Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EleutherAI/gpt-neox
/ functions
Functions
652 in github.com/EleutherAI/gpt-neox
⨍
Functions
652
◇
Types & classes
103
↓ 1 callers
Function
parse_args
()
megatron/tokenizer/train_tokenizer.py:85
↓ 1 callers
Function
peek
(args: Namespace)
tools/inspect_checkpoints.py:215
↓ 1 callers
Method
prepare
(self)
tools/corpora.py:153
↓ 1 callers
Function
prepare_dataset
Downloads + tokenizes a dataset in the registry (dataset_name) and saves output .npy files to data_dir.
tools/corpora.py:322
↓ 1 callers
Function
pretrain
Main training program. This function will run the following in the order provided: 1) initialize Megatron. 2) setup model, optimi
megatron/training.py:159
↓ 1 callers
Function
pretty_print
Prints a nice summary of the top-level contents in a checkpoint dictionary.
tools/inspect_checkpoints.py:56
↓ 1 callers
Function
pretty_print_double
Prints a nice summary of the top-level contents in a checkpoint dictionary.
tools/inspect_checkpoints.py:94
↓ 1 callers
Method
print
Print arguments.
megatron/neox_arguments/arguments.py:622
↓ 1 callers
Method
read_index
(self, path)
megatron/data/indexed_dataset.py:144
↓ 1 callers
Function
report_memory
Simple GPU memory report.
megatron/utils.py:51
↓ 1 callers
Function
run_checkpoint_test
(yaml_list=None, param_dict=None)
tests/model/test_model_checkpoint.py:83
↓ 1 callers
Method
run_eval
( self, eval_tasks=None, num_fewshot=0, bootstrap_iters=2, description
eval_tasks/eval_adapter.py:364
↓ 1 callers
Function
run_generate_test
(param_dict, prompt)
tests/model/test_model_generation.py:77
↓ 1 callers
Function
save_base_shapes
(neox_args, base_shapes, use_cache)
megatron/training.py:74
↓ 1 callers
Function
save_ds_checkpoint
Save a model checkpoint.
megatron/checkpointing.py:163
↓ 1 callers
Function
scaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
megatron/model/init_functions.py:39
↓ 1 callers
Function
scatter_to_model_parallel_region
(input_)
megatron/mpu/mappings.py:187
↓ 1 callers
Function
set_model_parallel_rank
Set model parallel rank.
megatron/mpu/initialize.py:201
↓ 1 callers
Function
set_model_parallel_world_size
Set the model parallel size
megatron/mpu/initialize.py:187
↓ 1 callers
Method
set_parallel_output
(self, parallel_output: bool)
megatron/mpu/layers.py:719
↓ 1 callers
Method
set_special_tokens
Add a list of additional tokens to the encoder. The additional tokens are indexed starting from the last index of the current vocabula
megatron/tokenizer/gpt2_tokenization.py:210
↓ 1 callers
Method
set_up_autotuning
(encoded_config, overwrite_values)
megatron/neox_arguments/arguments.py:432
↓ 1 callers
Function
setup_deepspeed_random_and_activation_checkpointing
Optional DeepSpeed Activation Checkpointing features. Gives access to partition activations, contiguous memory optimizations and cpu checkpoin
megatron/initialize.py:87
↓ 1 callers
Function
sizeof_fmt
(num, suffix="B")
tools/inspect_checkpoints.py:48
↓ 1 callers
Function
small_init_init_method
Fills the input Tensor with values according to the method described in Transformers without Tears: Improving the Normalization of Self-Attention
megatron/model/init_functions.py:134
↓ 1 callers
Method
sparse_attention
(self, query_layer, key_layer, value_layer, attention_mask)
megatron/model/transformer.py:469
↓ 1 callers
Function
split_into_partitions
(tensor, num_partitions, partition_dim, stride)
tools/merge_mp_partitions.py:37
↓ 1 callers
Function
split_tensor_along_last_dim
Split a tensor along its last dimension. Arguments: tensor: input tensor. num_partitions: number of partitions to split the tensor
megatron/mpu/utils.py:36
↓ 1 callers
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
megatron/optimizers.py:54
↓ 1 callers
Function
stop_tokens_in_completion
(stop_tokens, context_tokens, batch_index, current_index)
megatron/text_generation_utils.py:172
↓ 1 callers
Function
switch
replaces items in val1 with items in val2 where boolean = True
megatron/text_generation_utils.py:115
↓ 1 callers
Function
test_fused_softmax
()
megatron/fused_kernels/tests/test_fused_kernels.py:22
↓ 1 callers
Function
test_fused_upper_triangle_mask_softmax
()
megatron/fused_kernels/tests/test_fused_kernels.py:120
↓ 1 callers
Function
test_load_fused_kernels
()
megatron/fused_kernels/tests/test_fused_kernels.py:10
↓ 1 callers
Function
test_train
(param_dict)
tests/model/test_model_checkpoint.py:70
↓ 1 callers
Function
to_md
Writes the docs dictionary to markdown format
configs/gen_docs.py:67
↓ 1 callers
Method
tokenize
Tokenize a string.
megatron/tokenizer/gpt2_tokenization.py:264
↓ 1 callers
Method
tokenize
(self, text: str)
megatron/tokenizer/tokenizer.py:292
↓ 1 callers
Method
tokens_per_char
(self)
megatron/utils.py:467
↓ 1 callers
Function
train
Train the model function.
megatron/training.py:740
↓ 1 callers
Function
train_step_pipe
Single training step with DeepSpeed's pipeline parallel engine.
megatron/training.py:721
↓ 1 callers
Function
train_tokenizer
Trains a tokenizer on all the json files in `input_dir` and saves it to `save_path` :param input_dir: input directory containing jsonl files
megatron/tokenizer/train_tokenizer.py:49
↓ 1 callers
Function
training_log
Log training information such as losses, timing, etc.
megatron/logging.py:94
↓ 1 callers
Method
validate_types
At runtime, checks types are actually the type specified.
megatron/neox_arguments/arguments.py:1133
↓ 1 callers
Method
validate_values
(self)
megatron/neox_arguments/arguments.py:989
↓ 1 callers
Method
vocab_range_from_global_vocab_size
(global_vocab_size, rank, world_size)
megatron/mpu/utils.py:70
↓ 1 callers
Method
vocab_range_from_per_partition_vocab_size
( per_partition_vocab_size, rank, world_size )
megatron/mpu/utils.py:62
↓ 1 callers
Function
wang_init_method
(n_layers, dim, use_mup_outer=False, mup_init_scale=1.0)
megatron/model/init_functions.py:151
↓ 1 callers
Function
wrapper
()
tests/model/test_model_generation.py:71
↓ 1 callers
Function
wrapper
()
tests/model/test_model_checkpoint.py:77
↓ 1 callers
Method
writer
(cls, path, dtype)
megatron/data/indexed_dataset.py:347
↓ 1 callers
Function
xavier_normal_init_method
Fills the input Tensor with values according to the method described in Understanding the difficulty of training deep feedforward neural networks
megatron/model/init_functions.py:118
↓ 1 callers
Function
xavier_uniform_init_method
Fills the input Tensor with values according to the method described in Understanding the difficulty of training deep feedforward neural networks
megatron/model/init_functions.py:101
↓ 1 callers
Function
yield_from_files
Iterator over input documents using lm_dataformat. Should be able to handle jsons / texts / other compressed formats. Also filters out empty
tools/preprocess_data.py:151
↓ 1 callers
Function
yielder
(fname, semaphore)
tools/preprocess_data.py:159
Method
__call__
(self, name)
megatron/utils.py:277
Method
__del__
(self)
megatron/logging.py:40
Method
__del__
(self)
megatron/data/indexed_dataset.py:169
Method
__del__
(self)
megatron/data/indexed_dataset.py:440
Method
__del__
(self)
megatron/data/indexed_dataset.py:492
Method
__enter__
(self)
megatron/data/indexed_dataset.py:349
Method
__exit__
(self, exc_type, exc_val, exc_tb)
megatron/data/indexed_dataset.py:390
Method
__getitem__
(self, idx)
megatron/data/gpt2_dataset.py:73
Method
__getitem__
(self, idx)
megatron/data/blendable_dataset.py:72
Method
__getitem__
(self, idx)
megatron/data/indexed_dataset.py:174
Method
__getitem__
(self, idx)
megatron/data/indexed_dataset.py:253
Method
__getitem__
(self, i)
megatron/data/indexed_dataset.py:457
Method
__getitem__
(self, idx)
megatron/data/indexed_dataset.py:501
Method
__getstate__
(self)
megatron/data/indexed_dataset.py:472
Method
__init__
( self, tokenizer_type=None, merge_file=None, vocab_file=None, data_di
tools/corpora.py:38
Method
__init__
(self, args)
tools/preprocess_data.py:42
Method
__init__
(self, neox_config)
tools/convert_to_hf.py:84
Method
__init__
(self, file, err=False)
megatron/logging.py:30
Method
__init__
(self, name)
megatron/utils.py:227
Method
__init__
(self, use_wandb, tensorboard_writer)
megatron/utils.py:272
Method
__init__
(self, optimizer, n=50)
megatron/utils.py:348
Method
__init__
(self, data_iterator, tokenizer)
megatron/utils.py:459
Method
__init__
( self, optimizer, start_lr, warmup_iter, total_iters, decay_s
megatron/learning_rates.py:28
Method
__init__
( self, params: _params_t, lr: float = 1e-2, momentum: float = 0.9, we
megatron/optimizers.py:273
Method
__init__
(self, dim, base=10000, precision=torch.half)
megatron/model/positional_embeddings.py:20
Method
__init__
(self, dim, base=10000, precision=torch.half)
megatron/model/positional_embeddings.py:39
Method
__init__
( self, input_in_fp16, input_in_bf16, fusion_type, mask_func,
megatron/model/fused_softmax.py:105
Method
__init__
( self, layers, activation_checkpoint_interval, activation_checkpoint_func,
megatron/model/utils.py:88
Method
__init__
( self, neox_args, wte, n_tokens: int = 10, init_range: float = 0.5,
megatron/model/word_embeddings.py:186
Method
__init__
(self, dim, eps=1e-5)
megatron/model/norms.py:79
Method
__init__
(self, neox_args)
megatron/model/activations.py:123
Method
__init__
( self, neox_args, init_method, output_layer_init_method, parallel_output=False )
megatron/model/transformer.py:80
Method
__init__
( self, neox_args, parallel_output=True, init_method=nn.init.xavier_normal_,
megatron/model/transformer.py:142
Method
__init__
( self, neox_args, attention_mask_func, init_method, output_layer_init
megatron/model/transformer.py:186
Method
__init__
( self, neox_args, attention_mask_func, init_method, output_layer_init
megatron/model/transformer.py:595
Method
__init__
(self, neox_args, d_attn, d_ff, mask_fn)
megatron/model/gmlp.py:29
Method
__init__
(self, neox_args, d_ff, d_attn=None, causal=True, mask_fn=None)
megatron/model/gmlp.py:54
Method
__init__
( self, name, data_prefix, documents, indexed_dataset, num_sam
megatron/data/gpt2_dataset.py:30
Method
__init__
( self, sampler, batch_size, drop_last, rank=-1, world_size=2,
megatron/data/samplers.py:105
Method
__init__
(self, datasets, weights)
megatron/data/blendable_dataset.py:30
Method
__init__
(self, path)
megatron/data/indexed_dataset.py:219
Method
__init__
(self, out_file, dtype=np.int32)
megatron/data/indexed_dataset.py:281
Method
__init__
(self, path, skip_warmup=False)
megatron/data/indexed_dataset.py:395
Method
__init__
(self, path, skip_warmup=False)
megatron/data/indexed_dataset.py:463
Method
__init__
(self, out_file, dtype=np.int64)
megatron/data/indexed_dataset.py:563
← previous
next →
301–400 of 652, ranked by callers