MCPcopy Create free account

hub / github.com/EleutherAI/gpt-neox / functions

Functions652 in github.com/EleutherAI/gpt-neox

↓ 2 callersFunction_set_use_cache
Recursively sets an use_cache to `value` on a list of pytorch modules, if they have a use_cache attribute. use_cache is used to decide whethe
megatron/model/utils.py:213
↓ 2 callersMethod_sync_overflow
(self, is_overflow)
megatron/gradient_noise_scale/gradient_noise_scale.py:102
↓ 2 callersMethod_update
(self)
megatron/gradient_noise_scale/gradient_noise_scale.py:117
↓ 2 callersFunction_warmup_mmap_file
(path)
megatron/data/indexed_dataset.py:336
↓ 2 callersFunctionbroadcast_terminate_signal
Send signal to all workers to terminate if we've finished the process
megatron/text_generation_utils.py:161
↓ 2 callersFunctionbuild_weighted_datasets
( neox_args, train_num_samples, valid_num_samples, test_num_samples, train_weights, va
megatron/data/data_utils.py:189
↓ 2 callersMethodcheck_index
(self, i)
megatron/data/indexed_dataset.py:165
↓ 2 callersMethodclamp
(self, n)
megatron/tokenizer/tokenizer.py:318
↓ 2 callersMethodclear_cache
Recursively clears the kv cache on all layers
megatron/model/gpt2_model.py:332
↓ 2 callersFunctioncode
(dtype)
megatron/data/indexed_dataset.py:110
↓ 2 callersFunctionconcat_partitions
(partitions_)
tools/merge_mp_partitions.py:65
↓ 2 callersMethoddefaults
generator for getting default values.
megatron/neox_arguments/template.py:21
↓ 2 callersFunctiondist_launcher
Launch processes and gracefully handle failures.
tests/common.py:174
↓ 2 callersFunctiondo_forward_pass
(neox_args, model, inference=False)
megatron/checkpointing.py:52
↓ 2 callersFunctionema
Exponential moving average
megatron/gradient_noise_scale/gradient_noise_scale.py:18
↓ 2 callersFunctionensure_divisibility
Ensure that numerator is divisible by the denominator.
megatron/mpu/utils.py:22
↓ 2 callersMethodforward
(self, args)
megatron/model/transformer.py:779
↓ 2 callersMethodfrom_dict
instantiates NeoXArgs while reading values from input dict
megatron/neox_arguments/arguments.py:230
↓ 2 callersFunctionget_activation
retrieves the activation function specified in neox_args
megatron/model/activations.py:27
↓ 2 callersFunctionget_attribute
(obj: object, name: str)
tools/inspect_checkpoints.py:196
↓ 2 callersFunctionget_checkpoint_name
A unified checkpoint name.
megatron/checkpointing.py:124
↓ 2 callersFunctionget_config_directory
()
tests/common.py:101
↓ 2 callersFunctionget_coord_data
Get coord data for coord check. Train the models in `models` with data from `dataloader` and optimizer specified by `optimizer` and `lr` for `
megatron/mup_substitute.py:63
↓ 2 callersMethodget_deepspeed_main_args
(self)
megatron/neox_arguments/arguments.py:452
↓ 2 callersFunctionget_docs
(module)
configs/gen_docs.py:21
↓ 2 callersFunctionget_fusion_type
(neox_args)
megatron/model/utils.py:324
↓ 2 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
megatron/utils.py:79
↓ 2 callersFunctionget_model
(model_type)
tools/merge_mp_partitions.py:111
↓ 2 callersFunctionget_model_parallel_src_rank
Calculate the global rank corresponding to a local rank zero in the model parallel group.
megatron/mpu/initialize.py:215
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
megatron/tokenizer/gpt2_tokenization.py:77
↓ 2 callersFunctionget_pipe_parallel_group
Get the pipe parallel group the caller rank belongs to.
megatron/mpu/initialize.py:253
↓ 2 callersFunctionget_selection
(filename, args)
tools/inspect_checkpoints.py:252
↓ 2 callersFunctionget_wandb_api_key
Get Weights and Biases API key from ENV or .netrc file. Otherwise return None
megatron/utils.py:138
↓ 2 callersFunctionget_xdist_worker_id
()
tests/common.py:45
↓ 2 callersFunctionis_local_main
True if is the local main process
megatron/utils.py:128
↓ 2 callersFunctionload_checkpoint
Load a model checkpoint and return the iteration.
megatron/checkpointing.py:225
↓ 2 callersFunctionlocal_rank
Local rank of process
megatron/utils.py:107
↓ 2 callersFunctionmerge_partitions
(merged, partitions, partition_dim, stride)
tools/merge_mp_partitions.py:54
↓ 2 callersFunctionorthogonal_init_method
Fills the input Tensor with a (semi) orthogonal matrix, as described in Exact solutions to the nonlinear dynamics of learning in deep linear neura
megatron/model/init_functions.py:87
↓ 2 callersMethodpad
(self)
megatron/tokenizer/tokenizer.py:132
↓ 2 callersMethodread_data
(self, path)
megatron/data/indexed_dataset.py:162
↓ 2 callersFunctionreduce_from_model_parallel_region
(input_)
megatron/mpu/mappings.py:183
↓ 2 callersFunctionreduce_losses
Reduce a tensor of losses across all GPUs.
megatron/utils.py:43
↓ 2 callersFunctionrun_eval_harness
( model, forward_step_fn, neox_args, batch_size=None, eval_tasks=None, num_fewshot=0,
eval_tasks/eval_adapter.py:448
↓ 2 callersFunctionrun_test_model_instantiation
(yaml_list=None, param_dict=None)
tests/model/test_model_instantiation.py:105
↓ 2 callersFunctionsetup_for_inference_or_eval
Initializes the model for evaluation or inference (doesn't load optimizer states, etc.) from command line args. use_cache: bool Whet
megatron/utils.py:404
↓ 2 callersMethodstep
Set lr for all parameters groups.
megatron/learning_rates.py:88
↓ 2 callersFunctionstream_tokens
iterator producing text completions neox_args: NeoXArgs. model: a Megatron model. context_tokens: the prompt to complete; unpadded l
megatron/text_generation_utils.py:186
↓ 2 callersMethodtokenize
tokenizes dataset
tools/corpora.py:128
↓ 2 callersMethodtokenize
(self, text: str)
megatron/tokenizer/tokenizer.py:336
↓ 2 callersMethodtrain_mode
Sets up the model for training by turning off k/v caching.
megatron/model/utils.py:118
↓ 2 callersMethodvalidate_keys
test that there are no duplicate arguments
megatron/neox_arguments/arguments.py:970
↓ 2 callersFunctionwrapper
()
tests/model/test_model_instantiation.py:75
↓ 1 callersFunction__best_fitting_dtype
(vocab_size=None)
megatron/data/indexed_dataset.py:28
↓ 1 callersMethod__init__
(self, params, lr=0.1, momentum=0.0, beta=0.0, eps=1e-30)
megatron/optimizers.py:40
↓ 1 callersMethod__init__
(self, func)
megatron/model/utils.py:74
↓ 1 callersMethod__init__
( self, neox_args, hidden_size, vocab_size, max_sequence_length,
megatron/model/word_embeddings.py:37
↓ 1 callersMethod__init__
Root Mean Square Layer Normalization :param dim: model size :param p: partial RMSNorm, valid value [0, 1], default -1.0 (
megatron/model/norms.py:35
↓ 1 callersMethod__init__
( self, neox_args, num_tokentypes=0, parallel_output=True, topology=No
megatron/model/gpt2_model.py:101
↓ 1 callersMethod__init__
(self, data_source, replacement=False, num_samples=None)
megatron/data/samplers.py:37
↓ 1 callersFunction_add_initial_accumulators
(state, grad)
megatron/optimizers.py:182
↓ 1 callersFunction_build_doc_idx
Build an array with length = number-of-epochs * number-of-documents. Each index is mapped to a corresponding document.
megatron/data/gpt2_dataset.py:237
↓ 1 callersFunction_build_index_mappings
Build doc-idx, sample-idx, and shuffle-idx. doc-idx: is an array (ordered) of documents to be used in training. sample-idx: is the start docum
megatron/data/gpt2_dataset.py:114
↓ 1 callersFunction_build_key_size_numel_dictionaries
Build the size on rank 0 and broadcast.
megatron/mpu/data.py:35
↓ 1 callersFunction_build_shuffle_idx
Build the range [0, size) and shuffle.
megatron/data/gpt2_dataset.py:296
↓ 1 callersFunction_check_data_types
Check that all the keys have the same target data type.
megatron/mpu/data.py:25
↓ 1 callersFunction_compute_sparse_update
(beta, acc, grad_values, grad_indices)
megatron/optimizers.py:155
↓ 1 callersFunction_compute_update
(beta, acc_list, grad)
megatron/optimizers.py:164
↓ 1 callersMethod_dp_gather
Gather logits from all data parallel ranks
eval_tasks/eval_adapter.py:325
↓ 1 callersMethod_dp_scatter
Scatters the inputs to all data parallel ranks.
eval_tasks/eval_adapter.py:292
↓ 1 callersFunction_flash_attn_backward
num_splits: whether to parallelize over the seqlen_k dimension (num_splits > 1) or not (num_splits = 1). num_splits=0 means it will be set by
megatron/model/flash_attention.py:55
↓ 1 callersFunction_flash_attn_forward
num_splits: how much to parallelize over the seqlen_q dimension. num_splits=0 means it will be set by an internal heuristic. We're exposing n
megatron/model/flash_attention.py:11
↓ 1 callersMethod_get_bias_dropout
(self)
megatron/model/transformer.py:652
↓ 1 callersFunction_get_coord_data
(neox_args, timers, lr_scheduler, models, dataloader, optcls, nsteps=3, dict_in_out=False, fla
megatron/mup_substitute.py:16
↓ 1 callersFunction_get_cuda_bare_metal_version
(cuda_dir)
megatron/fused_kernels/setup.py:8
↓ 1 callersMethod_get_pointers
(sizes)
megatron/data/indexed_dataset.py:363
↓ 1 callersMethod_get_slopes
Get slopes for Alibi positional embedding n : int = number of heads. For best performance, restrict n to a power of 2.
megatron/model/positional_embeddings.py:112
↓ 1 callersFunction_initialize_distributed
Initialize torch.distributed and mpu.
megatron/initialize.py:119
↓ 1 callersMethod_is_checkpointable
(self, funcs)
megatron/model/utils.py:101
↓ 1 callersMethod_model_call
(self, inps)
eval_tasks/eval_adapter.py:337
↓ 1 callersFunction_num_epochs
Based on number of samples and sequence length, calculate how many epochs will be needed.
megatron/data/gpt2_dataset.py:222
↓ 1 callersFunction_num_tokens
Total number of tokens in the dataset.
megatron/data/gpt2_dataset.py:217
↓ 1 callersFunction_orthogonal
(tensor, gain=1)
megatron/model/init_functions.py:56
↓ 1 callersMethod_relative_position_bucket
( self, relative_position, num_buckets=32, max_distance=128 )
megatron/mpu/layers.py:315
↓ 1 callersMethod_rescale_parameters
Rescale parameters to convert SP initialization to μP initialization. Warning: This method is NOT idempotent and should be called only once
megatron/mpu/layers.py:682
↓ 1 callersFunction_set_random_seed
Set random seed for reproducibility.
megatron/initialize.py:214
↓ 1 callersMethod_update_accumulator
(beta, acc_list, update)
megatron/optimizers.py:136
↓ 1 callersMethod_update_sparse_accumulator
(beta, acc, update)
megatron/optimizers.py:146
↓ 1 callersFunction_vocab_size_with_padding
Pad vocab size so it is divisible by model parallel size and still having GPU friendly size.
megatron/tokenizer/tokenizer.py:69
↓ 1 callersFunction_write_args_to_tensorboard
Write arguments to tensorboard.
megatron/initialize.py:226
↓ 1 callersMethodadd_item
(self, np_array)
megatron/data/indexed_dataset.py:290
↓ 1 callersMethodbackward
(ctx, output_grads)
megatron/model/fused_softmax.py:75
↓ 1 callersMethodbackward
(ctx, grad_output)
megatron/model/activations.py:90
↓ 1 callersFunctionbackward_step
Backward step.
megatron/training.py:651
↓ 1 callersFunctionbias_gelu
(bias, y)
megatron/model/activations.py:63
↓ 1 callersFunctionbias_gelu_back
(g, bias, y)
megatron/model/activations.py:72
↓ 1 callersFunctionbounded_product
Returns a shuffled, bounded cartesian product of the input sequence. Designed to cover as wide a range of permutations as possible with a lim
tests/common.py:283
↓ 1 callersMethodbpe
(self, token)
megatron/tokenizer/gpt2_tokenization.py:226
↓ 1 callersFunctionbuild_train_valid_test_data_iterators
XXX
megatron/data/data_utils.py:289
↓ 1 callersFunctionbuild_train_valid_test_datasets
Build train, valid, and test datasets.
megatron/data/data_utils.py:86
← previousnext →101–200 of 652, ranked by callers