← 开源
rasbt

LLM-workshop-2024

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

TutorialsML/AI fundamentalsJupyter Notebook
在 GitHub 打开
增长势头
+124 小时新增 Star+0.1%
1.12k
Star
386
Fork
+1
本周
3
贡献者
创建于 2024-06-25 · 更新于 2026-10-15 · 今日第 5836 名
主要开发者
rasbtonurkanbakirciyvonnefroehlich

rasbt/LLM-workshop-2024 排名第 5,836,有 1,118 个星标。

同类别比较

rasbt/LLM-workshop-2024 排名第 5,836,此处有 8 个同类条目;LangChain-OpenTutorial/LangChain-OpenTutorial 排名第 5,838。

同类别比较
名称排名指标
tatsath/fin-ml5,757
语言:
Jupyter Notebook
星标数:
1,200
分叉数:
492
简介:
This github repository of "Machine Learning and Data Science Blueprints for Finance". Please star.
srush/LLM-Training-Puzzles5,760
语言:
Jupyter Notebook
星标数:
1,198
分叉数:
74
简介:
What would you do with 1000 H100s...
fcakyon/claude-codex-settings5,781
语言:
Python
星标数:
1,178
分叉数:
111
简介:
Battle-tested Claude Code, OpenAI Codex, Cursor configs, plugins, hooks and agents with Kimi, MiniMax and GLM API support.
bishwaghimire/ai-learning-roadmaps5,832
星标数:
1,122
分叉数:
126
LangChain-OpenTutorial/LangChain-OpenTutorial5,838
语言:
Jupyter Notebook
星标数:
1,117
分叉数:
347
简介:
LangChain, LangGraph Open Tutorial for everyone!
Ma-Lab-Berkeley/deep-representation-learning-book5,849
语言:
TeX
星标数:
1,097
分叉数:
118
简介:
Learning Deep Representations of Data Distributions
KalyanKS-NLP/LLM-Interview-Questions-and-Answers-Hub5,861
星标数:
1,082
分叉数:
174
简介:
100+ LLM interview questions with answers.
microsoft/lets-learn-mcp-python5,873
语言:
Python
星标数:
1,070
分叉数:
198
简介:
MCP Python Tutorial
关键参数与规格
关键参数与规格
参数值
语言Jupyter Notebook
类别Tutorials
子类别ML/AI fundamentals
星标数1,118
分叉数386
贡献者3
创建日期2024-06-25
更新日期2026-10-15
1 天星标数1
7 天星标数1
排名5,836
上次排名5,989
排名变化153
7 天星标排名10,163
上次 7 天星标排名13,066
7 天星标排名变化2,903
总星标排名10,237
上次总星标排名10,228
总星标排名变化-9
国家USA
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. | 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.

常见问题

记录了多少星标和分叉?

rasbt/LLM-workshop-2024 有 1,118 个星标和 386 个分叉。

仓库排名是多少?

rasbt/LLM-workshop-2024 排名第 5,836。

记录的语言和类别是什么?

rasbt/LLM-workshop-2024 有 1,118 个星标,语言为 Jupyter Notebook,类别为 Tutorials。

哪个仓库排名最接近?

rasbt/LLM-workshop-2024 与 LangChain-OpenTutorial/LangChain-OpenTutorial 比较,后者排名第 5,838,有 1,117 个星标。

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.)

排名相邻
同类项目