Team Ai
Modelpublic

PhysicsWallahAI/Aryabhata-2.0

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
7likes171downloads
Model Card

Aryabhata 2

Aryabhata 2 is a reasoning-focused language model developed by PhysicsWallah for competitive STEM examinations (JEE, NEET). It is obtained by post-training GPT-OSS-20B via reinforcement learning on a curated curriculum of Physics, Chemistry, Mathematics, and General Reasoning questions — achieving strong accuracy at substantially lower inference cost than comparable models.


Model Summary

PropertyValue
Base modelopenai/gpt-oss-20b
Training methodReinforcement Learning (GRPO) + LoRA
Training dataCurated STEM questions (PhysicsWallah internal)
Training compute2× NVIDIA H100 NVL GPUs

Performance

In-Distribution Benchmarks (Pass@1, 4-sample mean %)

ModelJEE Adv. 2025NEET 2025JEE Main 2025JEE Main 2026**Avg.**
Gemini 2.5 Flash96.8190.0087.2696.2290.23
GPT-5 Mini93.6587.3387.0795.8389.71
Qwen3-30B-A3B (Thinking)90.4886.0084.8997.2688.55
GPT-OSS-120B84.1385.3385.6195.4288.28
Aryabhata 2 (ours)86.5184.6687.8092.9988.95
Nemotron 3 Nano 30B A3B90.8784.0082.8994.8486.51
GPT-OSS-20B77.3881.3379.2792.4683.00

Out-of-Distribution Benchmarks (Pass@1, 4-sample mean %)

ModelAIMEHMMTGPQAMMLU-ProMMLU-Redux 2.0**Avg.**
GPT-OSS-120B90.0080.0177.0690.1195.9489.50
Qwen3-30B-A3B (Thinking)84.5851.8873.3190.8097.7789.42
Gemini 2.5 Flash66.6159.1375.0990.4496.8589.13
GPT-5 Mini83.3370.9775.4689.6496.4088.85
Aryabhata 2 (ours)86.6778.9674.8688.4992.9287.64
GPT-OSS-20B86.6777.4270.5185.4293.3284.95
Nemotron 3 Nano 30B A3B77.0865.8665.3884.3394.1083.48

Token Efficiency (Acc./1K tokens)

Aryabhata 2 achieves the best accuracy-per-token ratio of all evaluated models, using up to 64% fewer output tokens than GPT-OSS-20B.

ModelIn-Dist. Pass@1In-Dist. Tokens**In-Dist. Acc./1K↑**OOD Pass@1OOD Tokens**OOD Acc./1K↑**
Aryabhata 2 (ours)88.952,10242.3187.642,21439.58
GPT-OSS-120B88.283,31226.6689.503,66124.44
Qwen3-30B-A3B (Thinking)88.554,55619.4489.424,29920.80
GPT-OSS-20B83.005,29315.6884.954,86017.48

Training Details

Data

The training corpus is derived from PhysicsWallah's internal question banks and processed through a multi-stage pipeline:

  • —Cleaning pipeline: HTML/image removal → LaTeX validation → LLM-based completeness check → domain filtering (~24% of data removed).
  • —Answer verification: Multi-pass sampling with GPT-OSS-120B as policy model and Qwen3-30B-A3B-Thinking as judge, covering 80% (1-sample), 8% (4-sample), and 4% (16-sample) of the dataset.

Methodology

Aryabhata 2 uses Group Relative Policy Optimization (GRPO) with LoRA adapters (rank 64, α=128), applied to attention projection and token embedding layers. Only 0.15% of parameters are trainable.

Reward function: R = R_accuracy × R_format, where accuracy uses a cascade of string, numeric, and symbolic matchers, and the format reward encourages well-structured, appropriately detailed responses.

Three-phase training:

PhaseStepsGroup SizeDataFocus
1 – Format Alignment3008~5K (trivial)Output format
2 – Prolonged RL (ProRL)~5,0008 → 16~80K (learnable)Reasoning accuracy
3 – Broadened RL (BroRL)~70064 → 128~15K (challenging)Exploration & generalization

LoRA Configuration

HyperparameterValue
Rank (r)64
Scaling factor (α)128
Dropout0
Target modulesqproj, kproj, vproj, oproj, embed_tokens
Total parameters20,959,661,632
Trainable parameters31,850,496 (0.15%)

Read more about Aryabhata 2.0 in our Technical Report


Usage

System Prompt
python
SYSTEM_PROMPT = """
The user will provide a problem. Solve the problem. Explain step by step and put the final answer inside \\boxed{}

# Instructions
- The solution you provide in the final channel should be complete. The user should be able to follow your output step by step in order to get to the final answer.
- In case of Multiple Choice Questions, provide the option identifier as the final answer. (Example: \\boxed{B})
- In case multiple options are correct, provide the correct option identifiers, separated by semicolon (;). (Example: \\boxed{A;C})
- Put any units in \\text{} within in \\boxed{}. (Example: \\boxed{9.8\\ \\text{m/s}^2})
- The final answer should be in a single \\boxed{}
""".strip()
Transformers
python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "PhysicsWallahAI/Aryabhata-2.0"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)


messages = [
    {"role": "system", "content": SYSTEM_PROMPT},
    {"role": "user",   "content": YOUR_QUERY},
]

input_ids = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

output = model.generate(
    input_ids,
    max_new_tokens=4096,
    temperature=1.0,
)

response = tokenizer.decode(
    output[0][input_ids.shape[-1]:],
)
print(response)

vLLM
python
from vllm import LLM, SamplingParams

model_id = "PhysicsWallahAI/Aryabhata-2.0"

llm = LLM(
    model=model_id,
    dtype="bfloat16",
    tensor_parallel_size=1,   # increase for multi-GPU
    max_model_len=16384,
)

sampling_params = SamplingParams(
    temperature=1.0,
    max_tokens=4096,
    skip_special_tokens=False,
)

messages = [
    {"role": "system", "content": SYSTEM_PROMPT},
    {"role": "user",   "content": YOUR_QUERY},
]

outputs = llm.chat([messages], sampling_params)
print(outputs[0].outputs[0].text)

Intended Use

Primary use cases:

  • —Competitive exam preparation (JEE Main, JEE Advanced, NEET)
  • —STEM tutoring and student doubt resolution at scale
  • —Multi-step symbolic and numerical reasoning

Citation

bibtex
@misc{aryabhata2,
  author       = {Rastogi, Ritvik and Singh, Vishal and Chaudhari, Tejas and Varma, Sandeep},
  title        = {Aryabhata 2},
  year         = {2025},
  publisher    = {PhysicsWallah},
  howpublished = {\url{https://huggingface.co/PhysicsWallahAI/Aryabhata-2.0}},
}

Contact

For questions, please contact ritvik.rastogi@pw.live (PhysicsWallah).