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
backward
Backward function.
megatron/core/tensor_parallel/mappings.py:394
Method
backward
Backward function.
megatron/core/tensor_parallel/mappings.py:413
Method
backward
If this is the first bwd pass of this runner, record that a bwd graph needs to be created.
megatron/core/transformer/cuda_graphs.py:231
Method
backward
Replay the backward graph of the passed runner.
megatron/core/transformer/cuda_graphs.py:302
Method
backward
Compute and scale the gradient for auxiliary loss.. Args: grad_output (torch.Tensor): The gradient of the output. Return
megatron/core/transformer/moe/moe_utils.py:206
Method
backward
(ctx, grad_output)
megatron/inference/algos/distillation.py:422
Function
bias_dropout_add_fused_inference
(x: torch.Tensor, bias: Optional[torch.Tensor],
megatron/legacy/model/transformer.py:861
Function
bias_dropout_add_fused_inference
( x_with_bias: Tuple[torch.Tensor, Optional[torch.Tensor]], residual: torch.Tensor, prob: float )
megatron/core/fusions/fused_bias_dropout.py:56
Function
bias_dropout_add_fused_train
(x: torch.Tensor, bias: Optional[torch.Tensor],
megatron/legacy/model/transformer.py:853
Method
bos
The BOS token id Raises: NotImplementedError: Non-abstract, optional attribute
megatron/core/datasets/megatron_tokenizer.py:130
Method
bos
Id of the beginning of sentence token in the vocabulary.
megatron/training/tokenizer/tokenizer.py:277
Method
bos
(self)
megatron/training/tokenizer/tokenizer.py:500
Method
bos
(self)
megatron/training/tokenizer/tokenizer.py:723
Method
bos_token
Beginning of sentence token id
megatron/training/tokenizer/tokenizer.py:292
Method
broadcast_params
Syncs parameters across all DP ranks.
megatron/core/distributed/distributed_data_parallel.py:466
Method
build
Build all dataset splits according to the provided blend(s) This method is distributed-aware and must be called on all ranks. The da
megatron/core/datasets/blended_megatron_dataset_builder.py:82
Method
build_and_save_engine
Method to build the TRTLLM Engine This method uses the TRTLLMEngineBuilder to build and save the engine to engine dir Args:
megatron/core/export/trtllm/trtllm_helper.py:506
Method
build_and_save_engine
Method to build the TRTLLM Engine This method uses the TRTLLMEngineBuilder to build and save the engine to engine dir Args:
megatron/core/export/trtllm/engine_builder/trtllm_engine_builder.py:17
Function
build_blending_indices
megatron/core/datasets/helpers.cpp:75
Function
build_blocks_mapping
megatron/core/datasets/helpers.cpp:805
Function
build_blocks_mapping_impl
megatron/core/datasets/helpers.cpp:564
Function
build_exhaustive_blending_indices
megatron/core/datasets/helpers.cpp:21
Function
build_index
Build index. Building index involves sequentially running stages above: - Train index (on sampled training chunks). - Add to index (on al
megatron/core/datasets/retro/index/build.py:298
Method
build_layer
(layer_number)
megatron/legacy/model/transformer.py:1470
Method
build_layer
(layer_spec, layer_number)
megatron/core/transformer/transformer_block.py:248
Method
build_low_level_dataset
(dataset_path: str, config: JsonQADatasetConfig)
tools/retro/sft/dataset_conv.py:77
Method
build_low_level_dataset
Abstract method implementation Args: dataset_path (Optional[str]): This argument is of no consequence for the Moc
megatron/core/datasets/gpt_dataset.py:810
Method
build_low_level_dataset
Abstract method implementation Args: dataset_path (str): The real path prefix to the IndexedDataset .bin and .idx files
megatron/core/datasets/gpt_dataset.py:945
Method
build_low_level_dataset
Build the low level dataset via a function to be called from within BlendedMegatronDatasetBuilder.build_generic_dataset It may be tha
megatron/core/datasets/megatron_dataset.py:88
Method
build_low_level_dataset
( dataset_path: str, config: MaskedWordPieceDatasetConfig )
megatron/core/datasets/masked_dataset.py:120
Method
build_low_level_dataset
( dataset_path: str, config: BlendedMegatronDatasetConfig )
tests/unit_tests/data/test_builder.py:84
Function
build_mapping
megatron/core/datasets/helpers.cpp:526
Function
build_mapping_impl
megatron/core/datasets/helpers.cpp:266
Function
build_partial_db
Process a document index range of the indexed dataset. The chunk database is built in parallel blocks, since de-tokenizing & re-tokenizing fo
megatron/core/datasets/retro/db/build.py:48
Function
build_sample_idx
Build the 2-D sample index using the properly typed templated C++ function from helpers.cpp Args: sizes (numpy.ndarray): The 1-D array of
megatron/core/datasets/helpers.py:11
Function
build_sample_idx
megatron/core/datasets/helpers.cpp:143
Function
build_train_valid_test_datasets
(data_prefix, splits_string, train_valid_test_num_samples,
megatron/legacy/data/dataset_utils.py:448
Function
build_train_valid_test_datasets_with_prefixes
(train_valid_test_num_samples, max_seq_length,
megatron/legacy/data/dataset_utils.py:411
Function
calculate_weight
(masks, num_classes)
tasks/vision/segmentation/finetune_segformer.py:80
Method
can_handle_sharded_objects
(self)
megatron/core/dist_checkpointing/strategies/fully_parallel.py:125
Method
can_handle_sharded_objects
(self)
megatron/core/dist_checkpointing/strategies/fully_parallel.py:371
Method
can_handle_sharded_objects
Returns whether or not this strategy can handle loading ShardedObjects.
megatron/core/dist_checkpointing/strategies/base.py:90
Method
can_handle_sharded_objects
Returns whether or not this strategy can handle saving ShardedObjects.
megatron/core/dist_checkpointing/strategies/base.py:104
Method
can_handle_sharded_objects
(self)
megatron/core/dist_checkpointing/strategies/torch.py:711
Method
can_handle_sharded_objects
(self)
megatron/core/dist_checkpointing/strategies/torch.py:932
Method
can_handle_sharded_objects
This strategy can handle ShardedObjects.
megatron/core/dist_checkpointing/strategies/common.py:53
Method
can_handle_sharded_objects
This strategy can handle ShardedObjects.
megatron/core/dist_checkpointing/strategies/common.py:149
Function
can_update_timeouts
()
megatron/training/ft_integration.py:108
Function
cb
()
megatron/core/tensor_parallel/random.py:42
Method
check
(val, ref)
megatron/core/transformer/cuda_graphs.py:604
Method
check_and_set_env_variable
( env_variable_name: str, expected_value: int, attn_type: AttnBackend )
megatron/core/models/common/language_module/language_module.py:36
Function
check_answer
Search through all the top docs to see if they have any of the answers.
tasks/orqa/unsupervised/qa_utils.py:86
Method
check_backend_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/fully_parallel.py:380
Method
check_backend_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/two_stage.py:150
Method
check_backend_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/torch.py:935
Method
check_backend_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/common.py:153
Method
check_backend_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/tensorstore.py:56
Method
check_backend_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/zarr.py:191
Method
check_backend_compatibility
(self, loaded_version)
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:68
Function
check_is_distributed_checkpoint
Checks if `metadata.json` exists in the checkpoint and is a valid config. Args: checkpoint_dir: checkpoint directory Returns:
megatron/core/dist_checkpointing/core.py:36
Method
check_version_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/fully_parallel.py:383
Method
check_version_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/two_stage.py:153
Method
check_version_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/torch.py:938
Method
check_version_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/common.py:156
Method
check_version_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/tensorstore.py:59
Method
check_version_compatibility
(self, loaded_version)
megatron/core/dist_checkpointing/strategies/zarr.py:194
Method
check_version_compatibility
(self, loaded_version)
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:71
Method
checkpoint_handler
Determines whether to use the `te_checkpoint` or `tensor_parallel.checkpoint`
megatron/core/transformer/transformer_block.py:307
Method
clean_up_tokenization
Clean up a list of simple English tokenization artifacts like spaces before punctuations and abreviated forms.
megatron/training/tokenizer/bert_tokenization.py:191
Function
cleanup
()
tests/unit_tests/conftest.py:19
Function
cleanup
()
tests/unit_tests/transformer/moe/conftest.py:19
Function
client
(app)
tests/unit_tests/test_inference.py:44
Method
clone_tensor
(ten)
megatron/core/transformer/cuda_graphs.py:644
Method
close
Finalize all calls upon closing.
megatron/core/dist_checkpointing/strategies/async_utils.py:222
Method
cls
The CLS token id Raises: NotImplementedError: Non-abstract, optional attribute
megatron/core/datasets/megatron_tokenizer.py:94
Method
cls
(self)
megatron/training/tokenizer/tokenizer.py:261
Method
cls
(self)
megatron/training/tokenizer/tokenizer.py:488
Method
cls
(self)
megatron/training/tokenizer/tokenizer.py:540
Method
cls
(self)
megatron/training/tokenizer/tokenizer.py:590
Method
cls
(self)
megatron/training/tokenizer/tokenizer.py:807
Function
collate_batch
Collate samples of various lengths. This collate function handles samples with various sequence lengths, by padding 'text' arrays with pad_id
tools/bert_embedding/embed.py:27
Method
commit_tensor
Restores the original FP8 tensor saved in `resolve_tensor`.
megatron/core/dist_checkpointing/strategies/torch.py:572
Method
compute_auc
(y_values)
tests/functional_tests/python_test_utils/test_fp8_ci_pipeline.py:64
Function
compute_fingerprint
(line, key)
tools/openwebtext/find_duplicates.py:38
Method
compute_hybrid_entropy_loss
Compute the hybrid entropy loss for the remaining tokens in the sequence when using hybrid sampling.
megatron/core/models/difflm/gpt_model.py:536
Function
compute_jaccard
(each_bin, num_bins, start_time_local)
tools/openwebtext/find_duplicates.py:93
Method
compute_macs
(module, input, output)
megatron/legacy/model/vision/esvit_swin_backbone.py:173
Function
config_from_args
(args, config_cls, add_custom_args=False)
tools/retro/config_utils.py:579
Method
configured
Can be called to check if the instance is already configured Returns: bool: returns True if configure was called and was a succes
megatron/core/utils.py:1319
Function
convert_ffn_router_experts
(llama_mega, layer_idx=0, expert_idx=0, n_dense=11008)
tools/weights_conversion/megatron_to_hf_te.py:77
Function
convert_ffn_shared_experts
(llama_mega, layer_idx=0, n_dense=11008)
tools/weights_conversion/megatron_to_hf_te.py:83
Function
convert_ffn_shared_experts_separate
(s_ep_id, llama_mega, layer_idx=0, n_dense=11008)
tools/weights_conversion/megatron_to_hf_te.py:89
Function
convert_ids_to_tokens
(inv_vocab, ids)
megatron/training/tokenizer/bert_tokenization.py:151
Method
convert_ids_to_tokens
(self, ids)
megatron/training/tokenizer/bert_tokenization.py:184
Function
convert_tokens_to_ids
(vocab, tokens)
megatron/training/tokenizer/bert_tokenization.py:147
Method
convert_tokens_to_ids
(self, tokens)
megatron/training/tokenizer/bert_tokenization.py:181
Method
convert_tokens_to_ids
Convert plaintext to token IDs.
tests/unit_tests/test_tokenizer.py:226
Function
convert_wqkv_bias
(llama_mega, n_hidden, layer_idx=0, n_heads=32, n_heads_kv=8)
tools/weights_conversion/megatron_to_hf_te.py:50
Method
copy_group_grads
(model_groups, shard_main_groups)
megatron/core/optimizer/distrib_optimizer.py:1729
Method
copy_group_params
(shard_main_groups, model_groups)
megatron/core/optimizer/distrib_optimizer.py:1769
← previous
next →
2,701–2,800 of 4,219, ranked by callers