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
__lt__
Check if value of self is smaller than other's value Args: other (_ValueWithRank): The other object to compare with Retu
megatron/core/utils.py:665
Method
__new__
Constructor Creates an instance of the class if not created Args: cls (Type['StragglerDetector']): The class type
megatron/core/utils.py:789
Method
__new__
(cls, config: TransformerConfig, hidden_size: int, eps: float = 1e-5)
megatron/core/extensions/transformer_engine.py:68
Method
__new__
( cls, config: TransformerConfig, hidden_size: int, eps: float = 1e-5,
megatron/core/transformer/torch_norm.py:14
Method
__new__
(cls, tp=1, pp=1, ep=1)
tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:62
Method
__next__
__next__ method override adding replay capability.
megatron/core/rerun_state_machine.py:840
Method
__post_init__
(self)
tools/retro/sft/dataset_conv.py:57
Method
__post_init__
Python dataclass method that is used to modify attributes after initialization. See https://docs.python.org/3/library/dataclasses.html#post-in
megatron/core/model_parallel_config.py:336
Method
__post_init__
(self)
megatron/core/dist_checkpointing/mapping.py:91
Method
__post_init__
(self)
megatron/core/dist_checkpointing/mapping.py:548
Method
__post_init__
(self)
megatron/core/dist_checkpointing/strategies/resharding.py:56
Method
__post_init__
(self)
megatron/core/datasets/multimodal_dataset.py:28
Method
__post_init__
Do asserts and set fields post init
megatron/core/datasets/t5_dataset.py:36
Method
__post_init__
Do asserts and set fields post init
megatron/core/datasets/bert_dataset.py:23
Method
__post_init__
Do asserts and set fields post init
megatron/core/datasets/blended_megatron_dataset_config.py:72
Method
__post_init__
Do asserts and set fields post init
megatron/core/datasets/gpt_dataset.py:862
Method
__post_init__
Do asserts and set fields post init
megatron/core/datasets/masked_dataset.py:49
Method
__post_init__
Validate config attributes.
megatron/core/datasets/retro/query/multi_split_gpt_dataset.py:37
Method
__post_init__
Validate Retro config.
megatron/core/datasets/retro/config/config.py:113
Method
__post_init__
Validate Retro config.
megatron/core/models/retro/config.py:61
Method
__post_init__
Python dataclass method that is used to modify attributes after initialization. See https://docs.python.org/3/library/dataclasses.html#post-in
megatron/core/transformer/transformer_config.py:412
Method
__post_init__
Check the validity of the config.
megatron/core/optimizer/optimizer_config.py:135
Method
__repr__
Define repr method for ImageNetPolicy class.
megatron/legacy/data/autoaugment.py:109
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:95
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:142
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:172
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:213
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:254
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:303
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:357
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:398
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:418
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:442
Method
__repr__
(self)
tasks/vision/segmentation/metrics.py:520
Method
__setitem__
(self, key: Tuple[int, str], value: Any)
megatron/core/optimizer/optimizer.py:911
Method
__setstate
Unpickle method, used by torch.distributed.gather_object.
megatron/core/rerun_state_machine.py:960
Method
__setstate__
Set the state during un-pickling Args: state (Tuple[str, bool, bool, Optional[S3Config]]): The state tuple
megatron/core/datasets/indexed_dataset.py:590
Method
__str__
String representation of the object Returns: str: strigified object
megatron/core/utils.py:695
Method
__str__
(self)
megatron/core/inference_params.py:30
Method
__str__
(self)
megatron/core/dist_checkpointing/mapping.py:569
Method
__str__
(self)
megatron/core/dist_checkpointing/strategies/base.py:108
Method
__str__
Stringify the mapping. Returns: A string representation of this block path map.
megatron/core/datasets/retro/utils.py:330
Method
__str__
(self)
megatron/core/optimizer/distrib_optimizer.py:82
Method
_add_special_token
(t)
megatron/training/tokenizer/tokenizer.py:377
Method
_add_to_trtllm_model_weights
Add the input weight to trtllm_model_weights Depending on split (Expert split/Tensor split/None) we split the input data and add accordin
megatron/core/export/trtllm/trtllm_weights_converter/single_device_trtllm_model_weights_converter.py:117
Method
_adjust_key_value_for_latent_forward_deprecated
Saves the generated key and value tensors to the end of the buffers in latent_forward_params. Returns the full size keys and values f
megatron/core/transformer/attention.py:763
Method
_allocate_buffers_for_parameters
( input_params, data_parallel_group, gradient_scaling_factor )
megatron/core/distributed/distributed_data_parallel.py:103
Function
_batched_p2p_ops
( *, tensor_send_prev: Optional[torch.Tensor], tensor_recv_prev: Optional[torch.Tensor], tenso
megatron/core/pipeline_parallel/p2p_communication.py:119
Function
_bias_dropout_add
(x, bias, residual, prob)
megatron/legacy/model/transformer.py:847
Function
_bias_dropout_add
(x_with_bias, residual, prob)
megatron/core/fusions/fused_bias_dropout.py:42
Method
_build_fn
(key, tensor, replica_id, flattened_range)
tests/unit_tests/dist_checkpointing/test_serialization.py:335
Method
_collate_fn
(self, batch_data)
tasks/orqa/unsupervised/nq.py:48
Method
_collect_main_grad_data_for_unscaling
Note: this should be equivalent to the float-16 optimizer's method, but written differently, so the two should be combined.
megatron/core/optimizer/distrib_optimizer.py:1682
Method
_compare
(srcs, tgts, names, parallelism)
megatron/core/transformer/attention.py:561
Method
_compare
(srcs, tgts, names, parallelism)
megatron/core/transformer/attention.py:1132
Method
_compare
(srcs, tgts, names, parallelism)
megatron/core/transformer/attention.py:1533
Function
_compare_floats
Internal function that implements the default compare_func. Check the validate_result() method of the RerunStateMachine class for details.
megatron/core/rerun_state_machine.py:1114
Function
_compute_language_model_loss
(self, labels, logits)
megatron/inference/algos/distillation.py:447
Function
_convert_image_to_rgb
(image)
megatron/legacy/data/multimodal_dataset.py:16
Method
_copy_main_params_to_model_params
Copy main params to model params. Since this step is followed by an all-gather through the DDP's grad buffer, this method is
megatron/core/optimizer/distrib_optimizer.py:1757
Method
_copy_model_grads_to_main_grads
Copy model grads to main grads. Since this step follows a reduce-scatter through the DDP's grad buffer, this method is respo
megatron/core/optimizer/distrib_optimizer.py:1717
Method
_copy_model_params_to_main_params
Copy model params to main params. During finetuning, this method is used to reload the main params from the model params. Th
megatron/core/optimizer/distrib_optimizer.py:1815
Function
_cpp_extention_load_helper
(name, sources, extra_cuda_flags)
megatron/legacy/fused_kernels/__init__.py:37
Function
_cross_entropy_forward_step
Simple forward step with cross-entropy loss.
tasks/finetune_utils.py:53
Function
_cross_entropy_forward_step
Simple forward step with cross-entropy loss.
tasks/vision/classification/classification.py:53
Function
_cross_entropy_forward_step
Simple forward step with cross-entropy loss.
tasks/vision/segmentation/finetune_segformer.py:109
Function
_cross_entropy_forward_step
Simple forward step with cross-entropy loss.
tasks/vision/segmentation/finetune_setr.py:71
Function
_disable_gc
Temporarily disables GC.
megatron/core/dist_checkpointing/strategies/filesystem_async.py:39
Method
_does_param_require_new_bucket
Split shared embedding parameters into separate bucket if using distributed optimizer that makes use of reduce-scatters inste
megatron/core/distributed/param_and_grad_buffer.py:516
Method
_fill_in_data
(t: Union[ShardedTensor, torch.Tensor])
megatron/core/dist_checkpointing/strategies/two_stage.py:234
Method
_forward
(self, tokens, position_ids, attention_mask)
tools/run_vlm_text_generation.py:174
Method
_forward
(self, model_inputs)
tools/bert_embedding/huggingface.py:25
Method
_forward
Per-chunk bias-dropout-add. Args: x_with_bias (dict): Attention output and bias tuple. residual (Tensor): Transformer
megatron/core/models/retro/encoder_attention.py:119
Method
_forward
Per-chunk bias-dropout-add. Args: x_with_bias (dict): Attention output and bias, along with other Retro relevant parameters.
megatron/core/models/retro/decoder_attention.py:226
Function
_forward_step_func
(data_iterator, model)
tests/unit_tests/export/trtllm/test_single_device_fp8.py:81
Function
_forward_step_func
(data_iterator, model)
tests/unit_tests/export/trtllm/test_distributed_fp8.py:84
Method
_get_device_from_generator
(self, gen: torch.Generator)
megatron/core/models/difflm/gpt_model.py:299
Method
_get_model_and_main_params_data_float16
Get aligned list of model and main params.
megatron/core/optimizer/distrib_optimizer.py:1700
Method
_get_param_groups
(self)
megatron/core/optimizer/optimizer.py:270
Method
_get_state
(self)
megatron/core/optimizer/optimizer.py:259
Method
_get_token_mask
Abstract method implementation 100% of the time, replace the token id with mask token id. Args: numpy_random_state (Rand
megatron/core/datasets/t5_dataset.py:320
Method
_get_token_mask
Abstract method implementation 80% of the time, replace the token id with mask token id. 10% of the time, replace token id with a ran
megatron/core/datasets/bert_dataset.py:175
Method
_handler
Thread function for the controller. It is a tcp-server that listens on a port. Uses HTTP protocol. If connected to it using curl, it
megatron/core/utils.py:1136
Function
_init_weights
( module, n_layer, initializer_range=0.02, # Now only used for embedding layer. rescale_preno
megatron/core/ssm/mamba_block.py:31
Method
_init_weights
(self, module)
tools/weights_conversion/hf_configs/gptneox_1.7b_dlm/modeling_dlm.py:412
Method
_init_weights
(self, module)
tools/weights_conversion/hf_configs/gptneox_1.7b_ar/modeling_ar.py:403
Method
_init_weights
(self, module)
tools/weights_conversion/hf_configs/gpt2_1b_dlm/modeling_dlm.py:412
Method
_init_weights
(self, m)
megatron/legacy/model/vision/classification.py:72
Method
_init_weights
(self, m)
megatron/legacy/model/vision/esvit_swin_backbone.py:580
Method
_init_weights
(self, m)
megatron/legacy/model/vision/dino.py:105
Method
_init_weights
(self, m)
megatron/legacy/model/vision/mit_backbone.py:31
Method
_init_weights
(self, m)
megatron/legacy/model/vision/mit_backbone.py:86
Method
_init_weights
(self, m)
megatron/legacy/model/vision/mit_backbone.py:143
Method
_init_weights
(self, m)
megatron/legacy/model/vision/mit_backbone.py:180
Method
_init_weights
(self, m)
megatron/legacy/model/vision/mit_backbone.py:260
Method
_init_weights
(self, m)
megatron/legacy/model/vision/swin_backbone.py:552
Method
_init_weights
Initialize the weights.
megatron/inference/algos/distillation.py:398
Method
_initalize
(self, vocab_extra_ids)
megatron/training/tokenizer/tokenizer.py:526
Method
_initalize
(self, vocab_extra_ids)
megatron/training/tokenizer/tokenizer.py:566
Method
_key_config_attributes
Inherited method implementation Returns: List[str]: The key config attributes
megatron/core/datasets/t5_dataset.py:85
← previous
next →
2,501–2,600 of 4,219, ranked by callers