Image-Text-to-Text
Transformers
Safetensors
PyTorch
llama4
facebook
meta
llama
conversational
Eval Results
text-generation-inference
Instructions to use meta-llama/Llama-4-Maverick-17B-128E-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Llama-4-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-Instruct") model = AutoModelForMultimodalLM.from_pretrained("meta-llama/Llama-4-Maverick-17B-128E-Instruct", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meta-llama/Llama-4-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-Instruct
- SGLang
How to use meta-llama/Llama-4-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-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-Maverick-17B-128E-Instruct with Docker Model Runner:
docker model run hf.co/meta-llama/Llama-4-Maverick-17B-128E-Instruct
how is size checked?
#50 opened about 1 month ago
by
eNVy1981
Add EvalEval community eval results
#49 opened about 2 months ago
by
EvalEvalBot
Add LEXam evaluation results
#48 opened 2 months ago
by
joelniklaus
Request to reset rejected gated access form submission
#47 opened 3 months ago
by
dbowen
Add SWE-Bench Pro evaluation results
1
#46 opened 5 months ago
by
nielsr
Regarding the calculation of VRAM requirements for deploying meta-llama/Llama-4-Maverick-17B-128E-Instruct
1
#45 opened 9 months ago
by
a58982284
MarCognity-AI for Meta – LLaMA 4 Maverick
#44 opened 10 months ago
by
elly99
Tool Calling
#43 opened 10 months ago
by
vipulchoube
Trying to run with TGI - i try to run the model with doctor I am using 8 h200 gpu on Amazon ec2 p5en.48xlarge
1
#42 opened about 1 year ago
by
sayak340
Access rejected
#38 opened about 1 year ago
by
sheepyyy
Remove `<|python_start|>` and `<|python_end|>` tags from chat template
#37 opened about 1 year ago
by
jhuntbach
Add reasoning capabilities for llama 4 and add this model to huggingchat
#36 opened about 1 year ago
by
devopsML
Request: DOI
#35 opened about 1 year ago
by
EVANTRD
Llama4
#34 opened over 1 year ago
by
duckingsimsen
Gated Repo Permission Still Pending for Llama-4
#33 opened over 1 year ago
by
brando
World's Largest Dataset
#32 opened over 1 year ago
by deleted
When are we getting direct HuggingFace inference provider support?
#30 opened over 1 year ago
by
TejAndrewsACC
13 B and34 B Pleeease!!! Most people cannot even run this.
❤️👍 3
1
#28 opened over 1 year ago
by
UniversalLove333
Llama-4-Maverick-03-26-Experimental
👍 9
1
#27 opened over 1 year ago
by
ChuckMcSneed
Access Rejected
3
#24 opened over 1 year ago
by
rajkaranswain16
torch compile compatibility issue
➕ 3
6
#23 opened over 1 year ago
by
jhmun
Rejected access?
2
#22 opened over 1 year ago
by
pluttodk
Deploying production ready Llama-4 [Maverick] on your AWS with vLLM
🔥🚀 3
#21 opened over 1 year ago
by
agam30
GPU requirement
2
#20 opened over 1 year ago
by
meetzuber
How to run int4?
1
#19 opened over 1 year ago
by
BootsofLagrangian
[request for feedback] faster downloads with xet
5
#18 opened over 1 year ago
by
clem
Thanks a lot!
1
#17 opened over 1 year ago
by
FalconNet
License
1
#16 opened over 1 year ago
by
mrfakename
change to spda
2
#14 opened over 1 year ago
by
wukaixingxp