Aryabhata 2
Aryabhata 1 showed that a compact 7B model can excel at JEE Math with merging, curriculum SFT, and RLVR. Real student doubt traffic at PhysicsWallah spans Physics, Chemistry, Mathematics, and general reasoning across JEE Main, JEE Advanced, and NEET: millions of queries where both correctness and inference cost matter.
Aryabhata 2 scales that recipe. It is an open-source, unified RL-only post-training pipeline on GPT-OSS-20B (20B MoE, 3.6B active parameters) with LoRA, rigorous data verification, and three-phase reinforcement learning inspired by prolonged RL (ProRL) and broadened exploration (BroRL).
The deployment gap
Competitive exam problems require multi-step symbolic manipulation, precise numerics, and deep conceptual links across subjects. Frontier models score well on internet benchmarks, but at classroom scale they are often too large, too slow, or too verbose for production doubt-solving.
Aryabhata 2 targets domain-specific STEM reasoning under 2x NVIDIA H100 NVL, optimizing not only pass@1 accuracy but accuracy per 1K output tokens, a metric that reflects real tutoring economics.
Data: from 1.78M questions to a 100K curriculum
Training data comes from PhysicsWallah's internal banks across Physics, Chemistry, Mathematics, and General Reasoning, aligned with JEE and NEET syllabi.
Rendering diagram…
Cleaning pipeline
Roughly 24% of raw data is removed through deterministic filters:
- Questions with
<img>tags are dropped (text-only model). - Every question is compiled with
pdflatex; malformed math is discarded. - Qwen3-30B-A3B-Thinking classifies and removes ill-posed prompts.
- Non-STEM items are filtered out.
Answer verification
Incorrect answer keys poison RL. We verify keys using GPT-OSS-120B as the policy model (CoT solutions, temperature 1.0) and Qwen3-30B-A3B-Thinking as the judge (binary match to ground truth).
Multi-pass sampling escalates cost only where needed:
| Stage | Samples | Coverage gained |
|---|---|---|
| Single-sample | 1 | ~80% |
| Four-sample | 4 | +8% |
| Sixteen-sample | 16 | +4% |
A mid-2024 knowledge cutoff and decontamination against all evaluation suites reduce benchmark leakage.
Subject counts after preprocessing
| Subject | Raw | After cleaning | After verification | Final curriculum |
|---|---|---|---|---|
| Physics | 471K | 342K | 314K | 30K |
| Chemistry | 527K | 375K | 345K | 30K |
| Mathematics | 534K | 419K | 385K | 30K |
| General reasoning | 247K | 230K | 210K | 10K |
| Total | 1.78M | 1.36M | 1.25M | 100K |
Difficulty-aware curriculum
For each verified question we sample four completions at temperature 1.0 and label difficulty:
- Trivial: 4/4 correct (excluded from hard RL; small set kept for format alignment)
- Learnable: 1 to 3/4 correct (main ProRL phase)
- Challenging: 0/4 correct (BroRL phase)
Chemistry is upsampled in the curriculum because the base model underperformed there early in training.
Reinforcement learning on GPT-OSS-20B
We adapt only 0.15% of parameters via LoRA (rank 64, α 128) on attention projections and embed_tokens: 31.8M trainable of ~21B total.
GRPO with practical modifications
The base algorithm is Group Relative Policy Optimization (GRPO) with on-policy rollouts. We made several engineering choices to fit our hardware budget:
- No reference model, because holding dual 20B policies exceeded memory on 2x H100. Training is KL-free.
- DAPO-style clipped objective with asymmetric upper clip on policy ratios.
- Advantages are computed as reward minus group mean, without variance normalization.
- Completions hitting max length are masked during optimization (truncation masking).
Reward design
The final reward is multiplicative:
R = R_accuracy × R_format
Rendering diagram…
The accuracy component uses an ordered matcher cascade: case-insensitive string, numeric tolerance, symbolic equivalence (math-verify), then MCQ label matching with partial credit (0.5 when option text matches but label does not). R_accuracy ∈ {0, 0.5, 1}.
The format component encourages student-useful answers: sufficient final-answer length (S_len) and a balanced reasoning-to-solution character ratio (S_ratio), penalizing one-line dumps and runaway chain-of-thought.
Three training phases
Rendering diagram…
| Phase | Steps | Group size | Batch | Difficulty | Goal |
|---|---|---|---|---|---|
| 1: Format alignment | 300 | 8 | 128 | Trivial + format mix | Stable answer structure |
| 2: Prolonged RL | ~5,000 | 8 → 16 | 128 → 256 | Learnable | Sustained capability gains; EMA checkpoint merging on plateaus |
| 3: Broadened RL | ~700 | 64 → 128 | 512 → 1024 | Challenging | Explore alternative solution strategies |
Adaptive curriculum within Phase 2 increases difficulty when mean accuracy reward exceeds 0.7 for ~20 consecutive steps.
Evaluation
We report Pass@1 as the mean correctness over k = 4 stochastic samples per question (temperature > 0), and Acc./1K tokens = Pass@1 / (output tokens / 1000).
In-distribution exams (text-only)
| Model | JEE Adv. 2025 | NEET 2025 | JEE Main 2025 | JEE Main 2026 | Avg. |
|---|---|---|---|---|---|
| GPT-OSS-20B (base) | 77.38 | 81.33 | 79.27 | 92.46 | 83.00 |
| GPT-OSS-120B | 84.13 | 85.33 | 85.61 | 95.42 | 88.28 |
| Qwen3-30B-A3B (Thinking) | 90.48 | 86.00 | 84.89 | 97.26 | 88.55 |
| Gemini 2.5 Flash | 96.81 | 90.00 | 87.26 | 96.22 | 90.23 |
| Aryabhata 2 | 86.51 | 84.66 | 87.80 | 92.99 | 88.95 |
Aryabhata 2 is the strongest open-weight model in our aggregate in-distribution comparison, beating GPT-OSS-120B and matching or exceeding other 20B-30B open baselines on several papers.
Versus GPT-OSS-20B, Aryabhata 2 cuts output tokens by ~52-64% on in-distribution exams while improving accuracy. Aggregate Acc./1K tokens: 42.31 vs 15.68 for the base (see paper Appendix Table 9).
Out-of-distribution reasoning
| Model | AIME | HMMT | GPQA | MMLU-Pro | MMLU-Redux 2.0 | Avg. |
|---|---|---|---|---|---|---|
| GPT-OSS-20B | 86.67 | 77.42 | 70.51 | 85.42 | 93.32 | 84.95 |
| Aryabhata 2 | 86.67 | 78.96 | 74.86 | 88.49 | 92.92 | 87.64 |
| GPT-OSS-120B | 90.00 | 80.01 | 77.06 | 90.11 | 95.94 | 89.50 |
| Gemini 2.5 Flash | 66.61 | 59.13 | 75.09 | 90.44 | 96.85 | 89.13 |
OOD Acc./1K tokens: 39.58 (Aryabhata 2) vs 17.48 (GPT-OSS-20B), a ~2.3x improvement in deployment efficiency while closing much of the accuracy gap to larger baselines. On HMMT specifically, Aryabhata 2 scores +27.08 over Qwen3-30B-Thinking, which suggests stronger robustness on harder Olympiad-style sets.
Release
Aryabhata 2 is open source and released under Apache 2.0. Weights and usage examples are on Hugging Face (PhysicsWallahAI/Aryabhata-2.0). Full methodology is in our technical report.
Lineage and takeaway
| Aryabhata 1 | Aryabhata 2 | |
|---|---|---|
| Base | Merged 7B (Qwen family) | GPT-OSS-20B MoE |
| Domains | JEE Math | Physics, Chem, Math, reasoning |
| Post-training | SFT + RLVR (A2C) | RL-only (GRPO), 3 phases |
| Compute story | 2x H100, LoRA | 2x H100 NVL, LoRA |
| Open release | Aryabhata-1.0 | Aryabhata-2.0 |
Targeted RL on verified, exam-aligned curricula is an effective way to scale practical STEM tutors. Aryabhata 2 improves over its base on every in-distribution exam we measure, generalizes on broad reasoning benchmarks, and does so with far shorter generations.
For the math-only predecessor, see the Aryabhata 1 project log.