MCPcopy Create free account

hub / github.com/JinjieNi/MegaDLMs / functions

Functions4,219 in github.com/JinjieNi/MegaDLMs

Functioncopy_tensor_model_parallel_attributes
Copy model parallel attributes from one tensor to another.
megatron/core/tensor_parallel/layers.py:100
Functioncorrect_answers_forward_step
(batch, model)
tasks/eval_utils.py:111
Functioncorrect_answers_forward_step
(batch, model)
tasks/vision/classification/eval_utils.py:79
Functioncorrect_answers_forward_step
(batch, model)
tasks/vision/segmentation/finetune_segformer.py:154
Functioncorrect_answers_forward_step
(batch, model)
tasks/vision/segmentation/finetune_setr.py:121
Functioncount_parameters
(model)
tests/unit_tests/models/test_llava_model.py:665
Functioncount_stat
(dataset, tokenizer, k)
tools/retro/sft/dataset_conv.py:255
Methodcreate_attn_mask
(self, H, W)
megatron/legacy/model/vision/swin_backbone.py:219
Methodcreate_local_plan
Runs additional shapes validation.
megatron/core/dist_checkpointing/strategies/torch.py:545
Functioncreate_masked_lm_predictions
Creates the predictions for the masked LM objective. Note: Tokens here are vocab ids and not text tokens.
megatron/legacy/data/dataset_utils.py:176
Functioncreate_tensor_recv_next
()
megatron/core/pipeline_parallel/p2p_communication.py:292
Functioncreate_tensor_recv_prev
()
megatron/core/pipeline_parallel/p2p_communication.py:284
Functioncreate_tokens_and_tokentypes
Merge segments A and B, add [CLS] and [SEP] and build tokentypes.
megatron/legacy/data/dataset_utils.py:136
Methodcrop_in_image
(target_w, target_h, w, h, img, mask)
tasks/vision/segmentation/transforms.py:177
Functioncross_entropy_forward_step
Simple forward step with cross-entropy loss.
tasks/orqa/supervised/finetune.py:47
Functioncross_entropy_loss_func
(labels, output_tensor)
tasks/finetune_utils.py:40
Functioncross_entropy_loss_func
(query_tokens, context_tokens, output_tensor)
tasks/orqa/supervised/finetune.py:95
Functioncross_entropy_loss_func
(labels, output_tensor)
tasks/vision/classification/classification.py:42
Functioncross_entropy_loss_func
(images, masks, output_tensor, non_loss_data=False)
tasks/vision/segmentation/finetune_segformer.py:86
Functioncross_entropy_loss_func
(images, masks, output_tensor, non_loss_data=False)
tasks/vision/segmentation/finetune_setr.py:52
Methodcustom
(start, end)
megatron/legacy/model/transformer.py:1594
Methodcustom
(start: int, end: int)
megatron/core/transformer/transformer_block.py:287
Methodcustom_forward
(*inputs)
megatron/legacy/model/transformer.py:625
Methodcustom_forward
(*args, **kwargs)
megatron/legacy/model/transformer.py:1595
Methodcustom_forward
(*inputs)
megatron/core/transformer/attention.py:145
Methodcustom_forward
( hidden_states, attention_mask, context, context_mask, rotary_pos_emb )
megatron/core/transformer/transformer_block.py:288
Methodcustom_forward
(hidden_states)
megatron/core/transformer/moe/moe_layer.py:129
Methodcustom_forward
(hidden_states)
megatron/core/transformer/moe/moe_layer.py:244
Methoddecode_token_ids
(self, token_ids)
megatron/training/tokenizer/tokenizer.py:246
Methoddecoder
(self)
megatron/training/tokenizer/tokenizer.py:154
Methoddecoder
(self)
megatron/training/tokenizer/tokenizer.py:436
Functiondecoder_model_with_local_default_spec
LLava decoder local spec.
megatron/core/models/multimodal/llava_spec.py:62
Functiondecoder_model_with_transformer_engine_default_spec
LLava decoder TE spec (uses Transformer Engine components).
megatron/core/models/multimodal/llava_spec.py:34
Methoddefault
(self, o)
megatron/core/config_logger.py:46
Functiondefault_cache_dir
Provides a default path for the Triton cache directory.
megatron/core/ssm/triton_cache_manager.py:26
Functiondefault_embedding_ranks
Return the default ranks that constitute the stages on which the word embeddings live. For most models, these are the first and last pipeline stag
megatron/core/parallel_state.py:366
Functiondefault_loader
(path: str)
megatron/legacy/data/image_folder.py:254
Functiondefault_position_embedding_ranks
Return the default ranks that constitute the stages on which the position embeddings live. For most models, this is only the first pipeline stage.
megatron/core/parallel_state.py:379
Methoddeprecation
Return a single information on function deprecation notes.
tools/retro/config_utils.py:208
Functiondepthwise_routing
Depthwise routing for the transformer block.
megatron/core/transformer/custom_layers/ut_modules.py:16
Methoddestroy
(self)
tests/unit_tests/transformer/moe/test_token_dispatcher.py:219
Functiondestroy_global_state
()
megatron/training/training_nan_skipping.py:109
Functiondestroy_global_state
()
megatron/training/training.py:105
Methoddetokenize
(self, token_ids, **kwargs)
megatron/training/tokenizer/tokenizer.py:160
Methoddetokenize
Copy of decode() method for inference pipeline compatibility
megatron/training/tokenizer/tokenizer.py:242
Methoddetokenize
(self, token_ids)
megatron/training/tokenizer/tokenizer.py:342
Methoddetokenize
(self, ids)
megatron/training/tokenizer/tokenizer.py:471
Methoddetokenize
(self, ids)
megatron/training/tokenizer/tokenizer.py:536
Methoddetokenize
(self, ids)
megatron/training/tokenizer/tokenizer.py:586
Methoddetokenize
(self, tokens: List[int])
megatron/training/tokenizer/tokenizer.py:755
Functiondict_map
`map` equivalent for dicts.
megatron/core/dist_checkpointing/dict_utils.py:178
Functiondict_map_with_key
`map` equivalent for dicts with a function that accepts tuple (key, value).
megatron/core/dist_checkpointing/dict_utils.py:184
Methoddifflm_forward
Forward pass for the difflm.
megatron/core/models/difflm/gpt_model.py:212
Methoddocument_indices
Get the document indices Returns: numpy.ndarray: The document indices
megatron/core/datasets/indexed_dataset.py:688
Methoddownload_file
(self, Bucket: str, Key: str, Filename: str)
tests/unit_tests/data/test_bin_reader.py:46
Functiondump_output_data
(data, iteration, writer)
tasks/vision/segmentation/finetune_segformer.py:219
Functiondump_output_data
(data, iteration, writer)
tasks/vision/segmentation/finetune_setr.py:193
Functioneager_attention_forward
( module: nn.Module, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, attentio
tools/weights_conversion/hf_configs/gptneox_1.7b_dlm/modeling_dlm.py:131
Functioneager_attention_forward
( module: nn.Module, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, attentio
tools/weights_conversion/hf_configs/gptneox_1.7b_ar/modeling_ar.py:125
Functioneager_attention_forward
( module: nn.Module, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, attentio
tools/weights_conversion/hf_configs/gpt2_1b_dlm/modeling_dlm.py:131
Functionec_load_balancing_loss_func
Calculate the auxiliary loss for expert choice load balancing. Returns: torch.Tensor: The auxiliary loss for load balancing.
megatron/core/transformer/moe/moe_utils.py:58
Methodelapsed
Calculates the elapsed time.
megatron/core/timers.py:41
Methodelapsed
(self, reset=True, barrier=False)
megatron/core/timers.py:61
Methodembed_text
Embed a single text string. Primarily used for on-the-fly embeddings, particularly during analysis or debugging. For large scale, use
tools/bert_embedding/huggingface.py:105
Methodembed_text
Embed a simple string of text. Args: text (str): A single text sample. Returns: A 1D ndarray with shape (dim
megatron/core/datasets/retro/config/bert_embedders.py:32
Methodembed_text_dataset
Embed a text dataset.
tools/bert_embedding/embed.py:259
Methodenabled
Can be called to check the enabled state of the instance Note: After the request to toggle the state, the actual stat
megatron/core/utils.py:1308
Methodencode
(self, input_pair)
tools/preprocess_mmdata.py:52
Methodencode
(self, text)
tools/preprocess_data_nmt.py:26
Methodencoder
(self)
megatron/training/tokenizer/tokenizer.py:440
Methodentity_groups
Group consecutive entity tokens with the same NER tag.
tasks/orqa/unsupervised/tokenizers.py:119
Functionenv_constructor
(loader, node)
megatron/training/yaml_arguments.py:25
Methodeod
The EOD token id Raises: NotImplementedError: Non-abstract, optional attribute
megatron/core/datasets/megatron_tokenizer.py:121
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:176
Methodeod
Copy of eod property for inference pipeline compatibility
megatron/training/tokenizer/tokenizer.py:287
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:346
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:504
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:552
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:602
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:735
Methodeod
(self)
megatron/training/tokenizer/tokenizer.py:819
Methodeod
End of sentence token ID.
megatron/training/tokenizer/multimodal_tokenizer.py:257
Methodeos
The EOS token id Raises: NotImplementedError: Non-abstract, optional attribute
megatron/core/datasets/megatron_tokenizer.py:139
Methodeos
Id of the end of sentence token in the vocabulary.
megatron/training/tokenizer/tokenizer.py:282
Methodeos
(self)
megatron/training/tokenizer/tokenizer.py:508
Methodeos
(self)
megatron/training/tokenizer/tokenizer.py:727
Methodeos_token
End of sentence token id
megatron/training/tokenizer/tokenizer.py:297
Methodep_group
Get expert model parallel group.
megatron/core/transformer/moe/token_dispatcher.py:55
Functionerf_gelu
(x)
megatron/legacy/model/utils.py:58
Functionerf_gelu
(x)
megatron/core/transformer/utils.py:54
Functionevaluate_with_fixed_corruption
Evaluate the model on multiple fixed corruption settings.
megatron/training/training.py:1897
Functionexact_match_score
(prediction, ground_truth)
tasks/orqa/unsupervised/qa_utils.py:155
Methodexamples
Return a list of information on function examples.
tools/retro/config_utils.py:216
Functionexchange_loaded_tensors_broadcast
Exchange the tensors loaded by different ranks by a series of broadcasts. For each rank for each loaded tensor do a broadcast to the whole group.
megatron/core/dist_checkpointing/exchange_utils.py:400
Functionexchange_loaded_tensors_gather_object
Exchange the tensors loaded by different ranks with a simple all_gather_object call. This version can be used for debugging purposes do to its si
megatron/core/dist_checkpointing/exchange_utils.py:353
Functionexchange_loaded_tensors_gather_rounds
Exchange the tensors loaded by different ranks with several all_gather calls. Groups tensors by dtype, divide tensors that will be exchanged into
megatron/core/dist_checkpointing/exchange_utils.py:240
Methodexecute_sync
Helper to synchronously execute the request. This logic is equivalent to what should happen in case of the async call.
megatron/core/dist_checkpointing/strategies/async_utils.py:48
Functionexpected_data
(request)
tests/functional_tests/python_test_utils/test_ci_pipeline.py:17
Functionexpert_dist_ckpt_decorator
Decorator of shared_state_dict in expert layer for distributed checkpoint. Since !1940, the TP size for Expert layer can be different with Attent
megatron/core/transformer/moe/experts.py:49
Functionextra_extra_args
(parser)
tools/weights_conversion/utils/verify_correctness_dlm.py:223
← previousnext →2,801–2,900 of 4,219, ranked by callers