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
test_te_row_init
(self)
tests/unit_tests/tensor_parallel/test_initialization.py:164
Function
test_tensor_model_parallel_rank
(order)
tests/unit_tests/test_parallel_state.py:98
Function
test_tensor_model_parellel_world_size
(order)
tests/unit_tests/test_parallel_state.py:71
Method
test_tensor_shape_mismatch
(self, tmp_path_dist_ckpt)
tests/unit_tests/dist_checkpointing/test_serialization.py:441
Function
test_tokenizer
(args)
tests/unit_tests/test_tokenizer.py:125
Method
test_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
Method
test_transformer_engine_version_1_10
(self)
tests/unit_tests/models/test_t5_model.py:285
Method
test_transformer_engine_version_1_10
(self, mocker)
tests/unit_tests/models/test_bert_model.py:141
Method
test_transformer_engine_version_1_7_to_1_10_flash_attn
(self, mocker)
tests/unit_tests/models/test_bert_model.py:160
Method
test_transformer_engine_version_1_7_to_1_10_flashfused_attn
(self)
tests/unit_tests/models/test_t5_model.py:303
Method
test_transformer_engine_version_1_7_to_1_10_rng_error
(self, mocker)
tests/unit_tests/models/test_bert_model.py:171
Method
test_transformer_engine_version_1_7_to_1_10_unfused_attention
(self)
tests/unit_tests/models/test_t5_model.py:324
Method
test_transformer_engine_version_1_7_to_1_10_unfused_attention
(self, mocker)
tests/unit_tests/models/test_bert_model.py:191
Method
test_transformer_engine_version_less_than_1_7
(self)
tests/unit_tests/models/test_t5_model.py:344
Method
test_transformer_engine_version_less_than_1_7
(self, mocker)
tests/unit_tests/models/test_bert_model.py:210
Method
test_unexpected_keys_handling_during_validation
( self, caplog, tmp_path_dist_ckpt, validate_integrity, save_format )
tests/unit_tests/dist_checkpointing/test_serialization.py:629
Method
test_upcycling
(self, tp_pp_ep, enable_vp, enable_grouped_gemm)
tests/unit_tests/transformer/moe/test_upcycling.py:134
Function
test_update_num_microbatches
()
tests/unit_tests/test_num_microbatches_calculator.py:67
Function
test_virtual_pipeline_model_parallel_rank
(order)
tests/unit_tests/test_parallel_state.py:155
Function
test_vocab
()
tests/unit_tests/tensor_parallel/test_tensor_parallel_utils.py:43
Function
test_vocab_parallel_cross_entropy
()
tests/unit_tests/tensor_parallel/test_cross_entropy.py:8
Method
test_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
Method
test_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
Method
test_wrong_length_override_pattern
(self)
tests/unit_tests/ssm/test_mamba_hybrid_layer_allocation.py:69
Method
test_wrong_number_of_layer_types_in_override_pattern
(self)
tests/unit_tests/ssm/test_mamba_hybrid_layer_allocation.py:74
Method
test_zero_parameters
(self)
tests/unit_tests/models/test_base_embedding.py:33
Function
timed
(verbose=True)
megatron/core/dist_checkpointing/strategies/two_stage.py:31
Function
timed_dec
(fn)
megatron/core/dist_checkpointing/strategies/two_stage.py:32
Function
tmp_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
Function
tmp_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
Method
token_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
Method
token_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
Method
token_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
Method
token_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
Method
token_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
Method
token_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
Method
tokenize
(self, text, **kwargs)
megatron/training/tokenizer/tokenizer.py:157
Method
tokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:234
Method
tokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:339
Method
tokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:445
Method
tokenize
(self, text)
megatron/training/tokenizer/tokenizer.py:533
Method
tokenize
Default args for text completion, not chat/dialog.
megatron/training/tokenizer/tokenizer.py:576
Method
tokenize
(self, s: str, bos: bool = False, eos: bool = False)
megatron/training/tokenizer/tokenizer.py:746
Method
tokenize
(self, text)
megatron/training/tokenizer/bert_tokenization.py:173
Method
tokenize
Tokenizes a piece of text.
megatron/training/tokenizer/bert_tokenization.py:231
Method
tokenize
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
Method
tokenize
(self, text)
tasks/orqa/unsupervised/tokenizers.py:174
Method
tokenize
(self, text)
tasks/orqa/unsupervised/tokenizers.py:215
Method
tp_ep_group
Get expert tensor and model parallel group.
megatron/core/transformer/moe/token_dispatcher.py:70
Method
tp_group
Get expert tensor parallel group.
megatron/core/transformer/moe/token_dispatcher.py:60
Method
tp_rank
Get expert tensor parallel rank.
megatron/core/transformer/moe/token_dispatcher.py:65
Function
track_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
Function
track_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
Function
track_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
Function
train_valid_datasets_provider
Build train and validation dataset.
tasks/orqa/supervised/finetune.py:176
Function
train_valid_datasets_provider
Build train and validation dataset.
tasks/vision/classification/classification.py:17
Function
train_valid_datasets_provider
Build train and validation dataset.
tasks/vision/segmentation/finetune_segformer.py:53
Function
train_valid_datasets_provider
Build train and validation dataset.
tasks/glue/finetune.py:17
Function
train_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
Function
train_valid_test_datasets_provider
Build train, valid, and test datasets.
tools/retro/sft/sft_retro.py:189
Method
transform_object
Make no transformations - bytes objects are already serialized.
megatron/core/dist_checkpointing/strategies/torch.py:506
Function
transformer_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
Function
truncate_segments
Truncates a pair of sequences to a maximum sequence length.
megatron/legacy/data/dataset_utils.py:116
Function
twod_interpolate_position_embeddings_hook
( state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error
megatron/legacy/model/vision/vit_backbone.py:57
Method
unique_key
returns a unique key for this object
megatron/core/dist_checkpointing/mapping.py:561
Method
unk
(self)
megatron/training/tokenizer/tokenizer.py:731
Function
unlink_data
(x)
megatron/core/dist_checkpointing/strategies/resharding.py:157
Method
unmap_weight_tensor
(m)
megatron/core/distributed/distributed_data_parallel.py:270
Method
update
(self, consumed_samples, consistency_check, verbose=False)
megatron/core/num_microbatches_calculator.py:356
Method
update
(self, found_inf: bool)
megatron/core/optimizer/grad_scaler.py:26
Method
update
(self, found_inf: bool)
megatron/core/optimizer/grad_scaler.py:43
Method
update_index
Delete existing index and create a new
megatron/legacy/data/realm_index.py:178
Method
upload_file
(self, Filename: str, Bucket: str, Key: str)
megatron/core/datasets/utils_s3.py:39
Method
upload_file
(self, Filename: str, Bucket: str, Key: str)
tests/unit_tests/data/test_bin_reader.py:50
Function
ut_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
Function
ut_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
Function
ut_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
Function
validate
Validation method for validating encoding blocks. Args: f (h5py.File): File with block of encodings.
megatron/core/datasets/retro/index/validate.py:124
Method
validate
(f)
tools/bert_embedding/embed.py:266
Method
validate
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
Function
validate_case_matches_checkpoint
Checks whether the casing config is consistent with the checkpoint name.
megatron/training/tokenizer/bert_tokenization.py:31
Function
validate_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
Method
validate_metadata_integrity
No reasonable checks can be applied
megatron/core/dist_checkpointing/mapping.py:639
Method
vanilla_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
Method
vocab
Dictionary from vocab text token to id token
megatron/core/datasets/megatron_tokenizer.py:77
Method
vocab
Dictionary from vocab text token to id token.
megatron/training/tokenizer/tokenizer.py:144
Method
vocab
(self)
megatron/training/tokenizer/tokenizer.py:227
Method
vocab
(self)
megatron/training/tokenizer/tokenizer.py:332
Method
vocab
(self)
megatron/training/tokenizer/tokenizer.py:428
Method
vocab
(self)
megatron/training/tokenizer/tokenizer.py:739
Method
vocab
(self)
megatron/training/tokenizer/tokenizer.py:799
Method
vocab
Vocab.
megatron/training/tokenizer/multimodal_tokenizer.py:262
Method
vocab_size
The vocabulary size
megatron/core/datasets/megatron_tokenizer.py:89
Method
vocab_size
(self)
megatron/training/tokenizer/tokenizer.py:140
Method
vocab_size
(self)
megatron/training/tokenizer/tokenizer.py:223
Method
vocab_size
(self)
megatron/training/tokenizer/tokenizer.py:328
Method
vocab_size
(self)
megatron/training/tokenizer/tokenizer.py:424
Method
vocab_size
(self)
megatron/training/tokenizer/tokenizer.py:762
Method
vocab_size
Vocabulary size.
megatron/training/tokenizer/multimodal_tokenizer.py:272
Method
vocab_size
(self)
megatron/training/tokenizer/bert_tokenization.py:216
← previous
next →
4,101–4,200 of 4,219, ranked by callers