Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/THUDM/GLM
/ functions
Functions
1,117 in github.com/THUDM/GLM
⨍
Functions
1,117
◇
Types & classes
200
↓ 1 callers
Function
generate_samples
(model, tokenizer, args, device)
generate_samples.py:239
↓ 1 callers
Method
get_answers
(self, example: InputExample)
tasks/superglue/pvp.py:369
↓ 1 callers
Method
get_answers
(self, example: InputExample)
tasks/superglue/pvp.py:542
↓ 1 callers
Method
get_classifier_input
(self, example: InputExample, tokenizer)
tasks/superglue/dataset.py:265
↓ 1 callers
Function
get_command
(model, task, n_gpu, config, overwrite=True)
scripts/dispatcher.py:86
↓ 1 callers
Function
get_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 callers
Function
get_data_parallel_rank
Return my rank for the data parallel group.
mpu/initialize.py:125
↓ 1 callers
Function
get_detokenizer
(dataset)
tasks/language_model/detokenizer.py:53
↓ 1 callers
Method
get_dev_examples
Get a collection of `InputExample`s for the dev set.
tasks/superglue/dataset.py:248
↓ 1 callers
Function
get_encoder
(encoder_file, bpe_file)
data_utils/sp_tokenizer.py:130
↓ 1 callers
Function
get_f1
(text_a, text_b)
tasks/seq2seq/evaluate.py:128
↓ 1 callers
Function
get_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 callers
Function
get_full_inputs
(tensors)
mpu/random.py:248
↓ 1 callers
Function
get_hostname
()
utils.py:52
↓ 1 callers
Method
get_labels
(self)
tasks/superglue/dataset.py:547
↓ 1 callers
Method
get_labels
(self)
tasks/superglue/dataset.py:627
↓ 1 callers
Method
get_labels
(self)
tasks/superglue/dataset.py:760
↓ 1 callers
Function
get_learning_rate_scheduler
Build the learning rate scheduler.
train_utils.py:219
↓ 1 callers
Function
get_optimizer
Set up the optimizer.
train_utils.py:175
↓ 1 callers
Function
get_optimizer_param_groups
(model)
train_utils.py:159
↓ 1 callers
Function
get_output_func
(task_name, args)
tasks/superglue/dataset.py:48
↓ 1 callers
Function
get_partition_start
(item)
mpu/random.py:236
↓ 1 callers
Method
get_parts
(self, example: InputExample)
tasks/superglue/pvp.py:553
↓ 1 callers
Function
get_split
Get dataset splits from comma separated string list
configure_data.py:376
↓ 1 callers
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:355
↓ 1 callers
Method
get_tokens
(self, text)
tasks/language_model/dataset.py:96
↓ 1 callers
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:887
↓ 1 callers
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:997
↓ 1 callers
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1033
↓ 1 callers
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1072
↓ 1 callers
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1124
↓ 1 callers
Function
get_train_val_test_data
Load the data on rank zero and boradcast number of tokens to all GPUS.
pretrain_glm.py:520
↓ 1 callers
Method
get_type
get type token corresponding to `name`
data_utils/tokenization.py:281
↓ 1 callers
Method
get_unlabeled_examples
Get a collection of `InputExample`s for the unlabeled set.
tasks/superglue/dataset.py:256
↓ 1 callers
Method
get_verbalizer_ids
(self)
tasks/superglue/pvp.py:372
↓ 1 callers
Method
get_weighted_samples
(self, np_rng)
data_utils/datasets.py:886
↓ 1 callers
Method
get_weighting
(self)
data_utils/datasets.py:875
↓ 1 callers
Method
getidx
(self, idx)
data_utils/datasets.py:535
↓ 1 callers
Method
getidx
(self, data_idx)
data_utils/datasets.py:684
↓ 1 callers
Function
glm_get_params_for_weight_decay_optimization
(module)
model/modeling_glm.py:213
↓ 1 callers
Method
has_overflow
(self, params)
fp16/loss_scaler.py:42
↓ 1 callers
Method
has_overflow_serial
(self, params)
fp16/loss_scaler.py:107
↓ 1 callers
Function
http_get
(url, temp_file)
data_utils/file_utils.py:163
↓ 1 callers
Function
index_in_list
(lst, val, start=None)
blocklm_utils.py:21
↓ 1 callers
Method
init_embedding
(self, word_embeddings=None, task_tokens=None)
model/prompt.py:29
↓ 1 callers
Method
init_indices
(self)
data_utils/datasets.py:515
↓ 1 callers
Method
init_weighting
(self)
data_utils/datasets.py:596
↓ 1 callers
Method
init_weighting
(self)
data_utils/datasets.py:744
↓ 1 callers
Method
is_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 callers
Function
load_attention
(our, oai, dst2src=False)
utils.py:441
↓ 1 callers
Method
load_json_stream
(self, load_path)
data_utils/datasets.py:483
↓ 1 callers
Function
load_mlp
(our, oai, dst2src=False)
utils.py:436
↓ 1 callers
Function
load_pretrained
(model, checkpoint_path, args, task_tokens=None)
train_utils.py:16
↓ 1 callers
Method
load_spm_model
load sentencepiece model and parse vocab
data_utils/tokenization.py:709
↓ 1 callers
Method
load_state_dict
(self, state_dict, strict=True)
model/distributed.py:100
↓ 1 callers
Method
load_state_dict
(self, state_dict, strict=True)
model/downstream.py:20
↓ 1 callers
Function
load_transformer_layer
(our, oai, dst2src=False)
utils.py:446
↓ 1 callers
Function
load_vocab
Loads a vocabulary file into a dictionary.
data_utils/wordpiece.py:50
↓ 1 callers
Function
lower
(text)
tasks/superglue/evaluate.py:30
↓ 1 callers
Function
main
Main training program.
pretrain_glm.py:551
↓ 1 callers
Function
main
Main training program.
generate_samples.py:289
↓ 1 callers
Function
main
()
scripts/dispatcher.py:162
↓ 1 callers
Function
main
(args)
tasks/seq2seq/finetune.py:142
↓ 1 callers
Function
make_loaders
makes training/val/test
configure_data.py:248
↓ 1 callers
Method
make_masked_data
(self, tokens, loss_masks, attention_mask, block_spans, rng, task='bert')
blocklm_utils.py:160
↓ 1 callers
Function
make_tfrecord_loaders
Load train/val/test dataset from shuffled TFRecords
configure_data.py:211
↓ 1 callers
Function
make_tokenizer
Helper function to instantiate a tokenizer given common combinations of options.
data_utils/tokenization.py:35
↓ 1 callers
Method
mask_text
(self, text)
tasks/seq2seq/dataset.py:761
↓ 1 callers
Method
mask_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 callers
Function
model_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 callers
Function
mpi_define_env
(args)
arguments.py:471
↓ 1 callers
Function
mpu_cross_entropy
(batch_size, seq_length, vocab_size, logits_scale, seed)
mpu/tests/test_cross_entropy.py:46
↓ 1 callers
Method
named_parameters
(self, prefix: str = '', recurse: bool = True)
model/downstream.py:23
↓ 1 callers
Function
output_func
(predictions, examples, output_file)
tasks/seq2seq/finetune.py:108
↓ 1 callers
Method
pad_batch
(token_batch, target_batch, loss_mask_batch, position_id_batch)
blocklm_utils.py:460
↓ 1 callers
Function
parse_args
()
scripts/dispatcher.py:145
↓ 1 callers
Method
pet_wrapper
(data)
configure_data.py:56
↓ 1 callers
Function
prep_command_tokens
(tokenlist, token_format=token_format)
data_utils/tokenization.py:150
↓ 1 callers
Function
prep_type_tokens
(tokenlist, token_format=token_format)
data_utils/tokenization.py:186
↓ 1 callers
Method
print_info
(self, info)
data_utils/corpora.py:103
↓ 1 callers
Method
process
(self)
data_utils/corpora.py:113
↓ 1 callers
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:212
↓ 1 callers
Function
read_context
(tokenizer, args, output)
generate_samples.py:185
↓ 1 callers
Function
remove_articles
(text)
tasks/superglue/evaluate.py:20
↓ 1 callers
Function
remove_duplicate
(l_list, duplicate_rate)
tasks/seq2seq/evaluate.py:144
↓ 1 callers
Function
remove_punc
(text)
tasks/superglue/evaluate.py:26
↓ 1 callers
Function
report_evaluate_metrics
(summary_writer, prefix, loss, ppl, gpt_loss, bert_loss, sent_loss, multi_loss, step)
pretrain_glm.py:288
↓ 1 callers
Function
report_memory
Simple GPU memory report.
utils.py:179
↓ 1 callers
Function
s3_etag
Check ETag on S3 object.
data_utils/file_utils.py:147
↓ 1 callers
Function
s3_get
Pull a file directly from S3.
data_utils/file_utils.py:156
↓ 1 callers
Function
save_ds_checkpoint
Save a model checkpoint.
utils.py:278
↓ 1 callers
Method
save_json_stream
(self, save_path, json_stream)
data_utils/datasets.py:470
↓ 1 callers
Function
scaled_init_method
Init method based on N(0, sigma/sqrt(2*num_layers).
mpu/transformer.py:593
↓ 1 callers
Function
scatter_to_model_parallel_region
(input_)
mpu/mappings.py:137
↓ 1 callers
Method
segment_string
(article)
data_utils/extraction.py:14
↓ 1 callers
Function
set_deepspeed_activation_checkpointing
(args)
pretrain_glm.py:469
↓ 1 callers
Method
set_defaults
(self, **kwargs)
configure_data.py:109
↓ 1 callers
Method
set_epoch
(self, epoch)
data_utils/samplers.py:78
↓ 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
data_utils/tokenization_gpt2.py:172
↓ 1 callers
Function
setup_model
Setup model and optimizer.
generate_samples.py:36
← previous
next →
301–400 of 1,117, ranked by callers