MCPcopy Create free account

hub / github.com/MiniMax-AI/VTP / functions

Functions270 in github.com/MiniMax-AI/VTP

Methodforward
(self, text)
vtp/models/encoders/text_transformer.py:429
Methodforward
(self, image_embs, text_embs)
vtp/models/encoders/text_transformer.py:534
Methodforward
(self, *args, is_training: bool = False, drop_ratio: Optional[float] = None, **kwargs)
vtp/models/encoders/vision_transformer.py:320
Methodforward
(self, x: Tensor)
vtp/models/layers/misc.py:25
Methodforward
(self, x)
vtp/models/layers/misc.py:45
Methodforward
(self, x_or_x_list, rope_or_rope_list=None, drop_ratio: Optional[float] = None)
vtp/models/layers/block.py:300
Methodforward
( self, x: torch.Tensor, )
vtp/models/layers/block.py:360
Methodforward
( self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
vtp/models/layers/block.py:416
Methodforward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
vtp/models/layers/block.py:473
Methodforward
(self, x: Tensor)
vtp/models/layers/ffn.py:42
Methodforward
(self, x: Tensor)
vtp/models/layers/ffn.py:77
Methodforward
(self, input: Tensor)
vtp/models/layers/attention.py:36
Methodforward
(self, x: Tensor, attn_bias=None, rope: Tensor = None)
vtp/models/layers/attention.py:91
Methodforward
(self, x: Tensor, is_causal: bool = True)
vtp/models/layers/attention.py:164
Methodforward
(self, x, attn_mask: Optional[torch.Tensor] = None)
vtp/models/layers/attention.py:221
Methodforward
(self, x: torch.Tensor)
vtp/models/layers/attention.py:296
Methodforward
(self, x: Tensor)
vtp/models/layers/embeddings.py:61
Methodforward
(self, *, H: int, W: int)
vtp/models/layers/embeddings.py:131
Methodforward
(self, x: Tensor)
vtp/models/layers/normalization.py:20
Methodforward
(self, x: torch.Tensor)
vtp/models/layers/normalization.py:28
Methodforward
(self, x: torch.Tensor)
vtp/models/layers/normalization.py:37
Methodforward
(self, x: torch.Tensor)
vtp/models/layers/activation.py:11
Methodforward
(self, x: Tensor)
vtp/models/decoders/pixel_decoder.py:134
Methodforward
Forward pass with flexible layer control. Args: x: Input tensor no_last_layer: If True, skip the final projection lay
vtp/models/heads/dino_head.py:65
Methodforward
Unified forward with multiple modes. Args: image: Input images, shape (B, C, H, W). text: Input token IDs, shape (B,
vtp/models/vtp_hf/modeling_vtp.py:399
Methodforward_intermediates
( self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None,
vtp/models/encoders/text_transformer.py:161
Methodforward_intermediates
( self, text: torch.Tensor, indices: Optional[Union[int, List[int]]] = Non
vtp/models/encoders/text_transformer.py:363
Methodforward_intermediates
( self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None,
vtp/models/encoders/text_transformer.py:525
Methodforward_list
(self, x_list, attn_bias=None, rope_list=None)
vtp/models/layers/attention.py:98
Functionfreeze_batch_norm_2d
Converts all `BatchNorm2d` and `SyncBatchNorm` layers of provided module into `FrozenBatchNorm2d`. If `module` is itself an instance of eithe
vtp/models/utils/text_utils.py:30
Methodfrom_vtp_yaml
Create VTPConfig from legacy VTP YAML configuration file. Args: yaml_path: Path to the YAML configuration file. Returns:
vtp/models/vtp_hf/configuration_vtp.py:169
Functionftfy_fix_text
(text)
vtp/tokenizers/text_tokenizer.py:17
Functionget_2d_sincos_pos_embed
Generate 2D sincos position embedding. Args: embed_dim: embedding dimension grid_size: int of the grid height and width
vtp/models/layers/embeddings.py:198
Functionget_cast_dtype
(precision: str)
vtp/models/vtp.py:36
Methodget_cast_dtype
(self)
vtp/models/encoders/text_transformer.py:155
Methodget_clip_logits
Compute CLIP similarity logits. Args: image: Input images, shape (B_img, C, H, W). text: Input token IDs, shape (B_tx
vtp/models/vtp_hf/modeling_vtp.py:312
Functionget_conda_env
()
vtp/models/utils/utils.py:107
Functionget_input_dtype
(precision: str)
vtp/models/vtp.py:45
Methodget_intermediate_layers
Retrieves intermediate layer features from the model, bypassing the feature bottleneck. This method directly calls the parent class's
vtp/models/encoders/vision_transformer_bottleneck.py:81
Methodget_logits
(self, image: torch.Tensor, text: torch.Tensor)
vtp/models/vtp.py:314
Functionget_sha
()
vtp/models/utils/utils.py:86
Methodget_ssl_params
(self)
vtp/models/vtp.py:403
Functionhas_batchnorms
(model: nn.Module)
vtp/models/utils/utils.py:113
Methodinit_parameters
(self)
vtp/models/encoders/text_transformer.py:501
Methodinit_weights
(self)
vtp/models/encoders/vision_transformer.py:181
Methodinit_weights
( self, init_attn_std: Optional[float] = None, init_proj_std: Optional[float] = None,
vtp/models/layers/block.py:344
Methodinit_weights
( self, init_attn_std: Optional[float] = None, init_proj_std: Optional[float] = None, factor: float =
vtp/models/layers/attention.py:152
Methodinit_weights
Reinitialize weights.
vtp/models/heads/dino_head.py:55
Functioninit_weights_vit
(module: nn.Module, name: str = "")
vtp/models/encoders/vision_transformer.py:43
Functioninterpolate_pos_embed
Interpolate position embeddings for high-resolution.
vtp/models/layers/embeddings.py:257
Functionnamed_replace
( fn: Callable, module: nn.Module, name: str = "", depth_first: bool = True, include_root:
vtp/models/utils/utils.py:28
Methodno_weight_decay
(self)
vtp/models/encoders/text_transformer.py:328
Functionparse
(x)
vtp/models/utils/text_utils.py:71
Functionprint_sampling_cache_info
()
vtp/models/layers/block.py:127
Methodprune_intermediate_layers
Prune layers not required for specified intermediates.
vtp/models/encoders/text_transformer.py:192
Methodprune_intermediate_layers
Prune layers not required for specified intermediates.
vtp/models/encoders/text_transformer.py:415
Functionreplace_linear
(model, linear_replacement, include_modules=['c_fc', 'c_proj'], copy_weights=True)
vtp/models/utils/text_utils.py:86
Methodreset_parameters
(self)
vtp/models/layers/embeddings.py:79
Methodreset_parameters
(self)
vtp/models/layers/normalization.py:14
Methodset_grad_checkpointing
(self, enable=True)
vtp/models/encoders/text_transformer.py:324
Methodset_grad_checkpointing
(self, enable=True)
vtp/models/encoders/text_transformer.py:560
Functionunwrap_model
Unwraps a model from its DataParallel wrapper if it is wrapped.
vtp/models/utils/text_utils.py:24
Methodupdate_teacher
(self, momentum: float)
vtp/models/vtp.py:388
Functionvit_7b
(patch_size=16, **kwargs)
vtp/models/encoders/vision_transformer.py:401
Functionvit_base
(patch_size=16, **kwargs)
vtp/models/encoders/vision_transformer.py:340
Functionvit_giant2
Close to ViT-giant, with embed-dim 1536 and 24 heads => embed-dim per head 64
vtp/models/encoders/vision_transformer.py:388
Functionvit_huge2
(patch_size=16, **kwargs)
vtp/models/encoders/vision_transformer.py:376
Functionvit_large
(patch_size=16, **kwargs)
vtp/models/encoders/vision_transformer.py:352
Functionvit_small
(patch_size=16, **kwargs)
vtp/models/encoders/vision_transformer.py:328
Functionvit_so400m
(patch_size=16, **kwargs)
vtp/models/encoders/vision_transformer.py:364
← previous201–270 of 270, ranked by callers