immanuelpeter/DeepSeek-ViT

Model

DeepSeek-ViT

0

2 commits

1 linked in READMEs

updated Sep 17, 2026

See the code

README

DeepSeek-ViT

This repository packages DeepSeek-ViT and the two-layer MLP projector from DeepSeek-V4.1-Flash.

Contents

FileTensorsWhat it holds
model.safetensors259DeepSeek-ViT Tower, extracted from source shard 1
projector.safetensors4Two-layer MLP Aligner
config.jsonVision-only DeepSeekV41ViT
vision.pyStandalone ViT and Aligner used by examples/inference.py

This repository does not include Transformers modeling files or a preprocessor config. AutoModel.from_pretrained will not work.

Architecture

ComponentDetails
Tower32 layers, 1024 hidden, 16 heads, 2816 intermediate, patch size 14, 2D-RoPE
Token compression3x3 unfold / pixel-unshuffle with padding
AlignerLinear(9216, 5120), GELU, Linear(5120, 5120), both with bias

Usage

See examples/inference.py for image feature extraction. AutoModel.from_pretrained will not load this repository. The example uses vision.py in this repo.

Validation

The parity script compares all 259 Tower tensors and 4 Aligner tensors with the pinned parent checkpoint using torch.equal.

Reproduction

The export script reads vision.* and aligner.* from shard 1 of deepseek-ai/DeepSeek-V4.1-Flash, removes the prefixes, and writes the original BF16 tensors.

Credits

DeepSeek released the DeepSeek-V4.1-Flash weights. DeepSeek-ViT is described in DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression.

License

MIT License, the same license as the source model.

endpoints_compatible
image-feature-extraction
safetensors
transformers
vision

Contributors

immanuelpeter

2 commits

immanuelpeter/DeepSeek-ViT

Model

DeepSeek-ViT

0

2 commits

1 linked in READMEs

updated Sep 17, 2026

See the code

README

DeepSeek-ViT

This repository packages DeepSeek-ViT and the two-layer MLP projector from DeepSeek-V4.1-Flash.

Contents

FileTensorsWhat it holds
model.safetensors259DeepSeek-ViT Tower, extracted from source shard 1
projector.safetensors4Two-layer MLP Aligner
config.jsonVision-only DeepSeekV41ViT
vision.pyStandalone ViT and Aligner used by examples/inference.py

This repository does not include Transformers modeling files or a preprocessor config. AutoModel.from_pretrained will not work.

Architecture

ComponentDetails
Tower32 layers, 1024 hidden, 16 heads, 2816 intermediate, patch size 14, 2D-RoPE
Token compression3x3 unfold / pixel-unshuffle with padding
AlignerLinear(9216, 5120), GELU, Linear(5120, 5120), both with bias

Usage

See examples/inference.py for image feature extraction. AutoModel.from_pretrained will not load this repository. The example uses vision.py in this repo.

Validation

The parity script compares all 259 Tower tensors and 4 Aligner tensors with the pinned parent checkpoint using torch.equal.

Reproduction

The export script reads vision.* and aligner.* from shard 1 of deepseek-ai/DeepSeek-V4.1-Flash, removes the prefixes, and writes the original BF16 tensors.

Credits

DeepSeek released the DeepSeek-V4.1-Flash weights. DeepSeek-ViT is described in DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression.

License

MIT License, the same license as the source model.

endpoints_compatible
image-feature-extraction
safetensors
transformers
vision

Contributors

immanuelpeter

2 commits