#157 · Primary category: Deep Learning Frameworks
GRPO-Zero
Implementing DeepSeek R1's GRPO algorithm from scratch
Project last updated:04/18/25
GitHub Stars
1.9K
Forks
99
Contributors
1
License
Apache-2.0
Why we included this project
GRPO-Zero implements DeepSeek's GRPO reinforcement-learning algorithm from scratch, built on just PyTorch and the tokenizers library. Skipping the transformers and vLLM dependencies that most RL training stacks assume keeps the code compact enough to follow the group sampling, advantage normalization, and per-token policy gradient updates in a few hundred lines. The repo also has practical memory tricks: CPU optimizer offloading lets a 24GB RTX 4090 handle training, and the default config targets a single A40. It folds in DAPO-style improvements like token-level loss weighting and optional KL removal, so researchers and engineers experimenting with RL fine-tuning of small models have a useful starting point for reproducing CountDown-style reasoning tasks or adapting the loop to their own reward functions.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
tensorflow
An Open Source Machine Learning Framework for Everyone
pytorch
Tensors and Dynamic neural networks in Python with strong GPU acceleration
keras
Deep Learning for humans
nanoGPT
The simplest, fastest repository for training/finetuning medium-sized GPTs.
ray
Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.