Image-Text-to-Text
Transformers
Safetensors
PyTorch
mllama
facebook
meta
llama
llama-3
conversational
text-generation-inference
Instructions to use meta-llama/Llama-3.2-11B-Vision-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-11B-Vision-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-3.2-11B-Vision-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-3.2-11B-Vision-Instruct") model = AutoModelForMultimodalLM.from_pretrained("meta-llama/Llama-3.2-11B-Vision-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-3.2-11B-Vision-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-11B-Vision-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-11B-Vision-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-3.2-11B-Vision-Instruct
- SGLang
How to use meta-llama/Llama-3.2-11B-Vision-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-11B-Vision-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-11B-Vision-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-3.2-11B-Vision-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-11B-Vision-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-3.2-11B-Vision-Instruct with Docker Model Runner:
docker model run hf.co/meta-llama/Llama-3.2-11B-Vision-Instruct
Create llama 3.2 11b
#74 opened over 1 year ago
by
WongLen
SyntaxError: ':' expected after dictionary key
#73 opened over 1 year ago
by
jrp2024
How can I reapply the access to 11B-Vision after the reject?
1
#72 opened over 1 year ago
by
Bigyellow136
Unexpected Output using Official Example Code
👀 1
7
#71 opened over 1 year ago
by
jenniferL
how to make the repsonses consistent?
1
#70 opened over 1 year ago
by
wwdd7718
how can i perform batch inference for llama-3.2 vision.
3
#68 opened over 1 year ago
by
AnanyaDB
Model chat history
3
#67 opened over 1 year ago
by
aswad546
what is affiliation value ?
#65 opened over 1 year ago
by
suhail1399
Cannot load model
1
#63 opened almost 2 years ago
by
a-yildiz
Inquiry About Model File Necessities and the Role of 'consolidated.pth
#62 opened almost 2 years ago
by
ZebangCheng
Is possible to make the model only return the response without the prompt?
👍 3
2
#61 opened almost 2 years ago
by
mduran159
melhor modelo para conversar igual o GPT
#60 opened almost 2 years ago
by
Bruno146
Your request to access this repo has been rejected by the repo's authors.
1
#59 opened almost 2 years ago
by
flyfox666
Your request to access this repo has been rejected by the repo's authors.
1
#58 opened almost 2 years ago
by
ERmak1581
Why is the number of input embeddings 8 greater than the vocabulary size?
👍 4
#56 opened almost 2 years ago
by
Ali2500
Issue about using "repetition_penalty" parameter in model.generate function.
#55 opened almost 2 years ago
by
ZAW123123
How to host 11B on server with CPU only (No GPU)
3
#54 opened almost 2 years ago
by
AndrewChanU
"RuntimeError: probability tensor contains either `inf`, `nan` or element < 0" when running in multi-gpu
4
#53 opened almost 2 years ago
by
greeksharifa
The number of image token (1) should be the same as in the number of provided images (1)
3
#52 opened almost 2 years ago
by
MucahitSancar
Few Shot Learning
3
#51 opened almost 2 years ago
by
hiiamsid
huggingface_hub.errors.GenerationError: Request failed during generation: Server error: When trying to use Llama-3.2-11b-vision-instruct Serverless API
#50 opened almost 2 years ago
by
Inoob
Request: DOI
#48 opened almost 2 years ago
by
AdiJoost
401 Client Error: Unauthorized for url:
3
#47 opened almost 2 years ago
by
btg1213
Vocab size vs. LM head size mismatch
2
#46 opened almost 2 years ago
by
harshil-shah
<|begin_of_text|> is added twice by the preprocessor
👍 6
1
#44 opened almost 2 years ago
by
kz919
504 Gateway timeout
#42 opened almost 2 years ago
by
StanislavKalishenko
Flash Attention Support
3
#41 opened almost 2 years ago
by
rameshch
InfoVQA test results
#39 opened almost 2 years ago
by
jamepark3922
Please support Asian languages. Japanese, Chinese, Korean, etc...
❤️ 1
1
#38 opened almost 2 years ago
by
WarriorMama777
when can the model support multi-language OCR?
2
#34 opened almost 2 years ago
by
xingwang1234
Text model weights are different from 3.1 8B Instruct
❤️🤗 4
#32 opened almost 2 years ago
by
jlli
Fine-tune Llama Vision models with TRL 🚀
🚀❤️ 12
4
#31 opened almost 2 years ago
by
lewtun
Request for Compliance with EU Regulations and provision of Llama 3.2 Vision Models
👍🔥 30
1
#28 opened almost 2 years ago
by
molbal
Fine-tuning scripts for Llama3.2-Vision series
🔥 5
5
#27 opened almost 2 years ago
by
2U1
🍭Inference/Fine-tuning/RLHF support for llama3.2-vision
#26 opened almost 2 years ago
by
study-hjt
Llama-3.2-11B-Vision-Instruct and Llama-3.2-11B-Vision results are exactly same, coincidentally or it's same model?
7
#25 opened almost 2 years ago
by
aaditya
Are you considering supporting Chinese in the next generation?
#24 opened almost 2 years ago
by
windkkk
Chat template problem.
13
#23 opened almost 2 years ago
by
mylesgoose
How can I appeal?
😔 11
#22 opened almost 2 years ago
by
prince-canuma
About accessing models
6
#21 opened almost 2 years ago
by
kingeng
Tokenizer needs to be fixed for BOS handling
#18 opened almost 2 years ago
by
dzhulgakov