Expand description
DINOv2 — Meta’s self-supervised ViT (with optional registers).
Public entry points:
DinoV2Config— model dimensions + variant factories (vit_small,vit_base,vit_large)build_dinov2_graph_sized— emits the IR graph and the host-sideDinoV2PreprocessWeights.assemble_hidden/rgb_u8_to_imagenet_nchw— host-side image → encoder-input plumbing.
Weight keys match Meta / candle’s safetensors so checkpoints from
the HF Hub (e.g. lmz/candle-dino-v2) load with no remapping.
Re-exports§
pub use builder::build_dinov2_graph_sized;pub use config::DinoV2Config;pub use config::IMAGENET_MEAN;pub use config::IMAGENET_STD;pub use flow::DinoV2Built;pub use flow::DinoV2Flow;pub use flow::build_dinov2_built;pub use flow::build_dinov2_built_with_packed;pub use packed_gguf::gguf_has_packed_linears;pub use packed_gguf::load_dinov2_from_gguf;pub use preprocess::DinoV2PreprocessWeights;pub use preprocess::rgb_u8_to_imagenet_nchw;pub use runner::DinoV2Output;pub use runner::DinoV2Runner;pub use runner::DinoV2RunnerBuilder;pub use runner::DinoV2Variant;
Modules§
- builder
- DINOv2 graph builder — delegates to
super::flow::DinoV2Flow. - cli
- config
- DINOv2 configuration. Mirrors Meta’s reference configs.
- flow
- Tier-0 DINOv2 flow — native
ModelFlowViT assembly. - packed_
gguf - K-quant / legacy GGUF ViT weights for DINOv2 (
DequantMatMulviarlx_flow::GgufPackedParams). - preprocess
- Host-side DINOv2 preprocessing: patch projection + token assembly.
- runner