Instructions to use HuggingFaceTB/SmolLM3-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/SmolLM3-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceTB/SmolLM3-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM3-3B") model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM3-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HuggingFaceTB/SmolLM3-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceTB/SmolLM3-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HuggingFaceTB/SmolLM3-3B
- SGLang
How to use HuggingFaceTB/SmolLM3-3B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "HuggingFaceTB/SmolLM3-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "HuggingFaceTB/SmolLM3-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HuggingFaceTB/SmolLM3-3B with Docker Model Runner:
docker model run hf.co/HuggingFaceTB/SmolLM3-3B
Status on SmolLM4?
👀 4
#48 opened about 2 months ago
by
Tralalabs
QORA - Native Rust LLM Inference Engine Base Model SmolLM3-3B (HuggingFaceTB/SmolLM3-3B)
#47 opened 2 months ago
by
drdraq
Help me run it with llama.cpp and 128K context size
1
#46 opened 5 months ago
by
JLouisBiz
Add model-index with instruction benchmark evaluations
#45 opened 5 months ago
by
davidlms
Tool calls aren't rendered by the chat template
1
#44 opened 6 months ago
by
qgallouedec
moving <|im_end|> token in system message
1
#43 opened 6 months ago
by
Mephastophilis
Token Count Calculation in SFT Data Distribution Curation
#42 opened 6 months ago
by
tcy006
Is this a bug in chat template?
1
#41 opened 8 months ago
by
Nevermetyou
`tool` role got replace with `user`
#40 opened 8 months ago
by
Nevermetyou
Possible bug: tokenizer.vocab_size is misconfigured (Screws up embedding input_dim)
1
#38 opened 8 months ago
by
david-thrower
Very nice project!
3
#37 opened 9 months ago
by
BornSaint
Prevent Thinking
1
#35 opened 9 months ago
by
somya13
SmolLM3 RL results
🚀 1
#33 opened 10 months ago
by
eliebak
Add <|im_end|> to system role
1
#32 opened 10 months ago
by
wannaphong
Add This Model To the French Understanding Leaderboard By the French Government
4
#28 opened 10 months ago
by
Tonic
Inference API Issue
1
#26 opened 10 months ago
by
falcongoldman
Infinity reasoning with this prompt
3
#25 opened 10 months ago
by
celsowm
Where is the SmolLM3-1B and 2B and 0.6B?
11
#19 opened 10 months ago
by
ysn-rfd
Proposal to Integrate taobao-mnn/SmolLM3-3B-MNN into the SmolLM3-3B Collection
#17 opened 10 months ago
by
zhaode
chat template: tool call fix?
2
#16 opened 10 months ago
by
sbrandeis
Possible mistake in the chat template?
4
#14 opened 10 months ago
by
Shaltiel
Local Installation Video and Testing - Step by Step
🔥 4
2
#10 opened 10 months ago
by
fahdmirzac
Question about the figure showing GQA.
➕ 2
1
#8 opened 10 months ago
by
hebangwen
datasets
4
#7 opened 10 months ago
by
lucyknada
SmolLM 64bit
➕😔 3
#6 opened 10 months ago
by
snapo
Language list
👍 1
2
#5 opened 10 months ago
by
kristaller486