MCPcopy Create free account

hub / github.com/THUDM/GLM / functions

Functions1,117 in github.com/THUDM/GLM

↓ 1 callersFunctiongenerate_samples
(model, tokenizer, args, device)
generate_samples.py:239
↓ 1 callersMethodget_answers
(self, example: InputExample)
tasks/superglue/pvp.py:369
↓ 1 callersMethodget_answers
(self, example: InputExample)
tasks/superglue/pvp.py:542
↓ 1 callersMethodget_classifier_input
(self, example: InputExample, tokenizer)
tasks/superglue/dataset.py:265
↓ 1 callersFunctionget_command
(model, task, n_gpu, config, overwrite=True)
scripts/dispatcher.py:86
↓ 1 callersFunctionget_corpus_freq
Take corpus, split it into sentences, and extract word frequencies. Write frequencies to `filepath` as a tsv. Only write the first MAX
data_utils/tokenization.py:617
↓ 1 callersFunctionget_data_parallel_rank
Return my rank for the data parallel group.
mpu/initialize.py:125
↓ 1 callersFunctionget_detokenizer
(dataset)
tasks/language_model/detokenizer.py:53
↓ 1 callersMethodget_dev_examples
Get a collection of `InputExample`s for the dev set.
tasks/superglue/dataset.py:248
↓ 1 callersFunctionget_encoder
(encoder_file, bpe_file)
data_utils/sp_tokenizer.py:130
↓ 1 callersFunctionget_f1
(text_a, text_b)
tasks/seq2seq/evaluate.py:128
↓ 1 callersFunctionget_from_cache
Given a URL, look for the corresponding dataset in the local cache. If it's not there, download it. Then return the path to the cached file.
data_utils/file_utils.py:175
↓ 1 callersFunctionget_full_inputs
(tensors)
mpu/random.py:248
↓ 1 callersFunctionget_hostname
()
utils.py:52
↓ 1 callersMethodget_labels
(self)
tasks/superglue/dataset.py:547
↓ 1 callersMethodget_labels
(self)
tasks/superglue/dataset.py:627
↓ 1 callersMethodget_labels
(self)
tasks/superglue/dataset.py:760
↓ 1 callersFunctionget_learning_rate_scheduler
Build the learning rate scheduler.
train_utils.py:219
↓ 1 callersFunctionget_optimizer
Set up the optimizer.
train_utils.py:175
↓ 1 callersFunctionget_optimizer_param_groups
(model)
train_utils.py:159
↓ 1 callersFunctionget_output_func
(task_name, args)
tasks/superglue/dataset.py:48
↓ 1 callersFunctionget_partition_start
(item)
mpu/random.py:236
↓ 1 callersMethodget_parts
(self, example: InputExample)
tasks/superglue/pvp.py:553
↓ 1 callersFunctionget_split
Get dataset splits from comma separated string list
configure_data.py:376
↓ 1 callersMethodget_test_examples
(self, data_dir)
tasks/superglue/dataset.py:355
↓ 1 callersMethodget_tokens
(self, text)
tasks/language_model/dataset.py:96
↓ 1 callersMethodget_train_examples
(self, data_dir)
tasks/superglue/dataset.py:887
↓ 1 callersMethodget_train_examples
(self, data_dir)
tasks/superglue/dataset.py:997
↓ 1 callersMethodget_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1033
↓ 1 callersMethodget_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1072
↓ 1 callersMethodget_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1124
↓ 1 callersFunctionget_train_val_test_data
Load the data on rank zero and boradcast number of tokens to all GPUS.
pretrain_glm.py:520
↓ 1 callersMethodget_type
get type token corresponding to `name`
data_utils/tokenization.py:281
↓ 1 callersMethodget_unlabeled_examples
Get a collection of `InputExample`s for the unlabeled set.
tasks/superglue/dataset.py:256
↓ 1 callersMethodget_verbalizer_ids
(self)
tasks/superglue/pvp.py:372
↓ 1 callersMethodget_weighted_samples
(self, np_rng)
data_utils/datasets.py:886
↓ 1 callersMethodget_weighting
(self)
data_utils/datasets.py:875
↓ 1 callersMethodgetidx
(self, idx)
data_utils/datasets.py:535
↓ 1 callersMethodgetidx
(self, data_idx)
data_utils/datasets.py:684
↓ 1 callersFunctionglm_get_params_for_weight_decay_optimization
(module)
model/modeling_glm.py:213
↓ 1 callersMethodhas_overflow
(self, params)
fp16/loss_scaler.py:42
↓ 1 callersMethodhas_overflow_serial
(self, params)
fp16/loss_scaler.py:107
↓ 1 callersFunctionhttp_get
(url, temp_file)
data_utils/file_utils.py:163
↓ 1 callersFunctionindex_in_list
(lst, val, start=None)
blocklm_utils.py:21
↓ 1 callersMethodinit_embedding
(self, word_embeddings=None, task_tokens=None)
model/prompt.py:29
↓ 1 callersMethodinit_indices
(self)
data_utils/datasets.py:515
↓ 1 callersMethodinit_weighting
(self)
data_utils/datasets.py:596
↓ 1 callersMethodinit_weighting
(self)
data_utils/datasets.py:744
↓ 1 callersMethodis_done
If there are enough hypotheses and that none of the hypotheses being generated can become better than the worst one in the heap, then
generation_utils.py:376
↓ 1 callersFunctionload_attention
(our, oai, dst2src=False)
utils.py:441
↓ 1 callersMethodload_json_stream
(self, load_path)
data_utils/datasets.py:483
↓ 1 callersFunctionload_mlp
(our, oai, dst2src=False)
utils.py:436
↓ 1 callersFunctionload_pretrained
(model, checkpoint_path, args, task_tokens=None)
train_utils.py:16
↓ 1 callersMethodload_spm_model
load sentencepiece model and parse vocab
data_utils/tokenization.py:709
↓ 1 callersMethodload_state_dict
(self, state_dict, strict=True)
model/distributed.py:100
↓ 1 callersMethodload_state_dict
(self, state_dict, strict=True)
model/downstream.py:20
↓ 1 callersFunctionload_transformer_layer
(our, oai, dst2src=False)
utils.py:446
↓ 1 callersFunctionload_vocab
Loads a vocabulary file into a dictionary.
data_utils/wordpiece.py:50
↓ 1 callersFunctionlower
(text)
tasks/superglue/evaluate.py:30
↓ 1 callersFunctionmain
Main training program.
pretrain_glm.py:551
↓ 1 callersFunctionmain
Main training program.
generate_samples.py:289
↓ 1 callersFunctionmain
()
scripts/dispatcher.py:162
↓ 1 callersFunctionmain
(args)
tasks/seq2seq/finetune.py:142
↓ 1 callersFunctionmake_loaders
makes training/val/test
configure_data.py:248
↓ 1 callersMethodmake_masked_data
(self, tokens, loss_masks, attention_mask, block_spans, rng, task='bert')
blocklm_utils.py:160
↓ 1 callersFunctionmake_tfrecord_loaders
Load train/val/test dataset from shuffled TFRecords
configure_data.py:211
↓ 1 callersFunctionmake_tokenizer
Helper function to instantiate a tokenizer given common combinations of options.
data_utils/tokenization.py:35
↓ 1 callersMethodmask_text
(self, text)
tasks/seq2seq/dataset.py:761
↓ 1 callersMethodmask_token
helper function to mask `idx` token from `tokens` according to section 3.3.1 of https://arxiv.org/pdf/1810.04805.pdf
data_utils/datasets.py:1065
↓ 1 callersFunctionmodel_grads_to_master_grads
Copy model gradients to master gradients. Args: model_params: List of model parameters created by :func:`prep_param_lists`.
fp16/fp16util.py:151
↓ 1 callersFunctionmpi_define_env
(args)
arguments.py:471
↓ 1 callersFunctionmpu_cross_entropy
(batch_size, seq_length, vocab_size, logits_scale, seed)
mpu/tests/test_cross_entropy.py:46
↓ 1 callersMethodnamed_parameters
(self, prefix: str = '', recurse: bool = True)
model/downstream.py:23
↓ 1 callersFunctionoutput_func
(predictions, examples, output_file)
tasks/seq2seq/finetune.py:108
↓ 1 callersMethodpad_batch
(token_batch, target_batch, loss_mask_batch, position_id_batch)
blocklm_utils.py:460
↓ 1 callersFunctionparse_args
()
scripts/dispatcher.py:145
↓ 1 callersMethodpet_wrapper
(data)
configure_data.py:56
↓ 1 callersFunctionprep_command_tokens
(tokenlist, token_format=token_format)
data_utils/tokenization.py:150
↓ 1 callersFunctionprep_type_tokens
(tokenlist, token_format=token_format)
data_utils/tokenization.py:186
↓ 1 callersMethodprint_info
(self, info)
data_utils/corpora.py:103
↓ 1 callersMethodprocess
(self)
data_utils/corpora.py:113
↓ 1 callersMethodprocess_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:212
↓ 1 callersFunctionread_context
(tokenizer, args, output)
generate_samples.py:185
↓ 1 callersFunctionremove_articles
(text)
tasks/superglue/evaluate.py:20
↓ 1 callersFunctionremove_duplicate
(l_list, duplicate_rate)
tasks/seq2seq/evaluate.py:144
↓ 1 callersFunctionremove_punc
(text)
tasks/superglue/evaluate.py:26
↓ 1 callersFunctionreport_evaluate_metrics
(summary_writer, prefix, loss, ppl, gpt_loss, bert_loss, sent_loss, multi_loss, step)
pretrain_glm.py:288
↓ 1 callersFunctionreport_memory
Simple GPU memory report.
utils.py:179
↓ 1 callersFunctions3_etag
Check ETag on S3 object.
data_utils/file_utils.py:147
↓ 1 callersFunctions3_get
Pull a file directly from S3.
data_utils/file_utils.py:156
↓ 1 callersFunctionsave_ds_checkpoint
Save a model checkpoint.
utils.py:278
↓ 1 callersMethodsave_json_stream
(self, save_path, json_stream)
data_utils/datasets.py:470
↓ 1 callersFunctionscaled_init_method
Init method based on N(0, sigma/sqrt(2*num_layers).
mpu/transformer.py:593
↓ 1 callersFunctionscatter_to_model_parallel_region
(input_)
mpu/mappings.py:137
↓ 1 callersMethodsegment_string
(article)
data_utils/extraction.py:14
↓ 1 callersFunctionset_deepspeed_activation_checkpointing
(args)
pretrain_glm.py:469
↓ 1 callersMethodset_defaults
(self, **kwargs)
configure_data.py:109
↓ 1 callersMethodset_epoch
(self, epoch)
data_utils/samplers.py:78
↓ 1 callersMethodset_special_tokens
Add a list of additional tokens to the encoder. The additional tokens are indexed starting from the last index of the current
data_utils/tokenization_gpt2.py:172
↓ 1 callersFunctionsetup_model
Setup model and optimizer.
generate_samples.py:36
← previousnext →301–400 of 1,117, ranked by callers