Downloads · 30 days
102
6% of all-time downloads
wangkanai/qwen3-vl-8b-thinking
qwen3-vl-8b-thinking is a image-text-to-text model from wangkanai. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Qwen 3 VL 8B Thinking is a vision-language multimodal model with 8 billion parameters, part of the Qwen 3 family developed by Alibaba Cloud. This model combines vision and language understanding capabilities with exte…
Downloads · 30 days
102
6% of all-time downloads
All-time downloads
1.6K
Public
Repo size
47.7 GB
Likes
2
Public
Click a slice to open those files.
.gguf30.1 GB · 63%
From the Hugging Face model README
Qwen 3 VL 8B Thinking is a vision-language multimodal model with 8 billion parameters, part of the Qwen 3 family developed by Alibaba Cloud. This model combines vision and language understanding capabilities with extended "thinking" or reasoning capabilities for complex visual question answering and multimodal tasks.
Key Capabilities:
⚠️ Note: This directory is currently being prepared for model files.
Expected model structure:
qwen3-vl-8b-thinking/
├── config.json # Model configuration
├── model.safetensors # Main model weights (~16GB)
├── tokenizer.json # Tokenizer configuration
├── tokenizer_config.json # Tokenizer settings
├── special_tokens_map.json # Special tokens mapping
├── preprocessor_config.json # Image preprocessor config
├── generation_config.json # Generation parameters
└── README.md # This file
Expected Total Size: ~16-20 GB (FP16 precision)
from transformers import AutoModelForVision2Seq, AutoProcessor
from PIL import Image
import torch
# Load model and processor
model_path = "E:/huggingface/qwen3-vl-8b-thinking"
model = AutoModelForVision2Seq.from_pretrained(
model_path,
torch_dtype=torch.float16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_path)
# Load and process image
image = Image.open("example.jpg")
prompt = "Describe this image in detail and explain what's happening."
# Prepare inputs
inputs = processor(
text=prompt,
images=image,
return_tensors="pt"
).to(model.device)
# Generate response with thinking
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_p=0.9
)
# Decode response
response = processor.decode(outputs[0], skip_special_tokens=True)
print(response)
# Ask specific questions about images
questions = [
"What objects are visible in this image?",
"What is the main activity taking place?",
"What might happen next in this scene?"
]
for question in questions:
inputs = processor(
text=question,
images=image,
return_tensors="pt"
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
answer = processor.decode(outputs[0], skip_special_tokens=True)
print(f"Q: {question}")
print(f"A: {answer}\n")
from pathlib import Path
# Process multiple images
image_dir = Path("images/")
images = [Image.open(img) for img in image_dir.glob("*.jpg")]
prompts = ["Analyze this image:"] * len(images)
# Batch processing
inputs = processor(
text=prompts,
images=images,
return_tensors="pt",
padding=True
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
responses = [processor.decode(out, skip_special_tokens=True) for out in outputs]
for img_path, response in zip(image_dir.glob("*.jpg"), responses):
print(f"\n{img_path.name}:")
print(response)
from transformers import BitsAndBytesConfig
# 8-bit quantization for lower VRAM usage
quantization_config = BitsAndBytesConfig(
load_in_8bit=True,
bnb_8bit_compute_dtype=torch.float16
)
model = AutoModelForVision2Seq.from_pretrained(
model_path,
quantization_config=quantization_config,
device_map="auto"
)
# Use as normal - ~50% VRAM reduction
model = AutoModelForVision2Seq.from_pretrained(
model_path,
torch_dtype=torch.float16,
attn_implementation="flash_attention_2",
device_map="auto"
)
model = torch.compile(model, mode="reduce-overhead")
# Resize large images before processing
from PIL import Image
def preprocess_image(img_path, max_size=1024):
img = Image.open(img_path)
if max(img.size) > max_size:
img.thumbnail((max_size, max_size), Image.Resampling.LANCZOS)
return img
Batch Similar-Sized Images: Group images by size for efficient batch processing
Use Lower Precision for Inference: FP16 or BF16 for speed, 8-bit for VRAM constraints
import torch
import gc
# Clear cache between batches
def clear_memory():
gc.collect()
torch.cuda.empty_cache()
# Use after processing batches
clear_memory()
This model is released under the Apache 2.0 License.
You are free to:
Conditions:
See the Apache 2.0 License for full terms.
If you use this model in your research or applications, please cite:
@misc{qwen3-vl-8b-thinking,
title={Qwen 3 VL 8B Thinking: Vision-Language Model with Reasoning},
author={Qwen Team, Alibaba Cloud},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/Qwen/Qwen3-VL-8B-Thinking}}
}
Version: 1.0 Last Updated: 2025-11-05 Model Type: Vision-Language Multimodal Status: Ready for local deployment