← Projects
[ Project log ]

Aryabhata 2

Open source · GPT-OSS 20BD-01 · Reasoning Models
·Paper·Model

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:

StageSamplesCoverage gained
Single-sample1~80%
Four-sample4+8%
Sixteen-sample16+4%

A mid-2024 knowledge cutoff and decontamination against all evaluation suites reduce benchmark leakage.

Subject counts after preprocessing

SubjectRawAfter cleaningAfter verificationFinal curriculum
Physics471K342K314K30K
Chemistry527K375K345K30K
Mathematics534K419K385K30K
General reasoning247K230K210K10K
Total1.78M1.36M1.25M100K

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…

PhaseStepsGroup sizeBatchDifficultyGoal
1: Format alignment3008128Trivial + format mixStable answer structure
2: Prolonged RL~5,0008 → 16128 → 256LearnableSustained capability gains; EMA checkpoint merging on plateaus
3: Broadened RL~70064 → 128512 → 1024ChallengingExplore 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)

ModelJEE Adv. 2025NEET 2025JEE Main 2025JEE Main 2026Avg.
GPT-OSS-20B (base)77.3881.3379.2792.4683.00
GPT-OSS-120B84.1385.3385.6195.4288.28
Qwen3-30B-A3B (Thinking)90.4886.0084.8997.2688.55
Gemini 2.5 Flash96.8190.0087.2696.2290.23
Aryabhata 286.5184.6687.8092.9988.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

ModelAIMEHMMTGPQAMMLU-ProMMLU-Redux 2.0Avg.
GPT-OSS-20B86.6777.4270.5185.4293.3284.95
Aryabhata 286.6778.9674.8688.4992.9287.64
GPT-OSS-120B90.0080.0177.0690.1195.9489.50
Gemini 2.5 Flash66.6159.1375.0990.4496.8589.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 1Aryabhata 2
BaseMerged 7B (Qwen family)GPT-OSS-20B MoE
DomainsJEE MathPhysics, Chem, Math, reasoning
Post-trainingSFT + RLVR (A2C)RL-only (GRPO), 3 phases
Compute story2x H100, LoRA2x H100 NVL, LoRA
Open releaseAryabhata-1.0Aryabhata-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.