Image-Text-to-Text
Transformers
Safetensors
PyTorch
llama4
facebook
meta
llama
conversational
Eval Results
text-generation-inference
Instructions to use meta-llama/Llama-4-Scout-17B-16E-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Llama-4-Scout-17B-16E-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="meta-llama/Llama-4-Scout-17B-16E-Instruct") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("meta-llama/Llama-4-Scout-17B-16E-Instruct") model = AutoModelForMultimodalLM.from_pretrained("meta-llama/Llama-4-Scout-17B-16E-Instruct") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meta-llama/Llama-4-Scout-17B-16E-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-4-Scout-17B-16E-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-4-Scout-17B-16E-Instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/meta-llama/Llama-4-Scout-17B-16E-Instruct
- SGLang
How to use meta-llama/Llama-4-Scout-17B-16E-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-4-Scout-17B-16E-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-4-Scout-17B-16E-Instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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-4-Scout-17B-16E-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-4-Scout-17B-16E-Instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use meta-llama/Llama-4-Scout-17B-16E-Instruct with Docker Model Runner:
docker model run hf.co/meta-llama/Llama-4-Scout-17B-16E-Instruct
Add EvalEval community eval results
#111 opened 8 days ago
by
EvalEvalBot
Request: DOI
#110 opened about 2 months ago
by
Sweyjot
Requesting approval
#109 opened 3 months ago
by
kmudaliar-msft
Appealing the refusal.
#108 opened 4 months ago
by
RomanHammer
Access request pending for Llama 4 (HF username Rid24)
2
#107 opened 4 months ago
by
Rid24
What is the minimum hardware needed to run Llama-4-Scout-17B-16E-Instruct with vLLM?
#106 opened 6 months ago
by
PYTHON01100100
Update README.md
1
#105 opened 7 months ago
by
bean980310
Scout as Threshold, Cognition as Cartography
#104 opened 7 months ago
by
elly99
Token Count Calculation in SFT Data Distribution Curation
#103 opened 7 months ago
by
tcy006
Request to Reapply for Access to LLaMA 4 Model
#99 opened 8 months ago
by
chihli
Request: DOI
#98 opened 9 months ago
by
Filance
test
#97 opened 9 months ago
by
EricChenafa1
Let's talk about the model
#96 opened 10 months ago
by
kalashshah19
Update README.md
#95 opened 11 months ago
by
PedroCuinhane
Access Request
2
#94 opened 11 months ago
by
AngryAnderson
Request: DOI
#93 opened 11 months ago
by
rene-act
Access to Llama-4
2
#92 opened 11 months ago
by
ryogendr
Request: DOI
#91 opened 12 months ago
by
Juleeea23
Requesting access for Llama-4-Scout-17B-16E-Instruct
➕ 4
3
#90 opened 12 months ago
by
GInc
Your request to access this repo has been rejected by the repo's authors.
🤗 1
#89 opened about 1 year ago
by
intexcp
Why Not α-Entmax? — A Learnable Sparse Alternative to Softmax in Attention
#88 opened about 1 year ago
by
mc112611
llama-4-scout
#87 opened about 1 year ago
by
guptashailender
Output decode
#86 opened about 1 year ago
by
kajalnegi
ConnectionReset error
#85 opened about 1 year ago
by
kajalnegi
Bug: Llama4 Multimodal (Llama4ForConditionalGeneration) Fails with Optimized Attention (sdpa, eager) and KV Cache for Effective Sequence Lengths > attention_chunk_size (8192)
#84 opened about 1 year ago
by
Peter-233234
ValueError
#82 opened about 1 year ago
by
bijays09
Update processor_config.json
#81 opened about 1 year ago
by
Akshay47
Update config.json
#80 opened about 1 year ago
by
Akshay47
Please Check Your Access Requests
➕ 2
8
#76 opened about 1 year ago
by
omerdemirugm
Student Request for Llama-4-Scout-17B-16E-Instruct
3
#75 opened about 1 year ago
by
garytzehay
Commercial license?
#74 opened about 1 year ago
by
ccocks-deca
Student Request for Llama-4 series
2
#73 opened about 1 year ago
by
Nckuhsu
Please create a smaller reasoning model.
#72 opened about 1 year ago
by
ZeroWw
Gated Repo Permission Still Pending for Llama-4
👀 3
4
#71 opened about 1 year ago
by
brando
Gated Repo Permission Still Pending for Llama-4
👀 3
2
#70 opened about 1 year ago
by
bryka
Gated Repo Permission Still Pending for Llama-4
#69 opened about 1 year ago
by
brando
Gated Repo Permission Still Pending for Llama-4
➕😔 3
4
#68 opened about 1 year ago
by
bitmman-nch
World's Largest Dataset
#67 opened about 1 year ago
by deleted
Is it possible to reduce the number of llama4 expert models to use less memory?
#65 opened about 1 year ago
by
gukui
Does LLama4 have chunked attention in generation phase ?
4
#64 opened about 1 year ago
by
vanshils
The "force_words_ids" does not seem to be available on llama4
#63 opened about 1 year ago
by
nlp-g
Access Rejected
5
#62 opened about 1 year ago
by
ansenang
Less Knowledge Than Llama 3.3 70b?
👀 2
5
#60 opened about 1 year ago
by
phil111
No attribute `sliding_window`?
2
#59 opened about 1 year ago
by
farzadab
Any luck doing inference in 8xA100?
5
#57 opened about 1 year ago
by
taytun
Fine-tuning with BitsAndBytes
#56 opened about 1 year ago
by
arnavgrg
Update config.json -- important default parameters were left out from the config
1
#55 opened about 1 year ago
by
mdabbah-nvidia
VLLM not loading meta-llama/Llama-4-Scout-17B-16E-Instruct
🔥 1
3
#53 opened about 1 year ago
by
alokkrsahu
13 B and34 B Pleeease!!! Most people cannot even run this.
❤️👍 4
4
#52 opened about 1 year ago
by
UniversalLove333