Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_vl
nvidia
qwen3
qwen3-vl
nvfp4
quantized
blackwell
sm121
elk-ai
vllm
cuda13
fp4
vision-language
thinking
reasoning
multimodal
conversational
8-bit precision
modelopt
Instructions to use cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16") 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("cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16") model = AutoModelForImageTextToText.from_pretrained("cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16") 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 cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16", "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/cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16
- SGLang
How to use cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16 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 "cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16" \ --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": "cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16", "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 "cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16" \ --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": "cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16", "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 cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16 with Docker Model Runner:
docker model run hf.co/cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16
Qwen3-VL-4B-Thinking NVFP4 W4A16
First NVFP4 Quantization of Qwen3-VL-4B-Thinking
By Mutaz Al Awamleh | ELK-AI
Model Description
This is the first publicly available NVFP4 W4A16 quantized version of Qwen3-VL-4B-Thinking, a vision-language model optimized for NVIDIA Blackwell (SM121) architecture.
| Attribute | Original | NVFP4 Quantized |
|---|---|---|
| Parameters | 4B | Same |
| Architecture | Vision-Language + Thinking | Same |
| Model Size | ~8.3 GB | ~3.5 GB |
| Memory Savings | - | 58% |
| Precision | BF16 | FP4 W4A16 |
Quick Start
Using vLLM (Recommended)
from vllm import LLM, SamplingParams
model = LLM(
model="cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16",
trust_remote_code=True,
quantization="modelopt_fp4",
kv_cache_dtype="fp8",
gpu_memory_utilization=0.95
)
sampling_params = SamplingParams(temperature=0.7, max_tokens=512)
prompt = "Think step by step: What is shown in this image?"
outputs = model.generate([prompt], sampling_params)
print(outputs[0].outputs[0].text)
Using Docker (Pre-loaded)
# Pull the optimized container
docker pull elkaioptimization/vllm-nvfp4-cuda-13:qwen3-vl-4b-thinking-nvfp4-1.0
# Run with OpenAI-compatible API
docker run --gpus all -p 8000:8000 \
elkaioptimization/vllm-nvfp4-cuda-13:qwen3-vl-4b-thinking-nvfp4-1.0
Quantization Details
| Parameter | Value |
|---|---|
| Quantization Format | NVFP4 (FP4 E2M1) |
| Weight Precision | 4-bit (W4) |
| Activation Precision | 16-bit (A16) |
| Block Size | 16 elements |
| Scale Format | FP8 E4M3 |
| Calibration Dataset | CNN/DailyMail (512 samples) |
| Calibration Method | AWQ-style |
| Tool Used | NVIDIA TensorRT-Model-Optimizer |
Hardware Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| GPU | RTX 3070 (8GB) | RTX 4090 / DGX Spark |
| GPU Memory | 8 GB | 24 GB+ |
| CUDA | 12.4+ | 13.0 |
| Driver | 560+ | 570+ |
Model Architecture
Qwen3-VL-4B-Thinking features:
- Vision-Language: Processes both images and text inputs
- Enhanced Reasoning: Optimized for step-by-step thinking and complex reasoning
- Extended Context: 32K native, 262K extended context length
- Multilingual: Strong performance in English and Chinese
Links
| Resource | Link |
|---|---|
| Original Model | Qwen/Qwen3-VL-4B-Thinking |
| Docker (Org) | elkaioptimization/vllm-nvfp4-cuda-13 |
| Docker (Personal) | mutazai/vllm-spark-blackwell-nvfp4-optimized |
| Author | Mutaz Al Awamleh |
| Organization | ELK-AI |
License
This model is released under the Apache 2.0 License, same as the original Qwen3 model.
Built by Mutaz Al Awamleh | ELK-AI
First to quantize Qwen3-VL-4B-Thinking to NVFP4 for Blackwell
- Downloads last month
- 662
Model tree for cybermotaz/qwen3-vl-4b-thinking-nvfp4-w4a16
Base model
Qwen/Qwen3-VL-4B-Thinking