SAVRN
Search Contact SAVRN

Open-weight model · Text generation

math-slm-qwen2.5-0.5b-v4

by Mandavi Singh singhmandavi/math-slm-qwen2.5-0.5b-v4

A domain-specific small language model for step-by-step math problem solving, built by team03 (SLM Learners) for the Pramana SLM++ Bootcamp Round 2 submission.

Parameters494M
Context32,768
Weights988.1 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads

Runs On

What it takes to serve math-slm-qwen2.5-0.5b-v4 (494M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 1.0 GB 1.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.5 GB 0.6 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.2 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Mandavi Singh, published under apache-2.0, revision 6ed87bac845b.

A domain-specific small language model for step-by-step math problem solving, built by team03 (SLM Learners) for the Pramana SLM++ Bootcamp Round 2 submission. For an OpenAI-compatible endpoint, serve with servehf.py (stdlib + transformers only, no Ollama needed). Precision note: training ran in bf16 compute (QLoRA 4-bit NF4 base), but the merged checkpoint uploaded here is float16 (the merge step reloads the base in fp16). - Public Hugging Face datasets pulled via pulldata.py; licenses verified through the HF API on 2026-09-05 and recorded in datamanifest.md. - Held-out eval set built with buildheldouteval.py from raw ExamBench rows never used in training, with a final overlap check that…

Read Mandavi Singh's full model card

team03 Math SLM — v4 (GATE + General Mathematics)

A domain-specific small language model for step-by-step math problem solving, built by team03 (SLM Learners) for the Pramana SLM++ Bootcamp Round 2 submission.

  • Base: Qwen2.5-0.5B-Instruct (494M params, fine-tuned — not from scratch)
  • Method: QLoRA (r=16, 4-bit NF4 base, bf16 compute), merged into the base weights
  • Domain: GATE-style + general mathematics
  • Intended users: GATE / competitive-exam aspirants and math students
  • Use case: free-form math QA — direct answers for simple prompts, chain-of-thought + "Final answer:" for complex ones

How to use

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "singhmandavi/math-slm-qwen2.5-0.5b-v4", torch_dtype=torch.float16)
tok = AutoTokenizer.from_pretrained("singhmandavi/math-slm-qwen2.5-0.5b-v4")

msgs = [{"role": "user", "content": "What is 17 * 23? Solve step by step."}]
text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
enc = tok(text, return_tensors="pt")
out = model.generate(**enc, max_new_tokens=1024, temperature=0,
                     pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))

For an OpenAI-compatible endpoint, serve with serve_hf.py (stdlib + transformers only, no Ollama needed).

Training details

Item Value
Corpus train_all.jsonl — 29,853 rows (14,308 direct + 15,545 CoT)
Effective train / val 23,532 / 471 (after --drop-overlong, 5,850 CoT rows ≥2048 tokens dropped)
Sources ExamBench (169Pi/exambench, Apache-2.0, commit b5f3d8b) + MathNet IMO split (CC-BY-4.0)
Optimizer AdamW (betas 0.9/0.999, eps 1e-8, wd 0.01)
LR 1.5e-4, cosine decay, ~132 warmup steps (3% of total)
Effective batch 16 (2 micro-batch × 8 grad-accum)
Epochs / steps 3 / 4,410 logged (theoretical total 4,413 = 1,471/epoch × 3; last multiple of 5 logged)
Max seq len 2,048
LoRA r=16, alpha=32, dropout 0.05, all proj targets (q/k/v/o/gate/up/down); 8.8M trainable params (1.75%)
Hardware 1× NVIDIA H100 80GB, ~1.84 GPU-hours
Seed 7
Tokens seen 53,356,887 (last logged, step 4,410)

Precision note: training ran in bf16 compute (QLoRA 4-bit NF4 base), but the merged checkpoint uploaded here is float16 (the merge step reloads the base in fp16).

Data provenance & decontamination

  • Public Hugging Face datasets pulled via pull_data.py; licenses verified through the HF API on 2026-09-05 and recorded in data_manifest.md.
  • Decontamination: 13-gram word overlap (GPT-3/Chinchilla style) + MinHash-LSH Jaccard (threshold 0.5) against held-out eval sets — 0 exact matches / 0 8-gram hits vs the held-out set, and 0 overlap vs IMO 2025.
  • Held-out eval set built with build_heldout_eval.py from raw ExamBench rows never used in training, with a final overlap check that fails loudly on any contamination.
  • Caveat (documented, not hidden): the GATE-PYQ-specific contamination check was blocked (IIT-KGP site down at the time) and never re-run; and a byte-for-byte SHA-256 cross-check between the Kaggle-side and Studio-side corpus copies was not performed — only the row count (29,853) is confirmed to match.

