Model reference · open weights

lmd-vitl-p8-simmim-scratch

NEW · this week Embeddings ai-hhmi Image embed 1 build Its own licence terms 876 dl/mo

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.

  • lmd-vitl-p8-simmim-scratch is a 3D ViT-L encoder with 303M parameters designed for image feature extraction from volume microscopy data.
  • It uses the DINOv3 architecture with 8 by 8 by 8 voxel patches and was pretrained from random initialization using SimMIM on a corpus of 243 microscopy volumes.
  • The model operates on 8 nm isotropic voxels and is released under the DINOv3 license.

Summary of the ai-hhmi/lmd-vitl-p8-simmim-scratch model card, 2026-11-06

What it is

Released byai-hhmi
Released2026-11-04
Parameters303M
VRAM606 MB for the weights

What it runs on

Memory and cards for lmd-vitl-p8-simmim-scratch (FP32)

606 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What ai-hhmi says about lmd-vitl-p8-simmim-scratch

Read 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.

ModelStarts fromTraining
ai-hhmi/lmd-vitl-p8-simmim-lvdDINOv3 ViT-L/16, LVD-1689MSimMIM on LMD, 100k steps
ai-hhmi/lmd-vitl-p8-simmim-scratch (this one)randomSimMIM on LMD, 100k steps
ai-hhmi/lmd-vitl-p8-affinity-lvdlmd-vitl-p8-simmim-lvdaffinities, 100k steps
ai-hhmi/lmd-vitl-p8-affinity-scratchthis encoderaffinities, 75k steps

Use

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.
  • The encoder is a plain 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.

Input

  • One channel, with axes ordered (x, y, z). Arrays stored (z, y, x), as OME-Zarr and N5 volumes usually are, need array.transpose(2, 1, 0).
  • 8 nm isotropic voxels. Resample other data first.
  • Intensities in [0, 1], scaled per volume as in training: 8-bit data divided by 255; 16-bit and float data clamped to the volume's 0.1st and 99.9th percentiles, then rescaled to [0, 1].
  • Every side a multiple of 8 voxels. Training used 256³ windows. The model runs at other sizes, but we did not test them.

Model details

  • DINOv3 ViT-L: 24 blocks, width 1024, 16 heads, MLP ratio 4, LayerScale, 4 storage tokens and a masked key bias. A 3D rotary position embedding gives each axis a third of the rotary channels; there is no position-embedding table. 303 M parameters.
  • 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.

Training

  • Data. LMD, 243 volumes of 3D microscopy from 12 species: 177 electron microscopy volumes (fly, mouse, zebrafish, human, C. elegans, zebra finch and others) and 66 expansion microscopy volumes (fly, mouse, Danionella). We resampled all of them to 8 nm isotropic voxels, sampled volumes in proportion to size^0.4, and drew random 256³ crops.
  • Objective. SimMIM: 90% of the input is hidden in 32³-voxel blocks, a linear head predicts the hidden voxels, and the loss is the L1 error on them.
  • Initialization. Random.
  • Optimization. 100k steps at a global batch of 32 on 8 GPUs. AdamW (β = 0.9, 0.95; weight decay 0.05, none on norms and biases). Learning rate 3e-4 after 5k warm-up steps, decaying linearly to 3e-7. Gradient clipping at 1.0, bf16 autocast. Augmentation: in-plane rotations only.

Evaluation

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.

License

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.

References

  • O. Siméoni et al. DINOv3. arXiv:2508.10104, 2025.
  • Z. Xie et al. SimMIM: A Simple Framework for Masked Image Modeling. CVPR 2022.

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

How it works

How embedding models work

Your textsentence / documentEncodermaps meaningVectorlist of numbersAn embedding model turns text into a vector, so similar meanings sit close together, which is the basis of search and RAG.
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms