MCPcopy Create free account

hub / github.com/JinjieNi/MegaDLMs / functions

Functions4,219 in github.com/JinjieNi/MegaDLMs

↓ 1 callersFunctionbias_swiglu_back
(g, y, bias)
megatron/core/fusions/fused_bias_swiglu.py:35
↓ 1 callersMethodbpe
(self, token)
megatron/training/tokenizer/gpt2_tokenization.py:198
↓ 1 callersMethodbrightness
Brightness distortion.
tasks/vision/segmentation/transforms.py:58
↓ 1 callersFunctionbroadcast_data
Broadcast data from rank zero of each model parallel group to the members of the same model parallel group. Args: keys: list of keys
megatron/core/tensor_parallel/data.py:68
↓ 1 callersMethodbuild_and_save_index
Goes through one epoch of the dataloader and adds all data to this instance's BlockData. The copy of BlockData is saved as a
megatron/legacy/indexer.py:78
↓ 1 callersFunctionbuild_block_db
Split each document within block into consecutive retro_gpt_chunk_length size chunks. Args: config (RetroPreprocessingConfig): For DB bui
megatron/core/datasets/retro/db/build.py:165
↓ 1 callersFunctionbuild_cityscapes_train_valid_datasets
(data_path, image_size)
tasks/vision/segmentation/data.py:103
↓ 1 callersFunctionbuild_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
megatron/legacy/model/vision/knn_monitor.py:12
↓ 1 callersFunctionbuild_datasets
(idir_txt, idir_img, odir, extra_args=[])
tests/unit_tests/data/test_preprocess_mmdata.py:32
↓ 1 callersFunctionbuild_db
Extract token chunks from each indexed dataset. Iterate each document of each indexed dataset, extract that document's chunks, and save to a 'DB'
megatron/core/datasets/retro/db/build.py:599
↓ 1 callersMethodbuild_fn
(key, tensor, replica_id, flattened_range)
tests/unit_tests/dist_checkpointing/test_mapping.py:138
↓ 1 callersFunctionbuild_individual_db
Process a single indexed dataset & extract chunks. Args: config (RetroPreprocessingConfig): Retro preprocessing config. dataset_i
megatron/core/datasets/retro/db/build.py:271
↓ 1 callersFunctionbuild_individual_dbs
Iterate each indexed dataset & process its chunks. Args: config (RetroPreprocessingConfig): Retro preprocessing config. indexed_d
megatron/core/datasets/retro/db/build.py:372
↓ 1 callersMethodbuild_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:146
↓ 1 callersFunctionbuild_merged_dbs
Merge individual dataset components into single database. This method merges databases for DB types: - 'sampled': used for training the vecto
megatron/core/datasets/retro/db/build.py:582
↓ 1 callersFunctionbuild_sample
Convert to numpy and return a sample consumed by the batch producer.
megatron/legacy/data/orqa_wiki_dataset.py:105
↓ 1 callersFunctionbuild_sample
Convert to numpy and return a sample consumed by the batch producer.
tasks/orqa/supervised/data.py:94
↓ 1 callersFunctionbuild_sample
Convert to numpy and return a sample consumed by the batch producer.
tasks/orqa/unsupervised/nq.py:140
↓ 1 callersMethodbuild_sample
(cls, tokenizer, token_ids)
tools/bert_embedding/dataset.py:27
↓ 1 callersFunctionbuild_tokens_types_paddings_from_ids
Build token types and paddings, trim if needed, and pad if needed.
megatron/legacy/data/orqa_wiki_dataset.py:68
↓ 1 callersFunctionbuild_tokens_types_paddings_from_ids
Build token types and paddings, trim if needed, and pad if needed. TODO: Design modular interface to reuse this function. This is getting
tasks/orqa/unsupervised/nq.py:100
↓ 1 callersFunctionbuild_tokens_types_paddings_from_text
Build token types and paddings, trim if needed, and pad if needed.
megatron/legacy/data/orqa_wiki_dataset.py:51
↓ 1 callersFunctionbuild_tokens_types_paddings_from_text
Build token types and paddings, trim if needed, and pad if needed.
tasks/data_utils.py:35
↓ 1 callersFunctionbuild_tokens_types_paddings_from_text
Build token types and paddings, trim if needed, and pad if needed.
tasks/orqa/supervised/data.py:32
↓ 1 callersFunctionbuild_tokens_types_paddings_from_text
Build token types and paddings, trim if needed, and pad if needed.
tasks/orqa/unsupervised/nq.py:88
↓ 1 callersFunctionbuild_train_valid_datasets
(data_path, image_size=224)
megatron/legacy/data/vit_dataset.py:215
↓ 1 callersFunctionbuild_train_valid_test_data_loaders
Build pretraining data loaders.
megatron/training/training_nan_skipping.py:1966
↓ 1 callersFunctionbuild_train_valid_test_data_loaders
Build pretraining data loaders.
megatron/training/training.py:2091
↓ 1 callersFunctionbuild_train_valid_test_datasets
Build pretraining datasets.
megatron/training/training_nan_skipping.py:1956
↓ 1 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
megatron/training/tokenizer/gpt2_tokenization.py:55
↓ 1 callersFunctioncalc_threshold
(p, l)
tasks/ensemble_classifier.py:48
↓ 1 callersFunctioncalculate_correct_answers
Calculate correct over total answers and return prediction if the `output_predictions` is true.
tasks/eval_utils.py:65
↓ 1 callersFunctioncalculate_correct_answers
Calculate correct over total answers
tasks/vision/classification/eval_utils.py:58
↓ 1 callersFunctioncalculate_correct_answers
Calculate correct over total answers
tasks/vision/segmentation/finetune_segformer.py:128
↓ 1 callersFunctioncalculate_correct_answers
Calculate correct over total answers
tasks/vision/segmentation/finetune_setr.py:98
↓ 1 callersFunctioncalculate_cross_entropy_loss
( exp_logits: torch.Tensor, predicted_logits_sum_exp_logits: torch.Tensor )
megatron/core/fusions/fused_cross_entropy.py:48
↓ 1 callersFunctioncalculate_gradients
( softmax: torch.Tensor, grad_output: torch.Tensor, target_mask: torch.Tensor, masked_target_1
megatron/core/fusions/fused_cross_entropy.py:63
↓ 1 callersFunctioncalculate_iou
(hist_data)
tasks/vision/segmentation/finetune_segformer.py:21
↓ 1 callersFunctioncalculate_logits_max
(vocab_parallel_logits: torch.Tensor)
megatron/core/fusions/fused_cross_entropy.py:18
↓ 1 callersFunctioncalculate_matches
Evaluates answers presence in the set of documents. This function is supposed to be used with a large collection of documents and results.
tasks/orqa/unsupervised/qa_utils.py:32
↓ 1 callersFunctioncalculate_predicted_logits
( vocab_parallel_logits: torch.Tensor, target: torch.Tensor, logits_max: torch.Tensor, vocab_s
megatron/core/fusions/fused_cross_entropy.py:28
↓ 1 callersFunctioncalculate_weight
(masks, num_classes)
tasks/vision/segmentation/finetune_setr.py:46
↓ 1 callersFunctioncalibrate
(data_loader, model)
tasks/quantize/calibrate_gpt.py:110
↓ 1 callersFunctioncalibrate_and_print_results
Calibrate and print results on screen.
tasks/quantize/calibrate_gpt.py:165
↓ 1 callersFunctioncall_model_api
Calling the model api to get the output generations
tasks/msdp/prompt.py:20
↓ 1 callersFunctioncheck_checkpoint_args
Ensure fixed arguments for a model are the same for the input arguments and the one retrieved from checkpoint.
megatron/training/checkpointing.py:78
↓ 1 callersMethodcheck_for_nan_in_grad
Make sure norm of grads in bucket are not NaN prior to data-parallel all-reduce / reduce-scatter.
megatron/core/distributed/param_and_grad_buffer.py:152
↓ 1 callersFunctioncheckpoint_and_decide_exit
Save checkpoint and decide whether to exit based on arguments (e.g., if --exit-duration-in-mins is set). Actual exit happens in main training loop
megatron/training/training_nan_skipping.py:1373
↓ 1 callersFunctioncheckpoint_and_decide_exit
Save checkpoint and decide whether to exit based on arguments (e.g., if --exit-duration-in-mins is set). Actual exit happens in main training loop
megatron/training/training.py:1385
↓ 1 callersFunctionclassification
()
tasks/vision/classification/classification.py:16
↓ 1 callersFunctionclean_ngrams_below_threshold
(args, ngrams_below_threshold, dedup_file, \ dedup_key)
tools/openwebtext/filter_ngrams.py:329
↓ 1 callersFunctioncleanup_old_non_persistent_checkpoint
(save_dir, leave_ckpt_num=1, do_async=False)
megatron/training/checkpointing.py:621
↓ 1 callersMethodcode_from_dtype
Get the code from the dtype Args: value (Type[numpy.number]): The dtype Returns: int: The code
megatron/core/datasets/indexed_dataset.py:54
↓ 1 callersFunctioncollect_train_test_metrics
(logs_dir: str, output_path: str, is_convergence_test: bool)
tests/functional_tests/python_test_utils/get_test_results_from_tensorboard_logs.py:20
↓ 1 callersMethodcombine
Append the samples from multiple instances into one object.
megatron/core/rerun_state_machine.py:912
↓ 1 callersFunctioncombine_tp_tensors
(params, key, dim, tensors)
tools/checkpoint/hybrid_conversion.py:59
↓ 1 callersFunctioncompare_helpers
(pipeline_parallel_size, num_microbatches, num_model_chunks)
tests/unit_tests/pipeline_parallel/test_helpers.py:1
↓ 1 callersFunctioncompute_act_loss_router
(history_logits, act_loss_type, act_loss_factor)
megatron/core/transformer/custom_layers/ut_modules.py:1326
↓ 1 callersFunctioncompute_activation_memory
(args, num_microbatches, verbose=False)
megatron/training/theoretical_memory_usage.py:92
↓ 1 callersMethodcompute_all_pairs
(guesses: List[str], answers: List[str], n=1)
tools/retro/text_generation/metrics.py:66
↓ 1 callersMethodcompute_all_pairs
(guesses: List[str], answers: List[str])
tasks/msdp/metrics.py:64
↓ 1 callersMethodcompute_each_pair
(guess: str, answer: str, n=1)
tools/retro/text_generation/metrics.py:53
↓ 1 callersMethodcompute_each_pair
(guess: str, answer: str)
tasks/msdp/metrics.py:52
↓ 1 callersFunctioncompute_f1_score
Evaluating F1 Score
tools/retro/text_generation/evaluate.py:34
↓ 1 callersFunctioncompute_intermediate_size
(n, ffn_dim_multiplier=1, multiple_of=256)
tools/checkpoint/loader_llama_mistral.py:59
↓ 1 callersFunctioncompute_tasks_ngrams
(args, ngrams)
tools/openwebtext/filter_ngrams.py:260
↓ 1 callersFunctioncompute_throughputs_and_append_to_progress_log
(iteration, num_floating_point_operations_so_far)
megatron/training/training_nan_skipping.py:1223
↓ 1 callersFunctioncompute_throughputs_and_append_to_progress_log
(iteration, num_floating_point_operations_so_far)
megatron/training/training.py:1234
↓ 1 callersFunctioncompute_weight_and_optimizer_memory
(args, verbose=False)
megatron/training/theoretical_memory_usage.py:11
↓ 1 callersFunctioncondition
(model, attr)
megatron/core/utils.py:122
↓ 1 callersMethodconvert
Convert model weights to trtllm model weights This method goes through each layer in the model state dict and converts to equivalent trtllm m
megatron/core/export/trtllm/trtllm_weights_converter/single_device_trtllm_model_weights_converter.py:295
↓ 1 callersMethodconvert_checkpoint
Convert checkpoint
tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:428
↓ 1 callersFunctionconvert_ffn
(llama_mega, layer_idx=0, n_dense=11008)
tools/weights_conversion/megatron_to_hf_te.py:71
↓ 1 callersFunctionconvert_to_hf
(model_path, input_base_path, model_size, tokenizer_path)
tools/checkpoint/loader_llama_mistral.py:75
↓ 1 callersMethodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
megatron/training/tokenizer/bert_tokenization.py:188
↓ 1 callersFunctionconvert_wqkv
(llama_mega, layer_idx=0, n_heads=32, n_heads_kv=8)
tools/weights_conversion/megatron_to_hf_te.py:28
↓ 1 callersFunctioncore_config_from_args
Builds core config object from namespace args from given dataclass Raises exception if argument missing in args Args: args(SimpleNam
megatron/training/yaml_arguments.py:388
↓ 1 callersFunctioncore_gpt_dataset_config_from_args
(args)
pretrain_difflm.py:363
↓ 1 callersFunctioncosine_scheduler
(base_value, final_value, epochs, niter_per_ep, warmup_epochs=0, start_warmup_value=0)
megatron/legacy/model/vision/dino.py:159
↓ 1 callersFunctioncount_parameters_in_layer
(model, layer_name)
tools/run_mamba_text_generation_server.py:23
↓ 1 callersFunctioncount_zeros_fp32
Counts the number of zeros in gradients associated with the passed-in list of parameters. Args: parameters (Iterable[Tensor] or Tenso
megatron/core/optimizer/clip_grads.py:180
↓ 1 callersMethodcreate_attn_mask
(self, H, W)
megatron/legacy/model/vision/esvit_swin_backbone.py:229
↓ 1 callersMethodcreate_cudagraphs
Iterate through 'cudagraph_record' creating graphs in the order in which they were recorded.
megatron/core/transformer/cuda_graphs.py:92
↓ 1 callersMethodcreate_global_plan
Merges MCore data for all plans.
megatron/core/dist_checkpointing/strategies/torch.py:500
↓ 1 callersFunctioncreate_hierarchical_parallel_groups
Create hierarchical groups for one parallelism. Taking a group size of 16 as example, so we have a total of 16 GPUs denoted by g0 ... g15. If
megatron/core/parallel_state.py:254
↓ 1 callersFunctioncreate_test_args
()
tests/unit_tests/test_training.py:13
↓ 1 callersFunctioncreate_test_args
(cp_size, sequence_parallel)
tests/unit_tests/models/test_llava_model.py:474
↓ 1 callersFunctioncreate_test_args
( tensor_model_parallel_size, pipeline_model_parallel_size, enable_vp, enable_grouped_gemm )
tests/unit_tests/transformer/moe/test_upcycling.py:60
↓ 1 callersMethodcreate_window
(self, w_size, channel=1)
tasks/vision/segmentation/metrics.py:449
↓ 1 callersFunctioncustom_backward
Directly call C++ autograd engine. To make the 'deallocate_output_tensor' (above) optimization work, the C++ autograd engine must be called d
megatron/core/pipeline_parallel/schedules.py:129
↓ 1 callersFunctioncyclic_iter
(iter)
megatron/training/training_nan_skipping.py:1929
↓ 1 callersFunctioncyclic_iter
(iter)
megatron/training/training.py:2037
↓ 1 callersFunctiondecoder_model_with_local_spec
T5 decoder local spec (uses Megatron-Core components).
megatron/core/models/T5/t5_spec.py:152
↓ 1 callersFunctiondecoder_model_with_transformer_engine_default_spec
T5 decoder TE spec (uses Transformer Engine components).
megatron/core/models/T5/t5_spec.py:76
↓ 1 callersMethoddeduplicate_chunks
Group tensors by chunk and then pick the tensor with the lowest rank. NOTE: with proper loading overlap, loading from randomized ranks
megatron/core/dist_checkpointing/strategies/two_stage.py:176
↓ 1 callersMethoddefault_decoder_cross_attention
Cross attention for a standard encoder-decoder model.
megatron/legacy/model/transformer.py:951
↓ 1 callersFunctiondetokenize
(prompt, tok)
megatron/inference/endpoints/completions.py:17
↓ 1 callersMethoddetokenize
Detokenize tokens.
megatron/training/tokenizer/multimodal_tokenizer.py:243
↓ 1 callersMethoddetokenize_generations
Detokenize the output generations Args: prompt_tokens_with_generated_tokens (torch.Tensor): The input prompt tokens p
megatron/core/inference/text_generation_controllers/text_generation_controller.py:54
↓ 1 callersFunctiondict_list_map_outplace
Maps dicts and lists *out-of-place* with a given function.
megatron/core/dist_checkpointing/dict_utils.py:202
← previousnext →1,301–1,400 of 4,219, ranked by callers