MCPcopy Create free account

hub / github.com/THUDM/GLM / functions

Functions1,117 in github.com/THUDM/GLM

↓ 3 callersFunctionprepare_tokenizer
(args)
configure_data.py:120
↓ 3 callersMethodreset
Reset timer.
utils.py:139
↓ 3 callersMethodreset
Set to the initial state (no tracker).
mpu/random.py:133
↓ 3 callersFunctionset_random_seed
Set random seed for reproducability.
pretrain_glm.py:506
↓ 3 callersMethodset_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
mpu/random.py:146
↓ 3 callersMethodtranspose_for_scores
(self, x)
model/modeling_bert.py:367
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
data_utils/wordpiece.py:65
↓ 2 callersMethodIdToToken
ascii index to character
data_utils/tokenization.py:593
↓ 2 callersMethod__init__
(self, data_source, replacement=False, num_samples=None)
data_utils/samplers.py:37
↓ 2 callersMethod__init__
(self, name, token, Id)
data_utils/tokenization.py:191
↓ 2 callersMethod__iter__
(self)
tasks/data_utils.py:353
↓ 2 callersMethod_batch
extracts samples only pertaining to this worker's batch
data_utils/samplers.py:162
↓ 2 callersMethod_create_examples
(self, path, set_type, hypothesis_name="sentence2", premise_name="sentence1")
tasks/superglue/dataset.py:368
↓ 2 callersMethod_create_examples
(path: str, set_type: str)
tasks/superglue/dataset.py:1013
↓ 2 callersMethod_create_examples
(path: str, set_type: str)
tasks/superglue/dataset.py:1049
↓ 2 callersMethod_create_examples
(path: str, set_type: str)
tasks/superglue/dataset.py:1088
↓ 2 callersMethod_create_examples
(self, path: str)
tasks/superglue/dataset.py:1139
↓ 2 callersMethod_create_examples
(path: str, set_type: str)
tasks/superglue/dataset.py:1291
↓ 2 callersFunction_gather
Gather tensors and concatinate along the last dimension.
mpu/mappings.py:56
↓ 2 callersMethod_has_inf_or_nan
(x)
fp16/loss_scaler.py:46
↓ 2 callersFunction_is_digit
(w)
tasks/seq2seq/evaluate.py:14
↓ 2 callersMethod_master_params_to_model_params
(self)
fp16/fp16.py:303
↓ 2 callersFunction_normalize
(s)
tasks/seq2seq/dataset.py:241
↓ 2 callersFunction_reduce
All-reduce the the input tensor across model parallel group.
mpu/mappings.py:22
↓ 2 callersMethod_remove_last
(parts: List[Tuple[List[int], bool]])
tasks/superglue/pvp.py:334
↓ 2 callersFunction_split
Split the tensor along its last dimension and keep the corresponding slice.
mpu/mappings.py:36
↓ 2 callersMethod_update_scale
(self, has_overflow=False)
fp16/fp16.py:300
↓ 2 callersFunctionaccuracy_func_provider
Provide function that calculates accuracies.
tasks/eval_utils.py:54
↓ 2 callersMethodadd
Track the rng state.
mpu/random.py:151
↓ 2 callersMethodbpe
(self, token)
data_utils/sp_tokenizer.py:42
↓ 2 callersFunctioncached_path
Given something that might be a URL (or might be a local path), determine which. If it's a URL, download the file and cache it, and retur
data_utils/file_utils.py:84
↓ 2 callersFunctioncheck
(group, world_size, rank)
mpu/tests/test_initialize.py:38
↓ 2 callersFunctionconversion_helper
Apply conversion to val. Recursively apply conversion if `val` is a nested tuple/list structure.
fp16/fp16.py:29
↓ 2 callersFunctioncopy_to_model_parallel_region
(input_)
mpu/mappings.py:131
↓ 2 callersFunctioncount_tokens
(tokens)
tasks/seq2seq/evaluate.py:118
↓ 2 callersFunctiondetach_variable
(inputs, device=None)
mpu/random.py:62
↓ 2 callersFunctionensure_directory_exists
(filename)
utils.py:205
↓ 2 callersFunctionensure_divisibility
Ensure that numerator is divisible by the denominator.
mpu/utils.py:20
↓ 2 callersFunctionextend_embedding_weights
(state_weights, model_weights)
train_utils.py:34
↓ 2 callersFunctionf1_score
(prediction, ground_truth)
tasks/superglue/evaluate.py:36
↓ 2 callersMethodfile_read
read specified portion of file
data_utils/lazy_loader.py:229
↓ 2 callersMethodfinalize
( self, input_ids: torch.LongTensor, final_beam_scores: torch.FloatTensor,
generation_utils.py:287
↓ 2 callersFunctionfix_tokenization
(text, dataset)
tasks/seq2seq/evaluate.py:31
↓ 2 callersFunctiongather_from_model_parallel_region
(input_)
mpu/mappings.py:140
↓ 2 callersMethodgenerate_blank_data
(self, sample, masked_lengths, attention_mask, rng, task='bert')
blocklm_utils.py:270
↓ 2 callersFunctionget_batch
(context_tokens, device, args)
generate_samples.py:62
↓ 2 callersFunctionget_checkpoint_iteration
(load_path)
utils.py:295
↓ 2 callersFunctionget_checkpoint_tracker_filename
(checkpoints_path)
utils.py:211
↓ 2 callersFunctionget_data_parallel_group
Get the data parallel group the caller rank belongs to.
mpu/initialize.py:95
↓ 2 callersFunctionget_dataset
gets dataset object based on keyword args and file at `path`
data_utils/__init__.py:52
↓ 2 callersMethodget_doc
gets text of document corresponding to idx
data_utils/datasets.py:944
↓ 2 callersMethodget_labels
Get the list of labels for this data set.
tasks/superglue/dataset.py:261
↓ 2 callersMethodget_len_path
(path, data_type)
data_utils/lazy_loader.py:75
↓ 2 callersFunctionget_log_dir
(name, base)
utils.py:33
↓ 2 callersFunctionget_model
Build the model.
train_utils.py:62
↓ 2 callersFunctionget_model_parallel_src_rank
Calculate the global rank corresponding to a local rank zeor in the model parallel group.
mpu/initialize.py:112
↓ 2 callersFunctionget_pairs
(word)
data_utils/sp_tokenizer.py:25
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
data_utils/tokenization_gpt2.py:76
↓ 2 callersFunctionget_partition_size
(item)
mpu/random.py:242
↓ 2 callersMethodget_parts
Given an input example, apply a pattern to obtain two text sequences (text_a and text_b) containing exactly one mask token (or one co
tasks/superglue/pvp.py:358
↓ 2 callersFunctionget_sample_writer
Returns a tensorboard summary writer
utils.py:37
↓ 2 callersMethodget_train_examples
(self, data_dir)
tasks/superglue/dataset.py:352
↓ 2 callersMethodget_weighted_samples
(self, np_rng)
data_utils/datasets.py:606
↓ 2 callersMethodget_weighted_samples
(self, np_rng)
data_utils/datasets.py:757
↓ 2 callersMethodgetidx
(self, data_idx)
data_utils/datasets.py:815
↓ 2 callersFunctioninit_method_normal
Init method based on normal distribution. This is only used for embeddings. The transformer has its own initializer.
model/modeling_glm.py:27
↓ 2 callersFunctionmain
()
test/test_rel_shift.py:20
↓ 2 callersMethodmake_block_data
(self, tokens, loss_masks, attention_mask, block_spans, rng, task='bert')
blocklm_utils.py:172
↓ 2 callersFunctionmaster_params_to_model_params
Copy master parameters to model parameters. Args: model_params: List of model parameters created by :func:`prep_param_lists`.
fp16/fp16util.py:173
↓ 2 callersFunctionmetric_max_over_ground_truths
(metric_fn, prediction, ground_truths)
tasks/superglue/evaluate.py:53
↓ 2 callersMethodnamed_parameters
(self, prefix: str = '', recurse: bool = True)
model/distributed.py:103
↓ 2 callersMethodnamed_parameters
(self, prefix: str = '', recurse: bool = True)
fp16/fp16.py:75
↓ 2 callersFunctionnormal_init_method
(mean, std)
model/modeling_bert.py:42
↓ 2 callersFunctionpad_choice_dim
(data, choice_num)
tasks/data_utils.py:314
↓ 2 callersMethodpad_seq
(self, seq, pad_id=None)
data_utils/datasets.py:822
↓ 2 callersMethodpad_seq
helper function to pad sequence pair
data_utils/datasets.py:1083
↓ 2 callersFunctionparallel_self_attention
(model_parallel_size, num_att_heads_per_partition, hidden_size_per_att_head, dropo
mpu/tests/test_layers.py:328
↓ 2 callersFunctionparallel_transformer
(model_parallel_size, num_att_heads_per_partition, hidden_size_per_att_head, batch_si
mpu/tests/test_layers.py:412
↓ 2 callersMethodparse_command_tokens
(self)
data_utils/tokenization.py:84
↓ 2 callersFunctionprint_and_save_args
Print arguments.
utils.py:74
↓ 2 callersMethodprocess
( self, input_ids: torch.LongTensor, next_scores: torch.FloatTensor,
generation_utils.py:207
↓ 2 callersFunctionprocess_batch
Process batch and produce inputs for the model.
finetune_glm.py:32
↓ 2 callersFunctionprocess_batch
Process batch and produce inputs for the model.
tasks/seq2seq/evaluate.py:234
↓ 2 callersMethodprocess_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:453
↓ 2 callersFunctionreduce_from_model_parallel_region
(input_)
mpu/mappings.py:134
↓ 2 callersFunctionreport_iteration_metrics
(summary_writer, optimizer, lr, loss, elapsed_time, step, total_step, args)
pretrain_glm.py:273
↓ 2 callersMethodright_strip_seq
(self, tokens, loss_mask, seq_length)
data_utils/datasets.py:672
↓ 2 callersFunctionsample_sequence
(model, tokenizer, context_tokens, context_length, args, device, mems=None, end_tokens=None)
generate_samples.py:87
↓ 2 callersMethodsample_span_in_document
(self, tokens, masked_lengths, rng)
blocklm_utils.py:116
↓ 2 callersMethodsample_spans
(span_lengths, total_length, rng, offset=0)
blocklm_utils.py:103
↓ 2 callersFunctionscaled_init_method
Init method based on N(0, sigma/sqrt(2*num_layers).
model/modeling_bert.py:49
↓ 2 callersMethodsentence_split
split document into sentences
data_utils/datasets.py:926
↓ 2 callersMethodsentence_tokenize
tokenize sentence and get token types
data_utils/datasets.py:937
↓ 2 callersFunctionsetup_model_and_optimizer
Setup model and optimizer.
train_utils.py:243
↓ 2 callersFunctionsplit_s3_path
Split a full s3 path into the bucket name and path.
data_utils/file_utils.py:114
↓ 2 callersMethodstep
(self, step_num=None)
learning_rates.py:58
↓ 2 callersFunctiontop_k_logits
(logits, top_k=0, top_p=0.0, filter_value=-float('Inf'))
generation_utils.py:84
↓ 2 callersFunctiontrain_step
Single training step.
train_utils.py:324
↓ 2 callersFunctiontrain_valid_datasets_provider
Provide train and validation datasets.
tasks/seq2seq/finetune.py:56
↓ 2 callersMethodtrim_field
(content, max_length)
data_utils/corpora.py:177
← previousnext →101–200 of 1,117, ranked by callers