timm Qwen3 ViT Encoders
Collection
39 items • Updated • 4
How to use timm/qwen3_vit_88m_merge.qwen3_5_0_8b with timm:
import timm
model = timm.create_model("hf_hub:timm/qwen3_vit_88m_merge.qwen3_5_0_8b", pretrained=True)How to use timm/qwen3_vit_88m_merge.qwen3_5_0_8b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-feature-extraction", model="timm/qwen3_vit_88m_merge.qwen3_5_0_8b") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("timm/qwen3_vit_88m_merge.qwen3_5_0_8b", device_map="auto")A Qwen ViT image feature model extracted from Qwen3.5-0.8B. This is the classifier-ready wrapper retaining the native spatial merger and LLM-width projection, followed by average pooling and affine-free LayerNorm.
NOTE: This checkpoint is a native timm remap of the original vision weights, with no additional training. It contains no language-model weights or trained image-classification head.
mean=(0.5, 0.5, 0.5) and std=(0.5, 0.5, 0.5). Rectangular inputs are supported. Each image dimension must be divisible by 16; any variant using the 2×2 merger requires divisibility by 32.forward_features() returns projected NLC tokens from the native merger. encoder.forward_features() returns raw NHWC backbone features. forward() returns pooled image embeddings until a classification head is added.import torch
import timm
from PIL import Image
model = timm.create_model('hf-hub:timm/qwen3_vit_88m_merge.qwen3_5_0_8b', pretrained=True).eval()
data_config = timm.data.resolve_model_data_config(model)
transform = timm.data.create_transform(**data_config, is_training=False)
image = Image.open('image.jpg').convert('RGB')
x = transform(image).unsqueeze(0)
with torch.inference_mode():
output = model(x) # (1, 1024): image embeddings
features = model.forward_features(x) # (1, 576, 1024): projected spatial tokens (NLC)
with torch.inference_mode():
maps = model.forward_intermediates(
x, indices=3, output_fmt='NCHW', intermediates_only=True,
)
for feature_map in maps:
print(feature_map.shape) # (1, 768, 48, 48)
model = timm.create_model(
'hf-hub:timm/qwen3_vit_88m_merge.qwen3_5_0_8b', pretrained=True, num_classes=45,
)
logits = model(x) # (1, 45)
The new linear head is randomly initialized and must be trained on your target dataset.
@misc{qwen3.5,
title={{Qwen3.5}: Towards Native Multimodal Agents},
author={{Qwen Team}},
month={February},
year={2026},
url={https://qwen.ai/blog?id=qwen3.5}
}
@misc{rw2019timm,
author = {Ross Wightman},
title = {PyTorch Image Models},
year = {2019},
publisher = {GitHub},
journal = {GitHub repository},
doi = {10.5281/zenodo.4414861},
howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
}