MCPcopy Create free account

hub / github.com/DevSinghSachan/emdr2 / functions

Functions707 in github.com/DevSinghSachan/emdr2

↓ 90 callersFunctionget_args
Return arguments.
megatron/global_vars.py:35
↓ 89 callersFunctionprint_rank_0
If distributed is initialized print only on rank 0.
megatron/__init__.py:25
↓ 46 callersMethodsize
(self, index)
megatron/data/indexed_dataset.py:197
↓ 20 callersMethodstart
Start the timer.
megatron/global_vars.py:181
↓ 18 callersMethodstop
Stop the timer.
megatron/global_vars.py:188
↓ 17 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:500
↓ 16 callersFunctionget_data_parallel_group
Get the data parallel group the caller rank belongs to.
megatron/mpu/initialize.py:173
↓ 13 callersFunctionget_model_parallel_group
Get the model parallel group the caller rank belongs to.
megatron/mpu/initialize.py:159
↓ 13 callersMethodwrite
(self, sizes, doc_idx)
megatron/data/indexed_dataset.py:363
↓ 12 callersFunctionget_model_parallel_rank
Return my rank for the model parallel group.
megatron/mpu/initialize.py:207
↓ 11 callersFunctionget_model_parallel_world_size
Return world size for the model parallel group.
megatron/mpu/initialize.py:193
↓ 11 callersFunctionget_tokenizer
Return tokenizer.
megatron/global_vars.py:41
↓ 10 callersMethodexists
(path)
megatron/data/indexed_dataset.py:201
↓ 10 callersFunctionget_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
megatron/checkpointing.py:88
↓ 10 callersMethodtokenize
(self, text)
tasks/openqa/dense_retriever/evaluation/tokenizers.py:143
↓ 9 callersFunctionget_checkpoint_name
A unified checkpoint name.
megatron/checkpointing.py:74
↓ 9 callersFunctionget_timers
Return timers.
megatron/global_vars.py:65
↓ 8 callersFunction_compare
(arg_name)
megatron/checkpointing.py:49
↓ 8 callersFunctionadd_to_logging
(name)
megatron/training.py:263
↓ 8 callersMethodevaluate
(self, qa_file, split)
tasks/openqa/dense_retriever/evaluation/evaluate.py:96
↓ 7 callersFunctiondata_file_path
(prefix_path)
megatron/data/indexed_dataset.py:115
↓ 7 callersMethoddecode
(self, ids)
megatron/tokenizer/tokenizer.py:197
↓ 7 callersFunctionget_gloo_comm_group
()
megatron/mpu/initialize.py:282
↓ 7 callersMethodload_state_dict
(self, state_dict, strict=True)
megatron/fp16/fp16.py:84
↓ 7 callersFunctionmake_attention_mask_3d
Returns a 3-dimensional (3-D) attention mask :param source_block: 1-D array :param target_block: 1-D array
megatron/data/mask_creation_utils.py:17
↓ 7 callersFunctionsave_checkpoint
Save a model checkpoint.
megatron/checkpointing.py:94
↓ 6 callersFunction_ensure_var_is_not_initialized
Make sure the input variable is not None.
megatron/global_vars.py:167
↓ 6 callersMethodembed_text
Embed a batch of tokens using the model
megatron/model/dualencoder_model.py:77
↓ 6 callersFunctionindex_file_path
(prefix_path)
megatron/data/indexed_dataset.py:111
↓ 6 callersFunctionmake_attention_mask
Returns a 2-dimensional (2-D) attention mask :param source_block: 1-D array :param target_block: 1-D array
megatron/data/mask_creation_utils.py:5
↓ 6 callersMethodwrite
Write timers to a tensorboard writer
megatron/global_vars.py:228
↓ 5 callersMethod_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them.
megatron/learning_rates.py:93
↓ 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:71
↓ 5 callersFunctiondivide
Ensure that numerator is divisible by the denominator and return the division value.
megatron/mpu/utils.py:26
↓ 5 callersFunctionget_cuda_rng_tracker
Get cuda rng tracker.
megatron/mpu/random.py:202
↓ 5 callersFunctionget_node_first_rank
()
megatron/mpu/initialize.py:248
↓ 5 callersFunctionget_t5_tokenizer
Return T5 tokenizer.
megatron/global_vars.py:47
↓ 5 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:19
↓ 5 callersMethodmaybe_print
(self, msg)
megatron/fp16/fp16.py:258
↓ 5 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
megatron/fp16/fp16.py:76
↓ 4 callersMethod__iter__
(self)
megatron/data/samplers.py:61
↓ 4 callersFunction_ensure_var_is_initialized
Make sure the input variable is not None.
megatron/global_vars.py:162
↓ 4 callersMethod_model_params_to_master_params
(self)
megatron/fp16/fp16.py:311
↓ 4 callersMethodbuild_and_save_index
(self)
megatron/indexer_emdr2.py:77
↓ 4 callersFunctionbuild_tokenizer
Initialize tokenizer.
megatron/tokenizer/tokenizer.py:24
↓ 4 callersMethodclear
Clear the embedding data structures to save memory. The metadata ends up getting used, and is also much smaller in dimensionality so i
megatron/data/emdr2_index.py:38
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
megatron/tokenizer/bert_tokenization.py:136
↓ 4 callersFunctiondualencoder_model_provider
(only_query_model=False, only_context_model=False, vocab_size=None)
megatron/model/dualencoder_model.py:13
↓ 4 callersFunctioninit_method_normal
Init method based on N(0, sigma).
megatron/model/utils.py:25
↓ 4 callersMethodload_state_dict
Customized load.
megatron/model/language_model.py:200
↓ 4 callersMethodlog
Log a group of timers.
megatron/global_vars.py:238
↓ 4 callersFunctionread_longs
(f, n)
megatron/data/indexed_dataset.py:82
↓ 4 callersFunctionscaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
megatron/model/utils.py:33
↓ 4 callersFunctionset_global_variables
Set args, tokenizer, tensorboard-writer, adlr-autoresume, and timers.
megatron/global_vars.py:71
↓ 4 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
megatron/model/distributed.py:78
↓ 4 callersMethodstate_dict_for_save_checkpoint
For easy load.
megatron/model/language_model.py:183
↓ 4 callersFunctionwrite_longs
(f, a)
megatron/data/indexed_dataset.py:88
↓ 3 callersMethod__init__
(self, init_method, output_layer_init_method)
megatron/model/transformer.py:67
↓ 3 callersFunction_gather
Gather tensors and concatinate along the last dimension.
megatron/mpu/mappings.py:54
↓ 3 callersFunction_initialize_affine_weight_cpu
Initialize affine weight for model parallel. Build the master weight on all processes and scatter the relevant chunk.
megatron/mpu/layers.py:62
↓ 3 callersFunction_initialize_affine_weight_gpu
Initialize affine weight for model parallel on GPU.
megatron/mpu/layers.py:50
↓ 3 callersFunction_normalize
(text)
tasks/openqa/dense_retriever/evaluation/qa_validation.py:161
↓ 3 callersFunction_reduce
All-reduce the the input tensor across model parallel group.
megatron/mpu/mappings.py:22
↓ 3 callersMethod_set_mips_index
Create a Faiss Flat index with inner product as the metric to search against
megatron/data/emdr2_index.py:113
↓ 3 callersMethod_set_mips_index
Create a Faiss Flat index with inner product as the metric to search against
megatron/data/emdr2_index.py:212
↓ 3 callersFunction_split
Split the tensor along its last dimension and keep the corresponding slice.
megatron/mpu/mappings.py:35
↓ 3 callersMethodadd_token
(self, token)
megatron/tokenizer/tokenizer.py:169
↓ 3 callersFunctionbias_dropout_add
(x, bias, residual, prob, training)
megatron/model/transformer.py:397
↓ 3 callersFunctionbuild_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
tasks/openqa/e2eqa/train_e2eqa.py:352
↓ 3 callersFunctionbuild_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
tasks/openqa/dense_retriever/train_dense_retriever.py:199
↓ 3 callersFunctionbuild_tokens_types_paddings_from_ids
Build token types and paddings, trim if needed, and pad if needed.
tasks/openqa/dense_retriever/train_data_utils.py:57
↓ 3 callersFunctionconvert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
megatron/tokenizer/bert_tokenization.py:78
↓ 3 callersMethodelapsed
Calculate the elapsed time.
megatron/global_vars.py:200
↓ 3 callersFunctionensure_directory_exists
Build filename's path if it does not already exists.
megatron/checkpointing.py:67
↓ 3 callersFunctionget_language_model
Build language model and return along with the key to save.
megatron/model/language_model.py:45
↓ 3 callersFunctionget_linear_layer
Simple linear layer with weight initialization.
megatron/model/utils.py:43
↓ 3 callersFunctionget_mips_group
()
megatron/mpu/initialize.py:241
↓ 3 callersFunctionget_model
Build the model.
megatron/training.py:38
↓ 3 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:147
↓ 3 callersFunctionget_tensorboard_writer
Return tensorboard writer. It can be None so no need to check if it is initialized.
megatron/global_vars.py:53
↓ 3 callersMethodload_attributes
(self, custom_load_path=None, key_list=None)
megatron/indexer_emdr2.py:58
↓ 3 callersFunctionload_checkpoint
Load a model checkpoint and return the iteration.
megatron/checkpointing.py:145
↓ 3 callersFunctionload_dualencoder_checkpoint
selectively load retrieval models for indexing/retrieving from saved checkpoints
megatron/checkpointing.py:267
↓ 3 callersMethodload_from_file
Populate members from instance saved to file
megatron/data/emdr2_index.py:45
↓ 3 callersMethodload_state_dict
Load the state dicts of each of the models
megatron/model/dualencoder_model.py:100
↓ 3 callersFunctionpprint
(*args)
tasks/openqa/e2eqa/async_indexer.py:22
↓ 3 callersFunctionprocess_batch
(batch)
tasks/openqa/e2eqa/train_e2eqa.py:28
↓ 3 callersFunctionreduce_losses
Reduce a tensor of losses across all GPUs.
megatron/utils.py:32
↓ 3 callersMethodset_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
megatron/mpu/random.py:155
↓ 3 callersMethodstep
If no closure is supplied, :attr:`step` should be called after ``fp16_optimizer_obj.backward(loss)``. :attr:`step` updates th
megatron/fp16/fp16.py:420
↓ 3 callersMethodtokenize
(self, text)
megatron/tokenizer/tokenizer.py:102
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
megatron/tokenizer/bert_tokenization.py:152
↓ 3 callersMethodwords
Returns a list of the text of each token Args: uncased: lower cases text
tasks/openqa/dense_retriever/evaluation/tokenizers.py:49
↓ 2 callersMethod__init__
(self, hidden_size, init_method)
megatron/model/language_model.py:85
↓ 2 callersMethod__init__
(self, path)
megatron/data/indexed_dataset.py:131
↓ 2 callersMethod__init__
(self, input_size, output_size, bias=True, input_is_parallel=False, init_met
megatron/mpu/layers.py:295
↓ 2 callersMethod_batch
extracts samples only pertaining to this worker's batch
megatron/data/samplers.py:142
↓ 2 callersFunction_build_tokenizer
Initialize tokenizer.
megatron/global_vars.py:95
↓ 2 callersFunction_check_arg_is_not_none
(args, arg)
megatron/arguments.py:164
↓ 2 callersMethod_do_init
(self, path, skip_warmup)
megatron/data/indexed_dataset.py:460
next →1–100 of 707, ranked by callers