Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DevSinghSachan/emdr2
/ functions
Functions
707 in github.com/DevSinghSachan/emdr2
⨍
Functions
707
◇
Types & classes
85
↓ 90 callers
Function
get_args
Return arguments.
megatron/global_vars.py:35
↓ 89 callers
Function
print_rank_0
If distributed is initialized print only on rank 0.
megatron/__init__.py:25
↓ 46 callers
Method
size
(self, index)
megatron/data/indexed_dataset.py:197
↓ 20 callers
Method
start
Start the timer.
megatron/global_vars.py:181
↓ 18 callers
Method
stop
Stop the timer.
megatron/global_vars.py:188
↓ 17 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:500
↓ 16 callers
Function
get_data_parallel_group
Get the data parallel group the caller rank belongs to.
megatron/mpu/initialize.py:173
↓ 13 callers
Function
get_model_parallel_group
Get the model parallel group the caller rank belongs to.
megatron/mpu/initialize.py:159
↓ 13 callers
Method
write
(self, sizes, doc_idx)
megatron/data/indexed_dataset.py:363
↓ 12 callers
Function
get_model_parallel_rank
Return my rank for the model parallel group.
megatron/mpu/initialize.py:207
↓ 11 callers
Function
get_model_parallel_world_size
Return world size for the model parallel group.
megatron/mpu/initialize.py:193
↓ 11 callers
Function
get_tokenizer
Return tokenizer.
megatron/global_vars.py:41
↓ 10 callers
Method
exists
(path)
megatron/data/indexed_dataset.py:201
↓ 10 callers
Function
get_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
megatron/checkpointing.py:88
↓ 10 callers
Method
tokenize
(self, text)
tasks/openqa/dense_retriever/evaluation/tokenizers.py:143
↓ 9 callers
Function
get_checkpoint_name
A unified checkpoint name.
megatron/checkpointing.py:74
↓ 9 callers
Function
get_timers
Return timers.
megatron/global_vars.py:65
↓ 8 callers
Function
_compare
(arg_name)
megatron/checkpointing.py:49
↓ 8 callers
Function
add_to_logging
(name)
megatron/training.py:263
↓ 8 callers
Method
evaluate
(self, qa_file, split)
tasks/openqa/dense_retriever/evaluation/evaluate.py:96
↓ 7 callers
Function
data_file_path
(prefix_path)
megatron/data/indexed_dataset.py:115
↓ 7 callers
Method
decode
(self, ids)
megatron/tokenizer/tokenizer.py:197
↓ 7 callers
Function
get_gloo_comm_group
()
megatron/mpu/initialize.py:282
↓ 7 callers
Method
load_state_dict
(self, state_dict, strict=True)
megatron/fp16/fp16.py:84
↓ 7 callers
Function
make_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 callers
Function
save_checkpoint
Save a model checkpoint.
megatron/checkpointing.py:94
↓ 6 callers
Function
_ensure_var_is_not_initialized
Make sure the input variable is not None.
megatron/global_vars.py:167
↓ 6 callers
Method
embed_text
Embed a batch of tokens using the model
megatron/model/dualencoder_model.py:77
↓ 6 callers
Function
index_file_path
(prefix_path)
megatron/data/indexed_dataset.py:111
↓ 6 callers
Function
make_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 callers
Method
write
Write timers to a tensorboard writer
megatron/global_vars.py:228
↓ 5 callers
Method
_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them.
megatron/learning_rates.py:93
↓ 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:71
↓ 5 callers
Function
divide
Ensure that numerator is divisible by the denominator and return the division value.
megatron/mpu/utils.py:26
↓ 5 callers
Function
get_cuda_rng_tracker
Get cuda rng tracker.
megatron/mpu/random.py:202
↓ 5 callers
Function
get_node_first_rank
()
megatron/mpu/initialize.py:248
↓ 5 callers
Function
get_t5_tokenizer
Return T5 tokenizer.
megatron/global_vars.py:47
↓ 5 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:19
↓ 5 callers
Method
maybe_print
(self, msg)
megatron/fp16/fp16.py:258
↓ 5 callers
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
megatron/fp16/fp16.py:76
↓ 4 callers
Method
__iter__
(self)
megatron/data/samplers.py:61
↓ 4 callers
Function
_ensure_var_is_initialized
Make sure the input variable is not None.
megatron/global_vars.py:162
↓ 4 callers
Method
_model_params_to_master_params
(self)
megatron/fp16/fp16.py:311
↓ 4 callers
Method
build_and_save_index
(self)
megatron/indexer_emdr2.py:77
↓ 4 callers
Function
build_tokenizer
Initialize tokenizer.
megatron/tokenizer/tokenizer.py:24
↓ 4 callers
Method
clear
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 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
megatron/tokenizer/bert_tokenization.py:136
↓ 4 callers
Function
dualencoder_model_provider
(only_query_model=False, only_context_model=False, vocab_size=None)
megatron/model/dualencoder_model.py:13
↓ 4 callers
Function
init_method_normal
Init method based on N(0, sigma).
megatron/model/utils.py:25
↓ 4 callers
Method
load_state_dict
Customized load.
megatron/model/language_model.py:200
↓ 4 callers
Method
log
Log a group of timers.
megatron/global_vars.py:238
↓ 4 callers
Function
read_longs
(f, n)
megatron/data/indexed_dataset.py:82
↓ 4 callers
Function
scaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
megatron/model/utils.py:33
↓ 4 callers
Function
set_global_variables
Set args, tokenizer, tensorboard-writer, adlr-autoresume, and timers.
megatron/global_vars.py:71
↓ 4 callers
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
megatron/model/distributed.py:78
↓ 4 callers
Method
state_dict_for_save_checkpoint
For easy load.
megatron/model/language_model.py:183
↓ 4 callers
Function
write_longs
(f, a)
megatron/data/indexed_dataset.py:88
↓ 3 callers
Method
__init__
(self, init_method, output_layer_init_method)
megatron/model/transformer.py:67
↓ 3 callers
Function
_gather
Gather tensors and concatinate along the last dimension.
megatron/mpu/mappings.py:54
↓ 3 callers
Function
_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 callers
Function
_initialize_affine_weight_gpu
Initialize affine weight for model parallel on GPU.
megatron/mpu/layers.py:50
↓ 3 callers
Function
_normalize
(text)
tasks/openqa/dense_retriever/evaluation/qa_validation.py:161
↓ 3 callers
Function
_reduce
All-reduce the the input tensor across model parallel group.
megatron/mpu/mappings.py:22
↓ 3 callers
Method
_set_mips_index
Create a Faiss Flat index with inner product as the metric to search against
megatron/data/emdr2_index.py:113
↓ 3 callers
Method
_set_mips_index
Create a Faiss Flat index with inner product as the metric to search against
megatron/data/emdr2_index.py:212
↓ 3 callers
Function
_split
Split the tensor along its last dimension and keep the corresponding slice.
megatron/mpu/mappings.py:35
↓ 3 callers
Method
add_token
(self, token)
megatron/tokenizer/tokenizer.py:169
↓ 3 callers
Function
bias_dropout_add
(x, bias, residual, prob, training)
megatron/model/transformer.py:397
↓ 3 callers
Function
build_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
tasks/openqa/e2eqa/train_e2eqa.py:352
↓ 3 callers
Function
build_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 callers
Function
build_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 callers
Function
convert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
megatron/tokenizer/bert_tokenization.py:78
↓ 3 callers
Method
elapsed
Calculate the elapsed time.
megatron/global_vars.py:200
↓ 3 callers
Function
ensure_directory_exists
Build filename's path if it does not already exists.
megatron/checkpointing.py:67
↓ 3 callers
Function
get_language_model
Build language model and return along with the key to save.
megatron/model/language_model.py:45
↓ 3 callers
Function
get_linear_layer
Simple linear layer with weight initialization.
megatron/model/utils.py:43
↓ 3 callers
Function
get_mips_group
()
megatron/mpu/initialize.py:241
↓ 3 callers
Function
get_model
Build the model.
megatron/training.py:38
↓ 3 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:147
↓ 3 callers
Function
get_tensorboard_writer
Return tensorboard writer. It can be None so no need to check if it is initialized.
megatron/global_vars.py:53
↓ 3 callers
Method
load_attributes
(self, custom_load_path=None, key_list=None)
megatron/indexer_emdr2.py:58
↓ 3 callers
Function
load_checkpoint
Load a model checkpoint and return the iteration.
megatron/checkpointing.py:145
↓ 3 callers
Function
load_dualencoder_checkpoint
selectively load retrieval models for indexing/retrieving from saved checkpoints
megatron/checkpointing.py:267
↓ 3 callers
Method
load_from_file
Populate members from instance saved to file
megatron/data/emdr2_index.py:45
↓ 3 callers
Method
load_state_dict
Load the state dicts of each of the models
megatron/model/dualencoder_model.py:100
↓ 3 callers
Function
pprint
(*args)
tasks/openqa/e2eqa/async_indexer.py:22
↓ 3 callers
Function
process_batch
(batch)
tasks/openqa/e2eqa/train_e2eqa.py:28
↓ 3 callers
Function
reduce_losses
Reduce a tensor of losses across all GPUs.
megatron/utils.py:32
↓ 3 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:155
↓ 3 callers
Method
step
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 callers
Method
tokenize
(self, text)
megatron/tokenizer/tokenizer.py:102
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
megatron/tokenizer/bert_tokenization.py:152
↓ 3 callers
Method
words
Returns a list of the text of each token Args: uncased: lower cases text
tasks/openqa/dense_retriever/evaluation/tokenizers.py:49
↓ 2 callers
Method
__init__
(self, hidden_size, init_method)
megatron/model/language_model.py:85
↓ 2 callers
Method
__init__
(self, path)
megatron/data/indexed_dataset.py:131
↓ 2 callers
Method
__init__
(self, input_size, output_size, bias=True, input_is_parallel=False, init_met
megatron/mpu/layers.py:295
↓ 2 callers
Method
_batch
extracts samples only pertaining to this worker's batch
megatron/data/samplers.py:142
↓ 2 callers
Function
_build_tokenizer
Initialize tokenizer.
megatron/global_vars.py:95
↓ 2 callers
Function
_check_arg_is_not_none
(args, arg)
megatron/arguments.py:164
↓ 2 callers
Method
_do_init
(self, path, skip_warmup)
megatron/data/indexed_dataset.py:460
next →
1–100 of 707, ranked by callers