Instructions to use HuggingFaceTB/SmolLM-360M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/SmolLM-360M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceTB/SmolLM-360M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM-360M") model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-360M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceTB/SmolLM-360M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceTB/SmolLM-360M" # 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-360M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceTB/SmolLM-360M
- SGLang
How to use HuggingFaceTB/SmolLM-360M 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-360M" \ --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-360M", "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-360M" \ --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-360M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceTB/SmolLM-360M with Docker Model Runner:
docker model run hf.co/HuggingFaceTB/SmolLM-360M
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: evalevale171f9f
-
Add EvalEval community eval results
Verified signatureAdds EvalEval Community Evals YAML entries with source backlinks to EEE aggregate records. Contributor: evaleval7ea36f2
-
Add EvalEval community eval results
Verified signatureAdds EvalEval Community Evals YAML entries with source backlinks to EEE aggregate records. Contributor: evaleval6d9a6f5 -
Add EvalEval community eval results
Verified signatureAdds EvalEval Community Evals YAML entries with source backlinks to EEE aggregate records. Contributor: evaleval9f9bffc
-
Update README.md
Verified signature59f7ef2
-
Remove chat template on base model (apply to other models too) (#4)
Verified signature- Remove chat template on base model (apply to other models too) (bbf7a077dfda0e5cc30812d7ed0d5b2c6208f82d) Co-authored-by: Marc Kovka <GPT007@users.noreply.huggingface.co>0b0c54e
-
Update README.md
Verified signature318cc63 -
Update README.md
Verified signature46e55ea -
Update README.md
Verified signatureee389a1 -
Update README.md
Verified signature29ba436 -
Update README.md
Verified signatureed71914 -
Update README.md
Verified signature4e90ffc -
Update config.json
Verified signature1182e7e
-
Upload ONNX weights (#1)
Verified signature- Upload ONNX weights (714709f2ab541dd5cebd04ea1457cd69e7a4bac3)81ea1d2
-
Upload tokenizer
Verified signaturebd6885d -
Upload LlamaForCausalLM
Verified signature74ae0b2 -
initial commit
Verified signatured5a8c92