Model reference · open weights
lmd-vitl-p8-simmim-scratch is an open-weight embedding model from ai-hhmi. lmd-vitl-p8-simmim-scratch (FP32) weighs 606 MB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the ai-hhmi/lmd-vitl-p8-simmim-scratch model card, 2026-11-06
What it is
| Released by | ai-hhmi |
|---|---|
| Released | 2026-11-04 |
| Parameters | 303M |
| VRAM | 606 MB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
A 3D ViT-L encoder for volume microscopy (electron and expansion microscopy) at 8 nm. It has the DINOv3 ViT-L architecture with 8 × 8 × 8-voxel patches and was pretrained from random initialization for 100k steps with SimMIM on LMD, a corpus of 243 microscopy volumes.
| Model | Starts from | Training |
|---|---|---|
| ai-hhmi/lmd-vitl-p8-simmim-lvd | DINOv3 ViT-L/16, LVD-1689M | SimMIM on LMD, 100k steps |
| ai-hhmi/lmd-vitl-p8-simmim-scratch (this one) | random | SimMIM on LMD, 100k steps |
| ai-hhmi/lmd-vitl-p8-affinity-lvd | lmd-vitl-p8-simmim-lvd | affinities, 100k steps |
| ai-hhmi/lmd-vitl-p8-affinity-scratch | this encoder | affinities, 75k steps |
import json
import sys
from pathlib import Path
import torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
sys.path.insert(0, "mia-train/src") # git clone https://github.com/AI-HHMI/mia-train && git -C mia-train checkout 0fe3872
from models.dinov3_vit3d import DinoVisionTransformer3D
root = Path(snapshot_download("ai-hhmi/lmd-vitl-p8-simmim-scratch"))
config = json.loads((root / "config.json").read_text())
encoder = DinoVisionTransformer3D(**config["model"]["kwargs"])
encoder.load_state_dict(load_file(root / "model.safetensors"))
device = "cuda" if torch.cuda.is_available() else "cpu"
encoder = encoder.to(device).eval()
# (batch, channel, x, y, z): 8 nm voxels, intensities in [0, 1], every side a multiple of 8
x = torch.rand(1, 1, 128, 128, 128, device=device)
with torch.no_grad(), torch.autocast(device, dtype=torch.bfloat16, enabled=device == "cuda"):
tokens, grid = encoder.patch_features(x) # (1, 4096, 1024) final-layer patch tokens on a (16, 16, 16) grid
maps = encoder.get_intermediate_layers(x, n=[7, 15, 23], reshape=True) # 3 x (1, 1024, 16, 16, 16)
print(tuple(tokens.shape), grid, [tuple(m.shape) for m in maps])
Requirements: PyTorch (we used 2.13), NumPy, safetensors, huggingface_hub, and the model code
from mia-train at commit 0fe3872. Put mia-train/src on
the path as above rather than installing mia-train. Its top-level packages have generic names
(models, layers, utils, distributed, data), and they shadow packages of the same name, such
as Dask's distributed.
encoder.patch_features(x) returns the final layer's normalised patch tokens and their grid.
encoder.forward_features(x) also returns the CLS token and the 4 storage tokens.
encoder.get_intermediate_layers(x, n=[...], reshape=True) returns feature maps from any blocks.torch.nn.Module, so you can fine-tune it in your own training loop. Our
affinity models (table above) read blocks [7, 15, 23] through a UNETR decoder.(x, y, z). Arrays stored (z, y, x), as OME-Zarr and N5 volumes
usually are, need array.transpose(2, 1, 0).model.safetensors: the encoder's weights in fp32 (1.21 GB). It leaves out SimMIM's
pixel-prediction head and the optimizer state.config.json: the constructor arguments (model.kwargs), the input conventions and the source
training run.We did not score the encoder on its own. Fine-tuned for affinities, it gives ai-hhmi/lmd-vitl-p8-affinity-scratch, whose neuron segmentation scores are on that page and on our leaderboard.
DINOv3 License (LICENSE.md). This model holds no Meta weights, but its architecture code is a port
of Meta's DINOv3 reference implementation, which that agreement covers, so we release it under the
same agreement. Publications that use the model must acknowledge DINOv3.
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
How it works