Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
embedding
multimodal
int8
w8a8
compressed-tensors
vllm
conversational
8-bit precision
Instructions to use collin-park/Qwen3-VL-Embedding-8B-W8A8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use collin-park/Qwen3-VL-Embedding-8B-W8A8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="collin-park/Qwen3-VL-Embedding-8B-W8A8") 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("collin-park/Qwen3-VL-Embedding-8B-W8A8") model = AutoModelForMultimodalLM.from_pretrained("collin-park/Qwen3-VL-Embedding-8B-W8A8", 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 collin-park/Qwen3-VL-Embedding-8B-W8A8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "collin-park/Qwen3-VL-Embedding-8B-W8A8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "collin-park/Qwen3-VL-Embedding-8B-W8A8", "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/collin-park/Qwen3-VL-Embedding-8B-W8A8
- SGLang
How to use collin-park/Qwen3-VL-Embedding-8B-W8A8 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 "collin-park/Qwen3-VL-Embedding-8B-W8A8" \ --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": "collin-park/Qwen3-VL-Embedding-8B-W8A8", "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 "collin-park/Qwen3-VL-Embedding-8B-W8A8" \ --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": "collin-park/Qwen3-VL-Embedding-8B-W8A8", "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 collin-park/Qwen3-VL-Embedding-8B-W8A8 with Docker Model Runner:
docker model run hf.co/collin-park/Qwen3-VL-Embedding-8B-W8A8
Qwen3-VL-Embedding-8B-W8A8
W8A8 INT8 quantization of Qwen/Qwen3-VL-Embedding-8B — the #1 multimodal embedding model on MMEB-V2 (77.9).
Quantization Details
| Property | Value |
|---|---|
| Method | GPTQ W8A8 INT8 (weights INT8 per-channel, activations INT8 dynamic per-token) |
| Format | compressed-tensors (vLLM native) |
| Tool | llm-compressor |
| Calibration | 512 samples from ultrachat-200k (train_sft split), max 2048 tokens |
| Vision encoder | Kept in BF16 (not quantized) |
| Non-linear weights | Preserved exactly (norms, biases, embed_tokens) |
| Model size | ~10.5 GB (down from ~16 GB BF16) |
What's NOT quantized
- Vision encoder (
model.visual.*) — kept in full BF16 - All RMSNorm weights
- Embedding table (
embed_tokens) lm_head(not used for embeddings)
No SmoothQuant was applied — it corrupts norm weights which destroys embedding quality.
Serving with vLLM
vllm serve collin-park/Qwen3-VL-Embedding-8B-W8A8 \
--quantization compressed-tensors \
--runner pooling \
--trust-remote-code \
--gpu-memory-utilization 0.90 \
--max-model-len 32768 \
--max-num-seqs 8 \
--host 0.0.0.0 \
--port 8100
Tested with vLLM 0.17.1 on RTX 3090 (24GB). Uses ~10.4 GB VRAM for model + ~10.9 GB KV cache at 0.90 GPU utilization.
API Usage
curl http://localhost:8100/v1/embeddings \
-H "Content-Type: application/json" \
-d '{"input": "What is machine learning?", "model": "collin-park/Qwen3-VL-Embedding-8B-W8A8"}'
Original Model
- Architecture: Qwen3-VL (8B params, 36 layers, 4096-dim embeddings)
- Context: 32K tokens
- Modalities: Text, images, screenshots, video
- Benchmarks: MMEB-V2 77.9, MMTEB retrieval 81.08
- MRL: Supports custom embedding dimensions (64-4096)
See Qwen/Qwen3-VL-Embedding-8B for full details.
Quantization Recipe
from transformers import Qwen3VLForConditionalGeneration
from llmcompressor import oneshot
from llmcompressor.modifiers.quantization import GPTQModifier
model = Qwen3VLForConditionalGeneration.from_pretrained(
"Qwen/Qwen3-VL-Embedding-8B", dtype="auto", device_map="auto", trust_remote_code=True
)
recipe = [GPTQModifier(targets="Linear", scheme="W8A8", ignore=["lm_head", "re:.*visual.*"])]
oneshot(
model=model, dataset="ultrachat-200k", splits={"calibration": "train_sft"},
recipe=recipe, max_seq_length=2048, num_calibration_samples=512,
output_dir="Qwen3-VL-Embedding-8B-W8A8",
)
Key choices:
Qwen3VLForConditionalGeneration(notAutoModel) — preservesmodel.*weight prefix for vLLM compatibility- No
SmoothQuantModifier— it modifies RMSNorm weights, destroying embedding quality ignore=["re:.*visual.*"]— keep ViT in BF16 for quality
- Downloads last month
- 830