Instructions to use abhyudayhari/tiny-aya-reason-vr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abhyudayhari/tiny-aya-reason-vr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abhyudayhari/tiny-aya-reason-vr") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abhyudayhari/tiny-aya-reason-vr") model = AutoModelForCausalLM.from_pretrained("abhyudayhari/tiny-aya-reason-vr", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abhyudayhari/tiny-aya-reason-vr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abhyudayhari/tiny-aya-reason-vr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhyudayhari/tiny-aya-reason-vr", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abhyudayhari/tiny-aya-reason-vr
- SGLang
How to use abhyudayhari/tiny-aya-reason-vr with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "abhyudayhari/tiny-aya-reason-vr" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhyudayhari/tiny-aya-reason-vr", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "abhyudayhari/tiny-aya-reason-vr" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhyudayhari/tiny-aya-reason-vr", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abhyudayhari/tiny-aya-reason-vr with Docker Model Runner:
docker model run hf.co/abhyudayhari/tiny-aya-reason-vr
tiny-aya-reason-vr
CohereLabs/tiny-aya-global post-trained with reinforcement learning from verifiable rewards (GRPO with the DAPO loss). The goal is better step-by-step reasoning on tasks whose answers can be checked automatically: maths, financial calculations, code and logic, in English and other languages.
This is the step-1000 checkpoint of the mixed-domain GRPO run, with the LoRA weights merged into the model.
Related repos:
- tiny-aya-reason-vr-lora: this model's LoRA adapter on its own.
- tiny-aya-reason-vr-math: the math-only first stage. It is the base the adapter loads onto, and the math-only baseline in the table below.
Results
All scores are accuracy (%). Generation used vLLM with the model's chat template, and every answer was checked automatically.
| Area | Benchmark | Base | Math-only GRPO | This model | ฮ vs base |
|---|---|---|---|---|---|
| Math | GSM8K | 72.55 | 77.48 | 78.24 | +5.69 |
| Math | MATH-500 | 28.20 | 29.00 | 33.40 | +5.20 |
| Math | SVAMP | 78.33 | 85.00 | 83.33 | +5.00 |
| Math | ASDiv | 82.69 | 84.22 | 85.14 | +2.45 |
| Math | GSM-Hard | 26.76 | 31.08 | 30.40 | +3.64 |
| Math | GSM-Plus | 55.95 | 62.71 | 64.24 | +8.29 |
| Math | Minerva Math | 10.29 | 11.76 | 12.13 | +1.84 |
| Math | OlympiadBench | 7.40 | 10.15 | 8.61 | +1.21 |
| Math | AMC 2023 (40 problems) | 2.50 | 17.50 | 10.00 | +7.50 |
| Math | AIME 2024 / 2025 | 0.00 | 0.00 | 0.00 | 0.00 |
| Multilingual math | MGSM (10 languages) | 58.44 | 66.76 | 66.44 | +8.00 |
| Multilingual math | GSM8K Indic (20 variants) | 31.38 | 34.91 | 35.62 | +4.24 |
| Finance | FinQA | 40.63 | 42.98 | 49.00 | +8.37 |
| Finance | IndicFin | 16.67 | 16.67 | 23.33 | +6.66 |
| Logic | BBH logic (8 tasks) | 48.30 | 57.80 | 57.95 | +9.65 |
| Logic | Knights & Knaves | 24.00 | 22.00 | 30.00 | +6.00 |
| Code | HumanEval | 56.10 | 57.93 | 57.32 | +1.22 |
| Code | MBPP | 54.09 | 53.31 | 56.81 | +2.72 |
Bold marks a score above the math-only GRPO model.
This model beats the base model on 17 of 19 benchmarks; the other two are AIME 2024 and 2025, where every model scores 0. It beats math-only GRPO on 11 of 19.
eval_results/has a summary and every model output for each benchmark, with the extracted answer and whether it was correct. Gzipped files end in.jsonl.gz.eval_results/comparison.csvis the table above.eval_results/breakdown.csvhas results per language, per task and per difficulty level.
Training
The model was trained in two GRPO stages, each with LoRA, merged after training.
Math-only stage (250 steps): GSM8K and MATH-style problems, starting from tiny-aya-global.
Mixed-domain stage (this checkpoint, step 1000), starting from the merged stage-1 model. The prompts came from:
- Maths: DeepScaleR, DAPO-17k
- Multilingual maths: GSM8K translations, mostly Hindi, plus French, German and Swahili
- Finance: IndicFin, FinQA, TAT-QA arithmetic
- Logic: Knights & Knaves, FLD
- Code: MBPP, TACO, KodCode
Before training, the stage-1 model sampled 8 answers per problem. Only learnable prompts were kept, meaning some but not all of the 8 answers were correct.
Rewards. All rewards are binary (1 for correct, 0 otherwise) and computed automatically:
- Maths: math-verify, comparing the last
\boxed{}answer with the reference. - Finance: numeric match within a tolerance. Percent and decimal forms count as the same answer, and the model can answer
INSUFFICIENTwhen the question doesn't give enough information. - Logic: every person's knight or knave status must be correct, or the answer must exactly match a label.
- Code: the code runs in a sandboxed Python process against stdin/stdout, assert, pytest or function-call tests.
Settings:
| Setting | Value |
|---|---|
| LoRA | r 64, alpha 128, all attention and MLP projections |
| Loss | DAPO, ฮฒ (KL) 0, clip ฮต 0.2 low / 0.28 high |
| Generations | 8 per prompt, temperature 1.0 |
| Max length | 2048 completion tokens, 1536 prompt tokens |
| Learning rate | 1e-5, linear decay |
| Hardware | 8 GPUs |
| Stack | AlignTune (TRL backend), colocated vLLM, CuratorKIT for data curation, AuditKIT for evaluation |
Mean training reward rose from 0.42 in the first 100 steps to about 0.50, and was flat after about step 700. The full training log and graphs are in training_graphs/.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("abhyudayhari/tiny-aya-reason-vr")
model = AutoModelForCausalLM.from_pretrained("abhyudayhari/tiny-aya-reason-vr", torch_dtype="bfloat16", device_map="auto")
msgs = [{"role": "user", "content": "A shop sells pens at โน12 each. Riya buys 7 pens and pays with โน100. How much change does she get?\n\nPlease reason step by step, and put your final answer within \\boxed{}."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=1024)[0][ids.shape[1]:], skip_special_tokens=True))
Prompt suffixes used in training:
- Maths, finance and logic: "Please reason step by step, and put your final answer within \boxed{}."
- Code: "Think step by step about the approach first. Then write the complete solution in Python in a single ```python code block."
Limitations and licence
- This is a small model. Competition maths (AIME, OlympiadBench) stays near zero, and AMC 2023 has only 40 problems, so its score is noisy.
- The licence is CC-BY-NC 4.0, inherited from tiny-aya-global. Use must also follow Cohere Labs' Acceptable Use Policy. The training data includes KodCode, which is also non-commercial.
- Downloads last month
- 24
