Implement popular LLM post-training algorithms (SFT, DFT, DPO, GRPO, etc.) in PyTorch with easy code!
Python
116
398 commits
updated Jun 11, 2026
[English | 中文]
Implement popular LLM post-training algorithms (SFT, DPO, PPO, GRPO, etc.) in PyTorch with clean, simple code!
以简洁代码,基于 PyTorch 实现主流大模型后训练算法!
Break free from complex frameworks and focus on the core logic of LLM post training algorithms.
摆脱繁杂框架束缚,专注于大模型后训练算法的核心逻辑。
conda create --name myenv python=3.10
pip install -r requirements.txt
You can get started quickly using the sample data in the data, including SFT data, DPO data, etc.
Taking SFT as an example:
cd sft/
bash train.sh
SFT-Series
DPO-Series
PPO-Series
398 commits
Python
97.9%
Shell
2.1%
Implement popular LLM post-training algorithms (SFT, DFT, DPO, GRPO, etc.) in PyTorch with easy code!
Python
116
398 commits
updated Jun 11, 2026
[English | 中文]
Implement popular LLM post-training algorithms (SFT, DPO, PPO, GRPO, etc.) in PyTorch with clean, simple code!
以简洁代码,基于 PyTorch 实现主流大模型后训练算法!
Break free from complex frameworks and focus on the core logic of LLM post training algorithms.
摆脱繁杂框架束缚,专注于大模型后训练算法的核心逻辑。
conda create --name myenv python=3.10
pip install -r requirements.txt
You can get started quickly using the sample data in the data, including SFT data, DPO data, etc.
Taking SFT as an example:
cd sft/
bash train.sh
SFT-Series
DPO-Series
PPO-Series
398 commits
Python
97.9%
Shell
2.1%