nano-aha-moment
nanoAhaMoment is a single-file, single-GPU, from-scratch implementation of an LLM reinforcement learning (RL) training library developed by McGill-NLP, implementing a DeepSeek R1-zero style training pipeline. It supports a single 80G GPU as well as multi-GPU training, covering 3B base models and 7B models, and uses full-parameter tuning. Its efficiency is competitive with verl, but its code is simpler. The project is inspired by TinyZero and Mini-R1 and is designed to be more concise, clear, and fast, with every line of code visible and easy to understand. The main files include the interactive Jupyter notebook with a tutorial, nano_r1.ipynb, the corresponding Python script, nano_r1_script.py, and a checkpoint comparison notebook. The goal is to provide researchers with an efficient and easy-to-understand RL for LLM training tool built from scratch.