Instructions to use HuggingFaceTB/SmolLM3-3B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/SmolLM3-3B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceTB/SmolLM3-3B-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM3-3B-Base") model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM3-3B-Base") - Transformers.js
How to use HuggingFaceTB/SmolLM3-3B-Base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'HuggingFaceTB/SmolLM3-3B-Base'); - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceTB/SmolLM3-3B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceTB/SmolLM3-3B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceTB/SmolLM3-3B-Base
- SGLang
How to use HuggingFaceTB/SmolLM3-3B-Base 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-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceTB/SmolLM3-3B-Base with Docker Model Runner:
docker model run hf.co/HuggingFaceTB/SmolLM3-3B-Base
Update README.md
Browse files
README.md
CHANGED
|
@@ -72,9 +72,9 @@ In this section, we report the evaluation results of SmolLM3 model. All evaluati
|
|
| 72 |
|
| 73 |
We highlight the best score in bold and underline the second-best score.
|
| 74 |
|
| 75 |
-
## Base Pre-Trained Model
|
| 76 |
|
| 77 |
-
### English benchmarks
|
| 78 |
Note: All evaluations are zero-shot unless stated otherwise.
|
| 79 |
|
| 80 |
| Category | Metric | SmolLM3-3B | Qwen2.5-3B | Llama3-3.2B | Qwen3-1.7B-Base | Qwen3-4B-Base |
|
|
@@ -98,7 +98,7 @@ Note: All evaluations are zero-shot unless stated otherwise.
|
|
| 98 |
| | Ruler 32k context | 76.35 | 75.93 | <u>77.58</u> | 70.63 | **83.98** |
|
| 99 |
| | Ruler 64k context | 67.85 | 64.90 | **72.93** | 57.18 | 60.29 |
|
| 100 |
|
| 101 |
-
### Multilingual benchmarks
|
| 102 |
|
| 103 |
|
| 104 |
|
|
@@ -141,9 +141,9 @@ The model has also been trained on Arabic (standard), Chinese and Russian data,
|
|
| 141 |
| | Flores-200 (5-shot) | 47.13 | 48.74 | 50.74 | <u>54.70</u> | **60.53** |
|
| 142 |
|
| 143 |
|
| 144 |
-
## Instruction Model
|
| 145 |
|
| 146 |
-
### No Extended Thinking
|
| 147 |
Evaluation results of non reasoning models and reasoning models in no thinking mode. We highlight the best and second-best scores in bold.
|
| 148 |
| Category | Metric | SmoLLM3-3B | Qwen2.5-3B | Llama3.1-3B | Qwen3-1.7B | Qwen3-4B |
|
| 149 |
|---------|--------|------------|------------|-------------|------------|----------|
|
|
@@ -158,7 +158,7 @@ Evaluation results of non reasoning models and reasoning models in no thinking m
|
|
| 158 |
|
| 159 |
(*): this is a tool calling finetune
|
| 160 |
|
| 161 |
-
### Extended Thinking
|
| 162 |
Evaluation results in reasoning mode for SmolLM3 and Qwen3 models:
|
| 163 |
| Category | Metric | SmoLLM3-3B | Qwen3-1.7B | Qwen3-4B |
|
| 164 |
|---------|--------|------------|------------|----------|
|
|
|
|
| 72 |
|
| 73 |
We highlight the best score in bold and underline the second-best score.
|
| 74 |
|
| 75 |
+
### Base Pre-Trained Model
|
| 76 |
|
| 77 |
+
#### English benchmarks
|
| 78 |
Note: All evaluations are zero-shot unless stated otherwise.
|
| 79 |
|
| 80 |
| Category | Metric | SmolLM3-3B | Qwen2.5-3B | Llama3-3.2B | Qwen3-1.7B-Base | Qwen3-4B-Base |
|
|
|
|
| 98 |
| | Ruler 32k context | 76.35 | 75.93 | <u>77.58</u> | 70.63 | **83.98** |
|
| 99 |
| | Ruler 64k context | 67.85 | 64.90 | **72.93** | 57.18 | 60.29 |
|
| 100 |
|
| 101 |
+
#### Multilingual benchmarks
|
| 102 |
|
| 103 |
|
| 104 |
|
|
|
|
| 141 |
| | Flores-200 (5-shot) | 47.13 | 48.74 | 50.74 | <u>54.70</u> | **60.53** |
|
| 142 |
|
| 143 |
|
| 144 |
+
### Instruction Model
|
| 145 |
|
| 146 |
+
#### No Extended Thinking
|
| 147 |
Evaluation results of non reasoning models and reasoning models in no thinking mode. We highlight the best and second-best scores in bold.
|
| 148 |
| Category | Metric | SmoLLM3-3B | Qwen2.5-3B | Llama3.1-3B | Qwen3-1.7B | Qwen3-4B |
|
| 149 |
|---------|--------|------------|------------|-------------|------------|----------|
|
|
|
|
| 158 |
|
| 159 |
(*): this is a tool calling finetune
|
| 160 |
|
| 161 |
+
#### Extended Thinking
|
| 162 |
Evaluation results in reasoning mode for SmolLM3 and Qwen3 models:
|
| 163 |
| Category | Metric | SmoLLM3-3B | Qwen3-1.7B | Qwen3-4B |
|
| 164 |
|---------|--------|------------|------------|----------|
|