Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
Continues English text from a prompt with a 135M-parameter base language model small enough to run on-device. For developers who want a tiny model to test ideas on or fine-tune.
SmolLM2-135M is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install transformers
SmolLM2-135M is the smallest model in the SmolLM2 family, which also has 360M and 1.7B versions. This one is the base model, so it continues the text you give it and does not follow chat instructions. It was trained on 2 trillion tokens from FineWeb-Edu, DCLM, The Stack and extra filtered data.
It suits developers, students and researchers who want a tiny English language model for experiments, teaching or fine-tuning on modest hardware.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | App developers | Prototype on-device text features with a tiny model | Testing autocomplete behaviour offline |
| Education | Teachers and students | Learn how language models load and generate | A classroom demo of text completion |
| Research | ML researchers | Fine-tune a small base model for a narrow task | Training it on a domain's text |
| Tooling | Pipeline builders | Smoke-test code with a model that loads fast | Checking a generation pipeline end to end |
Skip it if you need reliable answers or chat behaviour, since the card's own scores for maths and trivia are low.
| Use case | Who | What they get back |
|---|---|---|
| Text completion | Developers | A continuation of a short prompt |
| Fine-tuning base | Researchers | A small starting point for task training |
| Pipeline testing | Engineers | A model that loads quickly on a laptop |
You need these first.
pip install transformers
pip install -U huggingface_hub hf download HuggingFaceTB/SmolLM2-135M
Load the tokenizer and model, move the model to your device, encode a short prompt and call generate. The card shows a full-precision script and a bfloat16 script.
# pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceTB/SmolLM2-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("Gravity is", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))# pip install accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
checkpoint = "HuggingFaceTB/SmolLM2-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("Gravity is", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))| Tool | What it does |
|---|---|
| AutoTokenizer | Turns your prompt into token IDs and back into text |
| AutoModelForCausalLM | Loads the model weights |
| model.generate | Continues the prompt |
| device_map="auto" | Places the model on your available GPUs, and needs accelerate |
Run the first script with the prompt "Gravity is". The model continues the sentence and the script prints the prompt plus the continuation. Expect a short, loosely correct passage, since a 135M base model is weak on facts.
If you are new, a base model finishes sentences and does not take orders. Run the Gravity example once on CPU and read what it adds. Change the prompt to the start of a sentence of your own.
If you know the field, the card compares it with SmolLM-135M on zero-shot benchmarks run with lighteval. SmolLM2 scores slightly higher on HellaSwag, ARC and MMLU cloze, ties on PIQA and Winogrande, and trails on TriviaQA. The instruct variant adds supervised fine-tuning and DPO on top of this base.
Continues English text from a prompt with a 135M-parameter base language model small enough to run on-device. For developers who want a tiny model to test ideas on or fine-tune.
Made by HuggingFaceTB on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: SmolLM2-135M is the smallest model in the SmolLM2 family, which also has 360M and 1.7B versions. This one is the base model, so it continues the text you give it and does not follow chat instructions. It was trained on 2 trillion tokens from FineWeb-Edu, DCLM, The Stack and extra filtered data.
Who it suits: It suits developers, students and researchers who want a tiny English language model for experiments, teaching or fine-tuning on modest hardware.
Industry | Who uses it | How they use it | Example
Software | App developers | Prototype on-device text features with a tiny model | Testing autocomplete behaviour offline
Education | Teachers and students | Learn how language models load and generate | A classroom demo of text completion
Research | ML researchers | Fine-tune a small base model for a narrow task | Training it on a domain's text
Tooling | Pipeline builders | Smoke-test code with a model that loads fast | Checking a generation pipeline end to end
Skip it if you need reliable answers or chat behaviour, since the card's own scores for maths and trivia are low.
Where to use it:
Use case | Who | What they get back
Text completion | Developers | A continuation of a short prompt
Fine-tuning base | Researchers | A small starting point for task training
Pipeline testing | Engineers | A model that loads quickly on a laptop
How to set it up: You need these first.
pip install transformers
pip install -U huggingface_hub
hf download HuggingFaceTB/SmolLM2-135M
How to use it: Load the tokenizer and model, move the model to your device, encode a short prompt and call generate. The card shows a full-precision script and a bfloat16 script.
# pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceTB/SmolLM2-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("Gravity is", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
# pip install accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
checkpoint = "HuggingFaceTB/SmolLM2-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("Gravity is", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Tool | What it does
AutoTokenizer | Turns your prompt into token IDs and back into text
AutoModelForCausalLM | Loads the model weights
model.generate | Continues the prompt
device_map="auto" | Places the model on your available GPUs, and needs accelerate
Example: Run the first script with the prompt "Gravity is". The model continues the sentence and the script prints the prompt plus the continuation. Expect a short, loosely correct passage, since a 135M base model is weak on facts.
For newcomers and experts: If you are new, a base model finishes sentences and does not take orders. Run the Gravity example once on CPU and read what it adds. Change the prompt to the start of a sentence of your own.
If you know the field, the card compares it with SmolLM-135M on zero-shot benchmarks run with lighteval. SmolLM2 scores slightly higher on HellaSwag, ARC and MMLU cloze, ties on PIQA and Winogrande, and trails on TriviaQA. The instruct variant adds supervised fine-tuning and DPO on top of this base.
Your prompt text
Tokenizer makes token IDs
Model predicts the next tokens
Tokens are decoded to text
Continuation is printed
Good to know:
Title: Zero-shot scores of SmolLM2-135M from the card
HellaSwag: 42.1 points
ARC average: 43.9 points
PIQA: 68.4 points
MMLU cloze: 31.5 points
CommonsenseQA: 33.9 points
Winogrande: 51.3 points
OpenBookQA: 34.6 points
TriviaQA: 4.1 points
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download HuggingFaceTB/SmolLM2-135M
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| SmolLM2-135M This page | 2,596,139 | 269 | 135M | apache-2.0 | |
| MiniCPM5-2BShares llama · text-generation · transformers | 1,039,518 | 1,850 | 2.5B | apache-2.0 | |
| TinyLlama-1.1B-Chat-v1.0Shares llama · text-generation · transformers | 963,057 | 1,910 | 1.1B | apache-2.0 | |
| SmolLM2-135M-InstructShares llama · text-generation · transformers | 841,106 | 474 | 135M | apache-2.0 | |
| Hermes 3 Llama-3.1 8BShares llama · text-generation · transformers | 336,953 | 550 | 8B | llama3 | |
| Meta-Llama-3.1-8B-Instruct-AWQ-INT4Shares llama · text-generation · transformers | 319,739 | 96 | 8B | llama3.1 |
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.
alibaba · Kit
Reviews Git changes with an AI agent that reads files and searches the codebase, then writes comments tied to exact lines. It suits developers who want automat…