qwen3 1.7b gsm8k sft
Qwen3-1.7B-GSM8K-SFT is an Apache-2.0 licensed, fine-tuned version of Qwen/Qwen3-1.7B optimized for mathematical reasoning. The model card reports fine-tuning on GSM8K and MetaMathQA GSM-related examples (247,467 examples) using chain-of-thought reasoning. Reported accuracy is 77.2% on the GSM8K test set and 55.2% on MATH-500, with a noted baseline GSM8K accuracy of about 20% for the original Qwen3-1.7B. The repository provides safetensors and GGUF formats, including q8_0 and f16 GGUF files. The model is intended for text generation and math reasoning tasks in English.
At a glance
- Parameters
- 1.72B
- Architecture
- qwen3
- Context length
- 40,960
- License
- apache-2.0
- Disk space
- 3.2 GB
- Software
- Ollama, Transformers
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareBest for
- Solving grade-school math word problems similar to GSM8K
- Generating chain-of-thought math reasoning
- Running local text-generation inference with GGUF-compatible runtimes such as llama.cpp or Ollama
- English-language mathematical question answering
- Practice or experimentation with fine-tuned small math reasoning models
Tradeoffs
- Fine-tuning focused on GSM8K-style problems may reduce MATH-500 performance relative to the base model
- Reported MATH-500 accuracy drops at higher difficulty levels, with 29.1% on Level 5
- Lower reported accuracy on geometry, precalculus, and intermediate algebra subjects
- Language coverage listed only as English
- No compatibility, performance, or numerical hardware requirements beyond the supplied model card should be assumed
Ways to run it
Ollama · Windows, macOS, Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
ollama run hf.co/HuggingFaceTB/qwen3-1.7b-gsm8k-sft:q8_0Transformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"HuggingFaceTB/qwen3-1.7b-gsm8k-sft",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/qwen3-1.7b-gsm8k-sft")
# For math problems, the model uses chain-of-thought reasoning
messages = [
{"role": "user", "content": "Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Explore its uses
Keep exploring
Bonsai 2 · 27B
A compressed 27B-class reasoning model with publisher-provided GGUF packs and a dedicated llama.cpp fork for CUDA, Metal, and CPU.
DeepSeek V4.1 Flash
A multimodal reasoning model with a compressed key-value cache, published as open weights.
Qwen3.8
Explore 4 versions of Qwen3.8. Compare model sizes, packages, hardware requirements, and available setups.