huggingface/smollm

Everything about the SmolLM and SmolVLM family of models

SmollM – Tiny, Open‑Source Language & Vision Models from Hugging Face

What it is – A collection of compact, fully‑open models that can run on‑device while still delivering strong performance. The flagship is SmolLM‑3, a 3 B‑parameter causal language model, and SmolVLM, a multimodal vision‑language model.

Why it matters – Most state‑of‑the‑art models are huge and require powerful servers. SmollM shows that, with careful data curation and training tricks, a 3 B model can beat other 3 B models (Llama 3.2, Qwen2.5) and stay competitive with 4 B models, all while being small enough for CPU or modest‑GPU inference.

Key capabilities

  • SmolLM‑3 – 3 B parameters, trained on 11 T tokens, supports a 128 k token context (NoPE + YaRN), dual‑mode reasoning ("think" / "no_think"), and multilingual instruction in six languages.
  • SmolVLM – Vision‑language model that accepts multiple images and text, can answer visual questions, describe images, and do visual storytelling, optimized for on‑device use.
  • Open‑source – Model weights, training data mixtures, and full training configs are publicly released.
  • Easy to use – Standard Hugging Face transformers APIs for both text and vision models, plus helper scripts for local inference.

How to get started

# Text model
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "HuggingFaceTB/SmolLM3-3B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name).to("cuda")

prompt = "Explain gravity in simple terms."
chat = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
out_ids = model.generate(**inputs, max_new_tokens=32768)
print(tokenizer.decode(out_ids[0][len(inputs.input_ids[0]):], skip_special_tokens=True))
# Vision model
from transformers import AutoProcessor, AutoModelForVision2Seq
processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM-Instruct")
model = AutoModelForVision2Seq.from_pretrained("HuggingFaceTB/SmolVLM-Instruct")

messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "What’s in this picture?"}]}]
# (use processor to encode image+text, then model.generate…) 

Repository layout

  • text/ – code, docs, and resources for SmolLM 1‑3.
  • vision/ – code and docs for SmolVLM.
  • tools/ – shared utilities and ready‑to‑run inference scripts.

Further reading & resources

  • Model cards: HuggingFaceTB/SmolLM3-3B-Base, HuggingFaceTB/SmolLM3-3B, HuggingFaceTB/SmolVLM-Instruct.
  • Blog post: https://hf.co/blog/smollm3
  • Papers: SmolLM2 paper (arXiv 2502.02737v1).
  • Datasets used for pre‑training: SmolTalk, FineMath, FineWeb‑Edu, etc.

Who should look at this – Researchers interested in efficient LLMs, developers building on‑device AI assistants, and anyone needing a small yet capable language or multimodal model without proprietary restrictions.

Related

  • Project
  • Project
  • Project
  • Project