Instructions to use HuggingFaceTB/SmolLM-135M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/SmolLM-135M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceTB/SmolLM-135M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM-135M") model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-135M") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HuggingFaceTB/SmolLM-135M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceTB/SmolLM-135M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceTB/SmolLM-135M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceTB/SmolLM-135M
- SGLang
How to use HuggingFaceTB/SmolLM-135M 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/SmolLM-135M" \ --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/SmolLM-135M", "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/SmolLM-135M" \ --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/SmolLM-135M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceTB/SmolLM-135M with Docker Model Runner:
docker model run hf.co/HuggingFaceTB/SmolLM-135M
System prompt
#22 opened 7 months ago
by
nicolas-bonnet
Data Formatting
#21 opened about 1 year ago
by
moutasem
Training details
#19 opened over 1 year ago
by
nleroux
EOS Token
π 1
1
#18 opened over 1 year ago
by
darkmatter2222
Benchmark results
π 1
#17 opened over 1 year ago
by
Bachstelze
Interview request: genAI evaluation & documentation
#16 opened over 1 year ago
by
meggymuggy
Are there two identical embedding tensors, even though embeddings are shared?
#15 opened over 1 year ago
by
graefics
About MMLU evaluation
1
#12 opened almost 2 years ago
by
ldwang
Intermediate checkpoints for research purposes
2
#11 opened almost 2 years ago
by
maveriq
ONNX generation
1
#9 opened almost 2 years ago
by
davesoma
Adding Evaluation Results
#8 opened almost 2 years ago
by
leaderboard-pr-bot
Google Colab for Guide to Use the Model
#7 opened almost 2 years ago
by
mesjavacca
Model code for training from sractch
β 7
5
#6 opened almost 2 years ago
by
Chrisneverdie
Multilingual Support
π 1
1
#5 opened almost 2 years ago
by
Mistsink
Trapezoidal scheduler with cooldown phase
π 1
3
#4 opened almost 2 years ago
by
maveriq