Instructions to use HuggingFaceTB/SmolLM2-360M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/SmolLM2-360M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceTB/SmolLM2-360M-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM2-360M-Instruct") model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-360M-Instruct", device_map="auto") 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]:])) - Transformers.js
How to use HuggingFaceTB/SmolLM2-360M-Instruct with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'HuggingFaceTB/SmolLM2-360M-Instruct'); - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceTB/SmolLM2-360M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceTB/SmolLM2-360M-Instruct" # 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/SmolLM2-360M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HuggingFaceTB/SmolLM2-360M-Instruct
- SGLang
How to use HuggingFaceTB/SmolLM2-360M-Instruct 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/SmolLM2-360M-Instruct" \ --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/SmolLM2-360M-Instruct", "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/SmolLM2-360M-Instruct" \ --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/SmolLM2-360M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HuggingFaceTB/SmolLM2-360M-Instruct with Docker Model Runner:
docker model run hf.co/HuggingFaceTB/SmolLM2-360M-Instruct
Measurement note: SmolLM2-360M β SmolLM2-360M-Instruct at exact revisions (Model X-Ray, 22 September 2026)
We compared HuggingFaceTB/SmolLM2-360M @ f8027fd0eaeea54caa13c31d31b9fdc459c38b49 (A) with this repository @ a10cc1512eabd3dde888204e902eca88bddb4951 (B) with our instrument (Tetracta Model X-Ray: instrument VG1; measurement contract mv-1.4; report schema rs-1.7 / presentation rp-1.3) on 22 September 2026. The report is labelled a validation-pending descriptive result. We are posting it here so that the measurement is on record next to the artifact it describes and can be corrected by people who know these checkpoints better than we do.
What the report states, and nothing more:
- Internal response: a difference was observed at 29 of 29 evaluated positions (decoder block 4 output through the final normalized output). The embedding output and blocks 1β3 are not evaluated, so where the difference begins is unresolved; "not evaluated" is not "no difference".
- Text output: withheld β the two artifacts do not share a directly comparable tokenizer/generation contract, so no output-text comparison is made. Withheld does not mean unchanged.
- Overall relative weight change 7.938% over 290 parameter tensors (relative to the reference norm); the per-block table is in the report.
- Recorded relation: combined artifact change β configuration, tokenizer and generation-settings semantics all differ. The report does not attribute the difference to fine-tuning or to weights alone, does not locate edited weights and does not identify a cause. A is not presented as the immediate training parent of B; the comparison describes the difference between the two named artifacts only.
This is not a quality, safety or deployment grade and it does not rank models.
Report: https://tetracta-model-xray-sample-reports.static.hf.space/current/07-mukayese-smollm2-360m.html (it links to a limited Tetracta operational receipt; the receipt is a Tetracta record, not independent proof). Scope and limits, including what the instrument does not claim: https://www.tetracta.ai/model-xray/scope/ Β· Correction record: https://www.tetracta.ai/model-xray/correction/
Both repositories are on the eligible list of the free beta; a registered account can repeat this pair from the exact revisions above (the free allowance is 20 browser scans and two distinct source models per calendar month, so one pair uses a month's model allowance). The comparable fields are the categorical ones listed here; numerical profiles are not published, and no cross-device bitwise equality is claimed.
If the tokenizer or generation-contract difference recorded above is not expected at these revisions, we would like to know. Corrections welcome. β Tetracta
Correction to the note above, posted the same day. Two figures in it were wrong.
The free allowance. It is 20 browser scans and five distinct source models per calendar month, not two. The model allowance was raised on 22 September 2026, after this note was written; the scan count is unchanged.
What a comparison costs against that allowance. The note said a pair uses a month's model allowance. It does not. The model allowance is counted on the source (A-side) repository of a job, and a comparison is a single job, so one pair uses one of the five - not two, and not the month.
Two further points from the same day's status update, so this thread is not left behind the live page.
First: a comparison of two 7B-class checkpoints is currently accepted by the submission form but fails inside the worker sandbox (under investigation, 22 September 2026). Please do not submit one until that note is removed from the scope page - it cannot succeed. A job that fails this way is recorded as failed and the scan it reserved is returned automatically, so an attempt does not cost you an allowance; if your account ever shows otherwise, tell us and we will correct it by hand. A single 7B-class repository runs normally as a quantization simulation.
Second: HuggingFaceTB/SmolLM3-3B-Base and HuggingFaceTB/SmolLM3-3B are listed on the register, but the current instrument release does not support their tokenizer contract, so those submissions fail as well, and the scan is returned the same way.
The current figures and the dated status block are on the scope page: https://www.tetracta.ai/model-xray/scope/ The correction record, which carries this and our earlier corrections with their dates, is at https://www.tetracta.ai/model-xray/correction/ - Tetracta