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 Settings
- 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,9 +18,28 @@ inference: false
|
|
| 18 |
<br>
|
| 19 |
|
| 20 |
<p align="center">
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
<br>
|
| 23 |
-
<a href="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
</p>
|
| 25 |
<br>
|
| 26 |
|
|
|
|
| 18 |
<br>
|
| 19 |
|
| 20 |
<p align="center">
|
| 21 |
+
Qwen-VL
|
| 22 |
+
<a href="https://huggingface.co/Qwen/Qwen-VL">🤗</a>
|
| 23 |
+
<a href="https://modelscope.cn/models/qwen/Qwen-VL/summary">🤖</a>  |
|
| 24 |
+
Qwen-VL-Chat
|
| 25 |
+
<a href="https://huggingface.co/Qwen/Qwen-VL-Chat">🤗</a>
|
| 26 |
+
<a href="https://modelscope.cn/models/qwen/Qwen-VL-Chat/summary">🤖</a> 
|
| 27 |
+
(Int4:
|
| 28 |
+
<a href="https://huggingface.co/Qwen/Qwen-VL-Chat-Int4">🤗</a>
|
| 29 |
+
<a href="https://modelscope.cn/models/qwen/Qwen-VL-Chat-Int4/summary">🤖</a> ) |
|
| 30 |
+
Qwen-VL-Plus
|
| 31 |
+
<a href="https://huggingface.co/spaces/Qwen/Qwen-VL-Plus">🤗</a>
|
| 32 |
+
<a href="https://modelscope.cn/studios/qwen/Qwen-VL-Chat-Demo/summary">🤖</a>  |
|
| 33 |
+
Qwen-VL-Max
|
| 34 |
+
<a href="https://huggingface.co/spaces/Qwen/Qwen-VL-Max">🤗</a>
|
| 35 |
+
<a href="https://modelscope.cn/studios/qwen/Qwen-VL-Max/summary">🤖</a> 
|
| 36 |
<br>
|
| 37 |
+
<a href="https://tongyi.aliyun.com/qianwen">Web</a>   |   
|
| 38 |
+
<a href="https://help.aliyun.com/zh/dashscope/developer-reference/vl-plus-quick-start">API</a>   |   
|
| 39 |
+
<a href="assets/wechat.png">WeChat</a>   |   
|
| 40 |
+
<a href="https://discord.gg/z3GAxXZ9Ce">Discord</a>   |   
|
| 41 |
+
<a href="https://arxiv.org/abs/2308.12966">Paper</a>   |   
|
| 42 |
+
<a href="TUTORIAL.md">Tutorial</a>
|
| 43 |
</p>
|
| 44 |
<br>
|
| 45 |
|