Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
multimodal
conversational
Eval Results
text-generation-inference
Instructions to use Qwen/Qwen2.5-VL-32B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen2.5-VL-32B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Qwen/Qwen2.5-VL-32B-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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-32B-Instruct") model = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen2.5-VL-32B-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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Qwen/Qwen2.5-VL-32B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen2.5-VL-32B-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": "Qwen/Qwen2.5-VL-32B-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/Qwen/Qwen2.5-VL-32B-Instruct
- SGLang
How to use Qwen/Qwen2.5-VL-32B-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 "Qwen/Qwen2.5-VL-32B-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": "Qwen/Qwen2.5-VL-32B-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 "Qwen/Qwen2.5-VL-32B-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": "Qwen/Qwen2.5-VL-32B-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 Qwen/Qwen2.5-VL-32B-Instruct with Docker Model Runner:
docker model run hf.co/Qwen/Qwen2.5-VL-32B-Instruct
Add ScreenSpot-Pro evaluation result (Qwen2.5-VL-32B-Instruct)
#22 opened 2 months ago
by
merve
Repeated MODEL NOT_FOUND error while calling inference API
#21 opened 3 months ago
by
AditDaltin
config.json: "vision_config" miss some info
#19 opened 9 months ago
by
huanggefan
Update chat template to support multimodal function calling
1
#18 opened 10 months ago
by
nicolafan
Do not end message correctly (english)
#17 opened 10 months ago
by
kengboon
get image bbox value
#15 opened 12 months ago
by
devops724
HF Model has visibly lower performance than chat.qwen.ai
1
#14 opened 12 months ago
by
johnxin-v
为什么reasoning是英文的
#13 opened about 1 year ago
by
kevinBusinessGenrator
Internal Server Error 500 in VLLM while using some images.
➕ 4
1
#12 opened about 1 year ago
by
as-sriram
Submit an ollama to thank you for your work
👍 7
#7 opened about 1 year ago
by
NeoShadow
Qwen2_5_VLForConditionalGeneration Import error
3
#6 opened about 1 year ago
by
FloSophorae
Request to open-source the base model Qwen/Qwen2.5-VL-32B
👍 4
#5 opened about 1 year ago
by
zwt963
Thank You for Open-Sourcing Your Model & Feedback
1
#4 opened about 1 year ago
by
rameshch
竖排文字识别建议优化一下
👍 2
7
#3 opened about 1 year ago
by
liuqjox
AWQ Version
👍 9
1
#2 opened about 1 year ago
by
devops724
You guys ROCK! I ❤️ Qwen!
❤️ 7
3
#1 opened about 1 year ago
by
Mdubbya