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
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:365
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:704
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:893
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:925
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:990
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1003
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1039
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1078
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1108
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1130
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1168
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1339
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1364
Method
get_test_examples
(self, data_dir)
tasks/superglue/dataset.py:1405
Method
get_text_len
(self, idx)
data_utils/corpora.py:47
Method
get_text_len
(self, idx)
data_utils/corpora.py:77
Method
get_text_len
(self, idx)
data_utils/datasets.py:87
Method
get_token_count
(contents)
data_utils/corpora.py:165
Method
get_tokenized_input
(self, item, key)
tasks/superglue/dataset.py:84
Method
get_train_examples
Get a collection of `InputExample`s for the train set.
tasks/superglue/dataset.py:243
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:297
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:362
Method
get_train_examples
(self, data_dir, cloze_eval=True)
tasks/superglue/dataset.py:415
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:698
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:919
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1162
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1281
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1333
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1358
Method
get_train_examples
(self, data_dir)
tasks/superglue/dataset.py:1399
Function
get_two_batch
(data, args)
pretrain_glm.py:112
Method
get_unlabeled_examples
(self, data_dir)
tasks/superglue/dataset.py:312
Method
get_unlabeled_examples
(self, data_dir)
tasks/superglue/dataset.py:896
Method
get_unlabeled_examples
(self, data_dir)
tasks/superglue/dataset.py:1006
Method
get_unlabeled_examples
(self, data_dir)
tasks/superglue/dataset.py:1042
Method
get_unlabeled_examples
(self, data_dir)
tasks/superglue/dataset.py:1081
Method
get_unlabeled_examples
(self, data_dir)
tasks/superglue/dataset.py:1133
Function
gigaword_detokenize
(string, is_target=False)
tasks/seq2seq/dataset.py:15
Function
half_conversion
(val)
fp16/fp16.py:42
Method
has_overflow
(self, params)
fp16/loss_scaler.py:114
Function
init_
(tensor)
model/modeling_bert.py:43
Function
init_
(tensor)
model/modeling_glm.py:34
Function
init_
(tensor)
mpu/transformer.py:587
Method
init_bert_weights
Initialize the weights.
model/modeling_bert.py:704
Function
initialize_model_parallel
Initialize model data parallel groups. Arguments: model_parallel_size: number of GPUs used to parallelize model. Let's say we h
mpu/initialize.py:30
Method
insert
(self, idx, other)
data_utils/tokenization.py:99
Method
inspect_master_grad_data
When running with :class:`FP16_Optimizer`, ``.grad`` attributes of a model's fp16 leaves should not be regarded as truthful,
fp16/fp16.py:581
Method
is_done
(self)
generation_utils.py:204
Method
is_multi_token
(self)
tasks/superglue/pvp.py:77
Method
is_multi_token
(self)
tasks/superglue/pvp.py:424
Method
is_multi_token
(self)
tasks/superglue/pvp.py:535
Method
is_multi_token
(self)
tasks/superglue/pvp.py:648
Method
is_multi_token
(self)
tasks/superglue/pvp.py:669
Method
is_multi_token
(self)
tasks/superglue/pvp.py:1269
Method
is_multi_token
(self)
tasks/superglue/pvp.py:1343
Method
is_within_directory
(directory, target)
model/modeling_bert.py:773
Function
lambada_detokenizer
(string)
tasks/language_model/detokenizer.py:49
Method
lens
(self)
data_utils/datasets.py:114
Method
load_examples
Load a set of input examples from a file
tasks/data_utils.py:81
Method
load_state_dict
(self, sd)
learning_rates.py:77
Method
load_state_dict
(self, state_dict, strict=True)
model/distributed.py:34
Method
load_state_dict
(self, state_dict, strict=True)
model/downstream.py:125
Method
load_state_dict
Loads a state_dict created by an earlier call to state_dict(). If ``fp16_optimizer_instance`` was constructed from some ``init_optim
fp16/fp16.py:369
Function
load_tf_weights_in_bert
Load tf checkpoints in a pytorch model
model/modeling_bert.py:90
Method
loss_scale
(self)
fp16/loss_scaler.py:53
Method
loss_scale
(self)
fp16/loss_scaler.py:175
Function
lru_cache
()
data_utils/tokenization_gpt2.py:31
Function
main
()
test/test_block.py:18
Function
main
(args)
tasks/superglue/finetune.py:83
Function
main
Main program.
tasks/language_model/finetune.py:228
Function
make_dataset
function to create datasets+tokenizers for common options
data_utils/__init__.py:164
Method
mask
Return the underlying LM's mask token
tasks/superglue/pvp.py:85
Method
mask
Return the underlying LM's mask token
tasks/superglue/pvp.py:432
Method
mask_id
Return the underlying LM's mask id
tasks/superglue/pvp.py:90
Method
mask_id
Return the underlying LM's mask id
tasks/superglue/pvp.py:438
Method
max_num_verbalizers
Return the maximum number of verbalizers across all labels
tasks/superglue/pvp.py:95
Function
metrics_func
(model, epoch, output_predictions=False, summary_writer=None)
tasks/eval_utils.py:77
Function
metrics_func
(model, epoch, output_predictions=False, summary_writer=None)
tasks/language_model/finetune.py:220
Function
metrics_func_provider
Privde metrics callback function.
tasks/superglue/finetune.py:64
Function
metrics_func_provider
Provide metrics callback function.
tasks/seq2seq/finetune.py:75
Function
metrics_func_provider
Privde metrics callback function.
tasks/language_model/finetune.py:202
Function
mix_forward_step
(batch_and_dataloader, model, args, times, mems)
finetune_glm.py:65
Function
model_parallel_cuda_manual_seed
Initialize model parallel cuda seed. This function should be called after the model parallel is initialized. Also, no torch.cuda.manual_seed
mpu/random.py:198
Function
model_parallel_is_initialized
Check if model and data parallel groups are initialized.
mpu/initialize.py:81
Function
move_weights
Loads weights from `oai` to `our` via in place copy. `oai` is a huggingface gpt2model, while `our` is one of our models. dst2src=True loa
utils.py:453
Function
multichoice_evaluate
Calculate correct over total answers and return prediction if the `output_predictions` is true.
tasks/eval_utils.py:120
Function
multirc_em
Compute the exact match (EM) for a sequence of predictions and actual labels
tasks/superglue/evaluate.py:104
Function
my_collate
(batch)
tasks/data_utils.py:310
Method
named_parameters
(self, prefix: str = '', recurse: bool = True)
model/distributed.py:27
Method
named_parameters
(self, prefix: str = '', recurse: bool = True)
model/downstream.py:128
Function
network_to_half
Convert model to half precision in a batchnorm-safe way. Retained for legacy purposes. It is recommended to use FP16Model.
fp16/fp16util.py:52
Method
num_samples
(self)
data_utils/samplers.py:56
Method
out_stream
()
data_utils/datasets.py:463
Method
output_prediction
(self, predictions, examples, output_file)
tasks/superglue/dataset.py:231
Method
output_prediction
(self, predictions, examples, output_file)
tasks/superglue/dataset.py:666
Method
output_prediction
(self, predictions, examples, output_file)
tasks/superglue/dataset.py:763
Method
output_prediction
(self, predictions, examples, output_file)
tasks/superglue/dataset.py:928
Method
output_prediction
(self, predictions, examples, output_file)
tasks/superglue/dataset.py:1311
Method
pad_seq
(self, seq, pad_id=None)
data_utils/datasets.py:691
Method
pad_to
(text, max_len, pad_id)
tasks/seq2seq/dataset.py:603
← previous
next →
901–1,000 of 1,117, ranked by callers