Instructions to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M # Run inference directly in the terminal: llama cli -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M # Run inference directly in the terminal: llama cli -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Use Docker
docker model run hf.co/U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
- Ollama
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with Ollama:
ollama run hf.co/U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
- Unsloth Desktop
- Pi
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with Docker Model Runner:
docker model run hf.co/U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
- Lemonade
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Run and chat with the model
lemonade run user.Qwen2.5-Math-1.5B-HigherMath-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen2.5-Math-1.5B-HigherMath
A GGUF (Q4_K_M) fine-tune of Qwen2.5-Math-1.5B-Instruct
that makes the model follow one output convention: step-by-step reasoning, LaTeX
for math, final answer inside \boxed{} — on university-style problems in
calculus, linear algebra, ODEs, series and probability.
TL;DR
- What it does: produces consistently formatted, step-by-step LaTeX solutions instead of free-form prose. Runs on CPU in ~0.9 GB.
- What the evidence shows: the reported accuracies (98.50% → 99.50%, n = 200, University Math-200) come from a single-run, non-paired evaluation. The 95% confidence intervals overlap, so the difference is not statistically established and is not claimed as a result.
- What it does not do: no tools, no Python, no calculator. Not a general assistant or a coding model, and not a benchmark-topping math model.
Quick start
# 1. Download the GGUF from this repo, then:
ollama create qwen-math-higher-math -f Modelfile
ollama run qwen-math-higher-math
Modelfile — the context and output limits matter more than they look:
FROM ./qwen-math-q4_k_m.gguf
PARAMETER temperature 0
PARAMETER num_ctx 8192 # 4096 truncates long chain-of-thought solutions
PARAMETER num_predict 4096 # higher-math solutions routinely exceed 2048 tokens
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|endoftext|>"
Always send the system prompt — without it the format discipline degrades:
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}
Python:
from ollama import chat
SYSTEM = (
"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{}."
)
resp = chat(
model="qwen-math-higher-math",
messages=[{"role": "system", "content": SYSTEM},
{"role": "user", "content": "Find the derivative of f(x) = x^3 ln(x)."}],
options={"temperature": 0, "num_predict": 4096, "num_ctx": 8192, "seed": 0},
)
print(resp["message"]["content"])
Parsing the answer: take the last \boxed{...} with balanced-brace matching,
then compare with math-verify —
string comparison alone marks correct answers wrong (1/2 vs \frac{1}{2}).
Intended use
Suitable for:
- university-level problem solving where a written derivation matters as much as the answer;
- limits, derivatives, single and multiple integrals, series and convergence tests;
- first- and second-order ODEs;
- matrices, determinants, eigenvalues;
- probability, Bayes' theorem, combinatorics;
- producing LaTeX derivations for notes, tutoring material, dataset generation.
Not suitable for: PDEs, measure theory, topology, complex analysis beyond the basics — the fine-tuning data does not cover them; general chat, coding, tool use; any setting where an unverified answer is acted upon without checking.
Model details
Training configuration (fine-tuning method, learning rate, schedule, epochs, hardware and wall time) was not recorded for this release. Only the final GGUF is published. Reproducing the exact fine-tune from this card is therefore not possible; it is listed as a known gap.
| Property | Value |
|---|---|
| Base model | Qwen/Qwen2.5-Math-1.5B-Instruct (Apache-2.0) |
| Parameters | 1.5B |
| Architecture | Qwen2, chat template included |
| Fine-tuning data | 1,500 filtered examples from AI-MO/NuminaMath-CoT (Apache-2.0) |
| Quantization shipped | GGUF Q4_K_M, 986 MB |
| Inference mode | chain-of-thought only; no tool use, Python or calculator |
| License | Apache-2.0 (inherited from base model and dataset) |
Evaluation
Decoding was greedy (temperature = 0), one generation per problem, pass@1; answers are extracted from the last \boxed{} and compared with math-verify. The two models were scored in separate, non-paired runs, and the exact run settings of each (in particular the quantization used for the baseline) are not documented in this release. The intervals below are Wilson intervals for each accuracy separately; no p-value for a difference can be computed, and none is reported.
Results
Single-run evaluation (separate runs, not paired — no p-value can be computed):
| Benchmark | n | Base correct | Fine-tune correct | Δ |
|---|---|---|---|---|
| University Math-200 | 200 | 197/200 (98.50%, 95% CI 95.68%–99.49%) | 199/200 (99.50%, 95% CI 97.22%–99.91%) | +1.00 p.p. |
| MATH-500 | 500 | 373/500 (74.60%, 95% CI 70.61%–78.22%) | 368/500 (73.60%, 95% CI 69.57%–77.27%) | -1.00 p.p. |
| GSM8K-100 | 100 | 86/100 (86.00%, 95% CI 77.86%–91.47%) | 82/100 (82.00%, 95% CI 73.33%–88.30%) | -4.00 p.p. |
Why the single-run numbers cannot be used as a result: the two models were scored in separate runs without a paired design, so the reported difference mixes model behaviour with run-to-run variation and has no confidence interval or p-value attached. With n of this size, differences of a few percentage points are well inside noise — note that the 95% intervals above overlap. No accuracy advantage is claimed for this fine-tune.
Format compliance
Format compliance is not measured in this release. The fine-tune targets this property, so it is the first thing a future evaluation should quantify: count the share of generations from which a \boxed{} answer can be extracted, separately from answer correctness.
About University Math-200
This is a custom set of problems, written for this project. It is not the official CollegeMath benchmark and it is not difficulty-calibrated against a public standard. The base model already solves 98.50% of it, which means the set is near-saturated: it works as a regression and format-discipline check, and it cannot demonstrate a specialization. A harder, externally sourced evaluation is the next step and is not in this release.
Topic composition: not documented in this release.
Contamination check
Not measured in this release. The fine-tuning data and the evaluation sets come from the same external corpus (NuminaMath-CoT and its sources), so overlap is plausible and the numbers above should be read with that caveat.
Qualitative difference: base vs fine-tune
Not quantified in this release. The fine-tune's stated target is the output convention — step-by-step derivation, LaTeX throughout, final answer inside \boxed{} — and that is the property a follow-up evaluation should measure directly, separately from answer correctness.
Known failure modes
- Drops the box on hard problems. When the derivation is long, the model
sometimes finishes in prose (
"…therefore the answer is 8") with no\boxed{}. Treat a missing box as a signal to re-ask, not as a wrong answer. - Confidently wrong on unfamiliar topics. Outside the training distribution it produces fluent, structured derivations with an incorrect final answer.
- Arithmetic slips in long substitutions. Multi-step integration by parts and large matrix reductions occasionally lose a sign or a factor.
- Truncation. At
num_predict 2048, an unreported share of solutions are cut mid-derivation — usenum_predict 4096.
Performance
Not benchmarked in this release. Verified figure: size on disk, 986 MB (Q4_K_M). The model runs in Ollama on CPU.
Limitations
- 1,500 training examples shape format and style, not mathematical capability. Gains in correctness at this data scale are not expected, and none have been demonstrated by the evaluation above.
- Specialized: general conversation, coding and tool use degrade.
- No tool use / code execution — arithmetic errors are possible and not self-corrected.
- Long chain-of-thought needs
num_ctx ≥ 8192; smaller contexts truncate solutions. - The fine-tune was evaluated in Q4_K_M; the baseline's quantization is not documented, and bf16 results are not reported. Quantization affects a 1.5B model more than a 7B+ one, so these figures may differ by a few points from a bf16 run.
- The base model is designed for tool-integrated reasoning (TIR) with Python.
Removing tool use lowers MATH-style scores by design, so these numbers are not
comparable to published TIR results for
Qwen2.5-Math-1.5B-Instruct. - Evaluation is
pass@1only;maj@k/ self-consistency is not reported. - Not a substitute for checking the answer. The model produces plausible but wrong reasoning on unfamiliar problems.
Training data
1,500 problems selected from AI-MO/NuminaMath-CoT,
filtered toward:
- limits and continuity, differentiation rules;
- definite, indefinite, improper and multiple integrals;
- series and convergence tests;
- first- and second-order ODEs;
- matrices, determinants, eigenvalues;
- probability, Bayes' theorem, combinatorics.
Chain-of-thought solutions only; no tool-integrated reasoning (no Python calls, no calculator traces) in the training data.
Reproduction
| Property | Value |
|---|---|
| Quantization | GGUF Q4_K_M |
| Model size on disk | 986 MB |
| Runtime | Ollama on CPU |
| GGUF SHA256 | not published |
| llama.cpp commit | not recorded |
| Ollama version | not recorded |
| Evaluation date | not recorded |
Citation
The underlying model and 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}},
year = {2024}
}
This fine-tune:
@misc{U-Ug1kn_highermath_2026,
title = {Qwen2.5-Math-1.5B-HigherMath: a format-specialized GGUF fine-tune},
author = {U-Ug1kn},
year = {2026},
note = {Fine-tune of Qwen2.5-Math-1.5B-Instruct on 1,500 NuminaMath-CoT examples},
url = {https://huggingface.co/U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath}
}
Changelog
- 2026-11-09 — card rewritten: evaluation now reported with confidence intervals and explicitly labelled as single-run (no paired test is claimed); contamination status and training provenance are stated as not recorded rather than omitted.
- Downloads last month
- 27
4-bit
Model tree for U-Ug1kn/Qwen2.5-Math-1.5B-HigherMath
Base model
Qwen/Qwen2.5-1.5B