Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Fugaku-LLM/DeepSpeedFugaku
/ functions
Functions
1,158 in github.com/Fugaku-LLM/DeepSpeedFugaku
⨍
Functions
1,158
◇
Types & classes
129
↓ 187 callers
Function
print_rank_0
If distributed is initialized, print only on rank 0.
megatron/__init__.py:41
↓ 155 callers
Function
get_args
Return arguments.
megatron/global_vars.py:48
↓ 86 callers
Method
start
Start the timer.
megatron/global_vars.py:260
↓ 83 callers
Method
stop
Stop the timer.
megatron/global_vars.py:268
↓ 73 callers
Method
size
(self, index)
megatron/data/indexed_dataset.py:202
↓ 35 callers
Method
exists
(path)
megatron/data/indexed_dataset.py:206
↓ 30 callers
Function
get_timers
Return timers.
megatron/global_vars.py:92
↓ 30 callers
Method
write
Write timers to a tensorboard writer
megatron/global_vars.py:309
↓ 28 callers
Method
get
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 callers
Function
get_tokenizer
Return tokenizer.
megatron/global_vars.py:66
↓ 19 callers
Function
print_rank_0
(message, debug=False, force=False)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:48
↓ 18 callers
Function
add_to_logging
(name)
megatron/training.py:821
↓ 17 callers
Method
write
(self, sizes, doc_idx)
megatron/data/indexed_dataset.py:403
↓ 16 callers
Method
encode
(self, json_line)
tools/preprocess_data.py:82
↓ 16 callers
Function
get_num_microbatches
()
megatron/global_vars.py:54
↓ 15 callers
Function
get_tensor_model_parallel_rank
Return my rank for the tensor model parallel group.
megatron/mpu/initialize.py:261
↓ 14 callers
Function
set_random_seed
Set random seed for reproducability.
megatron/mpu/tests/commons.py:36
↓ 13 callers
Function
print_separator
(message)
megatron/mpu/tests/commons.py:78
↓ 13 callers
Function
see_memory_usage
(message, cpu_only=False, force=False)
utils.py:21
↓ 12 callers
Function
get_tensor_model_parallel_world_size
Return world size for the tensor model parallel group.
megatron/mpu/initialize.py:228
↓ 12 callers
Function
init_method_normal
Init method based on N(0, sigma).
megatron/model/utils.py:24
↓ 12 callers
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
megatron/model/module.py:178
↓ 11 callers
Method
all_gather
(param_list=None, async_op=False, hierarchy=0)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:800
↓ 11 callers
Method
backward
(ctx, *args)
megatron/mpu/random.py:401
↓ 11 callers
Method
tokenize
(self, *text)
tools/preprocess_data.py:55
↓ 10 callers
Function
_compare
(arg_name, old_arg_name=None)
megatron/checkpointing.py:53
↓ 10 callers
Method
fork
Fork the cuda rng state, perform operations, and exit with the original state.
megatron/mpu/random.py:187
↓ 10 callers
Function
get_model_chunk_id
Helper method to get the model chunk ID given the iteration number.
megatron/schedules.py:247
↓ 10 callers
Function
get_tensor_model_parallel_group
Get the tensor model parallel group the caller rank belongs to.
megatron/mpu/initialize.py:188
↓ 10 callers
Function
is_last_rank
()
megatron/__init__.py:49
↓ 10 callers
Method
log
Log a group of timers.
megatron/global_vars.py:326
↓ 10 callers
Function
scaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
megatron/model/utils.py:32
↓ 9 callers
Function
_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 callers
Method
add
Track the rng state.
megatron/mpu/random.py:169
↓ 9 callers
Function
print_datetime
Note that this call will sync across all ranks.
megatron/training.py:70
↓ 8 callers
Function
clean_text
Remove new lines and multiple spaces and adjust end of sentence dot.
tasks/data_utils.py:22
↓ 8 callers
Method
decode
(self, tokens)
megatron/tokenizer/gpt2_tokenization.py:283
↓ 8 callers
Method
get
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 callers
Function
get_linear_layer
Simple linear layer with weight initialization.
megatron/model/utils.py:56
↓ 8 callers
Function
load_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 callers
Method
tokenize
(self, text)
megatron/tokenizer/tokenizer.py:101
↓ 7 callers
Function
_ensure_var_is_not_initialized
Make sure the input variable is not None.
megatron/global_vars.py:246
↓ 7 callers
Function
average_losses_across_data_parallel_group
Reduce a tensor of losses across all GPUs.
megatron/utils.py:96
↓ 7 callers
Function
data_file_path
(prefix_path)
megatron/data/indexed_dataset.py:120
↓ 7 callers
Function
get_checkpoint_name
A unified checkpoint name.
megatron/checkpointing.py:88
↓ 7 callers
Function
get_language_model
Build language model and return along with the key to save.
megatron/model/language_model.py:50
↓ 7 callers
Function
get_model
Build the model.
megatron/training.py:310
↓ 6 callers
Method
_get_files_with_prefix
(self, all_files, prefix)
tools/convert_checkpoint/deepspeed_checkpoint.py:152
↓ 6 callers
Method
add
Allocate a chunk of memory from the buffer to tensor and copy the values.
megatron/memory.py:89
↓ 6 callers
Method
detokenize
(self, token_ids)
megatron/tokenizer/tokenizer.py:104
↓ 6 callers
Function
get_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
megatron/checkpointing.py:108
↓ 6 callers
Function
get_cpus_rng_tracker
Get cpus rng tracker.
megatron/mpu/random.py:286
↓ 6 callers
Function
get_cuda_rng_tracker
Get cuda rng tracker.
megatron/mpu/random.py:282
↓ 6 callers
Function
get_pipeline_model_parallel_world_size
Return world size for the pipeline model parallel group.
megatron/mpu/initialize.py:241
↓ 6 callers
Method
get_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 callers
Function
index_file_path
(prefix_path)
megatron/data/indexed_dataset.py:116
↓ 6 callers
Function
initialize_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 callers
Method
load_state_dict
Load the state dicts of each of the models
megatron/model/biencoder_model.py:132
↓ 6 callers
Function
print_rank_last
If distributed is initialized, print only on last rank.
megatron/__init__.py:53
↓ 6 callers
Function
save_checkpoint
Save a model checkpoint.
megatron/checkpointing.py:114
↓ 6 callers
Method
set_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
megatron/mpu/random.py:164
↓ 5 callers
Method
_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them.
megatron/learning_rates.py:144
↓ 5 callers
Function
_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 callers
Function
backward_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 callers
Function
bert_position_ids
(token_ids)
megatron/model/bert_model.py:49
↓ 5 callers
Function
build_tokenizer
Initialize tokenizer.
megatron/tokenizer/tokenizer.py:27
↓ 5 callers
Function
build_train_valid_test_datasets
(data_prefix, data_impl, splits_string, train_valid_test_num_samples,
megatron/data/dataset_utils.py:417
↓ 5 callers
Function
compute_ngrams_insert_dict
(args, text, ngrams)
tools/openwebtext/filter_ngrams.py:194
↓ 5 callers
Function
divide
Ensure that numerator is divisible by the denominator and return the division value.
megatron/mpu/utils.py:26
↓ 5 callers
Method
ds_summary
(slf: torch.Tensor, use_debug_name: bool = False)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:931
↓ 5 callers
Method
elapsed
Calculate the elapsed time.
megatron/global_vars.py:281
↓ 5 callers
Function
evaluate_and_print_results
Helper function to evaluate and dump results on screen.
megatron/training.py:1503
↓ 5 callers
Function
forward_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 callers
Function
get_pipeline_model_parallel_rank
Return my rank for the pipeline model parallel group.
megatron/mpu/initialize.py:274
↓ 5 callers
Function
initialize_distributed
Initialize torch.distributed.
megatron/mpu/tests/commons.py:44
↓ 5 callers
Method
load_state_dict
Load the state dicts of each of the models
megatron/model/realm_model.py:105
↓ 5 callers
Method
load_state_dict
Customized load.
megatron/model/t5_model.py:168
↓ 5 callers
Function
pretrain
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 callers
Method
reset
Set to the initial state (no tracker).
megatron/mpu/random.py:151
↓ 5 callers
Method
set_input_tensor
See megatron.model.transformer.set_input_tensor()
megatron/model/t5_model.py:112
↓ 5 callers
Method
sizes
(self)
megatron/data/indexed_dataset.py:561
↓ 5 callers
Function
statics
(i)
megatron/mpu/random.py:468
↓ 5 callers
Method
step
Set lr for all parameters groups.
megatron/learning_rates.py:118
↓ 5 callers
Function
unwrap_model
(model, module_instances=(torchDDP))
megatron/utils.py:42
↓ 5 callers
Method
update
(self, consumed_samples, consistency_check)
megatron/microbatches.py:101
↓ 5 callers
Method
wait
(self)
DeepSpeed/deepspeed/runtime/zero/partition_parameters.py:479
↓ 5 callers
Method
word_embeddings_weight
(self)
megatron/model/module.py:53
↓ 4 callers
Method
_dump_mapping
(self, data_map, map_tag = None)
tools/convert_checkpoint/deepspeed_checkpoint.py:123
↓ 4 callers
Function
_transpose_first_dim
(t, num_splits, num_splits_first, model)
megatron/checkpointing.py:205
↓ 4 callers
Function
bert_extended_attention_mask
(attention_mask)
megatron/model/bert_model.py:33
↓ 4 callers
Function
build_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
tasks/vision/finetune_utils.py:67
↓ 4 callers
Method
concat_and_pad_tokens
Concat with special tokens and pad sequence to self.max_seq_length
megatron/data/ict_dataset.py:142
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
megatron/tokenizer/bert_tokenization.py:136
↓ 4 callers
Method
embed_text
Embed a batch of tokens using the model
megatron/model/biencoder_model.py:103
↓ 4 callers
Method
encode
(self, text)
megatron/tokenizer/gpt2_tokenization.py:280
↓ 4 callers
Function
fix_query_key_value_ordering
Fix up query/key/value matrix ordering if checkpoint version is smaller than 2.0
megatron/checkpointing.py:244
↓ 4 callers
Function
get_checkpoint_version
()
megatron/checkpointing.py:44
↓ 4 callers
Function
get_indexed_dataset_
(data_prefix, data_impl, skip_warmup)
megatron/data/dataset_utils.py:586
↓ 4 callers
Function
get_ltor_masks_and_position_ids
Build masks and position id for left to right model.
megatron/utils.py:177
↓ 4 callers
Function
get_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