Downloads · 30 days
0
wangkanai/qwen3-vl-32b-instruct
qwen3-vl-32b-instruct 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.
Qwen3-VL-32B-Instruct is a state-of-the-art multimodal large language model developed by Qwen team at Alibaba Cloud. With 33 billion parameters, this model represents the most powerful vision-language model in the Qwe…
Downloads · 30 days
0
Access
Public
Updated Oct 28, 2025
Repo size
—
Likes
1
Public
Click a slice to open those files.
.md12 KB · 89%
From the Hugging Face model README
Qwen3-VL-32B-Instruct is a state-of-the-art multimodal large language model developed by Qwen team at Alibaba Cloud. With 33 billion parameters, this model represents the most powerful vision-language model in the Qwen series, delivering comprehensive upgrades across multiple dimensions including superior text understanding & generation, deeper visual perception & reasoning, extended context length, enhanced spatial and video dynamics comprehension, and stronger agent interaction capabilities.
Note: This directory is prepared for storing Qwen3-VL-32B-Instruct model files. Model files should be downloaded from the official Hugging Face repository.
qwen3-vl-32b-instruct/
├── config.json # Model configuration
├── generation_config.json # Generation parameters
├── model-*.safetensors # Model weight shards (multiple files)
├── model.safetensors.index.json # Weight shard index
├── preprocessor_config.json # Preprocessing configuration
├── tokenizer.json # Tokenizer vocabulary
├── tokenizer_config.json # Tokenizer configuration
├── merges.txt # BPE merges
└── vocab.json # Vocabulary file
flash_attention_2 for better acceleration and memory savingtorch.bfloat16 or automatic dtype selectionpip install transformers accelerate torch pillow
pip install flash-attn --no-build-isolation # Optional but recommended
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from PIL import Image
import torch
# Model path - update with your local path
model_path = "E:/huggingface/qwen3-vl-32b-instruct"
# Load model and processor
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
device_map="auto",
attn_implementation="flash_attention_2" # Recommended
)
processor = AutoProcessor.from_pretrained(model_path)
# Example: Image understanding
image = Image.open("path/to/your/image.jpg")
messages = [
{
"role": "user",
"content": [
{"type": "image"},
{"type": "text", "text": "Describe this image in detail."}
]
}
]
# Prepare inputs
text = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(
text=[text],
images=[image],
return_tensors="pt",
padding=True
)
inputs = inputs.to(model.device)
# Generate response
output_ids = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=False
)
# Decode output
generated_text = processor.batch_decode(
output_ids,
skip_special_tokens=True,
clean_up_tokenization_spaces=False
)[0]
print(generated_text)
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
import torch
import cv2
import numpy as np
model_path = "E:/huggingface/qwen3-vl-32b-instruct"
# Load model
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
device_map="auto",
attn_implementation="flash_attention_2"
)
processor = AutoProcessor.from_pretrained(model_path)
# Load video frames
def load_video_frames(video_path, max_frames=16):
cap = cv2.VideoCapture(video_path)
frames = []
total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
indices = np.linspace(0, total_frames - 1, max_frames, dtype=int)
for idx in indices:
cap.set(cv2.CAP_PROP_POS_FRAMES, idx)
ret, frame = cap.read()
if ret:
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
frames.append(Image.fromarray(frame))
cap.release()
return frames
# Process video
video_frames = load_video_frames("path/to/video.mp4")
messages = [
{
"role": "user",
"content": [
{"type": "video"},
{"type": "text", "text": "Summarize what happens in this video."}
]
}
]
text = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(
text=[text],
videos=[video_frames],
return_tensors="pt"
)
inputs = inputs.to(model.device)
# Generate
output_ids = model.generate(
**inputs,
max_new_tokens=2048
)
response = processor.batch_decode(
output_ids,
skip_special_tokens=True
)[0]
print(response)
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from PIL import Image
import torch
model_path = "E:/huggingface/qwen3-vl-32b-instruct"
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
device_map="auto",
attn_implementation="flash_attention_2"
)
processor = AutoProcessor.from_pretrained(model_path)
# Load multiple images
images = [
Image.open("image1.jpg"),
Image.open("image2.jpg"),
Image.open("image3.jpg")
]
messages = [
{
"role": "user",
"content": [
{"type": "image"},
{"type": "image"},
{"type": "image"},
{"type": "text", "text": "Compare these three images and explain the differences."}
]
}
]
text = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(
text=[text],
images=images,
return_tensors="pt"
)
inputs = inputs.to(model.device)
output_ids = model.generate(**inputs, max_new_tokens=1024)
response = processor.batch_decode(output_ids, skip_special_tokens=True)[0]
print(response)
Enable Flash Attention 2:
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_path,
attn_implementation="flash_attention_2"
)
Use Mixed Precision:
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_path,
torch_dtype=torch.bfloat16
)
Device Mapping for Multi-GPU:
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_path,
device_map="auto" # Automatic distribution across GPUs
)
Gradient Checkpointing (for fine-tuning):
model.gradient_checkpointing_enable()
max_new_tokenstop_p and top_k for controlled generationdo_sample=True for more diverse outputsThis model is released under the Apache License 2.0.
You are free to:
Conditions:
See the full license at: https://www.apache.org/licenses/LICENSE-2.0
If you use Qwen3-VL-32B-Instruct in your research or applications, please cite:
@article{qwen3vl2025,
title={Qwen3-VL: The Most Powerful Vision-Language Model in the Qwen Series},
author={Qwen Team},
journal={arXiv preprint},
year={2025},
institution={Alibaba Cloud}
}
For questions, issues, or feedback:
Generated with Claude Code - Professional model documentation for local Hugging Face repositories.