Instructions to use Qwen/Qwen-VL-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen-VL-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qwen/Qwen-VL-Chat", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Qwen/Qwen-VL-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen-VL-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen-VL-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Qwen/Qwen-VL-Chat
- SGLang
How to use Qwen/Qwen-VL-Chat 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/Qwen-VL-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen-VL-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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/Qwen-VL-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen-VL-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Qwen/Qwen-VL-Chat with Docker Model Runner:
docker model run hf.co/Qwen/Qwen-VL-Chat
有一个难以修复的错误/A hard-to-fix bug
#29 opened 4 months ago
by
crashed123
Update README.md
#28 opened 8 months ago
by
Brunomtt
没有多模态模型 QWenVLChatModel
1
#27 opened about 1 year ago
by
jerry-lion
我无法使用他
#25 opened over 1 year ago
by
MaxZhuangYan
May be a bug
#24 opened over 1 year ago
by
DSY001
Interview request: genAI evaluation & documentation
#23 opened over 1 year ago
by
evatang
为什么Int4 的模型在EN上表现比BF16还要好?
#21 opened almost 2 years ago
by
YijunYang280
Poor OCR performance
#20 opened about 2 years ago
by
lihan
Few shot learning with model
👍 2
1
#19 opened about 2 years ago
by
eitangreenb
VL-Chat测试中学物理试卷识别胡说八道
5
#18 opened about 2 years ago
by
william0014
是否有计划采用Qwen2-14B?
#17 opened about 2 years ago
by
william0014
Update visual.py
#15 opened about 2 years ago
by
Matankl
How to load local image files
👍 12
2
#13 opened over 2 years ago
by
rene-hof
Adding `safetensors` variant of this model
#12 opened over 2 years ago
by
SFconvertbot
Floating point exception (core dumped) 是什么原因呢?
1
#11 opened over 2 years ago
by
renoyuan
如何让模型稳定回答?
#10 opened over 2 years ago
by
champock
A confusion on cross-attention module
1
#9 opened over 2 years ago
by
tibetgao
Adding `safetensors` variant of this model
#8 opened over 2 years ago
by
SFconvertbot
Update a link to LICENSE
#7 opened over 2 years ago
by
shotarok
Unofficial LLaMAfied Version in HF format - 非官方的LLaMA化HF格式版本
6
#5 opened over 2 years ago
by
JosephusCheung
Update tokenization_qwen.py
#4 opened over 2 years ago
by
ShushengYang
检测框,在demo界面无法正常显示是什么原因
1
#1 opened over 2 years ago
by
paul91