Model reference · open weights

SmolLM

LLMs HuggingFaceTB Text gen 5 builds Open weights 150k dl/mo

SmolLM is an open-weight language model from Hugging Face. SmolLM-135M-Instruct (BF16) weighs 269 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • SmolLM-135M is a small language model developed by Hugging Face for text generation tasks.
  • It contains 135 million parameters, supports a context length of 2048 tokens, and is trained primarily on English data.
  • The model is released under the Apache 2.0 license.

Summary of the HuggingFaceTB/SmolLM-135M model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released byHugging Face
Released2024-07-14
Parameters135M
VRAM269 MB for the weights

What it runs on

Memory and cards for SmolLM-135M-Instruct (BF16)

269 MBweights, file size
23 MBcache per 1K tokens
502 MBruntime overhead, at least
2,048 tokenscontext max
CardRequests at onceContext maxMemory
2K each
RTX 3060 12 GB229all 2K11.6 GB
RTX 4060 Ti 16 GB310all 2K15.4 GB
RTX 3090 24 GB479all 2K23.4 GB
RTX 4090 24 GB478all 2K23.4 GB
RTX 5090 32 GB641all 2K31.0 GB
L40S 48 GB915all 2K44.0 GB
A100 80 GB1000+all 2K78.2 GB
H100 80 GB1000+all 2K78.1 GB
RTX PRO 6000 Blackwell 96 GB1000+all 2K93.8 GB
DGX Spark (GB10) 128 GB unified1000+all 2K107 GB
H200 141 GB1000+all 2K138 GB
B200 180 GB1000+all 2K176 GB
Memory needed at each load
Requests at once2K tokens each
1818 MB
51.0 GB
81.1 GB
161.5 GB
322.3 GB
643.8 GB

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

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
SmolLM-135M ↗ 135MFP32 269 MBRTX 3060 12 GB
SmolLM-1.7B ↗ 1.7BFP32 3.4 GBRTX 3060 12 GB
SmolLM-135M-Instruct (above) ↗ 135MBF16 269 MBRTX 3060 12 GB
SmolLM-360M-Instruct ↗ 362MBF16 724 MBRTX 3060 12 GB
SmolLM-1.7B-Instruct ↗ 1.7BBF16 3.4 GBRTX 3060 12 GB

From the model card

What Hugging Face says about SmolLM

Read the model card

Table of Contents

  1. Model Summary
  2. Limitations
  3. Training
  4. License
  5. Citation

Model Summary

SmolLM is a series of state-of-the-art small language models available in three sizes: 135M, 360M, and 1.7B parameters. These models are built on Cosmo-Corpus, a meticulously curated high-quality training dataset. Cosmo-Corpus includes Cosmopedia v2 (28B tokens of synthetic textbooks and stories generated by Mixtral), Python-Edu (4B tokens of educational Python samples from The Stack), and FineWeb-Edu (220B tokens of deduplicated educational web samples from FineWeb). SmolLM models have shown promising results when compared to other models in their size categories across various benchmarks testing common sense reasoning and world knowledge. For detailed information on training, benchmarks and performance, please refer to our full blog post.

This is the SmolLM-135M

Generation

pip install transformers
Running the model on CPU/GPU/multi GPU
  • Using full precision
# pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceTB/SmolLM-135M"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
Memory footprint: 12624.81 MB
  • Using torch.bfloat16
# pip install accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
checkpoint = "HuggingFaceTB/SmolLM-135M"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
# for fp16 use `torch_dtype=torch.float16` instead
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", torch_dtype=torch.bfloat16)
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
Memory footprint: 269.03 MB
Quantized Versions through bitsandbytes
  • Using 8-bit precision (int8)
# pip install bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
# to use 4bit use `load_in_4bit=True` instead
quantization_config = BitsAndBytesConfig(load_in_8bit=True)
checkpoint = "HuggingFaceTB/SmolLM-135M"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint, quantization_config=quantization_config)
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
# load_in_8bit
Memory footprint: 162.87 MB
# load_in_4bit
>>> print(f"Memory footprint: {model.get_memory_footprint() / 1e6:.2f} MB")
Memory footprint: 109.78 MB

Limitations

While SmolLM models have been trained on a diverse dataset including educational content and synthetic texts, they have limitations. The models primarily understand and generate content in English. They can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content. For a more comprehensive discussion of the models' capabilities and limitations, please refer to our full blog post..

This repository contains a converted version of our latest trained model. We've noticed a small performance difference between this converted checkpoint (transformers) and the original (nanotron). We're currently working to resolve this issue.

Training

Model

Hardware

  • GPUs: 64 H100

Software

License

Apache 2.0

Citation

@misc{allal2024SmolLM,
      title={SmolLM - blazingly fast and remarkably powerful},
      author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Leandro von Werra and Thomas Wolf},
      year={2024},
}

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

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms