Image-Text-to-Text
Transformers
Safetensors
English
qwen2_vl
quantization
4-bit precision
chain-of-zoom
super-resolution
vlm
bitsandbytes
conversational
Instructions to use humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom") 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("humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom") model = AutoModelForImageTextToText.from_pretrained("humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom") 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 humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom", "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/humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom
- SGLang
How to use humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom 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 "humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom" \ --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": "humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom", "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 "humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom" \ --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": "humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom", "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 humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom with Docker Model Runner:
docker model run hf.co/humbleakh/qwen2.5-vl-3b-4bit-chain-of-zoom
Upload 4-bit quantized Qwen2.5-VL-3B for Chain-of-Zoom
Browse files- README.md +4 -4
- config.json +1 -0
- model.safetensors +1 -1
- preprocessor_config.json +1 -1
- tokenizer_config.json +1 -1
- video_preprocessor_config.json +1 -1
README.md
CHANGED
|
@@ -11,14 +11,14 @@ base_model: Qwen/Qwen2.5-VL-3B-Instruct
|
|
| 11 |
license: apache-2.0
|
| 12 |
language:
|
| 13 |
- en
|
| 14 |
-
pipeline_tag:
|
| 15 |
---
|
| 16 |
|
| 17 |
# Qwen2.5-VL-3B 4-bit Quantized for Chain-of-Zoom
|
| 18 |
|
| 19 |
## ๐ Model Description
|
| 20 |
|
| 21 |
-
4-bit quantized Vision-Language Model optimized for super-resolution
|
| 22 |
|
| 23 |
This model is part of the **Chain-of-Zoom 4-bit Quantized Pipeline** - a memory-optimized version of the original Chain-of-Zoom super-resolution framework.
|
| 24 |
|
|
@@ -68,11 +68,11 @@ bnb_config = BitsAndBytesConfig(
|
|
| 68 |
|
| 69 |
## ๐ง Technical Specifications
|
| 70 |
|
| 71 |
-
- **Created**: 2025-06-08
|
| 72 |
- **Quantization Library**: BitsAndBytes
|
| 73 |
- **Framework**: PyTorch + Transformers
|
| 74 |
- **Precision**: 4-bit NF4
|
| 75 |
-
- **Model Size**: 2899.
|
| 76 |
|
| 77 |
## ๐ Citation
|
| 78 |
|
|
|
|
| 11 |
license: apache-2.0
|
| 12 |
language:
|
| 13 |
- en
|
| 14 |
+
pipeline_tag: image-text-to-text
|
| 15 |
---
|
| 16 |
|
| 17 |
# Qwen2.5-VL-3B 4-bit Quantized for Chain-of-Zoom
|
| 18 |
|
| 19 |
## ๐ Model Description
|
| 20 |
|
| 21 |
+
4-bit quantized Vision-Language Model optimized for Chain-of-Zoom super-resolution
|
| 22 |
|
| 23 |
This model is part of the **Chain-of-Zoom 4-bit Quantized Pipeline** - a memory-optimized version of the original Chain-of-Zoom super-resolution framework.
|
| 24 |
|
|
|
|
| 68 |
|
| 69 |
## ๐ง Technical Specifications
|
| 70 |
|
| 71 |
+
- **Created**: 2025-06-08 17:10:40
|
| 72 |
- **Quantization Library**: BitsAndBytes
|
| 73 |
- **Framework**: PyTorch + Transformers
|
| 74 |
- **Precision**: 4-bit NF4
|
| 75 |
+
- **Model Size**: 2899.8802061080933 MB
|
| 76 |
|
| 77 |
## ๐ Citation
|
| 78 |
|
config.json
CHANGED
|
@@ -112,6 +112,7 @@
|
|
| 112 |
"spatial_patch_size": 14,
|
| 113 |
"temporal_patch_size": 2,
|
| 114 |
"tokens_per_second": 2,
|
|
|
|
| 115 |
"window_size": 112
|
| 116 |
},
|
| 117 |
"vision_end_token_id": 151653,
|
|
|
|
| 112 |
"spatial_patch_size": 14,
|
| 113 |
"temporal_patch_size": 2,
|
| 114 |
"tokens_per_second": 2,
|
| 115 |
+
"torch_dtype": "bfloat16",
|
| 116 |
"window_size": 112
|
| 117 |
},
|
| 118 |
"vision_end_token_id": 151653,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3024861693
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de593e892f76e8b97f2344896ad5a1b8db248be9b92cdfde7bcd2d231dcee6a6
|
| 3 |
size 3024861693
|
preprocessor_config.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
| 18 |
"merge_size": 2,
|
| 19 |
"min_pixels": 3136,
|
| 20 |
"patch_size": 14,
|
| 21 |
-
"processor_class": "
|
| 22 |
"resample": 3,
|
| 23 |
"rescale_factor": 0.00392156862745098,
|
| 24 |
"size": {
|
|
|
|
| 18 |
"merge_size": 2,
|
| 19 |
"min_pixels": 3136,
|
| 20 |
"patch_size": 14,
|
| 21 |
+
"processor_class": "Qwen2VLProcessor",
|
| 22 |
"resample": 3,
|
| 23 |
"rescale_factor": 0.00392156862745098,
|
| 24 |
"size": {
|
tokenizer_config.json
CHANGED
|
@@ -201,7 +201,7 @@
|
|
| 201 |
"extra_special_tokens": {},
|
| 202 |
"model_max_length": 131072,
|
| 203 |
"pad_token": "<|endoftext|>",
|
| 204 |
-
"processor_class": "
|
| 205 |
"split_special_tokens": false,
|
| 206 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 207 |
"unk_token": null
|
|
|
|
| 201 |
"extra_special_tokens": {},
|
| 202 |
"model_max_length": 131072,
|
| 203 |
"pad_token": "<|endoftext|>",
|
| 204 |
+
"processor_class": "Qwen2VLProcessor",
|
| 205 |
"split_special_tokens": false,
|
| 206 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 207 |
"unk_token": null
|
video_preprocessor_config.json
CHANGED
|
@@ -73,7 +73,7 @@
|
|
| 73 |
"merge_size"
|
| 74 |
],
|
| 75 |
"patch_size": 14,
|
| 76 |
-
"processor_class": "
|
| 77 |
"resample": 3,
|
| 78 |
"rescale_factor": 0.00392156862745098,
|
| 79 |
"size": {
|
|
|
|
| 73 |
"merge_size"
|
| 74 |
],
|
| 75 |
"patch_size": 14,
|
| 76 |
+
"processor_class": "Qwen2VLProcessor",
|
| 77 |
"resample": 3,
|
| 78 |
"rescale_factor": 0.00392156862745098,
|
| 79 |
"size": {
|