MCPcopy Create free account

hub / github.com/Fugaku-LLM/DeepSpeedFugaku / functions

Functions1,158 in github.com/Fugaku-LLM/DeepSpeedFugaku

↓ 187 callersFunctionprint_rank_0
If distributed is initialized, print only on rank 0.
megatron/__init__.py:41
↓ 155 callersFunctionget_args
Return arguments.
megatron/global_vars.py:48
↓ 86 callersMethodstart
Start the timer.
megatron/global_vars.py:260
↓ 83 callersMethodstop
Stop the timer.
megatron/global_vars.py:268
↓ 73 callersMethodsize
(self, index)
megatron/data/indexed_dataset.py:202
↓ 35 callersMethodexists
(path)
megatron/data/indexed_dataset.py:206
↓ 30 callersFunctionget_timers
Return timers.
megatron/global_vars.py:92
↓ 30 callersMethodwrite
Write timers to a tensorboard writer
megatron/global_vars.py:309
↓ 28 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
megatron/model/distributed.py:44
↓ 20 callersFunctionget_tokenizer
Return tokenizer.
megatron/global_vars.py:66
↓ 19 callersFunctionprint_rank_0
(message, debug=False, force=False)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:48
↓ 18 callersFunctionadd_to_logging
(name)
megatron/training.py:821
↓ 17 callersMethodwrite
(self, sizes, doc_idx)
megatron/data/indexed_dataset.py:403
↓ 16 callersMethodencode
(self, json_line)
tools/preprocess_data.py:82
↓ 16 callersFunctionget_num_microbatches
()
megatron/global_vars.py:54
↓ 15 callersFunctionget_tensor_model_parallel_rank
Return my rank for the tensor model parallel group.
megatron/mpu/initialize.py:261
↓ 14 callersFunctionset_random_seed
Set random seed for reproducability.
megatron/mpu/tests/commons.py:36
↓ 13 callersFunctionprint_separator
(message)
megatron/mpu/tests/commons.py:78
↓ 13 callersFunctionsee_memory_usage
(message, cpu_only=False, force=False)
utils.py:21
↓ 12 callersFunctionget_tensor_model_parallel_world_size
Return world size for the tensor model parallel group.
megatron/mpu/initialize.py:228
↓ 12 callersFunctioninit_method_normal
Init method based on N(0, sigma).
megatron/model/utils.py:24
↓ 12 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
megatron/model/module.py:178
↓ 11 callersMethodall_gather
(param_list=None, async_op=False, hierarchy=0)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:800
↓ 11 callersMethodbackward
(ctx, *args)
megatron/mpu/random.py:401
↓ 11 callersMethodtokenize
(self, *text)
tools/preprocess_data.py:55
↓ 10 callersFunction_compare
(arg_name, old_arg_name=None)
megatron/checkpointing.py:53
↓ 10 callersMethodfork
Fork the cuda rng state, perform operations, and exit with the original state.
megatron/mpu/random.py:187
↓ 10 callersFunctionget_model_chunk_id
Helper method to get the model chunk ID given the iteration number.
megatron/schedules.py:247
↓ 10 callersFunctionget_tensor_model_parallel_group
Get the tensor model parallel group the caller rank belongs to.
megatron/mpu/initialize.py:188
↓ 10 callersFunctionis_last_rank
()
megatron/__init__.py:49
↓ 10 callersMethodlog
Log a group of timers.
megatron/global_vars.py:326
↓ 10 callersFunctionscaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
megatron/model/utils.py:32
↓ 9 callersFunction_communicate
Communicate tensors between stages. Used as helper method in other communication methods that are used in megatron/schedules.py. Takes the fo
megatron/p2p_communication.py:25
↓ 9 callersMethodadd
Track the rng state.
megatron/mpu/random.py:169
↓ 9 callersFunctionprint_datetime
Note that this call will sync across all ranks.
megatron/training.py:70
↓ 8 callersFunctionclean_text
Remove new lines and multiple spaces and adjust end of sentence dot.
tasks/data_utils.py:22
↓ 8 callersMethoddecode
(self, tokens)
megatron/tokenizer/gpt2_tokenization.py:283
↓ 8 callersMethodget
Retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [idx] but get
megatron/data/indexed_dataset.py:539
↓ 8 callersFunctionget_linear_layer
Simple linear layer with weight initialization.
megatron/model/utils.py:56
↓ 8 callersFunctionload_checkpoint
Load a model checkpoint and return the iteration. strict (bool): whether to strictly enforce that the keys in :attr:`state_dict` of the ch
megatron/checkpointing.py:274
↓ 8 callersMethodtokenize
(self, text)
megatron/tokenizer/tokenizer.py:101
↓ 7 callersFunction_ensure_var_is_not_initialized
Make sure the input variable is not None.
megatron/global_vars.py:246
↓ 7 callersFunctionaverage_losses_across_data_parallel_group
Reduce a tensor of losses across all GPUs.
megatron/utils.py:96
↓ 7 callersFunctiondata_file_path
(prefix_path)
megatron/data/indexed_dataset.py:120
↓ 7 callersFunctionget_checkpoint_name
A unified checkpoint name.
megatron/checkpointing.py:88
↓ 7 callersFunctionget_language_model
Build language model and return along with the key to save.
megatron/model/language_model.py:50
↓ 7 callersFunctionget_model
Build the model.
megatron/training.py:310
↓ 6 callersMethod_get_files_with_prefix
(self, all_files, prefix)
tools/convert_checkpoint/deepspeed_checkpoint.py:152
↓ 6 callersMethodadd
Allocate a chunk of memory from the buffer to tensor and copy the values.
megatron/memory.py:89
↓ 6 callersMethoddetokenize
(self, token_ids)
megatron/tokenizer/tokenizer.py:104
↓ 6 callersFunctionget_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
megatron/checkpointing.py:108
↓ 6 callersFunctionget_cpus_rng_tracker
Get cpus rng tracker.
megatron/mpu/random.py:286
↓ 6 callersFunctionget_cuda_rng_tracker
Get cuda rng tracker.
megatron/mpu/random.py:282
↓ 6 callersFunctionget_pipeline_model_parallel_world_size
Return world size for the pipeline model parallel group.
megatron/mpu/initialize.py:241
↓ 6 callersMethodget_states
Get rng states. Copy the dictionary so we have direct pointers to the states, not just a pointer to the dictionary.
megatron/mpu/random.py:156
↓ 6 callersFunctionindex_file_path
(prefix_path)
megatron/data/indexed_dataset.py:116
↓ 6 callersFunctioninitialize_megatron
Set global variables, initialize distributed, and set autoresume and random seeds. `allow_no_cuda` should not be set unless using megatron for
megatron/initialize.py:39
↓ 6 callersMethodload_state_dict
Load the state dicts of each of the models
megatron/model/biencoder_model.py:132
↓ 6 callersFunctionprint_rank_last
If distributed is initialized, print only on last rank.
megatron/__init__.py:53
↓ 6 callersFunctionsave_checkpoint
Save a model checkpoint.
megatron/checkpointing.py:114
↓ 6 callersMethodset_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
megatron/mpu/random.py:164
↓ 5 callersMethod_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them.
megatron/learning_rates.py:144
↓ 5 callersFunction_set_cuda_rng_state
Sets the random number generator state of the current GPU. Argumentss: new_state (torch.ByteTensor): The desired state This function
megatron/mpu/random.py:78
↓ 5 callersFunctionbackward_step
Backward step through passed-in output tensor. If last stage, output_tensor_grad is None, otherwise gradient of loss with respect to stage's
megatron/schedules.py:105
↓ 5 callersFunctionbert_position_ids
(token_ids)
megatron/model/bert_model.py:49
↓ 5 callersFunctionbuild_tokenizer
Initialize tokenizer.
megatron/tokenizer/tokenizer.py:27
↓ 5 callersFunctionbuild_train_valid_test_datasets
(data_prefix, data_impl, splits_string, train_valid_test_num_samples,
megatron/data/dataset_utils.py:417
↓ 5 callersFunctioncompute_ngrams_insert_dict
(args, text, ngrams)
tools/openwebtext/filter_ngrams.py:194
↓ 5 callersFunctiondivide
Ensure that numerator is divisible by the denominator and return the division value.
megatron/mpu/utils.py:26
↓ 5 callersMethodds_summary
(slf: torch.Tensor, use_debug_name: bool = False)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:931
↓ 5 callersMethodelapsed
Calculate the elapsed time.
megatron/global_vars.py:281
↓ 5 callersFunctionevaluate_and_print_results
Helper function to evaluate and dump results on screen.
megatron/training.py:1503
↓ 5 callersFunctionforward_step
Forward step for passed-in model. If first stage, input tensor is obtained from data_iterator, otherwise passed-in input_tensor is used.
megatron/schedules.py:43
↓ 5 callersFunctionget_pipeline_model_parallel_rank
Return my rank for the pipeline model parallel group.
megatron/mpu/initialize.py:274
↓ 5 callersFunctioninitialize_distributed
Initialize torch.distributed.
megatron/mpu/tests/commons.py:44
↓ 5 callersMethodload_state_dict
Load the state dicts of each of the models
megatron/model/realm_model.py:105
↓ 5 callersMethodload_state_dict
Customized load.
megatron/model/t5_model.py:168
↓ 5 callersFunctionpretrain
Main training program. This function will run the followings in the order provided: 1) initialize Megatron. 2) setup model, optim
megatron/training.py:77
↓ 5 callersMethodreset
Set to the initial state (no tracker).
megatron/mpu/random.py:151
↓ 5 callersMethodset_input_tensor
See megatron.model.transformer.set_input_tensor()
megatron/model/t5_model.py:112
↓ 5 callersMethodsizes
(self)
megatron/data/indexed_dataset.py:561
↓ 5 callersFunctionstatics
(i)
megatron/mpu/random.py:468
↓ 5 callersMethodstep
Set lr for all parameters groups.
megatron/learning_rates.py:118
↓ 5 callersFunctionunwrap_model
(model, module_instances=(torchDDP))
megatron/utils.py:42
↓ 5 callersMethodupdate
(self, consumed_samples, consistency_check)
megatron/microbatches.py:101
↓ 5 callersMethodwait
(self)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:479
↓ 5 callersMethodword_embeddings_weight
(self)
megatron/model/module.py:53
↓ 4 callersMethod_dump_mapping
(self, data_map, map_tag = None)
tools/convert_checkpoint/deepspeed_checkpoint.py:123
↓ 4 callersFunction_transpose_first_dim
(t, num_splits, num_splits_first, model)
megatron/checkpointing.py:205
↓ 4 callersFunctionbert_extended_attention_mask
(attention_mask)
megatron/model/bert_model.py:33
↓ 4 callersFunctionbuild_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
tasks/vision/finetune_utils.py:67
↓ 4 callersMethodconcat_and_pad_tokens
Concat with special tokens and pad sequence to self.max_seq_length
megatron/data/ict_dataset.py:142
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
megatron/tokenizer/bert_tokenization.py:136
↓ 4 callersMethodembed_text
Embed a batch of tokens using the model
megatron/model/biencoder_model.py:103
↓ 4 callersMethodencode
(self, text)
megatron/tokenizer/gpt2_tokenization.py:280
↓ 4 callersFunctionfix_query_key_value_ordering
Fix up query/key/value matrix ordering if checkpoint version is smaller than 2.0
megatron/checkpointing.py:244
↓ 4 callersFunctionget_checkpoint_version
()
megatron/checkpointing.py:44
↓ 4 callersFunctionget_indexed_dataset_
(data_prefix, data_impl, skip_warmup)
megatron/data/dataset_utils.py:586
↓ 4 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
megatron/utils.py:177
↓ 4 callersFunctionget_token_stream
(model, context_tokens, model_latencies=[], single_token_latency=[])
megatron/text_generation_utils.py:394
next →1–100 of 1,158, ranked by callers