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
Method
pad_to
(text, max_len, pad_id)
tasks/seq2seq/dataset.py:714
Function
partition_activations_in_checkpoint
(partition_activation)
mpu/random.py:380
Function
prep_param_lists
Creates a list of FP32 master parameters for a given model, as in `Training Neural Networks with Mixed Precision: Real Examples`_. Args
fp16/fp16util.py:105
Method
print_info
(self, info)
data_utils/corpora.py:425
Function
print_masked_text
(batch_id)
pretrain_glm.py:226
Function
print_masked_text
(batch_id)
tasks/language_model/finetune.py:60
Function
print_params_min_max_norm
Print min, max, and norm of all parameters.
utils.py:93
Method
process
( self, input_ids: torch.LongTensor, next_scores: torch.FloatTensor,
generation_utils.py:119
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:183
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:263
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:296
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:325
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:345
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:355
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:371
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:386
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:408
Method
process_line
(self, data, tokenizer, tokenize)
data_utils/corpora.py:473
Method
process_line
(self, item, tokenizer, tokenize)
data_utils/corpora.py:497
Function
ptb_detokenizer
(string)
tasks/language_model/detokenizer.py:4
Function
qa_evaluate
(predictions, labels, examples: List[InputExample], metric)
tasks/superglue/evaluate.py:63
Method
read_input_to_queue
()
data_utils/corpora.py:129
Function
read_set_from_file
Extract a de-duped collection (set) of text from a file. Expected file format is one item per line.
data_utils/file_utils.py:235
Function
rindex
(lst, val, start=None)
blocklm_utils.py:12
Function
rouge_metric
(predictions, labels, examples, metric="rouge-1", duplicate_rate=0.7, dataset='cnn_dm')
tasks/seq2seq/evaluate.py:156
Function
s3_request
Wrapper function for s3 requests in order to create more helpful error messages.
data_utils/file_utils.py:127
Method
safe_extract
(tar, path=".", members=None, *, numeric_owner=False)
model/modeling_bert.py:782
Method
save_examples
Save a set of input examples to a file
tasks/data_utils.py:87
Function
save_on_exit
(args_, model_, optimizer_, lr_scheduler_)
pretrain_glm.py:644
Method
save_vocabulary
Save the tokenizer vocabulary and merge files to a directory.
data_utils/tokenization_gpt2.py:277
Function
save_zero_checkpoint
(args, iteration, optimizer)
utils.py:215
Method
scale_gradient
(self, module, grad_in, grad_out)
fp16/loss_scaler.py:56
Method
scale_gradient
(self, module, grad_in, grad_out)
fp16/loss_scaler.py:178
Function
see_memory_usage
(message, force=False)
train_utils.py:310
Function
see_memory_usage
(message, force=False)
mpu/random.py:35
Function
seq2seq_forward_step
Forward step.
tasks/seq2seq/finetune.py:32
Function
single_dataset_provider
(split)
tasks/superglue/finetune.py:67
Method
spell_length
(self)
tasks/superglue/pvp.py:81
Method
spell_length
(self)
tasks/superglue/pvp.py:428
Method
spell_length
(self)
tasks/superglue/pvp.py:539
Method
spell_length
(self)
tasks/superglue/pvp.py:717
Method
spell_length
(self)
tasks/superglue/pvp.py:793
Method
spell_length
(self)
tasks/superglue/pvp.py:832
Method
spell_length
(self)
tasks/superglue/pvp.py:879
Method
spell_length
(self)
tasks/superglue/pvp.py:1298
Method
split_on_token
(tok_extended: CommandToken, text)
data_utils/tokenization.py:333
Method
split_on_token
(tok_extended: CommandToken, text)
data_utils/tokenization.py:1025
Method
split_on_tokens
(tok_list, text)
data_utils/tokenization.py:364
Method
split_on_tokens
(tok_list, text)
data_utils/tokenization.py:1056
Function
squad_evaluate
(predictions, labels, examples, metric)
tasks/superglue/evaluate.py:75
Method
state_dict
(self)
learning_rates.py:66
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
model/distributed.py:30
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
model/downstream.py:120
Method
state_dict
Returns a dict containing the current state of this :class:`FP16_Optimizer` instance. This dict contains attributes of :class:`FP16_O
fp16/fp16.py:348
Method
sub_finder
(mylist, pattern)
tasks/seq2seq/dataset.py:473
Function
swish
(x)
model/modeling_bert.py:159
Method
text_token_vocab
dictionary mapping text tokens to ids for text tokenizer
data_utils/tokenization.py:321
Method
text_tokens
list (or iterable) of text tokens for text tokenizer
data_utils/tokenization.py:316
Function
to_python_float
(t)
fp16/fp16util.py:191
Function
to_python_float
(t)
fp16/loss_scaler.py:20
Method
token_type_vocab
dictionary mapping token types to ids for tokenizer
data_utils/tokenization.py:301
Method
token_types
list (or iterable) of all token types for tokenizer
data_utils/tokenization.py:296
Method
tokenize
(self, text)
data_utils/sp_tokenizer.py:117
Method
tokenize
(self, text)
data_utils/wordpiece.py:107
Method
tokenize
Tokenizes a piece of text.
data_utils/wordpiece.py:190
Method
tokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the gi
data_utils/wordpiece.py:301
Method
tokenize_worker
(self, input, output, info, tokenizer, tokenize)
data_utils/corpora.py:100
Method
tokenize_worker
(self, input, output, info, tokenizer, tokenize)
data_utils/corpora.py:190
Method
tokenize_worker
(self, input, output, info, tokenizer, tokenize)
data_utils/corpora.py:233
Method
tokenize_worker
(self, input, output, info, tokenizer, tokenize)
data_utils/corpora.py:436
Method
tokenizer
(self)
data_utils/datasets.py:406
Method
tokens
list (or iterable) of all tokens for tokenizer
data_utils/tokenization.py:286
Method
tokens
list (or iterable) of text tokens for text tokenizer
data_utils/tokenization.py:497
Method
tokens
(self)
data_utils/tokenization.py:568
Method
tokens
(self)
data_utils/tokenization.py:691
Function
train_valid_datasets_provider
Provide train and validation datasets.
tasks/superglue/finetune.py:52
Method
update_scale
(self, overflow)
fp16/loss_scaler.py:148
Method
uppercase_first
Lowercase the first character
tasks/superglue/pvp.py:119
Method
variable_num_choices
(self)
tasks/superglue/dataset.py:239
Method
variable_num_choices
(self)
tasks/superglue/dataset.py:412
Method
variable_num_choices
(self)
tasks/superglue/dataset.py:692
Method
variable_num_choices
(self)
tasks/superglue/dataset.py:757
Method
verbalize
(self, label)
tasks/superglue/pvp.py:474
Method
verbalize
(self, label)
tasks/superglue/pvp.py:642
Method
verbalize
(self, label)
tasks/superglue/pvp.py:663
Method
verbalize
(self, label)
tasks/superglue/pvp.py:702
Method
verbalize
(self, label)
tasks/superglue/pvp.py:744
Method
verbalize
(self, label)
tasks/superglue/pvp.py:771
Method
verbalize
(self, label)
tasks/superglue/pvp.py:814
Method
verbalize
(self, label)
tasks/superglue/pvp.py:858
Method
verbalize
(self, label)
tasks/superglue/pvp.py:901
Method
verbalize
(self, label)
tasks/superglue/pvp.py:939
Method
verbalize
(self, label)
tasks/superglue/pvp.py:981
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1010
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1044
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1070
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1099
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1112
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1137
Method
verbalize
(self, label)
tasks/superglue/pvp.py:1164
← previous
next →
1,001–1,100 of 1,117, ranked by callers