Views
No views yet
model.visual from
Qwen/Qwen3-VL-32B-Instruct, revision
0cfaf48183f594c314753d30a4c4974bc75f3ccb.Qwen3VLVisionModel: patch embedding,
27 vision-transformer blocks, the 5120-dimensional merger, and the three
DeepStack merger heads. It does not contain language-model or LM-head weights.model.visual. was removed so the checkpoint is laid out
for a standalone Qwen3VLVisionModel. The extraction script operates directly
on safetensors headers and byte ranges; it never constructs or loads a model.
No tensor value was altered: the concatenated payload of the extracted file
hashes identically to the corresponding byte ranges of the source shards.qwen3_vl_vision is a registered model_type, so the checkpoint loads through
the auto classes with no trust_remote_code.1import torch
2from PIL import Image
3from transformers import AutoImageProcessor, AutoModel
4
5repo = "giovannioliveira/Qwen3-VL-32B-vision-encoder"
6
7processor = AutoImageProcessor.from_pretrained(repo)
8model = AutoModel.from_pretrained(repo, dtype=torch.bfloat16).eval().cuda()
9
10image = Image.open("photo.jpg").convert("RGB")
11inputs = processor(images=image, return_tensors="pt").to(model.device)
12
13with torch.inference_mode():
14 output = model(
15 hidden_states=inputs["pixel_values"].to(torch.bfloat16),
16 grid_thw=inputs["image_grid_thw"],
17 )
18
19output.pooler_output # [merged_tokens, 5120] -- the merger output
20output.deepstack_features # 3 x [merged_tokens, 5120], blocks 8, 16, 24
21output.last_hidden_state # [patches, 1152], pre-merge[pooler_output, *deepstack_features].preprocessor_config.json ships the upstream longest_edge of 16,777,216,
which smart_resize treats as a total-pixel budget rather than a side length --
one 16.7 MP image becomes 16,384 merged tokens. Attention inside an image is
quadratic in that image's own patch count, so lower
processor.size["longest_edge"] to whatever your token budget actually allows.model.safetensors: 351 BF16 tensors and 595,266,800 parametersconfig.json: standalone qwen3_vl_vision configurationpreprocessor_config.json: image preprocessing configurationvideo_preprocessor_config.json: video preprocessing configurationextraction_manifest.json: source revision, sizes, and checksumsextract_vision_safetensors.py, verify_extraction.py: the extraction and
verification toolingextraction_manifest.json records the checksums, so a download can be checked
against it without touching the source model:1sha256sum model.safetensors
2# 8f079a0bbeaeebb9af02b9094cbf83a717349c850b8600601e6ec2ced32a80de1# ~64 GB of source shards
2snapshot=$(hf download Qwen/Qwen3-VL-32B-Instruct \
3 --revision 0cfaf48183f594c314753d30a4c4974bc75f3ccb \
4 --include "model*.safetensors" "model.safetensors.index.json")
5
6python3 verify_extraction.py "$snapshot" model.safetensorsextract_vision_safetensors.py reproduces the checkpoint from the same
snapshot:python3 extract_vision_safetensors.py "$snapshot" model.safetensorsLICENSE for the full text.model.visual. prefix are included; every
language-model and LM-head tensor is droppedmodel.visual. prefix is stripped from the remaining tensor namesconfig.json is the parent config's vision_config verbatim, with
model_type changed from qwen3_vl to qwen3_vl_vision and
architectures, dtype, and transformers_version added so the checkpoint
resolves as a standalone model