← Open Source
rasbt

LLM-workshop-2024

A 4-hour coding workshop to understand how LLMs are implemented and used.

TutorialsML/AI fundamentalsJupyter Notebook
Open on GitHub
Momentum
+1stars in 24 hours+0.1%
1.12k
Stars
386
Forks
+1
This week
3
Contributors
Created 2024-06-25 · Updated 2026-10-15 · #5836 today
Top developers
rasbtonurkanbakirciyvonnefroehlich

rasbt/LLM-workshop-2024 is ranked 5,836 with 1,118 stars.

Same-category comparison

rasbt/LLM-workshop-2024 is ranked 5,836 among these 8 peers; LangChain-OpenTutorial/LangChain-OpenTutorial is ranked 5,838.

Same-category comparison
NameRankMetrics
tatsath/fin-ml5,757
Language:
Jupyter Notebook
Stars:
1,200
Forks:
492
Description:
This github repository of "Machine Learning and Data Science Blueprints for Finance". Please star.
srush/LLM-Training-Puzzles5,760
Language:
Jupyter Notebook
Stars:
1,198
Forks:
74
fcakyon/claude-codex-settings5,781
Language:
Python
Stars:
1,178
Forks:
111
Description:
Battle-tested Claude Code, OpenAI Codex, Cursor configs, plugins, hooks and agents with Kimi, MiniMax and GLM API support.
bishwaghimire/ai-learning-roadmaps5,832
Stars:
1,122
Forks:
126
LangChain-OpenTutorial/LangChain-OpenTutorial5,838
Language:
Jupyter Notebook
Stars:
1,117
Forks:
347
Description:
LangChain, LangGraph Open Tutorial for everyone.
Ma-Lab-Berkeley/deep-representation-learning-book5,849
Language:
TeX
Stars:
1,097
Forks:
118
Description:
Learning Deep Representations of Data Distributions.
KalyanKS-NLP/LLM-Interview-Questions-and-Answers-Hub5,861
Stars:
1,082
Forks:
174
Description:
100+ LLM interview questions with answers.
microsoft/lets-learn-mcp-python5,873
Language:
Python
Stars:
1,070
Forks:
198
Description:
MCP Python Tutorial.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageJupyter Notebook
CategoryTutorials
SubcategoryML/AI fundamentals
Stars1,118
Forks386
Contributors3
Created date2024-06-25
Updated date2026-10-15
Stars in 1 day1
Stars in 7 days1
Rank5,836
Previous rank5,989
Rank change153
7-day stars rank10,163
Previous 7-day stars rank13,066
7-day stars rank change2,903
Total stars rank10,237
Previous total stars rank10,228
Total stars rank change-9
CountryUSA
README summary

Pretraining and Finetuning LLMs from the Ground Up Overview This tutorial is aimed at coders interested in understanding the building blocks of large language models (LLMs), how LLMs work, and how to code them from the ground up in PyTorch. We will kick off this tutorial with an introduction to LLMs, recent milestones, and their use cases. Then, we will code a small GPT-like LLM, including its data input pipeline, core architecture components, and pretraining code ourselves. After understanding

how everything fits together and how to pretrain an LLM, we will learn how to load pretrained weights and finetune LLMs using open-source libraries. **The code material is based on my Build a Large Language Model From Scratch book and also uses the LitGPT library. ** Setup instructions A ready-to-go cloud environment, complete with all code examples and dependencies installed, is available here. This enables participants to run all code, particularly in the pretraining and finetuning sections, on

a GPU. In addition, see the instructions in the setup folder to set up your computer to run the code locally. | 01_intro | | 2 | Understanding LLM Input Data | In this section, we are coding the text input pipeline by implementing a text tokenizer and a custom PyTorch DataLoader for our LLM | 02_data | | 3 | Coding an LLM architecture | In this section, we will go over the individual building blocks of LLMs and assemble them in code. We will not cover

