qwen-math-higher-math

qwen-math-higher-math is a fine-tuned version of Qwen2.5-Math-1.5B-Instruct, specialized for university-level mathematics: calculus, linear algebra, ordinary differential equations, series, multivariable calculus, complex analysis, and probability.

The model produces step-by-step Chain-of-Thought solutions in English, uses LaTeX notation, and finishes with the final answer in \boxed{}.

Model details

Property Value
Base model Qwen/Qwen2.5-Math-1.5B-Instruct
Parameters 1.5B
Fine-tuning data 1,500 filtered examples from AI-MO/NuminaMath-CoT
Target domain University-level mathematics
Output format Step-by-step reasoning, LaTeX, final answer in \boxed{}
Inference mode Chain-of-Thought only; no tool use / Python / calculator
Quantized artifact GGUF Q4_K_M, approximately 0.92 GB
Runtime Ollama, CPU inference

Intended use

This model is intended for:

  • University-level math problem solving
  • Calculus: limits, derivatives, integrals, series
  • Linear algebra: matrices, determinants, eigenvalues
  • Ordinary differential equations
  • Multivariable calculus and vector calculus
  • Complex analysis
  • Probability and statistics
  • Generating step-by-step explanations with LaTeX

It is not intended as a general-purpose assistant, coding assistant, or tool-using agent.

Benchmarks

All results were obtained with greedy decoding (temperature = 0), one generation per problem (pass@1), and answer extraction from the final \boxed{} expression. The model was evaluated locally through Ollama using a Q4_K_M GGUF quantization.

Benchmark Baseline: Qwen2.5-Math-1.5B-Instruct qwen-math-higher-math Difference
Custom University Math-200 98.50% 99.50% +1.0%
MATH-500 74.60% 73.60% -1.0%
GSM8K-100 86.00% 82.00% -4.0%

Custom University Math-200

Custom University Math-200 is a held-out set of 200 university-level problems covering:

  • Limits and continuity
  • Derivatives
  • Integrals
  • Multivariable calculus
  • Vector calculus
  • Linear algebra
  • ODEs and PDEs
  • Series
  • Complex analysis
  • Probability and statistics

This is a custom evaluation set, not the official CollegeMath benchmark. The result should be interpreted as a domain-specific evaluation rather than a standardized public benchmark score.

MATH-500

MATH-500 is a 500-problem subset of the MATH benchmark. Answers are evaluated by exact match after extracting the final answer from \boxed{}.

GSM8K-100

GSM8K-100 is a 100-problem subset of GSM8K, used as a general mathematical reasoning sanity check.

Results interpretation

The fine-tuned model improved on the custom university-mathematics set by 1 percentage point, while showing a small decline on MATH-500 and GSM8K.

Because the baseline already scored 98.5% on the custom set, the available headroom was limited. The results suggest that the fine-tune specializes the model for higher mathematics, but does not improve general competition-level math performance.

The differences are small relative to the benchmark sizes, particularly for the 100-problem GSM8K subset. Larger evaluations and an error analysis are needed before drawing strong conclusions.

Usage

Ollama

ollama create qwen-math-higher-math -f Modelfile
ollama run qwen-math-higher-math

Example Modelfile:

FROM ./qwen-math-q4_k_m.gguf
PARAMETER temperature 0
PARAMETER num_ctx 4096
PARAMETER stop "<|im_end|>"

Python

from ollama import chat

response = chat(
    model="qwen-math-higher-math",
    messages=[
        {
            "role": "system",
            "content": (
                "Please reason step by step. "
                "Use LaTeX for mathematical expressions. "
                "Do not use Python, a calculator, or any external tools. "
                "Put your final answer inside \\boxed{}."
            )
        },
        {
            "role": "user",
            "content": "Find the derivative of f(x) = x^3 ln(x)."
        }
    ],
    options={
        "temperature": 0,
        "num_predict": 2048,
    },
)

print(response["message"]["content"])

Recommended prompt

Please reason step by step.
Use LaTeX for mathematical expressions.
Do not use Python, a calculator, or any external tools.
Put your final answer inside \boxed{}.

Problem:
{problem}

Example

Input:

Find the derivative of f(x) = x^3 ln(x).

Expected output format:

To find the derivative of f(x) = x^3 ln(x), we use the product rule.

f'(x) = 3x^2 ln(x) + x^3 * (1/x)
      = x^2(3 ln(x) + 1)

\boxed{x^2(3\ln(x)+1)}

Limitations

  • The model is specialized for university-level mathematics and may perform worse on general conversation, coding, and non-mathematical tasks.
  • It does not use external tools, calculators, or code execution.
  • Long Chain-of-Thought outputs may be truncated if the context or generation limit is too small.
  • The model may produce plausible but incorrect reasoning, especially on unfamiliar or highly complex problems.
  • Benchmark scores are sensitive to prompt format, decoding settings, answer extraction, and answer-equivalence checking.
  • The custom university-math benchmark has not yet been fully checked for overlap with the fine-tuning data.

Training data

The model was fine-tuned on 1,500 problems selected from AI-MO/NuminaMath-CoT.

The selected problems focus on:

  • Limits and continuity
  • Derivatives and differentiation rules
  • Definite, indefinite, improper, and multiple integrals
  • Series and convergence tests
  • First- and second-order ordinary differential equations
  • Matrices, determinants, and eigenvalues
  • Probability, Bayesโ€™ theorem, and combinatorics

The training data uses Chain-of-Thought solutions. No tool-integrated reasoning, Python execution, or calculator calls were used.

Evaluation methodology

  • Model: qwen-math-higher-math, Q4_K_M GGUF
  • Runtime: Ollama on CPU
  • Decoding: greedy, temperature = 0
  • Generation limit: 2,048 tokens
  • Evaluation: one generation per problem, pass@1
  • Answer extraction: last valid \boxed{} expression
  • Answer checking: mathematical equivalence via math-verify
  • Baseline: original Qwen/Qwen2.5-Math-1.5B-Instruct

Citation

If you use this model, please cite the underlying Qwen2.5-Math work and NuminaMath dataset:

@article{qwen2.5math,
  title={Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvement},
  author={Qwen Team},
  journal={arXiv preprint arXiv:2409.12122},
  year={2024}
}

@misc{numina,
  title={NuminaMath},
  author={AI-MO},
  howpublished={\url{[https://huggingface.co/datasets/AI-MO/NuminaMath-CoT](https://huggingface.co/datasets/AI-MO/NuminaMath-CoT)}},
  year={2024}
}
Downloads last month
17
GGUF
Model size
2B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath

Quantized
(39)
this model

Paper for U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath