Downloads · 30 days
0
Premchan369/smollm2-135m-sft-lora
smollm2-135m-sft-lora is a machine learning model from Premchan369. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
[](https://colab.research.google.com/github/huggingface/smol-course/blob/main/1instructiontuning/notebooks/sftfinetuningexample.ipynb) [](https://opensource.org/licenses/Apache-2.0)
Downloads · 30 days
0
Access
Public
Updated May 7, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.7 KB · 64%
From the Hugging Face model README
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}
}