A compact research codebase for post-training large language models with a focus on reasoning and reinforcement learning experiments.
- Implements reusable components for post-training workflows
- Evaluates reasoning capabilities on benchmarks like MATH-500
- Explores inference-time scaling and RL reward optimization
- Tracks progress on RLVR-GRPO experiments
- Correct: 32 / 50
- Accuracy: 64.0%
- Evaluation time: 7.8 minutes
- Avg response length: 303 tokens
- GRPO steps: 5, rollouts: 4, max length: 300 tokens
- Reward: sparse binary correctness
- Correct: 24 / 50
- Accuracy: 48.0%
- Evaluation time: 5.9 minutes
- Avg response length: 223 tokens
- GRPO steps: 50, rollouts: 8, max length: 300 tokens
- Reward: sparse binary correctness
- Correct: 30 / 50
- Accuracy: 60.0%
- Evaluation time: 3.9 minutes
- Avg response length: 219 tokens
- 5-step RLVR-GRPO underperformed the base model (64% → 48%).
- 50-step RLVR-GRPO recovered performance to 60%, still slightly below base.
- RL training shortened responses significantly (303 → ~220 tokens) and reduced latency.
- Sparse final-answer reward is a weak learning signal; more training and better rewards are needed.
- Supervised fine-tuning (SFT)
- Preference optimization (DPO / ORPO / SimPO)
- RL-based post-training
- Reasoning and inference-time scaling
- Evaluation and benchmark analysis
base_model/— custom model architecture and Qwen implementationdownloading_the_base_model/— model download pipelineevaluating_reasoning_models/— benchmark evaluation and metricsgenerating_text_with_pre_trained_llm/— text generation utilitiesimproving_reasoning_with_inference_time_scaling/— inference scaling experiments
- Download a model:
cd downloading_the_base_model python download_model.py - Load or inspect model architecture:
cd ../base_model python qwen.py - Generate predictions:
cd ../generating_text_with_pre_trained_llm python generate.py - Evaluate reasoning:
cd ../evaluating_reasoning_models python evaluating_reasoning_models.py - Test inference scaling:
cd ../improving_reasoning_with_inference_time_scaling python improving_reasoning_with_inference_time_scaling.py
Active research development. Contributions and experimentation are welcome.