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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM-135M") model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-135M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Commit History
-
Update EvalEval source links to flat datastore
Verified signatureUpdates existing EvalEval Community Evals YAML entries to link to flat datastore aggregate objects pinned to an immutable EEE datastore commit, and normalizes source.name to EvalEval. No score, dataset, task, or date changes are intended. This updates existing open PR refs only. Contributor: evalevaldf783cf
-
Add EvalEval community eval results
Verified signatureAdds EvalEval Community Evals YAML entries with source backlinks to EEE aggregate records. Contributor: evaleval0e2f050
-
Add EvalEval community eval results
Verified signatureAdds EvalEval Community Evals YAML entries with source backlinks to EEE aggregate records. Contributor: evalevald487127 -
Add EvalEval community eval results
Verified signatureAdds EvalEval Community Evals YAML entries with source backlinks to EEE aggregate records. Contributor: evaleval0bb1234
-
Update README.md
Verified signature1d46172
-
Update tokenizer_config.json
Verified signature0ccfeb9
-
Update README.md
Verified signatureeec6e46 -
Update README.md
Verified signature209e03a -
Update README.md
Verified signature164f715 -
Update README.md
Verified signatureed79565 -
Update README.md
Verified signature9dfc659 -
Update README.md
Verified signature6e67a6f -
Update README.md
Verified signature79e48c3 -
Update README.md
Verified signature004e26f -
Update README.md
Verified signature40722a7 -
Update README.md
Verified signature206152b -
Update README.md
Verified signature08113ae -
Update README.md
Verified signature1f21d13 -
Update README.md
Verified signaturef33ac84 -
Update README.md
Verified signaturea5d92e1 -
Update README.md
Verified signature2229821 -
Update config.json
Verified signature501d302
-
Upload ONNX weights (#1)
Verified signature- Upload ONNX weights (741998987a281c7f2bdeb0cecb39ae57446e71df)1476377
-
Upload tokenizer
Verified signaturef9d39ea -
Upload LlamaForCausalLM
Verified signature9180459 -
initial commit
Verified signatureae2ee32