Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
vision-language
object-detection
referring-expression-comprehension
object-counting
point-grounding
ocr
referring-expression-segmentation
image-matting
conversational
Instructions to use tencent/WeVisOne-VL-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/WeVisOne-VL-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tencent/WeVisOne-VL-4B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("tencent/WeVisOne-VL-4B") model = AutoModelForMultimodalLM.from_pretrained("tencent/WeVisOne-VL-4B", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/WeVisOne-VL-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/WeVisOne-VL-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/WeVisOne-VL-4B", "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/tencent/WeVisOne-VL-4B
- SGLang
How to use tencent/WeVisOne-VL-4B 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 "tencent/WeVisOne-VL-4B" \ --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": "tencent/WeVisOne-VL-4B", "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 "tencent/WeVisOne-VL-4B" \ --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": "tencent/WeVisOne-VL-4B", "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 tencent/WeVisOne-VL-4B with Docker Model Runner:
docker model run hf.co/tencent/WeVisOne-VL-4B
Add links to paper and project page
#2
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
pipeline_tag: image-text-to-text
|
| 4 |
-
library_name: transformers
|
| 5 |
tags:
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
---
|
| 15 |
|
| 16 |
# WeVisOne-VL: Unified Visual Perception from Objects to Pixels
|
| 17 |
|
|
|
|
|
|
|
| 18 |
**WeVisOne-VL** (**We**Chat **Vis**ion All-in-**One**) is a unified vision-language model developed by WeChat Vision, Tencent Inc. Built upon Qwen3-VL, it unifies object-level perception (open-vocabulary object detection, referring localization, object counting, object pointing, and OCR) and pixel-level perception (referring segmentation and promptable alpha matting) through structured next-token prediction and a lightweight 9.6M-parameter pixel decoder.
|
| 19 |
|
| 20 |
## Quick Start
|
|
@@ -53,4 +55,4 @@ The release is intended for research in visual grounding, referring localization
|
|
| 53 |
|
| 54 |
Unless otherwise noted, Tencent-authored code in this repository is released under the [Apache License 2.0](LICENSE).
|
| 55 |
|
| 56 |
-
Third-party components retain their original licenses and copyright notices. Please review the corresponding source files before use.
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
pipeline_tag: image-text-to-text
|
|
|
|
| 5 |
tags:
|
| 6 |
+
- vision-language
|
| 7 |
+
- object-detection
|
| 8 |
+
- referring-expression-comprehension
|
| 9 |
+
- object-counting
|
| 10 |
+
- point-grounding
|
| 11 |
+
- ocr
|
| 12 |
+
- referring-expression-segmentation
|
| 13 |
+
- image-matting
|
| 14 |
---
|
| 15 |
|
| 16 |
# WeVisOne-VL: Unified Visual Perception from Objects to Pixels
|
| 17 |
|
| 18 |
+
**Paper:** [WeVisOne-VL: Unified Visual Perception from Objects to Pixels](https://huggingface.co/papers/2610.31329) | **Project Page:** [WeVisOne-VL](https://tencent.github.io/WeVisOne-VL)
|
| 19 |
+
|
| 20 |
**WeVisOne-VL** (**We**Chat **Vis**ion All-in-**One**) is a unified vision-language model developed by WeChat Vision, Tencent Inc. Built upon Qwen3-VL, it unifies object-level perception (open-vocabulary object detection, referring localization, object counting, object pointing, and OCR) and pixel-level perception (referring segmentation and promptable alpha matting) through structured next-token prediction and a lightweight 9.6M-parameter pixel decoder.
|
| 21 |
|
| 22 |
## Quick Start
|
|
|
|
| 55 |
|
| 56 |
Unless otherwise noted, Tencent-authored code in this repository is released under the [Apache License 2.0](LICENSE).
|
| 57 |
|
| 58 |
+
Third-party components retain their original licenses and copyright notices. Please review the corresponding source files before use.
|