Text Generation
Transformers
Safetensors
PyTorch
llama
facebook
meta
llama-3
conversational
text-generation-inference
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
Request: DOI
#197 opened about 1 year ago
by
PrabuXmedia01
Your request to access this repo has been rejected by the repo's authors.
#196 opened about 1 year ago
by
nesibnnur
Request Reconsideration – LLaMA 3.2 Multimodal Access
#195 opened about 1 year ago
by
stefsm
Your request to access this repo has been rejected by the repo's authors.
1
#194 opened over 1 year ago
by
PaolaGhione
Your request to access this repo has been rejected by the repo's authors.
#192 opened over 1 year ago
by
Ankit7rma
llama 3.2-3B Instruct requesting access
#191 opened over 1 year ago
by
Pugazharasan09
Access rejected for meta-llama/Llama-3.2-3B-Instruct
1
#190 opened over 1 year ago
by
haroldshipibm
Access rejected to Llama-3.1-8B-Instruct
1
#189 opened over 1 year ago
by
Bridgee
Request: DOI
#188 opened over 1 year ago
by
SimoElb
Access to Llama-3.2-3b-Instruct for Hugging Face Agents Course
2
#187 opened over 1 year ago
by
QuirkyDataScientist
LLama Access Rejected. Required for HF Agents Course
5
#186 opened over 1 year ago
by
dagiro
ACCESS REJECTED
4
#185 opened over 1 year ago
by
tictacteo
Request: DOI
#184 opened over 1 year ago
by
nuwan-d
Request: DOI
#183 opened over 1 year ago
by
dansamar
Request to Enable or Restart Inference API Endpoint
👍 4
1
#182 opened over 1 year ago
by
Srinivas-hfc
Request: DOI
#181 opened over 1 year ago
by
BenyaAronov
Request: DOI
#180 opened over 1 year ago
by
boywithaxe
Request: DOI
#179 opened over 1 year ago
by
dansamar
Request: DOI
#178 opened over 1 year ago
by
samozvanec1985
Access to Llama models rejected
#177 opened over 1 year ago
by
RJBAccenture
Request: DOI
#176 opened over 1 year ago
by
chinmaypagey
Request: DOI
#175 opened over 1 year ago
by
vaseiss
Who is the tokenizer.model
#174 opened over 1 year ago
by
jkuphal
Request: DOI
#173 opened over 1 year ago
by
AymanTaybi
Request rejected doing the Hugging Face agents course
3
#171 opened over 1 year ago
by
buntegedanken
access rejected --need for AI Agents Class
1
#170 opened over 1 year ago
by
econgradstud
Why I was rejected?
1
#169 opened over 1 year ago
by
igornikishov
Llama-2 7B access rejected
#168 opened over 1 year ago
by
zadabakht
Access rejected
#167 opened over 1 year ago
by
zcacmjw
Access rejected
#166 opened over 1 year ago
by
srampras
Need access to Llama-3.2-3B-Instruct
#165 opened over 1 year ago
by
mo-fa
Access Rejected
#164 opened over 1 year ago
by
johnsonjr-jm
Request::ACCEss
#162 opened over 1 year ago
by
JasssZ
Request: Access
#161 opened over 1 year ago
by
jiacheng8
Request: Access
#160 opened over 1 year ago
by
asamil
My access was rejected.
#159 opened over 1 year ago
by
katalok
Req access for meta-llama/Llama-3.2-3B-Instruct
1
#158 opened over 1 year ago
by
lokahrishi9
Access Request
#157 opened over 1 year ago
by
HeniLoukil
Please I request access
#156 opened over 1 year ago
by
sleeptimex
My access to Llama-3.2-3B-Instruct was rejected
#155 opened over 1 year ago
by
Noelyz
I keep receiving 503 error when using HuggingFaceEndpoint to access the model
4
#154 opened over 1 year ago
by
CinderLord
Export LLama3.2
#153 opened over 1 year ago
by
SarthakMohanty25
Request: DOI
#152 opened over 1 year ago
by
Aditya2897
Why was my access rejected?
1
#151 opened over 1 year ago
by
jklre
Request: DOI
#150 opened over 1 year ago
by
simon315
why my reques of access has been rejected?
#149 opened over 1 year ago
by
starsofchance
Requesting access
#148 opened over 1 year ago
by
nbenhassine
Requesting for meta-llama/Llama-3.2-3B-Instruct access
#147 opened over 1 year ago
by
reynalbperez
Request for Access
#146 opened over 1 year ago
by
Kenjihilasak