Evaluation results

Level 1 — training health (results_level1_v4.json)

Check Result
Numerical stability PASS
Undertraining PASS (loss reduction 19.7%)
Overfitting OK (final gap 0.14, stable)
Gradient explosion OK
Convergence FAIL (marginal — loss trend ticks up in the final 10% of steps; consistent with cosine-decay/batch noise rather than real instability, since all other checks are healthy)

Level 2 — general capability / instruction following (results_level2_v4.json)

  • Instruction-following score I = 8/33 (24.24%).
  • Main failure mode: the model prepends a "here is the thinking process..." CoT preamble even under strict format constraints (one-word, JSON-only, exact word counts), despite usually getting the underlying answer right. This is inherited from the CoT-heavy training mix and is the main quality gap.

Level 3 — not run for this model. It requires the model served over HTTP (serve_hf.py + evaluate.py --level 3 --base-url …). The eval set it consumes (eval/heldout_eval.jsonl, 282 KB, SHA-256 d2ac7ef3…) is in place and the harness is functional — Level 2 ran end-to-end against the same server — so Level 3 can still be run post-hoc against this checkpoint without retraining.

Limitations

  • Weak instruction-following under strict output-format constraints (see Level 2 above).
  • Convergence check fails marginally (noisy end-of-run loss slope); training itself was otherwise healthy.
  • Verbose-CoT bias — mitigated but not eliminated by including 48% direct-format rows.
  • Trained at 2,048 tokens context; longer problems are truncated rather than handled.

