Downloads · 30 days
162
84% of all-time downloads
timm/deepseek_vit_412m_align.deepseek_v4_flash_vision_exp
deepseek_vit_412m_align.deepseek_v4_flash_vision_exp is a image feature extraction model from timm. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for timm. The card lists the license as mit.
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.
Downloads · 30 days
162
84% of all-time downloads
All-time downloads
193
Public
Parameters
466M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
From the Hugging Face model README
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.
A DeepSeek ViT image feature model extracted from DeepSeek-V4-Flash-Vision-Exp. This is the classifier-ready wrapper retaining the native spatial aligner and LLM-width projection, followed by average pooling and affine-free RMSNorm.
_enc and _align variants and omitted from the plain classifier.mean=(0.5, 0.5, 0.5) and std=(0.5, 0.5, 0.5), matching the original. The default timm evaluation transform uses crop_mode="border", crop_pct=1.0 and bicubic resizing to preserve aspect ratio on a fixed, gray-padded canvas. The original processor selects variable canvas dimensions and uses gray 127 padding; timm uses gray 128.dynamic_img_pad=True at model creation to zero-pad normalized inputs on the bottom/right to a patch-size multiple. This does not reproduce the original adaptive resize policy.forward_features() returns projected NLC tokens from the aligner. encoder.forward_features() returns final-RMSNorm NHWC backbone features. forward() returns pooled image embeddings until a classification head is added.forward_intermediates() and features_only=True; these do not include the aligner. Use norm=True to apply the encoder's final RMSNorm to intermediate maps.import torch
import timm
from PIL import Image
model = timm.create_model('hf-hub:timm/deepseek_vit_412m_align.deepseek_v4_flash_vision_exp', 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, 4096): image embeddings
features = model.forward_features(x) # (1, 100, 4096): projected spatial tokens (NLC)
with torch.inference_mode():
maps = model.forward_intermediates(
x, indices=3, norm=True, output_fmt='NCHW', intermediates_only=True,
)
for feature_map in maps:
print(feature_map.shape) # (1, 1024, 28, 28)
model = timm.create_model(
'hf-hub:timm/deepseek_vit_412m_align.deepseek_v4_flash_vision_exp', 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{deepseekai2026deepseekv4flashvisionexp,
title={DeepSeek-V4-Flash-Vision-Exp},
author={DeepSeek-AI},
year={2026},
url={https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Vision-Exp},
}
@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}}
}