Qwen2.5 Math 7B Instruct
Writes English and Chinese math solutions either as plain derivations or with Python-assisted steps. Qwen reports 83.6 on MATH for the 7B model with chain-of-thought, and 85.3 when an interpreter runs its Python.
Overview
Qwen2.5 Math 7B Instruct sits between the 1.5B and 72B instruction models in Qwen's Qwen2.5-Math release. It is fine-tuned from Qwen2.5-Math-7B, a base model initialized from Qwen2.5 and trained further on Qwen Math Corpus v2: over 1T tokens of math data, part of it synthesized by Qwen2-Math-72B-Instruct.
The system prompt picks the answering style. Chain-of-thought (CoT) gives a written derivation, while tool-integrated reasoning (TIR) interleaves that derivation with Python programs for precise calculation and symbolic manipulation. Qwen reports MATH scores of 83.6 with CoT and 85.3 with TIR, and says this model matches Qwen2-Math-72B-Instruct from the previous generation.
Choosing a variant: Qwen2.5 Math 1.5B Instruct is the smaller sibling, reported at 79.7 on MATH with TIR. The 7B model beats that number with written reasoning alone, which matters here because nothing runs the TIR code for you. Choose 7B when the boxed answer feeds an answer key or a grade.
What you can build
- Answer keys for a question bank, with a written derivation and a boxed result for each item.
- A math step inside an agent, where your own code executes the Python the model writes in TIR mode.
- Tutoring chats that keep session history, so a student can ask about step three of a long problem.
- Grading checks that flag submissions whose final answer differs from the model's.
Inputs
The required prompt field takes the problem, with formulas in LaTeX. Its default asks for x in 4x+5 = 6x+7. Put the CoT or TIR instruction in the system prompt, which defaults to a generic assistant message. Optional user_id and session_id values store chat history, so a follow-up can refer to an earlier answer.
Sampling controls cover temperature from 0 to 5 (0.7 by default), top_p at 0.95, top_k, repetition and length penalties, min and max token counts, semicolon-separated stop sequences and a seed preset to 123456. do_sample and quantization are checkboxes that start enabled.
Outputs
Text with LaTeX. The sample solves the default equation in four numbered steps, writing each intermediate equation in full (4x + 5 - 4x = 6x + 7 - 4x) before simplifying. It ends with a framed -1 from \boxed{}. With the TIR prompt, the text also contains the Python the model wants run.
Recommended settings
- For written solutions, use Qwen's CoT prompt: "Please reason step by step, and put your final answer within \boxed{}." The TIR prompt instead asks it to combine natural language reasoning with programs.
- Qwen reports scores for greedy decoding (do_sample off here) and for majority votes over 8 samples at temperature 0.7 and top_p 0.8.
- Quantization lowers weight precision, so for answer keys compare against a run with it off.
Limitations
- Qwen supports the series for English and Chinese math only and advises against other uses.
- Reported TIR scores assume an interpreter runs each program, and that part is yours to add.
- Qwen pre-trained the series with a 4K context length. Send one problem or a short set per request.
- Benchmark figures are Qwen's own, so verify boxed answers before publishing them.
Safety & compliance
Apache 2.0 is the license on Qwen's model card, and the stated use is solving English and Chinese math problems.
API quick start
Run Qwen2.5-Math-7B-Instruct with a single API call.
{
"prompt": "Find the value of $x$ that satisfies the …",
"user_id": "...",
"session_id": "...",
"system_prompt": "You are a helpful, respectful and honest …"
}curl -X POST "https://api.wiro.ai/v1/Run/qwen/qwen2-5-math-7b-instruct" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_WIRO_API_KEY" \
--data-binary @- <<'JSON'
{
"prompt": "Find the value of $x$ that satisfies the …",
"user_id": "...",
"session_id": "...",
"system_prompt": "You are a helpful, respectful and honest …"
}
JSONOther models you might like
Explore similar llm & chat models.