Reproducibility

  • Training log: runs/math_slm_v4/training_log.jsonl (official L1 schema: step, train_loss, val_loss, lr, grad_norm, tokens_seen)
  • Training events: runs/math_slm_v4/training_events.jsonl
  • Checkpoints: best (by val loss) + merged final; run completed cleanly (checkpoint timestamps match the log's final timestamp, 2026-09-17 18:28)
  • Exact dependency list: dependency_versions.txt (211 packages, pip freeze from the GPU node)
  • Corpus hash (SHA-256): eb4fecba0468286afe3e4960c8680c45f87e46d414941d0614dfe2f5ad518be5

License

Base model Qwen2.5-0.5B-Instruct is Apache-2.0. Training data: ExamBench (Apache-2.0) and MathNet (CC-BY-4.0, attribution required).

Configuration

Architecture
Qwen2ForCausalLM
Context length (tokens)
32,768
Layers
24
Hidden size
896
Feed-forward size
4,864
Attention heads
14
Key/value heads
2
Vocabulary size
151,936
Model type
qwen2

Identity and Version

Repository
singhmandavi/math-slm-qwen2.5-0.5b-v4
Publisher
Mandavi Singh
Task
Text generation
Modality
Text
Library
Not stated by the source
Parameters
494M parameters
Languages
en
Revision
6ed87bac845bdf798e2927f0abb2f9cb79d2d4c7
First published
2026-09-18
Last updated
2026-09-18

Files and Weights

13 files, 999.8 MB in total. The weights are 1 file totalling 988.1 MB in safetensors.

Weights1 file · 988.1 MB
Configuration4 files · 8.3 KB
Tokenizer2 files · 11.4 MB
Documentation1 file · 5.9 KB
Other4 files · 251.3 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights988.1 MB 0445252dfa61
config.jsonConfiguration1.3 KB
eval/results_level1_v4.jsonConfiguration773 B
eval/results_level2_v4.jsonConfiguration6.0 KB
generation_config.jsonConfiguration242 B
README.mdDocumentation5.9 KB
chat_template.jinjaOther2.5 KB
logs/training_events.jsonlOther24.7 KB
logs/training_log.jsonlOther220.1 KB
reproducibility/dependency_versions.txtOther4.0 KB
.gitattributesRepository1.6 KB
tokenizer.jsonTokenizer11.4 MB 3fd169731d2c
tokenizer_config.jsonTokenizer694 B

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
988.1 MB
Download from Mandavi Singh

Released by Mandavi Singh through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published988.1 MB
16-bit1.0 GB
8-bit0.5 GB
4-bit0.2 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About math-slm-qwen2.5-0.5b-v4

How much GPU memory does math-slm-qwen2.5-0.5b-v4 need?

About 1.2 GB at 16-bit and 0.3 GB at 4-bit: the weights (494M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run math-slm-qwen2.5-0.5b-v4 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use math-slm-qwen2.5-0.5b-v4 commercially?

Yes. math-slm-qwen2.5-0.5b-v4 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is math-slm-qwen2.5-0.5b-v4's context length?

32,768 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text generation

Qwen2.5-0.5B-Instruct

Qwen

Qwen2.5 is the latest series of Qwen large language models. For Qwen2.5, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters. Qwen2.5 brings the following improvements upon Qwen2: - Significantly more knowledge and has greatly improved capabilities in coding and mathematics, thanks to our specialized expert models in these domains. - Significant improvements in instruction following, generating long texts (over 8K tokens), understanding structured data (e.g, tables), and generating structured outputs especially JSON. More resilient to the diversity of system prompts, enhancing role-play implementation and…

Open weights apache-2.0 494M parameters 32,768 tokens transformers

Model · Text generation

Qwen2.5-0.5B

Qwen

Qwen2.5 is the latest series of Qwen large language models. For Qwen2.5, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters. Qwen2.5 brings the following improvements upon Qwen2: - Significantly more knowledge and has greatly improved capabilities in coding and mathematics, thanks to our specialized expert models in these domains. - Significant improvements in instruction following, generating long texts (over 8K tokens), understanding structured data (e.g, tables), and generating structured outputs especially JSON. More resilient to the diversity of system prompts, enhancing role-play implementation and…

Open weights apache-2.0 494M parameters 32,768 tokens transformers

Model · Text generation

Qwen2-0.5B

Qwen

Qwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the 0.5B Qwen2 base language model. Compared with the state-of-the-art opensource language models, including the previous released Qwen1.5, Qwen2 has generally surpassed most opensource models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, reasoning, etc. For more details, please refer to our blog…

Open weights apache-2.0 494M parameters 131,072 tokens transformers

Model · Text generation

DeepReasoning_1R

Convergent Intelligence

Part of the Standalone Models by Convergent Intelligence LLC: Research Division DistilQwen Collection — Our only BF16 series. Proof-weighted distillation from Qwen3-30B-A3B → 1.7B and 0.6B on H100. Three teacher variants (Instruct, Thinking, Coder), nine models, 2,788 combined downloads. The rest of the portfolio proves structure beats scale on CPU. This collection shows what happens when you give the methodology real hardware. This model is part of the Convergent Intelligence LLC: Research Division portfolio. All models in this portfolio are developed under the Discrepancy Calculus (DISC) framework — a measure-theoretic approach to understanding and controlling the gap between what a model…

Open weights 494M parameters 32,768 tokens transformers

Model · Text generation

Qwen3-0.6B-Base

Qwen

Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models. Building upon extensive advancements in training data, model architecture, and optimization techniques, Qwen3 delivers the following key improvements over the previously released Qwen2.5: Qwen3-0.6B-Base has the following features: For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our blog, GitHub, and Documentation. The code of Qwen3 has been in the latest Hugging Face transformers and we advise you to use the latest version of transformers. With transformers<4.51.0, you will…

Open weights apache-2.0 596M parameters 32,768 tokens transformers

Model · Text generation

Symbiotic-1B

Convergent Intelligence

Purpose: Lightweight, memory-augmented reasoning model for CPU and embedded inference SymbioticLM-1B is the compact version of the SymbioticAI architecture. It fuses Qwen’s rotary transformer design with a symbolic processing pipeline and a persistent episodic memory. Though smaller in parameter count, it retains the full cognitive engine: symbolic memory, dynamic thought evolution, and entropy-gated control. This model is ideal for symbolic reasoning in constrained environments — like research agents, lightweight assistants, and memory-efficient logical processing. - Procedural planning, math modeling, small-code generation - Less fluent in free-form language than larger variants…

Open weights afl-3.0 596M parameters 40,960 tokens transformers