all modules in meticulous detail but will focus on the bigger picture and how to assemble them into a GPT-like model. | 03_architecture | | 4 | Pretraining LLMs | In part 4, we will cover the pretraining process of LLMs and implement the code to pretrain the model architecture we implemented previously. Since pretraining is expensive, we will only pretrain it on a small text sample available in the public domain so that the LLM is capable of generating some basic sentences

. | 04_pretraining | | 5 | Loading pretrained weights | Since pretraining is a long and expensive process, we will now load pretrained weights into our self-implemented architecture. Then, we will introduce the LitGPT open-source library, which provides more sophisticated (but still readable) code for training and finetuning LLMs. We will learn how to load weights of pretrained LLMs (Llama, Phi, Gemma, Mistral) in LitGPT. | 05_weightloading | | 6 | Finetuning LLMs | This section will introduce LLM finetuning techniques, and we will prepare a

small dataset for instruction finetuning, which we will then use to finetune an LLM in LitGPT. | 06_finetuning | (The code material is based on my Build a Large Language Model From Scratch book and also uses the LitGPT library.

Frequently asked questions

How many stars and forks are recorded?

rasbt/LLM-workshop-2024 has 1,118 stars and 386 forks.

What is the repository rank?

rasbt/LLM-workshop-2024 is ranked 5,836.

What language and category are recorded?

rasbt/LLM-workshop-2024 has 1,118 stars, uses Jupyter Notebook and belongs to Tutorials.

Which repository is closest in rank?

rasbt/LLM-workshop-2024 is compared with LangChain-OpenTutorial/LangChain-OpenTutorial, ranked 5,838 with 1,117 stars.

README

Pretraining and Finetuning LLMs from the Ground Up

Overview

This tutorial is aimed at coders interested in understanding the building blocks of large language models (LLMs), how LLMs work, and how to code them from the ground up in PyTorch. We will kick off this tutorial with an introduction to LLMs, recent milestones, and their use cases. Then, we will code a small GPT-like LLM, including its data input pipeline, core architecture components, and pretraining code ourselves. After understanding how everything fits together and how to pretrain an LLM, we will learn how to load pretrained weights and finetune LLMs using open-source libraries.

The code material is based on my Build a Large Language Model From Scratch book and also uses the LitGPT library.

Setup instructions

A ready-to-go cloud environment, complete with all code examples and dependencies installed, is available here. This enables participants to run all code, particularly in the pretraining and finetuning sections, on a GPU.

In addition, see the instructions in the setup folder to set up your computer to run the code locally.

Outline

Title Description Folder
1 Introduction to LLMs An introduction to the workshop introducing LLMs, the topics being covered in this workshop, and setup instructions. 01_intro
2 Understanding LLM Input Data In this section, we are coding the text input pipeline by implementing a text tokenizer and a custom PyTorch DataLoader for our LLM 02_data
3 Coding an LLM architecture In this section, we will go over the individual building blocks of LLMs and assemble them in code. We will not cover all modules in meticulous detail but will focus on the bigger picture and how to assemble them into a GPT-like model. 03_architecture
4 Pretraining LLMs In part 4, we will cover the pretraining process of LLMs and implement the code to pretrain the model architecture we implemented previously. Since pretraining is expensive, we will only pretrain it on a small text sample available in the public domain so that the LLM is capable of generating some basic sentences. 04_pretraining
5 Loading pretrained weights Since pretraining is a long and expensive process, we will now load pretrained weights into our self-implemented architecture. Then, we will introduce the LitGPT open-source library, which provides more sophisticated (but still readable) code for training and finetuning LLMs. We will learn how to load weights of pretrained LLMs (Llama, Phi, Gemma, Mistral) in LitGPT. 05_weightloading
6 Finetuning LLMs This section will introduce LLM finetuning techniques, and we will prepare a small dataset for instruction finetuning, which we will then use to finetune an LLM in LitGPT. 06_finetuning

(The code material is based on my Build a Large Language Model From Scratch book and also uses the LitGPT library.)

Nearby in the ranking
Similar items