Run this model with HF Jobs

Run 96kevinli29/Qwen3-4B-MathThink-Distill on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/96kevinli29/Qwen3-4B-MathThink-Distill. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/96kevinli29/Qwen3-4B-MathThink-Distill on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/96kevinli29/Qwen3-4B-MathThink-Distill. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/96kevinli29/Qwen3-4B-MathThink-Distill. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
96kevinli29's picture
Upload README.md with huggingface_hub
dce896e verified
|
Raw History Blame Contribute Delete
2.19 kB
---
license: apache-2.0
base_model: Qwen/Qwen3-4B-Base
library_name: transformers
pipeline_tag: text-generation
tags: [qwen3, math, reasoning, long-cot, thinking, sft, distillation]
language: [en]
---
# Qwen3-4B-MathThink-Distill
Four **Qwen3-4B-Base** models fine-tuned to solve math problems with long step-by-step reasoning, one per source of reasoning traces.
Each model thinks inside a `<think> … </think>` block and then writes a final answer with `\boxed{}`. Each folder is a complete model.
## Models and results
Accuracy in %: thinking mode, temperature 0.6, top-p 0.95, top-k 20, 16,384-token budget, strict answer matching
(a response cut off before the answer counts as wrong). AIME is avg@32, GPQA Diamond is avg@4.
| Folder | Source of reasoning traces | AIME 2025 | AIME 2026 | GPQA Diamond |
|---|---|---|---|---|
| `deepseek-r1` | DeepSeek-R1 (OpenR1-Math-220k) | 19.8 | 20.6 | 26.5 |
| `qwen3.8-27b` | Qwen3.8-27B | 8.0 | 7.8 | 24.5 |
| `gemma-4-26b-a4b` | Gemma 4 26B-A4B | 8.0 | 8.3 | 6.9 |
| `inkling-2-mini` | Inkling 2 Mini | 8.0 | 5.1 | 16.5 |
## Training
- Data: 5,314 verified-correct math traces per model.
- Full fine-tuning, 5 epochs (final checkpoint, step 830), batch size 32, learning rate 2e-5, sequence length up to 16k.
- Trainable weights were stored in bfloat16 during training, so many small updates were rounded away. Treat these models as a lower-precision training baseline.
- Prompt suffix: `Please reason step by step, and put your final answer within \boxed{}.`
- End-of-sequence token set to `<|im_end|>`.
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
repo, sub = "96kevinli29/Qwen3-4B-MathThink-Distill", "deepseek-r1"
tok = AutoTokenizer.from_pretrained(repo, subfolder=sub)
model = AutoModelForCausalLM.from_pretrained(repo, subfolder=sub, torch_dtype="bfloat16", device_map="auto")
```
For vLLM, download one folder and pass its local path.
## Limitations
Many responses to hard problems reach the token budget before answering, and some get stuck repeating themselves.
Math-only training; not tuned for chat safety or tool use. The traces come from third-party models; check their terms for your use.