timm/models/qwen3vit.py ·
Qwen3 ViT
Category: Encoder · Code:
timm/models/qwen3_vit.py ·
Architectures: 9 · Pretrained weights: 39 (0 with ImageNet-1k results)
The vision encoder of the Qwen3-VL / Qwen3.5 / Qwen3.8 multimodal models, a pre-norm ViT with a learned absolute
position grid combined with axial 2D RoPE. Classifier variants add pooling and a linear head, the _enc variants keep
the native projector that maps the tokens to the language model width.
Papers
- Qwen3-VL Technical Report
- Qwen-Drive-1.0: An Initial Step towards a Vision-Language Foundation Model for Autonomous Driving
Usage
See the Quickstart for loading pretrained weights, image preprocessing and fine-tuning, and Feature Extraction for using the models as backbones.
>>> import timm
>>> model = timm.create_model('qwen3_vit_88m.qwen3_5_0_8b', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)
Model API support
| Feature | Qwen3VitClassifier |
Qwen3VitEncoder |
|---|---|---|
features_only=True feature maps |
✓ (strides 16, 16, 16) | ✓ (strides 16, 16, 16) |
forward_intermediates() |
✓ | ✓ |
prune_intermediate_layers() |
✓ | ✓ |
| Any input size, no changes needed | ✓ | ✓ |
set_input_size() |
– | – |
dynamic_img_size=True |
– | – |
set_grad_checkpointing() |
✓ | ✓ |
Layer-wise LR decay (group_matcher()) |
✓ | ✓ |
reset_classifier() |
✓ | ✗ |
✓ supported, ✓ (square) works for square sizes only, ✗ not supported, – not needed (the model already accepts any input
size). Checked by running each feature on a randomly initialized model (Qwen3VitClassifier with qwen3_vit_88m at
256, Qwen3VitEncoder with qwen3_vit_88m_enc at 256), other architectures of the same class are expected to behave
the same. See the Model API page for details.
Architectures
| Architecture | Class | Params (M) | GMACs | Input size | Pretrained weights |
|---|---|---|---|---|---|
qwen3_vit_88m |
Qwen3VitClassifier |
87.41 | - | 768 | 1 |
qwen3_vit_88m_enc |
Qwen3VitEncoder |
100.00 | - | 768 | 1 |
qwen3_vit_88m_merge |
Qwen3VitClassifier |
100.00 | - | 768 | 1 |
qwen3_vit_306m |
Qwen3VitClassifier |
305.46 | - | 768 | 4 |
qwen3_vit_306m_enc |
Qwen3VitEncoder |
330.63 | - | 768 | 4 |
qwen3_vit_306m_merge |
Qwen3VitClassifier |
330.63 | - | 768 | 4 |
qwen3_vit_416m |
Qwen3VitClassifier |
415.01 | - | 768 | 8 |
qwen3_vit_416m_enc |
Qwen3VitEncoder |
459.85 | - | 768 | 8 |
qwen3_vit_416m_merge |
Qwen3VitClassifier |
459.85 | - | 768 | 8 |
GMACs and parameter counts are for the default input size and classifier of each architecture, from the benchmark results.
Pretrained weights
Top-1 is ImageNet-1k validation accuracy from
results-imagenet.csv at
the listed eval size, - if the weight has no ImageNet-1k result (e.g. pretraining or image-text weights). Classes is the
size of the pretrained classifier, none for weights without one.
Weights are grouped by source: the paper or origin given in the pretrained config, else a Hub organization other than
timm, else the first part of the pretrained tag (architecture.tag). Sources with a single weight are listed under
other.
Qwen/Qwen-Drive-1.0-4B
Origin: huggingface.co/Qwen/Qwen-Drive-1.0-4B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_306m.qwen_drive_1_0_4b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_enc.qwen_drive_1_0_4b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_merge.qwen_drive_1_0_4b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3-VL-235B-A22B-Instruct
Origin: huggingface.co/Qwen/Qwen3-VL-235B-A22B-Instruct
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_vl_235b_a22b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_vl_235b_a22b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_vl_235b_a22b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3-VL-30B-A3B-Instruct
Origin: huggingface.co/Qwen/Qwen3-VL-30B-A3B-Instruct
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_vl_30b_a3b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_vl_30b_a3b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_vl_30b_a3b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3-VL-32B-Instruct
Origin: huggingface.co/Qwen/Qwen3-VL-32B-Instruct
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_vl_32b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_vl_32b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_vl_32b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3-VL-4B-Instruct
Origin: huggingface.co/Qwen/Qwen3-VL-4B-Instruct
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_306m.qwen3_vl_4b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_enc.qwen3_vl_4b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_merge.qwen3_vl_4b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3-VL-8B-Instruct
Origin: huggingface.co/Qwen/Qwen3-VL-8B-Instruct
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_vl_8b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_vl_8b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_vl_8b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.5-0.8B
Origin: huggingface.co/Qwen/Qwen3.5-0.8B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_88m.qwen3_5_0_8b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_88m_enc.qwen3_5_0_8b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_88m_merge.qwen3_5_0_8b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.5-27B
Origin: huggingface.co/Qwen/Qwen3.5-27B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_5_27b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_5_27b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_5_27b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.5-2B
Origin: huggingface.co/Qwen/Qwen3.5-2B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_306m.qwen3_5_2b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_enc.qwen3_5_2b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_merge.qwen3_5_2b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.5-4B
Origin: huggingface.co/Qwen/Qwen3.5-4B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_306m.qwen3_5_4b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_enc.qwen3_5_4b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_306m_merge.qwen3_5_4b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.5-9B
Origin: huggingface.co/Qwen/Qwen3.5-9B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_5_9b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_5_9b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_5_9b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.8-27B
Origin: huggingface.co/Qwen/Qwen3.8-27B
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_8_27b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_enc.qwen3_8_27b |
768 | - | - | none | apache-2.0 | timm |
qwen3_vit_416m_merge.qwen3_8_27b |
768 | - | - | none | apache-2.0 | timm |
Qwen/Qwen3.8-Flash-Next
Origin: huggingface.co/Qwen/Qwen3.8-Flash-Next
| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---|---|---|---|---|---|
qwen3_vit_416m.qwen3_8_flash_next |
768 | - | - | none | qwen-community-1.0 | timm |
qwen3_vit_416m_enc.qwen3_8_flash_next |
768 | - | - | none | qwen-community-1.0 | timm |
qwen3_vit_416m_merge.qwen3_8_flash_next |
768 | - | - | none | qwen-community-1.0 | timm |
Source and license
Source: timm documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.