Instructions to use meta-llama/Llama-3.2-3B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Llama-3.2-3B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meta-llama/Llama-3.2-3B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct") model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-3B-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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meta-llama/Llama-3.2-3B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meta-llama/Llama-3.2-3B-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": "meta-llama/Llama-3.2-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/meta-llama/Llama-3.2-3B-Instruct
- SGLang
How to use meta-llama/Llama-3.2-3B-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 "meta-llama/Llama-3.2-3B-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": "meta-llama/Llama-3.2-3B-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 "meta-llama/Llama-3.2-3B-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": "meta-llama/Llama-3.2-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use meta-llama/Llama-3.2-3B-Instruct with Docker Model Runner:
docker model run hf.co/meta-llama/Llama-3.2-3B-Instruct
Where instruction tuning landed in this pair — a propagation scan (N80 18/29, band 13–17)
We ran a before/after internal scan of meta-llama/Llama-3.2-3B → meta-llama/Llama-3.2-3B-Instruct with a fixed probe protocol (identical prompts for both models, controlled perturbations injected at seven depths, 168 matched probes per model) and thought the result was worth putting here rather than only on our own page.
Where the difference sits. 80% of the base→instruct difference mass falls in 18 of 29 stations (a station is the output of one block; 28 layers → 29 stations). The densest five-station band is 13–17, carrying 1.72× what a uniform spread would put there and 1.49× what a flat null would. The first observable difference is station 4 — that is our probe grid's detection floor (the earliest probe is injected at layer 2), not something the tuning earned.
This one surprised us. That band is mid-network. In the same run Qwen2.5, Falcon3, OLMo-2 and Mistral all concentrated in their last five stations, so a single pair would have told us "instruction tuning is a last-layers story" — and it is not, at least not for this family.
Knowledge side. Factual recall barely moved: 0 of the 20 probe facts broke and 4 were repaired. What moved is behaviour on entities the model does not know — fake-name echo avoided went 13 → 20 of 20 (McNemar 7 improved / 0 regressed, exact two-sided p = 0.016), and a three-class judge reads refusals 2→3, echo 7→0, fabricated answers 11→17. Trajectory AUROC 0.740 → 1.000.
Data. Report: https://tetracta-model-xray-sample-reports.static.hf.space/reports/karsilastirma-llama-3-2-3b-llama-3-2-3b-instruct.html
Signed provenance/deletion attestation (its report_sha256 pins that exact file): https://www.tetracta.ai/llm_tomografi/attest/57fccb3b5c894e1ab428a3494591b04e
Machine-readable per-station profiles for this and 21 other interventions across six families: https://huggingface.co/datasets/tetracta/model-xray-gallery
If this does not match how the instruction tuning was actually done, we would genuinely like to know. The instrument is young, family differences like this are exactly what we cannot yet explain, and a correction from the people who trained the model is worth more to us than another scan.
Correction — 6 September 2026
We withdraw the Model X-Ray location, spread, concentration and derived-severity conclusions in the opening post. Any legacy knowledge-separation, portrait-visualization, lesion-response or simulated-quantization conclusion linked from it is also withdrawn and must not be used as current evidence.
We are publishing no replacement figures. Validation remains pending. Correction record: https://www.tetracta.ai/model-xray/correction/
— Tetracta