SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model
Paper β’ 2502.02737 β’ Published β’ 261
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
LoRA adapter for instruction-tuned SmolLM2-135M, trained on smol-smoltalk.
| Property | Value |
|---|---|
| Base Model | HuggingFaceTB/SmolLM2-135M |
| Training Method | LoRA (r=16, alpha=32) |
| Dataset | smol-smoltalk β 460K conversations |
| Trainable Params | ~2.5M (1.9% of base) |
| Learning Rate | 1e-3 (cosine schedule, 10% warmup) |
| Training Steps | 1,000 |
| Max Sequence Length | 2,048 |
| Architecture | Llama (30 layers, 576 hidden, 9 heads) |
from transformers import pipeline
import torch
pipe = pipeline(
"text-generation",
model="Premchan369/smollm2-135m-sft-lora",
torch_dtype=torch.bfloat16,
device="cuda",
)
messages = [{"role": "user", "content": "Explain gravity in simple terms."}]
output = pipe(messages, max_new_tokens=200, temperature=0.7)
print(output[0]["generated_text"][-1]["content"])
This follows the official SmolLM2 training recipe from the paper SmolLM2: When Smol Goes Big (arXiv:2502.02737).
Key configuration:
messages column) β auto-detected by SFTTrainerSee the π training notebook for the full training code.
# Clone and run
git clone https://huggingface.co/Premchan369/smollm2-135m-sft-lora
cd smollm2-135m-sft-lora
pip install transformers datasets trl peft accelerate bitsandbytes
python train.py
@article{allal2025smollm2,
title={SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model},
author={Allal, Loubna Ben and Lozhkov, Anton and Bakouch, Elie and others},
journal={arXiv preprint arXiv:2502.02737},
year={2025}
}