MCPcopy Create free account

hub / github.com/JinjieNi/MegaDLMs / functions

Functions4,219 in github.com/JinjieNi/MegaDLMs

Functionload_checkpoint
(queue, args)
tools/checkpoint/loader_mixtral_hf.py:331
Functionload_checkpoint
(queue, args)
tools/checkpoint/loader_legacy.py:371
Functionload_checkpoint
(queue, args)
tools/checkpoint/loader_llama_mistral.py:654
Methodload_common
Load common (non-sharded) objects state dict from the checkpoint. Args: checkpoint_dir (Path): checkpoint directory Retu
megatron/core/dist_checkpointing/strategies/common.py:61
Functionload_common_state_dict
Load common (non-sharded) objects state dict from the checkpoint. Args: checkpoint_dir (Path): checkpoint directory Returns:
megatron/core/dist_checkpointing/serialization.py:159
Functionload_distillation_config
Read the distillation yaml config file specified by ``args.export_kd_cfg``. Args: config_path: Path to user-defined distillation settings
megatron/inference/algos/distillation.py:27
Functionload_expected_data
()
tests/functional_tests/python_test_utils/common.py:84
Methodload_parameter_state
Load the distributed parameter state from disk. Args: filename (str): path to load parameter state from.
megatron/core/optimizer/distrib_optimizer.py:1640
Methodload_rand
(x)
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:57
Functionload_script
(config_path: str)
tests/test_utils/python_scripts/generate_local_jobs.py:18
Functionload_sharded_base
(x: Any)
megatron/core/dist_checkpointing/state_dict_transformation.py:249
Methodload_sharded_metadata
(self, checkpoint_dir: Path)
megatron/core/dist_checkpointing/strategies/fully_parallel.py:377
Methodload_sharded_metadata
Load sharded metadata from the checkpoint for ShardedTensors and ShardedObjects. Returns a dictionary similar to a sharded state dict, but no
megatron/core/dist_checkpointing/strategies/base.py:157
Methodload_sharded_metadata
Uses tensors and objects metadata stored in the metadata file.
megatron/core/dist_checkpointing/strategies/torch.py:839
Methodload_sharded_metadata
(self, checkpoint_dir: Path)
megatron/core/dist_checkpointing/strategies/common.py:123
Methodload_sharded_object
(sh_obj: ShardedObject)
megatron/core/dist_checkpointing/strategies/common.py:94
Methodload_sharded_objects
Replaces all ShardedObject from a given state dict with values loaded from the checkpoint. Args: sharded_objects_state_di
megatron/core/dist_checkpointing/strategies/common.py:79
Methodload_state_dict
Customized load.
megatron/legacy/model/classification.py:89
Methodload_state_dict
Customized load.
megatron/legacy/model/realm_model.py:198
Methodload_state_dict
Customized load.
megatron/legacy/model/gpt_model.py:113
Methodload_state_dict
Customized load.
megatron/legacy/model/language_model.py:593
Methodload_state_dict
Customized load.
megatron/legacy/model/biencoder_model.py:320
Methodload_state_dict
Customize load.
megatron/legacy/model/transformer.py:1791
Methodload_state_dict
(self, state_dict, strict=True)
megatron/legacy/model/module.py:204
Methodload_state_dict
Customize load.
megatron/legacy/model/bert_model.py:84
Methodload_state_dict
Customized load.
megatron/legacy/model/multiple_choice.py:100
Methodload_state_dict
Method to restore the state saved as a serializable dict.
megatron/core/rerun_state_machine.py:876
Methodload_state_dict
Method to restore the state saved as a serializable dict.
megatron/core/rerun_state_machine.py:1058
Methodload_state_dict
No-op because tensors are already loaded in-place by `_load_base_checkpoint` with FSDP2.
megatron/core/distributed/torch_fully_sharded_data_parallel.py:111
Methodload_state_dict
Load pass-in `state_dict`.
megatron/core/optimizer/optimizer.py:253
Methodload_state_dict
(self, state_dict)
megatron/core/optimizer/optimizer.py:714
Methodload_state_dict
(self, state_dict)
megatron/core/optimizer/optimizer.py:1002
Methodload_state_dict
(self, state_dict: Dict)
megatron/core/optimizer/grad_scaler.py:34
Methodload_state_dict
(self, state_dict)
megatron/core/optimizer/grad_scaler.py:49
Methodload_state_dict
(self, state_dict: Dict)
megatron/core/optimizer/grad_scaler.py:139
Methodload_tensors_metadata
(self, checkpoint_dir: Path)
megatron/core/dist_checkpointing/strategies/fully_parallel.py:374
Methodload_tensors_metadata
(self, checkpoint_dir: Path)
megatron/core/dist_checkpointing/strategies/two_stage.py:249
Methodload_tensors_metadata
(self, checkpoint_dir: Path)
megatron/core/dist_checkpointing/strategies/tensorstore.py:49
Methodload_tensors_metadata
(self, checkpoint_dir: Path)
megatron/core/dist_checkpointing/strategies/zarr.py:184
Methodload_tensors_metadata
(self, checkpoint_dir: Path)
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:65
Methodload_with_flag
(strict)
tests/unit_tests/dist_checkpointing/test_serialization.py:639
Functionload_workloads
Return all workloads from disk that match scope and platform.
tests/test_utils/python_scripts/common.py:187
Functionlocal_multi_tensor_l2_norm
Computes l2 norm for a list of contiguous tensors works as a drop-in replacement for amp_C.multi_tensor_l2norm
megatron/core/utils.py:626
Functionlocal_multi_tensor_scale
Works as a drop-in replacement for amp_C.multi_tensor_scale.
megatron/core/utils.py:638
Functionlocal_test_specs
()
tests/unit_tests/test_tokenizer.py:26
Methodlog_failure
(message: str)
megatron/core/rerun_state_machine.py:497
Functionloss_func
(loss_mask, output_tensor)
tools/retro/sft/sft_retro.py:151
Functionloss_func
(output_tensor)
tests/unit_tests/pipeline_parallel/test_schedules.py:61
Functionloss_func
(loss_mask: torch.Tensor, output_tensor: torch.Tensor)
tests/unit_tests/export/trtllm/test_distributed_fp8.py:86
Functionloss_func
(labels, output_tensor)
tasks/vision/classification/eval_utils.py:65
Functionloss_func
(labels, output_tensor)
tasks/vision/segmentation/finetune_segformer.py:135
Functionloss_func
(labels, slices_info, img_size, output_tensor)
tasks/vision/segmentation/finetune_setr.py:105
Functionlru_cache
()
megatron/training/tokenizer/gpt2_tokenization.py:34
Functionmain
Main program
tasks/orqa/evaluate_orqa.py:9
Functionmain
()
tasks/orqa/supervised/finetune.py:228
Functionmain
Main program.
tasks/zeroshot_gpt/evaluate.py:178
Functionmain
()
tasks/msdp/prompt.py:288
Functionmain
()
tasks/vision/classification/classification.py:79
Functionmain
()
tasks/vision/segmentation/finetune_setr.py:211
Functionmain
()
tasks/glue/finetune.py:56
Methodmany_returns
Return a list of information on function return.
tools/retro/config_utils.py:201
Methodmask
The MASK token id Raises: NotImplementedError: Non-abstract, optional attribute
megatron/core/datasets/megatron_tokenizer.py:148
Methodmask
(self)
megatron/training/tokenizer/tokenizer.py:273
Methodmask
(self)
megatron/training/tokenizer/tokenizer.py:512
Methodmask
(self)
megatron/training/tokenizer/tokenizer.py:548
Methodmask
(self)
megatron/training/tokenizer/tokenizer.py:598
Methodmask
(self)
megatron/training/tokenizer/tokenizer.py:815
Functionmaybe_reformulate_nd_flattened_tensor
(sh_ten: Any)
megatron/core/dist_checkpointing/strategies/resharding.py:128
Functionmcore_gpt_load_legacy_state_dict_pre_hook
Register a pre-hook to fix the state_dict key difference. This prehook is used when trying to load the legacy Megatron-LM GPTModel into its m
megatron/core/inference/modelopt_support/gpt/state_dict_hooks.py:10
Functionmcore_gpt_load_te_state_dict_pre_hook
Register a pre-hook to fix the state_dict key difference of. This prehook is used when trying to load the megatron/core GPTModel that uses a
megatron/core/inference/modelopt_support/gpt/state_dict_hooks.py:83
Functionmega_forward
(model, batch)
tools/weights_conversion/utils/verify_correctness_dlm.py:140
Methodmerge_extra_states
Merge multiple "_extra_state" into one.
megatron/core/extensions/transformer_engine.py:849
Functionmetrics_func
(model, epoch, output_predictions=False)
tasks/eval_utils.py:33
Functionmetrics_func
(model, epoch, output_predictions=False)
tasks/orqa/supervised/eval_utils.py:102
Functionmetrics_func
(model, epoch)
tasks/vision/classification/eval_utils.py:46
Functionmetrics_func
(model, epoch)
tasks/vision/segmentation/finetune_segformer.py:210
Functionmetrics_func
(model, epoch)
tasks/vision/segmentation/finetune_setr.py:184
Functionmetrics_func_provider
Provide metrics callback function.
tasks/orqa/supervised/finetune.py:217
Functionmetrics_func_provider
Privde metrics callback function.
tasks/race/finetune.py:40
Functionmetrics_func_provider
Privde metrics callback function.
tasks/glue/finetune.py:41
Functionmock_forward_step_fn
(tokens, position_ids, attention_mask)
tests/unit_tests/test_inference.py:24
Methodmock_get_empty_tensor_for_exchange
(*args, **kwargs)
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:296
Functionmock_optimizer
()
tests/unit_tests/test_optimizer_param_scheduler.py:12
Functionmock_train_valid_test_datasets_provider
(train_val_test_num_samples)
tests/unit_tests/test_training.py:9
Functionmodel_parallel_is_initialized
Check if model- and data-parallel groups are initialized.
megatron/core/parallel_state.py:1019
Functionmodel_provider
Builds the model. Args: pre_process (bool, optional): Set to true if you need to compute embedings. Defaults to True. post_proces
tools/run_mamba_text_generation_server.py:32
Functionmodel_provider
Builds the model. If you set the use_legacy_models to True, it will return the legacy GPT model and if not the core GPT model. Args:
tools/run_text_generation_server.py:32
Functionmodel_provider
Build the model.
megatron/legacy/model/biencoder_model.py:22
Functionmodel_provider
Builds the model. If you set the use_legacy_models to True, it will return the legacy GPT model and if not the core GPT model. Args:
megatron/inference/gpt/model_provider.py:122
Functionmodel_provider
( pre_process=True, post_process=True, layer_spec_fn=get_gpt_layer_local_spec, **config_kwargs )
tests/unit_tests/transformer/moe/test_upcycling.py:33
Functionmodel_provider
Build the model.
tasks/orqa/supervised/finetune.py:193
Functionmodel_provider
Build the model.
tasks/zeroshot_gpt/evaluate.py:28
Functionmodel_provider
Build the model.
tasks/msdp/prompt.py:143
Functionmodel_provider
Build the model.
tasks/race/finetune.py:28
Functionmodel_provider
Builds the model. Args: pre_process (bool, optional): Set to true if you need to compute embeddings. Defaults to True.
tasks/quantize/calibrate_gpt.py:32
Functionmodel_provider
Build the model.
tasks/vision/classification/classification.py:27
Functionmodel_provider
Build the model.
tasks/vision/segmentation/finetune_segformer.py:64
Functionmodel_provider
Build the model.
tasks/vision/segmentation/finetune_setr.py:32
Functionmodel_provider
Build the model.
tasks/glue/finetune.py:29
Methodmodify_logits_for_top_k_filtering
Set the logits for none top-k values to -inf.
megatron/core/inference/text_generation_controllers/text_generation_controller.py:100
← previousnext →3,301–3,400 of 4,219, ranked by callers