MCPcopy Create free account

hub / github.com/JinjieNi/MegaDLMs / functions

Functions4,219 in github.com/JinjieNi/MegaDLMs

Methodtest_te_row_init
(self)
tests/unit_tests/tensor_parallel/test_initialization.py:164
Functiontest_tensor_model_parallel_rank
(order)
tests/unit_tests/test_parallel_state.py:98
Functiontest_tensor_model_parellel_world_size
(order)
tests/unit_tests/test_parallel_state.py:71
Methodtest_tensor_shape_mismatch
(self, tmp_path_dist_ckpt)
tests/unit_tests/dist_checkpointing/test_serialization.py:441
Functiontest_tokenizer
(args)
tests/unit_tests/test_tokenizer.py:125
Methodtest_transformer_block_custom
This test checks that the two ways of passing `layer_spec` to a `TransformerBlock` result in an identical model: 1. ModuleSp
tests/unit_tests/transformer/test_spec_customization.py:185
Methodtest_transformer_engine_version_1_10
(self)
tests/unit_tests/models/test_t5_model.py:285
Methodtest_transformer_engine_version_1_10
(self, mocker)
tests/unit_tests/models/test_bert_model.py:141
Methodtest_transformer_engine_version_1_7_to_1_10_flash_attn
(self, mocker)
tests/unit_tests/models/test_bert_model.py:160
Methodtest_transformer_engine_version_1_7_to_1_10_flashfused_attn
(self)
tests/unit_tests/models/test_t5_model.py:303
Methodtest_transformer_engine_version_1_7_to_1_10_rng_error
(self, mocker)
tests/unit_tests/models/test_bert_model.py:171
Methodtest_transformer_engine_version_1_7_to_1_10_unfused_attention
(self)
tests/unit_tests/models/test_t5_model.py:324
Methodtest_transformer_engine_version_1_7_to_1_10_unfused_attention
(self, mocker)
tests/unit_tests/models/test_bert_model.py:191
Methodtest_transformer_engine_version_less_than_1_7
(self)
tests/unit_tests/models/test_t5_model.py:344
Methodtest_transformer_engine_version_less_than_1_7
(self, mocker)
tests/unit_tests/models/test_bert_model.py:210
Methodtest_unexpected_keys_handling_during_validation
( self, caplog, tmp_path_dist_ckpt, validate_integrity, save_format )
tests/unit_tests/dist_checkpointing/test_serialization.py:629
Methodtest_upcycling
(self, tp_pp_ep, enable_vp, enable_grouped_gemm)
tests/unit_tests/transformer/moe/test_upcycling.py:134
Functiontest_update_num_microbatches
()
tests/unit_tests/test_num_microbatches_calculator.py:67
Functiontest_virtual_pipeline_model_parallel_rank
(order)
tests/unit_tests/test_parallel_state.py:155
Functiontest_vocab
()
tests/unit_tests/tensor_parallel/test_tensor_parallel_utils.py:43
Functiontest_vocab_parallel_cross_entropy
()
tests/unit_tests/tensor_parallel/test_cross_entropy.py:8
Methodtest_vocab_size_padding_change
Test model loading with different vocab size (caused by TP padding).
tests/unit_tests/dist_checkpointing/models/test_bert_model.py:151
Methodtest_vocab_size_padding_change
Test model loading with different vocab size (caused by TP padding).
tests/unit_tests/dist_checkpointing/models/test_gpt_model.py:131
Methodtest_wrong_length_override_pattern
(self)
tests/unit_tests/ssm/test_mamba_hybrid_layer_allocation.py:69
Methodtest_wrong_number_of_layer_types_in_override_pattern
(self)
tests/unit_tests/ssm/test_mamba_hybrid_layer_allocation.py:74
Methodtest_zero_parameters
(self)
tests/unit_tests/models/test_base_embedding.py:33
Functiontimed
(verbose=True)
megatron/core/dist_checkpointing/strategies/two_stage.py:31
Functiontimed_dec
(fn)
megatron/core/dist_checkpointing/strategies/two_stage.py:32
Functiontmp_path_dist_ckpt
Common directory for saving the checkpoint. Can't use pytest `tmp_path_factory` directly because directory must be shared between processes.
tests/unit_tests/conftest.py:34
Functiontmp_path_dist_ckpt
Common directory for saving the checkpoint. Can't use pytest `tmp_path_factory` directly because directory must be shared between processes.
tests/unit_tests/transformer/moe/conftest.py:35
Methodtoken_permutation
Dispatch tokens to local experts. It's composed of two stages: (1) Gather the tokens across the expert parallel devices. After this stage,
megatron/core/transformer/moe/token_dispatcher.py:136
Methodtoken_permutation
Dispatch tokens to local experts using AlltoAll communication. This method performs the following steps: 1. Preprocess the r
megatron/core/transformer/moe/token_dispatcher.py:456
Methodtoken_permutation
Dispatch tokens to local experts using AlltoAll communication. Args: hidden_states (torch.Tensor): Input token embedding
megatron/core/transformer/moe/legacy_a2a_token_dispatcher.py:188
Methodtoken_unpermutation
Reverse process of `dispatch()` which permutes the output of local experts locallay and across expert parallel rank into the original
megatron/core/transformer/moe/token_dispatcher.py:198
Methodtoken_unpermutation
Reverse the token permutation to restore the original order. This method performs the following steps: 1. Unsort tokens by l
megatron/core/transformer/moe/token_dispatcher.py:530
Methodtoken_unpermutation
Reverse the token permutation to restore the original order. Args: hidden_states (torch.Tensor): Output from local exper
megatron/core/transformer/moe/legacy_a2a_token_dispatcher.py:257
Methodtokenize
(self, text, **kwargs)
megatron/training/tokenizer/tokenizer.py:157
Methodtokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:234
Methodtokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:339
Methodtokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:445
Methodtokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:533
Methodtokenize
Default args for text completion, not chat/dialog.
megatron/training/tokenizer/tokenizer.py:576
Methodtokenize
(self, s: str, bos: bool = False, eos: bool = False)
megatron/training/tokenizer/tokenizer.py:746
Methodtokenize
(self, text)
megatron/training/tokenizer/bert_tokenization.py:173
Methodtokenize
Tokenizes a piece of text.
megatron/training/tokenizer/bert_tokenization.py:231
Methodtokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the gi
megatron/training/tokenizer/bert_tokenization.py:343
Methodtokenize
(self, text)
tasks/orqa/unsupervised/tokenizers.py:174
Methodtokenize
(self, text)
tasks/orqa/unsupervised/tokenizers.py:215
Methodtp_ep_group
Get expert tensor and model parallel group.
megatron/core/transformer/moe/token_dispatcher.py:70
Methodtp_group
Get expert tensor parallel group.
megatron/core/transformer/moe/token_dispatcher.py:60
Methodtp_rank
Get expert tensor parallel rank.
megatron/core/transformer/moe/token_dispatcher.py:65
Functiontrack_app_tag
Track app_tag and app_tag ID Args: batch_size (int): current batch size world_size (int): the number of processes of current job
megatron/training/one_logger_utils.py:438
Functiontrack_config_flags
Track flags about train/validation/test enablement Args: train_iters (int): target train iteration number skip_train (bool): flag
megatron/training/one_logger_utils.py:294
Functiontrack_e2e_metrics
Track E2E application metrics with one-logger NOTE: the function should be called after barrier call. Args: log_throughput (bool, op
megatron/training/one_logger_utils.py:204
Functiontrain_valid_datasets_provider
Build train and validation dataset.
tasks/orqa/supervised/finetune.py:176
Functiontrain_valid_datasets_provider
Build train and validation dataset.
tasks/vision/classification/classification.py:17
Functiontrain_valid_datasets_provider
Build train and validation dataset.
tasks/vision/segmentation/finetune_segformer.py:53
Functiontrain_valid_datasets_provider
Build train and validation dataset.
tasks/glue/finetune.py:17
Functiontrain_valid_test_datasets_provider
Build the train test and validation datasets. Args: train_val_test_num_samples : A list containing the number of samples in train test an
pretrain_difflm.py:390
Functiontrain_valid_test_datasets_provider
Build train, valid, and test datasets.
tools/retro/sft/sft_retro.py:189
Methodtransform_object
Make no transformations - bytes objects are already serialized.
megatron/core/dist_checkpointing/strategies/torch.py:506
Functiontransformer_block_forward
Perform the forward pass through the transformer block. This method handles the core computation of the transformer, including
megatron/core/transformer/custom_layers/ut_modules.py:188
Functiontruncate_segments
Truncates a pair of sequences to a maximum sequence length.
megatron/legacy/data/dataset_utils.py:116
Functiontwod_interpolate_position_embeddings_hook
( state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error
megatron/legacy/model/vision/vit_backbone.py:57
Methodunique_key
returns a unique key for this object
megatron/core/dist_checkpointing/mapping.py:561
Methodunk
(self)
megatron/training/tokenizer/tokenizer.py:731
Functionunlink_data
(x)
megatron/core/dist_checkpointing/strategies/resharding.py:157
Methodunmap_weight_tensor
(m)
megatron/core/distributed/distributed_data_parallel.py:270
Methodupdate
(self, consumed_samples, consistency_check, verbose=False)
megatron/core/num_microbatches_calculator.py:356
Methodupdate
(self, found_inf: bool)
megatron/core/optimizer/grad_scaler.py:26
Methodupdate
(self, found_inf: bool)
megatron/core/optimizer/grad_scaler.py:43
Methodupdate_index
Delete existing index and create a new
megatron/legacy/data/realm_index.py:178
Methodupload_file
(self, Filename: str, Bucket: str, Key: str)
megatron/core/datasets/utils_s3.py:39
Methodupload_file
(self, Filename: str, Bucket: str, Key: str)
tests/unit_tests/data/test_bin_reader.py:50
Functionut_act_forward_original
Perform the forward pass through the universal transformer block. ACT was adapted from the original tensorflow implementation https:
megatron/core/transformer/custom_layers/ut_modules.py:565
Functionut_router_forward
Perform the forward pass through the universal transformer block (router as the act function).
megatron/core/transformer/custom_layers/ut_modules.py:1486
Functionut_router_prerouting_forward
Perform the forward pass through the universal transformer block (router as the act function).
megatron/core/transformer/custom_layers/ut_modules.py:1838
Functionvalidate
Validation method for validating encoding blocks. Args: f (h5py.File): File with block of encodings.
megatron/core/datasets/retro/index/validate.py:124
Methodvalidate
(f)
tools/bert_embedding/embed.py:266
Methodvalidate
Validation method for validating loaded encodings. Args: f (h5py.File): File that contains encodings.
megatron/core/datasets/retro/index/indexes/faiss_par_add.py:102
Functionvalidate_case_matches_checkpoint
Checks whether the casing config is consistent with the checkpoint name.
megatron/training/tokenizer/bert_tokenization.py:31
Functionvalidate_index
Validate index. Validating index involves sequentially running stages above: - Validate trained index. - Validate filled index. Args
megatron/core/datasets/retro/index/validate.py:176
Methodvalidate_metadata_integrity
No reasonable checks can be applied
megatron/core/dist_checkpointing/mapping.py:639
Methodvanilla_forward
Forward pass for the latent next word prediction. The LM decoder will perform teacher-forcing next word prediction in multiple depths
megatron/core/models/difflm/gpt_model.py:163
Methodvocab
Dictionary from vocab text token to id token
megatron/core/datasets/megatron_tokenizer.py:77
Methodvocab
Dictionary from vocab text token to id token.
megatron/training/tokenizer/tokenizer.py:144
Methodvocab
(self)
megatron/training/tokenizer/tokenizer.py:227
Methodvocab
(self)
megatron/training/tokenizer/tokenizer.py:332
Methodvocab
(self)
megatron/training/tokenizer/tokenizer.py:428
Methodvocab
(self)
megatron/training/tokenizer/tokenizer.py:739
Methodvocab
(self)
megatron/training/tokenizer/tokenizer.py:799
Methodvocab
Vocab.
megatron/training/tokenizer/multimodal_tokenizer.py:262
Methodvocab_size
The vocabulary size
megatron/core/datasets/megatron_tokenizer.py:89
Methodvocab_size
(self)
megatron/training/tokenizer/tokenizer.py:140
Methodvocab_size
(self)
megatron/training/tokenizer/tokenizer.py:223
Methodvocab_size
(self)
megatron/training/tokenizer/tokenizer.py:328
Methodvocab_size
(self)
megatron/training/tokenizer/tokenizer.py:424
Methodvocab_size
(self)
megatron/training/tokenizer/tokenizer.py:762
Methodvocab_size
Vocabulary size.
megatron/training/tokenizer/multimodal_tokenizer.py:272
Methodvocab_size
(self)
megatron/training/tokenizer/bert_tokenization.py:216
← previousnext →4,101–4,200 of 4,219, ranked by callers