Views
No views yet
Qwen3-4B-Thinking-2507 for grade-school math word
problems. Trained on a 2,000-example filtered subset of OpenR1-Math-220k
on a single M1 Max 32GB Mac Studio using mlx-lm.#### <number> final
answer formatting and improves both accuracy and output efficiency on
GSM8K-style problems.| Model | Accuracy | Avg output tokens |
|---|---|---|
| Qwen3-4B-Thinking-2507 (base, 4-bit MLX) | 47.5% (95/200) | 878 |
| This model | 69.0% (138/200) | 775 |
| Delta | +21.5 pp | -104 tokens |
#### <number> convention, so a regex-based
extractor under-counts its true accuracy. Both models ran through the
exact same extraction pipeline, so the comparison is fair, but the base
number is lower than published GSM8K results for Qwen3-4B-Thinking
(~85%+ with format-aware extractors). Part of what this fine-tune does
well is enforce the answer format reliably.mlx-community/Qwen3-4B-Thinking-2507-4bitopen-r1/OpenR1-Math-220k,
filtered to 100-2000 tokens per (problem + solution)mlx-lmmlx-lm:1from mlx_lm import load, generate
2
3model, tokenizer = load("morganlinton/qwen3-4b-thinking-gsm8k-sft")
4prompt = tokenizer.apply_chat_template(
5 [{"role": "user", "content": "Janet has 5 apples. She gives 2 to her brother and buys 3 more. How many apples does Janet have now?"}],
6 tokenize=False,
7 add_generation_prompt=True,
8)
9print(generate(model, tokenizer, prompt=prompt, max_tokens=512, verbose=True))mlx-lm LoRA on filtered OpenR1-Math-220k. Full
script and hyperparameters above. Adapter-only weights are also
published at morganlinton/qwen3-4b-thinking-gsm8k-sft-lora for users
who want to apply the LoRA to a different quantization of the base.