MCPcopy Create free account

hub / github.com/JinjieNi/MegaDLMs / functions

Functions4,219 in github.com/JinjieNi/MegaDLMs

↓ 1 callersFunctionmain
( scope: str, environment: str, n_repeat: int, time_limit: int, test_cases: str, a100_
tests/test_utils/python_scripts/generate_jet_trigger_job.py:41
↓ 1 callersFunctionmain
()
tasks/ensemble_classifier.py:126
↓ 1 callersFunctionmain
()
tasks/msdp/evaluate.py:41
↓ 1 callersFunctionmain
()
tasks/race/finetune.py:52
↓ 1 callersFunctionmake_dataset
Generates a list of samples of a form (path_to_sample, class). Args: directory (str): root dataset directory class_to_idx (Dict[st
megatron/legacy/data/image_folder.py:64
↓ 1 callersMethodmake_dataset
( directory: str, class_to_idx: Dict[str, int], data_per_class_fraction: float,
megatron/legacy/data/image_folder.py:178
↓ 1 callersMethodmatches_graph_inputs
Check the the passed args, kwargs match with the arg, kwargs the graph was created with.
megatron/core/transformer/cuda_graphs.py:600
↓ 1 callersMethodmax_allowed_chunks
Returns the maximum allowed chunks for this ShardedTensor.
megatron/core/dist_checkpointing/mapping.py:218
↓ 1 callersFunctionmaybe_copy
(attribute)
megatron/core/tensor_parallel/layers.py:103
↓ 1 callersFunctionmaybe_download_file
Download the object at the given S3 path to the given local file system path In a distributed setting, downloading the S3 object proceeds in stag
megatron/core/datasets/utils_s3.py:119
↓ 1 callersMethodmaybe_init_gloo_group
(self)
megatron/core/dist_checkpointing/strategies/two_stage.py:138
↓ 1 callersMethodmaybe_inject
Method that decides whether to inject an error.
megatron/core/rerun_state_machine.py:993
↓ 1 callersMethodmaybe_miscompare
Method that introduces mismatching results during reruns when an error is injected. When no error is injected, this method defers to the user
megatron/core/rerun_state_machine.py:1011
↓ 1 callersFunctionmaybe_set
(attribute, value)
megatron/core/tensor_parallel/layers.py:92
↓ 1 callersFunctionmega_provider
()
tools/weights_conversion/utils/verify_correctness_dlm.py:132
↓ 1 callersFunctionmerge_datasets
(idir)
tests/unit_tests/data/test_preprocess_mmdata.py:46
↓ 1 callersFunctionmerge_datasets
(idir)
tests/unit_tests/data/test_preprocess_data.py:66
↓ 1 callersFunctionmerge_embedding_blocks
Merge individual embedding blocks into a single binary mmap file. The embeddings are initially stored in block-sized (e.g., ~100k embeddings per
megatron/core/datasets/retro/index/build.py:70
↓ 1 callersFunctionmerge_global_slice_with_shape
Intersects the global slice with the actual shape (prevent overflow).
megatron/core/dist_checkpointing/strategies/tensorstore.py:63
↓ 1 callersFunctionmerge_hf_llama
(size: int, version: int, cache_dir: Optional[Path] = None)
tools/weights_conversion/utils/merge_llama.py:90
↓ 1 callersFunctionmerge_llama
(size: int, version: int, root_dir: Optional[Path] = None)
tools/weights_conversion/utils/merge_llama.py:115
↓ 1 callersFunctionmerge_meta_llama
(size: int, root_dir: Path)
tools/weights_conversion/utils/merge_llama.py:61
↓ 1 callersMethodmerge_shards_and_save
(self)
megatron/legacy/data/realm_index.py:87
↓ 1 callersFunctionmetadata_finalize_fn
()
megatron/core/dist_checkpointing/serialization.py:386
↓ 1 callersFunctionmistral_to_megatron
(weights: dict, size: int)
tools/weights_conversion/hf_to_megatron_te.py:195
↓ 1 callersFunctionmpu_cross_entropy
(batch_size, seq_length, vocab_size, logits_scale, seed)
megatron/legacy/mpu/tests/test_cross_entropy.py:31
↓ 1 callersFunctionnew_get_microbatch_id_in_model_chunk
Helper method to get the microbatch_id within model chunk given the iteration number.
tests/unit_tests/pipeline_parallel/test_helpers.py:78
↓ 1 callersFunctionnew_is_first_microbatch_for_model_chunk
Check if an iteration is the first for a model chunk.
tests/unit_tests/pipeline_parallel/test_helpers.py:84
↓ 1 callersFunctionnew_is_last_microbatch_for_model_chunk
Check if an iteration is the last for a model chunk.
tests/unit_tests/pipeline_parallel/test_helpers.py:91
↓ 1 callersFunctionnormalize_question
(question)
tasks/orqa/supervised/data.py:229
↓ 1 callersFunctionnum_released_microbatches
Helper method to count number of released (i.e. popped from input_tensors) microbatches for a model chunk.
megatron/core/pipeline_parallel/schedules.py:781
↓ 1 callersFunctionnum_samples_to_block_ranges
Split a range (length num_samples) into sequence of block ranges of size block_size. Args: config (RetroPreprocessingConfig): Retro p
megatron/core/datasets/retro/index/utils.py:34
↓ 1 callersMethodnumel_low_level_dataset
Abstract method implementation For GPT, the underlying IndexedDataset should be split by sequence, as opposed to, say, BERT, which sh
megatron/core/datasets/gpt_dataset.py:131
↓ 1 callersMethodon_eval_heartbeat
(self)
megatron/training/ft_integration.py:53
↓ 1 callersMethodon_save_checkpoint
(self)
megatron/training/ft_integration.py:42
↓ 1 callersFunctionon_save_checkpoint_start
Function to be called before save-checkpoint start to generate productive metrics to log after ckpt succeeds. Args: async_save (bool): ap
megatron/training/one_logger_utils.py:221
↓ 1 callersFunctionon_save_checkpoint_success
Function to be called after checkpointing succeeds and checkpoint is persisted for storing productive metrics Args: productive_metrics (d
megatron/training/one_logger_utils.py:323
↓ 1 callersMethodon_timeouts_updated
(self)
megatron/training/ft_integration.py:56
↓ 1 callersMethodon_train_heartbeat
(self)
megatron/training/ft_integration.py:45
↓ 1 callersFunctiononelogger_finalize_fn
()
megatron/training/checkpointing.py:527
↓ 1 callersFunctionorqa
(Dataset)
tasks/orqa/supervised/finetune.py:45
↓ 1 callersMethodpad_encoder_prompts_tokens
Method to pad input prompts Given a list of prompts, pad them all to uniform length Args: encoder_prompts_tokens_list (L
megatron/core/inference/model_inference_wrappers/t5/t5_inference_wrapper.py:117
↓ 1 callersMethodpad_input_prompt_tokens
Method to pad input prompts Given a list of prompts, pad them all to uniform length Args: batch_prompt_tokens_list (List
megatron/core/inference/text_generation_controllers/text_generation_controller.py:194
↓ 1 callersFunctionpad_neighbours_for_query_only
(args, nb_tokens, pad_id, ft_neighbours)
tools/retro/text_generation/retro_text_generation.py:57
↓ 1 callersFunctionpad_to_expected_shape
Pad tensor to the expected shape.
megatron/core/dist_checkpointing/strategies/zarr.py:261
↓ 1 callersMethodparse
Parse the Google-style docstring into its components. :returns: parsed docstring
tools/retro/config_utils.py:396
↓ 1 callersFunctionparse_failed_job
(logs: List[str])
tests/test_utils/python_scripts/launch_jet_workload.py:140
↓ 1 callersFunctionparse_finished_training
(logs: List[str])
tests/test_utils/python_scripts/launch_jet_workload.py:148
↓ 1 callersFunctionparse_strict_flag
Parse user passed strict flag from a string to StrictHandling instance. Args: strict (str, StrictHandling): strict flag to parse. If alre
megatron/core/dist_checkpointing/validation.py:108
↓ 1 callersMethodperform_action
(self, action: StateMachineActions)
megatron/training/ft_integration.py:75
↓ 1 callersFunctionpixel_shuffle
Pixel shuffle based on InternVL but adapted for our use case. Args: x (torch.Tensor): Vision model outputs [num_tiles, img_seq_len, h_vis
megatron/core/models/multimodal/llava_model.py:896
↓ 1 callersMethodpost
(self)
megatron/inference/endpoints/completions.py:42
↓ 1 callersMethodpost_forward_comm
Reduce scatter for SP after forward. This function is used to overlap shared experts with the dispatcher. It is only useful w
megatron/core/transformer/moe/shared_experts.py:190
↓ 1 callersFunctionpost_language_model_processing
(lm_output, labels, logit_weights, parallel_output,
megatron/legacy/model/gpt_model.py:16
↓ 1 callersFunctionpost_language_model_processing
(lm_output, pooled_output, lm_head, binary_head,
megatron/legacy/model/bert_model.py:96
↓ 1 callersFunctionpost_training_step_callbacks
Run all post-training-step functions (e.g., FT heartbeats, GC).
megatron/training/training_nan_skipping.py:1310
↓ 1 callersFunctionpost_training_step_callbacks
Run all post-training-step functions (e.g., FT heartbeats, GC).
megatron/training/training.py:1322
↓ 1 callersFunctionpostprocess_predictions
(all_predictions, all_labels, args)
tasks/ensemble_classifier.py:79
↓ 1 callersMethodpp_layers
(self, num_layers)
tests/unit_tests/export/trtllm/test_trtllm_single_device_converter.py:130
↓ 1 callersMethodpre_forward_comm
All Gather for SP before forward. This function is used to overlap shared experts with the dispatcher. It is only useful when
megatron/core/transformer/moe/shared_experts.py:107
↓ 1 callersMethodprep_model_for_inference
Preparing batch for inference, using respective wrapper's prep_model_for_inference method Args: prompts_tokens (torch.Tensor): A
megatron/core/inference/text_generation_controllers/text_generation_controller.py:391
↓ 1 callersMethodprepare_grads
Pre-processing gradients before the optimizer step, returns whether inf/nan is found.
megatron/core/optimizer/optimizer.py:407
↓ 1 callersMethodprepare_grads
Pre-processing gradients before the optimizer step, returns whether inf/nan is found.
megatron/core/optimizer/optimizer.py:1014
↓ 1 callersFunctionprepare_input_for_response_generation
Preparing inputs for the response generation
tasks/msdp/preprocessing.py:534
↓ 1 callersMethodprepare_write_data
First stage of async saving. Copy data to CPU and plan the local saving. Args: plan (SavePlan): save plan generated by t
megatron/core/dist_checkpointing/strategies/filesystem_async.py:84
↓ 1 callersMethodpreprocess
Preprocess token routing map for AlltoAll communication and token permutation. This method computes the number of tokens assigned to
megatron/core/transformer/moe/token_dispatcher.py:336
↓ 1 callersMethodpreprocess
Preprocess routing map for AlltoAll communication and token permutation. This method computes the number of tokens assigned to each e
megatron/core/transformer/moe/legacy_a2a_token_dispatcher.py:88
↓ 1 callersFunctionpreprocess_image
Example image preprocessing. Resizes input image to target size. Args: target_h (int): Target height in pixels. target_w (int): T
tools/run_vlm_text_generation.py:49
↓ 1 callersFunctionprint_memory_usage
Print memory usage.
tools/checkpoint/utils.py:6
↓ 1 callersMethodprint_usage
Print usage.
tools/retro/cli/cli.py:210
↓ 1 callersFunctionprocess_batch
Process batch and produce inputs for the model.
tasks/vision/finetune_utils.py:22
↓ 1 callersFunctionprocess_batch
Process batch and produce inputs for the model.
tasks/vision/classification/classification.py:36
↓ 1 callersFunctionprocess_files
(args)
tasks/ensemble_classifier.py:9
↓ 1 callersFunctionprocess_nq_batch
(batch)
tasks/orqa/unsupervised/nq.py:31
↓ 1 callersMethodprocess_samples_from_single_path
(filename)
megatron/legacy/data/orqa_wiki_dataset.py:164
↓ 1 callersMethodprocess_samples_from_single_path
Abstract method that takes a filename and returns a list of dataset samples, each sample being a dict of {'text': string, 'text':
tasks/orqa/supervised/data.py:220
↓ 1 callersMethodprocess_samples_from_single_path
(filename)
tasks/orqa/unsupervised/nq.py:196
↓ 1 callersMethodprocess_samples_from_single_path
Abstract method that takes a single path / filename and returns a list of dataset samples, each sample being a dict of {'text_a':
tasks/glue/data.py:51
↓ 1 callersFunctionprocess_set
(args, input_file, output_f_cleaned, output_f_filtered)
tools/openwebtext/cleanup_fix_dataset.py:85
↓ 1 callersFunctionprocess_single_datapath
Read in RACE files, combine, clean-up, tokenize, and convert to samples.
tasks/race/data.py:53
↓ 1 callersFunctionprocess_task
(args, task_name, ngrams)
tools/openwebtext/filter_ngrams.py:208
↓ 1 callersFunctionprocess_task_lambda
(args, task_file, ngrams)
tools/openwebtext/filter_ngrams.py:194
↓ 1 callersFunctionprocess_woi_dataset
This is a function used for processing the wizard of internet (woi) dataset Expected processed format: topic \t dialogue context \t
tasks/msdp/preprocessing.py:129
↓ 1 callersFunctionprocess_wow_dataset
This is a function used for processing the wizard of wikipedia (wow) dataset Expected processed format: topic \t dialogue context \
tasks/msdp/preprocessing.py:43
↓ 1 callersFunctionprompt_selection_for_knowledge_generation
Selecting prompts for the knowledge generation
tasks/msdp/preprocessing.py:365
↓ 1 callersFunctionprompt_selection_for_response_generation
Selecting prompts for the response generation
tasks/msdp/preprocessing.py:463
↓ 1 callersFunctionquery_block_neighbors
Query neighbors of a dataset block (i.e., range). Args: config (RetroPreprocessingConfig): Retro preprocessing config. db_dataset
megatron/core/datasets/retro/query/query.py:225
↓ 1 callersFunctionquery_dataset_neighbors
Query neighbors of each chunk within a dataset. Args: config (RetroPreprocessingConfig): Retro preprocessing config. db_dataset (
megatron/core/datasets/retro/query/query.py:276
↓ 1 callersFunctionquery_embedding_block
Query a block of embeddings. The block is broken into smaller sub-blocks, for easier tracking of progress. Both the raw neighbor IDs and the
megatron/core/datasets/retro/query/query.py:160
↓ 1 callersFunctionquery_embeddings
Query neighbors of a block of embeddings. Querying includes: - Query index for neighbor chunk IDs. - Filter chunk IDs that have the s
megatron/core/datasets/retro/query/query.py:88
↓ 1 callersFunctionquery_neighbors
Query pretraining datasets (train & valid). Args: config (RetroPreprocessingConfig): Retro preprocessing config.
megatron/core/datasets/retro/query/query.py:354
↓ 1 callersFunctionqwen_to_megatron
(weights: dict, size: int)
tools/weights_conversion/hf_to_megatron_te.py:268
↓ 1 callersFunctionread_json
(path)
tools/checkpoint/loader_llama_mistral.py:63
↓ 1 callersFunctionread_prediction
(prediction_file)
tools/retro/text_generation/evaluate.py:90
↓ 1 callersFunctionrearrange_qkv_bias
(bq, bk, bv, n_kv_heads, n_heads, n_hidden_per_head)
tools/weights_conversion/hf_to_megatron_te.py:293
↓ 1 callersMethodrecord_bwd_graph
Record a bwd graph to 'cudagraph_record
megatron/core/transformer/cuda_graphs.py:84
↓ 1 callersMethodrecord_fwd_graph
Record a fwd graph to 'cudagraph_record
megatron/core/transformer/cuda_graphs.py:76
↓ 1 callersMethodrecord_graph_capture
If this is the first time this runner has encountered a fwd pass, a cudagraph needs to be created. Record this to _CudagraphGlobalRecord which
megatron/core/transformer/cuda_graphs.py:547
↓ 1 callersFunctionrecursively_lint_files
Recursively lint all python files in chosen subdirectories of megatron-lm
tools/linter.py:7
↓ 1 callersFunctionrecv_backward
Wrapper for p2p_communication.recv_backward used with non-interleaving schedule.
megatron/core/pipeline_parallel/schedules.py:1548
← previousnext →1,701–1,800 of 4,219, ranked by callers