Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MiniMax-AI/VTP
/ types & classes
Types & classes
45 in github.com/MiniMax-AI/VTP
⨍
Functions
270
◇
Types & classes
45
↓ 8 callers
Class
LayerScale
Layer scaling module for stable training.
vtp/models/layers/misc.py:7
↓ 7 callers
Class
DinoVisionTransformer
DINOv3 Vision Transformer for visual representation learning.
vtp/models/encoders/vision_transformer.py:58
↓ 5 callers
Class
DinoV3PixelDecoder
DINOv3-based Pixel Decoder for image reconstruction. This decoder uses a transformer architecture with RoPE position embeddings and PixelShuf
vtp/models/decoders/pixel_decoder.py:15
↓ 5 callers
Class
NetLinLayer
A single linear layer which does a 1x1 conv
vtp/utils/lpips.py:117
↓ 2 callers
Class
DINOHead
Unified DINO Head supporting both weight_norm and flexible forward modes. This head is used for self-supervised learning in DINO/iBOT style train
vtp/models/heads/dino_head.py:7
↓ 2 callers
Class
DinoVisionTransformerWithBottleneck
DINOv3 Vision Transformer with feature bottleneck for dimensionality reduction. This variant adds a linear projection layer to reduce the feature
vtp/models/encoders/vision_transformer_bottleneck.py:11
↓ 2 callers
Class
RMSNorm
Root Mean Square Layer Normalization.
vtp/models/layers/normalization.py:6
↓ 2 callers
Class
ResidualAttentionBlock
Residual attention block for CLIP-style transformers.
vtp/models/layers/block.py:370
↓ 2 callers
Class
RopePositionEmbedding
RoPE positional embedding with no mixing of coordinates (axial) and no learnable weights. Supports two parametrizations of the rope parameters: e
vtp/models/layers/embeddings.py:86
↓ 2 callers
Class
SelfAttentionBlock
Self-attention block with FFN for DINOv3.
vtp/models/layers/block.py:137
↓ 2 callers
Class
TextTransformer
Text Transformer for CLIP-style text encoding.
vtp/models/encoders/text_transformer.py:231
↓ 2 callers
Class
VTP_Tokenizer
generation/tokenizer/vtp_tokenizer.py:14
↓ 1 callers
Class
AllClassifiers
Container for multiple linear classifiers.
tools/test_linear_probing_hf.py:173
↓ 1 callers
Class
Attention
Multi-head attention module for CLIP-style transformers.
vtp/models/layers/attention.py:177
↓ 1 callers
Class
CausalSelfAttention
Causal self-attention for autoregressive models.
vtp/models/layers/attention.py:129
↓ 1 callers
Class
CustomResidualAttentionBlock
Custom residual attention block with scaled cosine attention.
vtp/models/layers/block.py:430
↓ 1 callers
Class
FeatureExtractor
Wrapper that extracts intermediate layer features from VTPModel.
tools/test_linear_probing_hf.py:109
↓ 1 callers
Class
InceptionV3
tools/test_reconstruction_hf.py:127
↓ 1 callers
Class
InfiniteSampler
Wraps another sampler to yield an infinite stream of indices.
tools/test_linear_probing_hf.py:192
↓ 1 callers
Class
LPIPS
LPIPS metric wrapper.
tools/test_reconstruction_hf.py:65
↓ 1 callers
Class
LinearClassifier
Linear classifier on top of frozen features.
tools/test_linear_probing_hf.py:155
↓ 1 callers
Class
Mlp
Standard MLP layer with optional dropout.
vtp/models/layers/ffn.py:21
↓ 1 callers
Class
PatchEmbed
2D image to patch embedding: (B,C,H,W) -> (B,N,D) Args: img_size: Image size. patch_size: Patch token size. in_chans
vtp/models/layers/embeddings.py:18
↓ 1 callers
Class
ScalingLayer
vtp/utils/lpips.py:103
↓ 1 callers
Class
SimpleTokenizer
Simple tokenizer for CLIP models.
vtp/tokenizers/text_tokenizer.py:144
↓ 1 callers
Class
Transformer
Base Transformer for text encoding.
vtp/models/encoders/text_transformer.py:21
↓ 1 callers
Class
vgg16
vtp/utils/lpips.py:127
Class
AttentionalPooler
Attentional pooling for multi-head attention.
vtp/models/layers/attention.py:276
Class
CausalSelfAttentionBlock
Causal self-attention block for autoregressive models.
vtp/models/layers/block.py:311
Class
CosineScheduler
Cosine annealing scheduler with optional warmup and freeze periods. Supports linear warmup followed by cosine annealing decay with optional
vtp/models/utils/text_utils.py:160
Class
CustomTransformer
A custom transformer that can use different block types.
vtp/models/encoders/text_transformer.py:111
Class
LPIPS
Learned perceptual metric.
vtp/utils/lpips.py:61
Class
LayerNorm
Subclass torch's LayerNorm (with cast back to input dtype).
vtp/models/layers/normalization.py:25
Class
LayerNormFp32
Subclass torch's LayerNorm to handle fp16 (by casting to float32 and back).
vtp/models/layers/normalization.py:34
Class
LinearKMaskedBias
Linear layer with masked bias for K in QKV attention.
vtp/models/layers/attention.py:26
Class
ListForwardMixin
Mixin for forward_list operation on list of tensors.
vtp/models/layers/ffn.py:9
Class
MultimodalTransformer
Multimodal Transformer with cross-attention for vision-language tasks.
vtp/models/encoders/text_transformer.py:455
Class
PatchDropout
Patch dropout for vision transformers. Reference: https://arxiv.org/abs/2212.00794
vtp/models/layers/misc.py:29
Class
QuickGELU
Quick GELU activation function. NOTE: This is slower than nn.GELU or nn.SiLU and uses more GPU memory.
vtp/models/layers/activation.py:5
Class
SelfAttention
Self-attention module with optional RoPE support.
vtp/models/layers/attention.py:41
Class
SwiGLUFFN
SwiGLU Feed-Forward Network. Reference: GLU Variants Improve Transformer (https://arxiv.org/abs/2002.05202)
vtp/models/layers/ffn.py:51
Class
VTP
Visual Tokenizer Pre-training Model. A unified framework for vision-language pre-training that supports: - Contrastive learning (CLIP-style)
vtp/models/vtp.py:88
Class
VTPConfig
Configuration class for VTP (Visual Tokenizer Pre-training) model. This configuration supports two main modes: - CLIP-style contrastive learn
vtp/models/vtp_hf/configuration_vtp.py:7
Class
VTPModel
VTP (Visual Tokenizer Pre-training) Model. A unified framework supporting multiple vision tasks through composable methods: Basic feature ex
vtp/models/vtp_hf/modeling_vtp.py:51
Class
VTPPreTrainedModel
Base class for VTP models.
vtp/models/vtp_hf/modeling_vtp.py:31