SmolLM2-135M: Self-Hosting & Deployment Guide
SmolLM2-135M is an open-weight text generation model.
What is SmolLM2-135M?
SmolLM2-135M is an open-weight text generation model, published by Hugging Face with open weights at HuggingFaceTB/SmolLM2-135M. LLM API does not route this model today, so there is no endpoint or code sample for it here. What this page does give you is the self-hosting picture: published weight sizes, the VRAM each quantisation needs and the commands to serve it yourself. Every figure is read from the public repository and refreshed weekly. At import it had 1,838,046 downloads on Hugging Face in the previous 30 days, under the apache-2.0 licence.
How to run SmolLM2-135M yourself
Open weights (apache-2.0), 135M parameters. Below: how much memory the weights need at each quantization, which hardware fits them, and the commands to serve it.
SmolLM2-135M VRAM requirements
| Precision / quantization | Weights | Figure | Source |
|---|---|---|---|
| BF16 (full precision) | 0.27 GB | Estimate | 135M params × 2 bytes |
| MLX 4-bit | 0.08 GB | File size | Irfanuruchi/SmolLM2-135M-Instruct-MLX-4bit |
| GGUF Q8_0 | 0.14 GB | File size | unsloth/SmolLM2-135M-Instruct-GGUF |
| GGUF Q4_K_M | 0.11 GB | File size | unsloth/SmolLM2-135M-Instruct-GGUF |
File size = actual download size on Hugging Face. Estimate = parameter count × bytes per weight. Weights only — the KV cache for long contexts needs extra memory; the fit tables below add 15% headroom as a rule of thumb.
GPU requirements: deploy SmolLM2-135M on your hardware
| Hardware | BF16 (full precision) | MLX 4-bit | GGUF Q8_0 | GGUF Q4_K_M |
|---|---|---|---|---|
| NVIDIA H200141 GB | 1× | 1× | 1× | 1× |
| NVIDIA H10080 GB | 1× | 1× | 1× | 1× |
| NVIDIA A100 80GB80 GB | 1× | 1× | 1× | 1× |
| NVIDIA L40S48 GB | 1× | 1× | 1× | 1× |
GPUs needed per variant.
| Hardware | GGUF Q8_0 | GGUF Q4_K_M |
|---|---|---|
| RTX 509032 GB | 1× | 1× |
| RTX 409024 GB | 1× | 1× |
| RTX 309024 GB | 1× | 1× |
GGUF via llama.cpp; more cards or CPU offload for larger files.
| Hardware | GGUF Q8_0 | GGUF Q4_K_M | MLX 4-bit |
|---|---|---|---|
| Mac, 512 GBM3 Ultra | Fits | Fits | Fits |
| Mac, 192 GBM2 Ultra | Fits | Fits | Fits |
| Mac, 128 GBM4 Max / M3 Max | Fits | Fits | Fits |
| Mac, 64 GBM4 Pro / Max | Fits | Fits | Fits |
Assumes ~75% of unified memory is usable by the GPU.
| Hardware | BF16 (full precision) | MLX 4-bit | GGUF Q8_0 | GGUF Q4_K_M |
|---|---|---|---|---|
| AWS p5.48xlarge8× H100 · 640 GB | Fits | Fits | Fits | Fits |
| AWS p4de.24xlarge8× A100 80GB · 640 GB | Fits | Fits | Fits | Fits |
| AWS g6e.12xlarge4× L40S · 192 GB | Fits | Fits | Fits | Fits |
| Google Cloud a3-highgpu-8g8× H100 · 640 GB | Fits | Fits | Fits | Fits |
| Azure ND H100 v58× H100 · 640 GB | Fits | Fits | Fits | Fits |
Whole-instance GPU memory; public instance specs.
Serve it yourself
pip install -U vllm
vllm serve HuggingFaceTB/SmolLM2-135Mpip install 'sglang[all]'
python -m sglang.launch_server --model-path HuggingFaceTB/SmolLM2-135Mllama-server -hf unsloth/SmolLM2-135M-Instruct-GGUF:Q4_K_M \
--ctx-size 32768 --n-gpu-layers 99pip install -U mlx-lm
mlx_lm.generate --model Irfanuruchi/SmolLM2-135M-Instruct-MLX-4bit --prompt "Hello"Commands use the official repositories above; vLLM and SGLang expose an OpenAI-compatible endpoint.
Not on LLM.API yet
We do not route this model through our API at the moment. Browse the models you can call today — most workloads have a close match already live.
Not available on LLM API yet
We do not route this model through our API at the moment, so there is no endpoint or code snippet for it yet. Browse the models you can call today — most workloads have a close match already live.
Browse available modelsWhen to Use — When NOT to Use
Use it if...
- You want to run SmolLM2-135M on your own hardware and keep every prompt inside your network
- The weights are published openly, so you can pin one checkpoint and keep it reproducible
- You want to fine-tune or quantise the model rather than accept a hosted configuration
- You are comparing self-hosting cost against a managed endpoint before committing
Avoid if...
- LLM API does not route this model today, so there is no endpoint here to call
- You have no GPU capacity: the VRAM figures below are the floor, not a suggestion
- You want zero operations — serving, scaling and upgrades are yours to run
- You need image, audio or video input; this checkpoint is text in, text out
Get one key to every model
Swap your API key. Keep your code.