MiniMax-M3.1-Flash standalone ViT
Built with MiniMax M3.1-Flash. ζ ζζεηθ§θ§ηΌη ε¨οΌδΏηεε§εζ°εη§°γζ°εΌεη²ΎεΊ¦οΌδΈε ε«θ―θ¨ζ¨‘εζ dspark θ稿樑εγ
Source: MiniMaxAI/MiniMax-M3.1-Flash Β· fixed revision 54e4e69dfc452b1e94a426c24a4fdeeaa8e3ad5e Β· release date 2026-10-24.
Weights
vit.safetensors: 631,185,920 parameters / 515 tensors, 1,265,452,848 bytes. Complete 32-layer, hidden-size-1280 ViT: Conv3d 14Γ14 patch embedding with temporal patch size 2, pre-layer normalization, separate Q/K/V/out projections, and spatial-merge-aware 3D RoPE. No CLS token or additional post-layer normalization is added.projector.safetensors: 234,381,312 parameters / 8 tensors, 468,763,640 bytes. Original 1280β6144β6144 multimodal projector and 2Γ2 spatial patch merger (24576β6144β6144).- Total: 865,567,232 visual parameters / 523 tensors. Stored precision is unchanged: the Conv3d kernel has 1,505,280 F32 parameters; all remaining 864,061,952 parameters are BF16. No MXFP8 language parameters are included.
tensor_mapping.json, tensor_sha256.json and extraction.json record every tensor's source file, original offsets, dtype, shape and SHA256. Only visual byte ranges from source shards 13 and 48 were downloaded. Exact response offsets/lengths and persisted-byte SHA256 were verified; no whole-source-shard LFS hash verification is claimed.
Load only the ViT
import sys
import torch
from PIL import Image
from huggingface_hub import snapshot_download
root = snapshot_download(
"gatilin/minimax_m3_1_flash_vision",
allow_patterns=["vit.safetensors", "component.py", "source_config.json",
"image_processor.py", "native/vision_encoder.py", "LICENSE*", "NOTICE"],
)
sys.path.insert(0, root)
from component import load_vit, load_processor
processor = load_processor(root)
inputs = processor(images=Image.open("image.jpg").convert("RGB"), return_tensors="pt")
vit = load_vit(root, dtype=torch.float32, device="cpu")
with torch.inference_mode():
patch_features = vit(inputs["pixel_values"], inputs["image_grid_thw"].tolist())
# shape: [sum(T*H*W), 1280], e.g. [2304,1280] for a 672Γ672 image
The pure ViT loader opens only vit.safetensors; it does not read or instantiate the projector/merger. The default execution dtype is F32. Passing BF16/F16 explicitly is a runtime cast; it does not change the published source tensors. Deterministic RoPE frequency buffers remain F32.
Optional trained bridge
Download projector.safetensors as well, then:
from component import load_model
model = load_model(root, dtype=torch.float32, device="cpu")
with torch.inference_mode():
raw_features = model.encode(inputs["pixel_values"], inputs["image_grid_thw"])
image_embeddings = model.project(raw_features)
# model(inputs["pixel_values"], inputs["image_grid_thw"]) combines both steps.
# shape: [sum(T*H*W)/4,6144], e.g. [576,6144] for a 672Γ672 image
The bridge embeddings target the original MiniMax language model; they are not generic CLIP contrastive embeddings or a text/image similarity API.
Preprocessing and inputs
load_processor uses the pinned original image_processor.py: RGB conversion, bicubic dynamic resizing, CLIP mean/std normalization, temporal frame duplication for images, and merge-aware patch ordering. Default max_pixels=451584 (672Β²) follows the original image-processor class. You may pass its supported max_pixels override explicitly.
The low-level model expects packed pixel_values with shape [sum(T*H*W),1176] and integer (T,H,W) patch grids. Spatial grids must be divisible by 2. Pixel rows must preserve the processor's 2Γ2 grouping; flattening ordinary RGB pixels or shuffling patches gives incorrect positional/merge semantics.
The included PyTorch native implementation supports images and short temporal grids. Long-video segmentation above vision_segment_max_frames=4 is explicitly rejected. Multi-image inference uses a dense block-diagonal attention mask; large packed batches have quadratic attention-mask memory cost.
Verification
22 checks passed on CPU, using the full trained 32-layer model, not a randomly initialized or truncated substitute. Tests include all 523 stored tensor hashes/shapes, strict native loading, pure-ViT-only loading, RGB normalization and temporal/patch order, Conv3d versus flat linear embedding, exact pinned SGLang 3D coordinate/RoPE comparison, full-depth SDPA versus explicit softmax attention, rectangular image features, trained bridge/merger, multi-image isolation and invalid-input guards.
For the fixed 56Γ84 RGB fixture: raw features [24,1280], merged embeddings [6,6144]; full-depth attention comparison maximum absolute error was 3.24249267578125e-05 for raw features and 0.0002593994140625 for merged embeddings. The standalone ViT output matched the bundle's ViT output exactly.
python verify_release.py /path/to/downloaded/full/package
These are small synthetic RGB/interface checks, not VQA/OCR benchmark results, full-resolution 672px tests, GPU inference validation, full SGLang CUDA execution or complete MiniMax language-model parity claims. See validation.json for exact coverage and tolerances.
Re-extract from the pinned original source
MINIMAX_VISION_OUTPUT=/tmp/minimax-m31-vision python extract_vit.py
The self-contained extractor uses the pinned metadata in extraction_source/, requests only visual HTTP byte ranges, resumes verified ranges, and reproduces the two weight files without any dtype conversion or tensor-key renaming. It requires httpx. The source index included for reproduction is intentionally filtered to the 523 visual entries; its metadata records the complete original index SHA256.
Implementation and license
The unchanged native architecture code is pinned to NVIDIA NeMo AutoModel, with the pinned SGLang implementation retained as a reference. component.py provides independent loading and kwargs compatibility adapters. Original source hashes and revisions are in source_provenance.json.
Weights retain the original MINIMAX COMMUNITY LICENSE in LICENSE; extraction does not grant additional rights. Apache source notices are retained separately in LICENSE_NVIDIA_APACHE_2_0, LICENSE_SGLANG_APACHE_2_0 and NOTICE.
- Downloads last month
- 49
Model tree for gatilin/minimax_m3_1_flash_vision
Base model
MiniMaxAI/MiniMax-M3.1-Flash