Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JinjieNi/MegaDLMs
/ functions
Functions
4,219 in github.com/JinjieNi/MegaDLMs
⨍
Functions
4,219
◇
Types & classes
650
↳
Endpoints
8
Method
forward
(self, x)
megatron/legacy/model/vision/dino.py:135
Method
forward
(self, input)
megatron/legacy/model/vision/dino.py:269
Method
forward
(self, input)
megatron/legacy/model/vision/inpainting.py:51
Method
forward
(self, x)
megatron/legacy/model/vision/inpainting.py:78
Method
forward
(self, input)
megatron/legacy/model/vision/inpainting.py:119
Method
forward
(self, hidden_states)
megatron/legacy/model/vision/vit_backbone.py:41
Method
forward
(self, input)
megatron/legacy/model/vision/vit_backbone.py:212
Method
forward
(self, x, H, W)
megatron/legacy/model/vision/mit_backbone.py:46
Method
forward
(self, x, H, W)
megatron/legacy/model/vision/mit_backbone.py:101
Method
forward
(self, x, H, W)
megatron/legacy/model/vision/mit_backbone.py:158
Method
forward
(self, x)
megatron/legacy/model/vision/mit_backbone.py:195
Method
forward
(self, x)
megatron/legacy/model/vision/mit_backbone.py:335
Method
forward
(self, x, H, W)
megatron/legacy/model/vision/mit_backbone.py:349
Method
forward
(self, x)
megatron/legacy/model/vision/swin_backbone.py:30
Method
forward
Args: x: input features with shape of (num_windows*B, N, C) mask: (0/-inf) mask with shape of (num_windows, Wh*Ww, Wh
megatron/legacy/model/vision/swin_backbone.py:119
Method
forward
(self, x)
megatron/legacy/model/vision/swin_backbone.py:245
Method
forward
x: B, H*W, C
megatron/legacy/model/vision/swin_backbone.py:319
Method
forward
(self, x)
megatron/legacy/model/vision/swin_backbone.py:400
Method
forward
(self, x)
megatron/legacy/model/vision/swin_backbone.py:453
Method
forward
(self, x)
megatron/legacy/model/vision/swin_backbone.py:569
Method
forward
(self)
megatron/legacy/mpu/tests/test_layers.py:169
Method
forward
(self)
megatron/legacy/mpu/tests/test_layers.py:311
Method
forward
(self)
megatron/legacy/mpu/tests/commons.py:17
Method
forward
Runs the fwd pass of _kernel_make_viewless_tensor
megatron/core/utils.py:208
Method
forward
(self, input: Tensor)
megatron/core/fusions/fused_layer_norm.py:131
Method
forward
(ctx, inputs, scale)
megatron/core/fusions/fused_softmax.py:21
Method
forward
(ctx, inputs, mask, scale)
megatron/core/fusions/fused_softmax.py:51
Method
forward
Forward pass of softmax with masked input. In case attn_mask_type is causal the mask is generated and None can be passed. A user-defi
megatron/core/fusions/fused_softmax.py:136
Method
forward
(ctx, vocab_parallel_logits, target)
megatron/core/fusions/fused_cross_entropy.py:85
Method
forward
(ctx, input, bias)
megatron/core/fusions/fused_bias_geglu.py:51
Method
forward
(ctx, input)
megatron/core/fusions/fused_bias_geglu.py:65
Method
forward
(ctx, input, bias)
megatron/core/fusions/fused_bias_gelu.py:39
Method
forward
(ctx, input, bias, fp8_input_store)
megatron/core/fusions/fused_bias_swiglu.py:43
Method
forward
(ctx, input, fp8_input_store)
megatron/core/fusions/fused_bias_swiglu.py:61
Method
forward
Forward. Args: input_ (torch.Tensor): Input tensor.
megatron/core/tensor_parallel/layers.py:242
Method
forward
Forward with frozen weight.
megatron/core/tensor_parallel/layers.py:306
Method
forward
Forward.
megatron/core/tensor_parallel/layers.py:409
Method
forward
Forward of ColumnParallelLinear Args: input_: 3D tensor whose order of dimension is [sequence, batch, hidden]
megatron/core/tensor_parallel/layers.py:874
Method
forward
(self, input_)
megatron/core/tensor_parallel/layers.py:1220
Method
forward
Vocab parallel cross entropy forward function.
megatron/core/tensor_parallel/cross_entropy.py:124
Method
forward
(ctx, run_function, distribute_saved_activations, *args)
megatron/core/tensor_parallel/random.py:255
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:210
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:229
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:248
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:267
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:286
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:312
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:360
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:389
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:408
Method
forward
Forward function.
megatron/core/tensor_parallel/mappings.py:420
Method
forward
Calls the wrapped module's forward() method.
megatron/core/distributed/data_parallel_base.py:18
Method
forward
Forward.
megatron/core/extensions/flex_attn.py:39
Method
forward
(self, input: torch.Tensor)
megatron/core/extensions/torch_modules.py:17
Method
forward
Forward.
megatron/core/extensions/transformer_engine.py:367
Method
forward
Forward.
megatron/core/extensions/transformer_engine.py:691
Method
forward
Forward.
megatron/core/extensions/transformer_engine.py:904
Method
forward
Forward pass. Args: hidden_states (Tensor): output hidden states from decoder word_embeddings_weight (Tensor): word e
megatron/core/models/T5/t5_model.py:60
Method
forward
Forward pass. Args: encoder_input_ids (Tensor): input ids for encoder decoder_input_ids (Tensor): input ids for decod
megatron/core/models/T5/t5_model.py:236
Method
forward
Forward function of the Mamba model. This function passes the input tensors through the embedding layer, and then the decoder and finally into
megatron/core/models/mamba/mamba_model.py:160
Method
forward
(self, hidden_states: Tensor, sequence_index=0)
megatron/core/models/bert/pooler.py:38
Method
forward
Forward function of BERT model Forward function of the BERT Model This function passes the input tensors through the embedding layer,
megatron/core/models/bert/bert_model.py:286
Method
forward
forward pass
megatron/core/models/bert/bert_lm_head.py:44
Method
forward
Forward function of the GPT Model This function passes the input tensors through the embedding layer, and then the decoeder and finally into t
megatron/core/models/gpt/gpt_model.py:186
Method
forward
Run multimodal projector. Args: hidden_states (torch.Tensor): Input. Returns: torch.Tensor: The projected ou
megatron/core/models/vision/multimodal_projector.py:52
Method
forward
Forward function of the CLIP ViT Model. This function passes the input tensors through the embedding layer and then the transformer.
megatron/core/models/vision/clip_vit_model.py:148
Method
forward
Forward pass of the embedding module. Args: input_ids (Tensor): The input tokens position_ids (Tensor): The position
megatron/core/models/common/embeddings/language_model_embedding.py:94
Method
forward
Forward pass of Yarn Rotary Embedding. Args: max_seq_len (int): Maximum size of sequence offset (int, optional): RoPE
megatron/core/models/common/embeddings/yarn_rotary_pos_embedding.py:87
Method
forward
Forward pass of RoPE embedding. Args: max_seq_len (int): Maximum size of sequence offset (int, optional): RoPE offset
megatron/core/models/common/embeddings/rotary_pos_embedding.py:139
Method
forward
(self, x, position_ids)
megatron/core/models/common/embeddings/rotary_pos_embedding.py:282
Method
forward
Forward function of the LLaVA model. Args: images (torch.Tensor): input images of shape [num_tiles, img_h, img_w].
megatron/core/models/multimodal/llava_model.py:714
Method
forward
Forward function of the GPT Model This function passes the input tensors through the embedding layer, and then the decoeder and finally into t
megatron/core/models/difflm/gpt_model.py:382
Method
forward
Cross attention for Retro encoder. Notation: ns : Sequence length. bs : Batch size. d : Hidden size.
megatron/core/models/retro/encoder_attention.py:33
Method
forward
Retro decoder bias-dropout-add. Args: training (bool): If training, then apply dropout. fused (bool): Fuse bias-dropo
megatron/core/models/retro/encoder_attention.py:167
Method
forward
Per-chunk layer norm. Args: input (Tensor): Input chunks, concatenated into a single tensor. Returns: Output
megatron/core/models/retro/encoder_attention.py:202
Method
forward
Cross attention for Retro decoder. Notation: ns : Sequence length. bs : Batch size. d : Hidden size.
megatron/core/models/retro/decoder_attention.py:77
Method
forward
Retro decoder bias-dropout-add. Args: training (bool): If training, then apply dropout. fused (bool): Fuse bias-dropo
megatron/core/models/retro/decoder_attention.py:291
Method
forward
RetroModel forward method. Foward input tokens & mask, along with neighbor tokens & mask, through the Retro model.. Args:
megatron/core/models/retro/model.py:22
Method
forward
Args: x (Tensor): An input embedding of shape [seq_len, batch_size, embed_dim] position_ids (Optional[Tensor]): 1D or
megatron/core/transformer/utils.py:217
Method
forward
Forward pass, does nothing but registers an autograd node.
megatron/core/transformer/cuda_graphs.py:220
Method
forward
Forward pass of the runner. If cudagraphs have not been created, record the execution of this fwd and bwd pass for graph capture. Else, replay
megatron/core/transformer/cuda_graphs.py:583
Method
forward
Perform a forward pass through the transformer layer. This method implements the core computation of a transformer layer, including
megatron/core/transformer/transformer_layer.py:256
Method
forward
Perform a forward pass through the transformer layer. This method implements the core computation of a transformer layer, including
megatron/core/transformer/transformer_layer.py:429
Method
forward
Perform a forward pass through the transformer layer. This method implements the core computation of a transformer layer, including
megatron/core/transformer/transformer_layer.py:599
Method
forward
(self, hidden_states)
megatron/core/transformer/qwen2_norm.py:14
Method
forward
(self, x, *args, **kwargs)
megatron/core/transformer/identity_op.py:13
Method
forward
(self, *args, **kwargs)
megatron/core/transformer/identity_op.py:27
Method
forward
Perform a forward pass through the attention module.
megatron/core/transformer/attention.py:333
Method
forward
Perform a forward pass through the attention module.
megatron/core/transformer/attention.py:896
Method
forward
Perform a forward pass through the attention module.
megatron/core/transformer/attention.py:1251
Method
forward
Perform the forward pass through the transformer block. This method handles the core computation of the transformer, including
megatron/core/transformer/transformer_block.py:409
Method
forward
Perform the forward pass through the transformer block. This method handles the core computation of the transformer, including
megatron/core/transformer/transformer_block.py:653
Method
forward
Perform the forward pass through the transformer block. This method handles the core computation of the transformer, including
megatron/core/transformer/transformer_block.py:900
Method
forward
Perform the forward pass through the MLP block.
megatron/core/transformer/mlp.py:94
Method
forward
(self, *inputs, **kwargs)
megatron/core/transformer/module.py:175
Method
forward
Forward pass for multi-latent attention
megatron/core/transformer/multi_latent_attention.py:111
Method
forward
Forward.
megatron/core/transformer/dot_product_attention.py:98
Method
forward
Preserve the aux_loss by storing it in the context to avoid garbage collection. Args: output (torch.Tensor): The output tensor.
megatron/core/transformer/moe/moe_utils.py:192
Method
forward
Forward function
megatron/core/transformer/moe/shared_experts.py:82
Method
forward
Forward step of the GroupedMLP.
megatron/core/transformer/moe/experts.py:210
← previous
next →
3,001–3,100 of 4,219, ranked by callers