Model reference · open weights

SmolLM3-GSM8K-SFT

LLMs HuggingFaceTB Text gen 1 build Open weights 317 dl/mo

SmolLM3-GSM8K-SFT is an open-weight language model from Hugging Face. SmolLM3-3B-GSM8K-SFT (BF16) weighs 6.2 GB; the smallest configuration that runs it is RTX 3060 12 GB.

  • SmolLM3-GSM8K-SFT is a 3.1B parameter text-generation model by Hugging Face, fine-tuned specifically for grade school math problems.
  • It supports a context length of 65,536 tokens and operates in English under the Apache 2.0 license.
  • The model achieves 65.8% accuracy on the GSM8K benchmark, representing a significant improvement over its base model.

Summary of the HuggingFaceTB/SmolLM3-3B-GSM8K-SFT model card, 2026-10-01

What it is

Released byHugging Face
Released2026-04-03
Parameters3.1B
VRAM6.2 GB for the weights

What it runs on

Memory and cards for SmolLM3-3B-GSM8K-SFT (BF16)

6.2 GBweights, file size
74 MBcache per 1K tokens
685 MBruntime overhead, at least
65,536 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB7163K11.6 GB
RTX 4060 Ti 16 GB143all 64K15.4 GB
RTX 3090 24 GB276all 64K23.4 GB
RTX 4090 24 GB276all 64K23.4 GB
RTX 5090 32 GB4010all 64K31.0 GB
L40S 48 GB6115all 64K44.0 GB
A100 80 GB11829all 64K78.2 GB
H100 80 GB11127all 64K78.1 GB
RTX PRO 6000 Blackwell 96 GB13734all 64K93.8 GB
DGX Spark (GB10) 128 GB unified15939all 64K107 GB
H200 141 GB21052all 64K138 GB
B200 180 GB27368all 64K176 GB
2× RTX 3060 12 GB
tensor parallel
266all 64K11.6 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
17.4 GB9.3 GB
59.9 GB18.9 GB
811.7 GB26.2 GB
1616.5 GB45.5 GB
3226.2 GB84.1 GB
6445.5 GB161 GB

One card, with vLLM's small-card settings.

From the model card

What Hugging Face says about SmolLM3-GSM8K-SFT

Read the model card

Fine-tuned version of HuggingFaceTB/SmolLM3-3B-Base optimized for grade school math (GSM8K benchmark).

Performance

MetricScore
GSM8K Accuracy65.8%
Baseline (SmolLM3-3B-Base)23.3%
Improvement+42.5 pp (2.8x)

Quick Start

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "HuggingFaceTB/SmolLM3-3B-GSM8K-SFT"
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)

# Solve a math problem
messages = [{"role": "user", "content": "Janet's ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?"}]

inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))

Expected output:

Janet's ducks lay 16 eggs per day.
She eats 3 for breakfast, so 16 - 3 = 13 eggs remain.
She bakes muffins with 4 eggs, so 13 - 4 = 9 eggs remain.
She sells the remaining 9 eggs at $2 each.
9 × $2 = $18

#### 18

Using with vLLM (Recommended for Speed)

from vllm import LLM, SamplingParams

llm = LLM(model="HuggingFaceTB/SmolLM3-3B-GSM8K-SFT")
tokenizer = llm.get_tokenizer()

messages = [{"role": "user", "content": "What is 15 * 23 + 47?"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

outputs = llm.generate([prompt], SamplingParams(max_tokens=256, temperature=0))
print(outputs[0].outputs[0].text)

Training Details

ParameterValue
Base ModelHuggingFaceTB/SmolLM3-3B-Base
Training DataMetaMathQA (100k samples)
MethodSupervised Fine-Tuning (SFT) with TRL 1.0.0
HardwareNVIDIA H100 80GB
Training Time~3h 16min
Epochs1
Batch Size2 (effective 16 with gradient accumulation)
Learning Rate1e-5
Max Sequence Length2048
OptimizerAdamW

Chat Template

This model uses the ChatML format:

You are a helpful AI assistant.
What is 2 + 2?
2 + 2 = 4

#### 4

Training History

We tried multiple approaches to improve math reasoning:

StageGSM8K AccuracyMethodNotes
Baseline23.3%-SmolLM3-3B-Base with no training
SFT V159.6%SFT 2 epochsMetaMathQA 50k samples
GRPO58%GRPOGSM8K train set - ineffective
SFT V265.8%SFT 1 epochMetaMathQA 100k samples ✓

Key finding: More diverse training data (100k vs 50k samples) was more effective than more epochs or GRPO reinforcement learning.

Reproduction

Training and evaluation scripts are available in the training/ folder:

# Train from scratch
python training/train_sft.py

# Evaluate on GSM8K
python training/evaluate_gsm8k.py --model HuggingFaceTB/SmolLM3-3B-GSM8K-SFT --samples 1319

Limitations

  • Optimized specifically for grade school math; may not generalize to advanced mathematics
  • Best performance with step-by-step reasoning format ending with #### answer
  • Context window limited to 2048 tokens during training

Citation

@misc{smollm3-gsm8k-sft,
  title={SmolLM3-3B-GSM8K-SFT: Fine-tuned SmolLM3 for Math Reasoning},
  author={Hugging Face},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/HuggingFaceTB/SmolLM3-3B-GSM8K-SFT}
}

License

Apache 2.0

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Benchmarks

Reported results

As published on the model card: the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
Math ReasoningGSM8KGSM8K Accuracy65.800
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms