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
setup_method
(self, method)
tests/unit_tests/dist_checkpointing/models/test_moe_experts.py:89
Method
setup_method
(self, method)
tests/unit_tests/dist_checkpointing/models/test_retro_model.py:62
Method
setup_method
(self, method)
tests/unit_tests/dist_checkpointing/models/test_bert_model.py:77
Method
setup_method
(self, method)
tests/unit_tests/dist_checkpointing/models/test_gpt_model.py:65
Method
setup_method
(self, method)
tests/unit_tests/models/test_t5_model.py:27
Method
setup_method
(self, method)
tests/unit_tests/models/test_t5_model.py:259
Method
setup_method
(self, method)
tests/unit_tests/models/test_multimodal_projector.py:17
Method
setup_method
(self, method)
tests/unit_tests/models/test_mamba_model.py:16
Method
setup_method
(self, method)
tests/unit_tests/models/test_llava_model.py:24
Method
setup_method
(self, method)
tests/unit_tests/models/test_llava_model.py:417
Method
setup_method
(self, method)
tests/unit_tests/models/test_llava_model.py:557
Method
setup_method
(self, method)
tests/unit_tests/models/test_bert_model.py:24
Method
setup_method
(self, method)
tests/unit_tests/models/test_bert_model.py:100
Method
setup_method
(self, method)
tests/unit_tests/models/test_clip_vit_model.py:15
Method
setup_method
(self, method)
tests/unit_tests/models/test_base_embedding.py:13
Method
setup_method
(self, method)
tests/unit_tests/models/test_gpt_model.py:17
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_transformer_layer.py:18
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_module.py:29
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_module.py:58
Method
setup_method
(self)
tests/unit_tests/transformer/test_rope.py:12
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_multi_latent_attention.py:21
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_spec_customization.py:32
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_mlp.py:15
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_retro_attention.py:78
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_attention.py:15
Method
setup_method
(self, method)
tests/unit_tests/transformer/test_transformer_block.py:20
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_upcycling.py:122
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_a2a_token_dispatcher.py:17
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_routers.py:15
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_routers.py:90
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_token_dispatcher.py:224
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_moe_layer.py:22
Method
setup_method
(self, method, use_cpu_initialization=False, swiglu=True)
tests/unit_tests/transformer/moe/test_grouped_mlp.py:29
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_shared_experts.py:15
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_shared_experts.py:72
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_aux_loss.py:36
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_aux_loss.py:102
Method
setup_method
(self, method)
tests/unit_tests/transformer/moe/test_sequential_mlp.py:74
Method
setup_method
(self, method)
tests/unit_tests/ssm/test_mamba_layer.py:15
Method
setup_method
(self, method)
tests/unit_tests/ssm/test_mamba_block.py:20
Method
setup_method
(self, method)
tests/unit_tests/ssm/test_mamba_mixer.py:15
Method
setup_method
Setup method
tests/unit_tests/export/trtllm/test_trtllm_distributed_gpu_converter.py:28
Method
setup_method
(self, method)
tests/unit_tests/export/trtllm/test_single_device_fp8.py:188
Method
setup_method
(self, method)
tests/unit_tests/export/trtllm/test_distributed_fp8.py:191
Function
sh_ten_build_fn
(*args, **kwargs)
megatron/core/dist_checkpointing/strategies/resharding.py:270
Function
sh_ten_build_fn
( key: str, t: torch.Tensor, replica_id: ReplicaId, flattened_range: Optional[slice] )
megatron/core/transformer/mlp.py:166
Function
sh_ten_build_fn
( key: str, t: torch.Tensor, replica_id: ReplicaId, flattened_range: Optional[slice] )
megatron/core/ssm/mamba_mixer.py:681
Method
sh_ten_build_fn
( key: str, t: torch.Tensor, replica_id: ReplicaId, flattened_
megatron/core/transformer/moe/experts.py:265
Function
sh_ten_merge_fn
(sub_state_dict)
megatron/core/dist_checkpointing/strategies/resharding.py:275
Function
sh_ten_merge_fn
(sub_state_dict)
megatron/core/transformer/mlp.py:251
Function
sh_ten_merge_fn
(sub_state_dict)
megatron/core/ssm/mamba_mixer.py:713
Method
sh_ten_merge_fn
(sub_state_dict, tp_axis: int, with_glu: bool)
megatron/core/transformer/moe/experts.py:511
Method
sharded_state_dict
Non-default implementation for embeddings due to `allow_shape_mismatch` param
megatron/core/tensor_parallel/layers.py:275
Method
sharded_state_dict
Sharding along axis 0, bias sharded
megatron/core/tensor_parallel/layers.py:974
Method
sharded_state_dict
Sharding along axis 1, bias not sharded
megatron/core/tensor_parallel/layers.py:1196
Method
sharded_state_dict
Sharding along axis 0, bias sharded
megatron/core/extensions/transformer_engine.py:382
Method
sharded_state_dict
Sharding along axis 0, bias sharded
megatron/core/extensions/transformer_engine.py:460
Method
sharded_state_dict
Sharding along axis 1, bias not sharded
megatron/core/extensions/transformer_engine.py:538
Method
sharded_state_dict
For each gemm, sharding along axis 0, bias sharded. Assume sharded_offsets[-1] is the expert parallel offset.
megatron/core/extensions/transformer_engine.py:1042
Method
sharded_state_dict
For each gemm, sharding along axis 1, bias not sharded. Assume sharded_offsets[-1] is the expert parallel offset.
megatron/core/extensions/transformer_engine.py:1087
Method
sharded_state_dict
Sharded state dict implementation handling duplication of encoder and decoder layers. Some layers (output, embedding) are shared between the
megatron/core/models/T5/t5_model.py:385
Method
sharded_state_dict
Sharded state dict implementation for GPTModel backward-compatibility (removing extra state). Args: prefix (str): Module
megatron/core/models/gpt/gpt_model.py:284
Method
sharded_state_dict
Sharded state dict implementation that handles the output layer weights tying. Args: prefix (str): Module name prefix.
megatron/core/models/common/language_module/language_module.py:167
Method
sharded_state_dict
Sharded state dict implementation for GPTModel backward-compatibility (removing extra state). Args: prefix (str): Module
megatron/core/models/difflm/gpt_model.py:543
Method
sharded_state_dict
Get sharded state dict. Args: prefix (str): Module name prefix. sharded_offsets (tuple): Offsets of local shard withi
megatron/core/models/retro/model.py:84
Method
sharded_state_dict
Generate a sharded state dictionary for the transformer layer. Args: prefix (str, optional): Prefix to be added to all k
megatron/core/transformer/transformer_layer.py:553
Method
sharded_state_dict
Generate a sharded state dictionary for the transformer layer. Args: prefix (str, optional): Prefix to be added to all k
megatron/core/transformer/transformer_layer.py:723
Method
sharded_state_dict
Generate a sharded state dictionary for the transformer block. Args: prefix (str, optional): Prefix to be added to all k
megatron/core/transformer/transformer_block.py:819
Method
sharded_state_dict
Generate a sharded state dictionary for the transformer block. Args: prefix (str, optional): Prefix to be added to all k
megatron/core/transformer/transformer_block.py:1065
Method
sharded_state_dict
Default implementation for sharded state dict for distributed checkpointing. General definition of sharded_state_dict simply calls `sharded_s
megatron/core/transformer/module.py:56
Method
sharded_state_dict
Retrieve sharded_state_dict from the module being wrapped.
megatron/core/transformer/module.py:190
Method
sharded_state_dict
Gets sharded state dict.
megatron/core/transformer/moe/shared_experts.py:91
Method
sharded_state_dict
Maps local expert to global experts. The sharded state dict is interchangable with SequentialMLP's.
megatron/core/transformer/moe/experts.py:713
Method
sharded_state_dict
Maps local expert to global experts.
megatron/core/transformer/moe/experts.py:815
Method
sharded_state_dict
Returns a sharded state dictionary for the current object. This function constructs a sharded state dictionary by iterating over the
megatron/core/ssm/mamba_block.py:287
Method
sharded_state_dict
Sharding along axis 0, bias not sharded
megatron/core/ssm/mamba_mixer.py:59
Method
sharded_state_dict
Provide a sharded state dictionary for distributed checkpointing.
megatron/core/ssm/mamba_mixer.py:581
Method
sharded_state_dict
Builds sharded state dict for the optimizer, based on model's sharded state dict. Args: model_sharded_state_dict (ShardedStateDic
megatron/core/optimizer/optimizer.py:287
Method
sharded_state_dict
( self, model_sharded_state_dict: ShardedStateDict, is_loading: bool = False )
megatron/core/optimizer/optimizer.py:669
Method
sharded_state_dict
( self, model_sharded_state_dict: ShardedStateDict, is_loading: bool = False, **kwargs )
megatron/core/optimizer/optimizer.py:990
Method
sharded_state_dict
Chooses between 3 param state sharding implementations as requested by `sharding_type`. Regular state dict parameters are saved on D
megatron/core/optimizer/distrib_optimizer.py:941
Method
sharded_state_dict
(self)
tests/unit_tests/dist_checkpointing/test_optimizer.py:87
Method
sharded_state_dict_bucket_space
( self, *args, sharding_type: str = 'fully_sharded_model_space', **kwargs
tests/unit_tests/dist_checkpointing/test_optimizer.py:358
Function
sigterm_handler
(_signo, _stack_frame)
tests/test_utils/python_scripts/launch_jet_workload.py:25
Function
single_dataset_provider
(datapath)
tasks/glue/finetune.py:43
Method
split_sentences
(self, file_name)
tools/preprocess_data.py:126
Function
squared_relu
(x)
megatron/training/yaml_arguments.py:429
Function
squared_relu
(x: torch.Tensor)
megatron/training/activations.py:9
Method
squared_relu
(x)
megatron/legacy/model/transformer.py:141
Method
start
Start the timer.
megatron/core/timers.py:26
Method
start
(self, barrier=False)
megatron/core/timers.py:52
Method
start_grad_sync
Initiates grad sync (all-reduce or reduce-scatter) communication operations for all model gradients. When overlap_grad_reduc
megatron/core/distributed/data_parallel_base.py:34
Method
start_grad_sync
Initiates grad sync (all-reduce or reduce-scatter) communication operations for all model gradients. When overlap_grad_reduc
megatron/core/distributed/distributed_data_parallel.py:425
Method
start_method
This method adds the start timers. Both cuda event and perf_counter are added. If bdata is set to true from __call__, this method ski
megatron/core/utils.py:933
Method
state
Return optimizer state with tuple keys, where the first element is the index of the optimizer in the list of chained optimizers.
megatron/core/optimizer/optimizer.py:966
Method
state_dict
Method that returns a state dict to be checkpointed. Args: data_iterator: the data iterator that needs to be checkpointed (or Non
megatron/core/rerun_state_machine.py:628
Method
state_dict
Method to capture the state of the iterator as a serializable dict.
megatron/core/rerun_state_machine.py:867
Method
state_dict
Method to capture the state of the error injector as a serializable dict.
megatron/core/rerun_state_machine.py:1048
Method
state_dict
Returns a dictionary containing references to the whole state of the wrapped module. Both parameters and persistent buffers
megatron/core/distributed/data_parallel_base.py:73
Method
state_dict
Return state_dict.
megatron/core/optimizer/optimizer.py:248
← previous
next →
3,601–3,700 of 4,219, ranked by callers