MCPcopy Create free account

hub / github.com/THUDM/GLM / functions

Functions1,117 in github.com/THUDM/GLM

↓ 1 callersFunctionshould_split
given split proportions checks if should split Examples: >>> should_split([10,0,0]) False >>> should_split([1,.1,.2]) True
data_utils/__init__.py:35
↓ 1 callersFunctionsingle_dataset_provider
(split)
tasks/seq2seq/finetune.py:78
↓ 1 callersFunctionsplit_ds
Split a dataset into subsets given proportions of how much to allocate per split. If a split is 0% returns None for that split. Purpose:
data_utils/datasets.py:193
↓ 1 callersMethodsplit_samples
(self, samples, rng)
blocklm_utils.py:283
↓ 1 callersFunctionsplit_strings
Split strings based on string lengths and given start.
data_utils/lazy_loader.py:97
↓ 1 callersFunctionsquad_decode
(example, prediction, tokenizer)
tasks/seq2seq/evaluate.py:218
↓ 1 callersFunctionsquad_fix_tokenization
(text)
tasks/seq2seq/evaluate.py:192
↓ 1 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
model/distributed.py:95
↓ 1 callersMethodstate_dict
(self, destination=None, prefix='', keep_vars=False)
model/downstream.py:15
↓ 1 callersFunctionsupported_corpus
checks if corpus name is defined in `corpora.py`
data_utils/__init__.py:159
↓ 1 callersMethodswitch_linear
(self, args)
learning_rates.py:87
↓ 1 callersFunctiontest_boradcast_data
(model_parallel_size)
mpu/tests/test_data.py:29
↓ 1 callersFunctiontest_column_parallel_linear
(model_parallel_size)
mpu/tests/test_layers.py:187
↓ 1 callersFunctiontest_cross_entropy
(model_parallel_size)
mpu/tests/test_cross_entropy.py:60
↓ 1 callersFunctiontest_cuda_rng_tracker
(model_parallel_size)
mpu/tests/test_random.py:88
↓ 1 callersFunctiontest_get_model_parallel_src_rank
(model_parallel_size_)
mpu/tests/test_initialize.py:65
↓ 1 callersFunctiontest_initialize_affine_weight
(model_parallel_size)
mpu/tests/test_layers.py:109
↓ 1 callersFunctiontest_initialize_model_parallel
(model_parallel_size)
mpu/tests/test_initialize.py:26
↓ 1 callersFunctiontest_model_parallel_cuda_manual_seed
(model_parallel_size)
mpu/tests/test_random.py:159
↓ 1 callersFunctiontest_parallel_embedding
(model_parallel_size)
mpu/tests/test_layers.py:31
↓ 1 callersFunctiontest_parallel_self_attention
(model_parallel_size)
mpu/tests/test_layers.py:361
↓ 1 callersFunctiontest_parallel_transformer_layer
(model_parallel_size)
mpu/tests/test_layers.py:448
↓ 1 callersFunctiontest_row_parallel_linear
(model_parallel_size)
mpu/tests/test_layers.py:254
↓ 1 callersFunctiontest_set_cuda_rng_state
(model_parallel_size)
mpu/tests/test_random.py:26
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary.
model/modeling_bert.py:255
↓ 1 callersMethodto_dict
Serialize this instance to a Python dictionary.
tasks/data_utils.py:71
↓ 1 callersMethodto_json_string
Serializes this instance to a JSON string.
model/modeling_bert.py:260
↓ 1 callersMethodto_json_string
Serialize this instance to a JSON string.
tasks/data_utils.py:76
↓ 1 callersMethodtokenize
Tokenize a string.
data_utils/tokenization_gpt2.py:226
↓ 1 callersMethodtokenizer
(self)
data_utils/datasets.py:310
↓ 1 callersFunctiontorch_cross_entropy
(batch_size, seq_length, vocab_size, logits_scale, seed)
mpu/tests/test_cross_entropy.py:31
↓ 1 callersFunctiontrain
Train the model.
pretrain_glm.py:318
↓ 1 callersMethodtruncate_seq_pair
Truncate sequence pair according to original BERT implementation: https://github.com/google-research/bert/blob/master/create_pretrain
data_utils/datasets.py:1034
↓ 1 callersFunctionupdate_cmd
@param cmd str @param configs list of dicts
scripts/dispatcher.py:128
↓ 1 callersMethodupdate_mems
(self, hiddens, mems, return_memory=False)
mpu/transformer.py:855
↓ 1 callersMethodupdate_scale
(self, overflow)
fp16/loss_scaler.py:49
↓ 1 callersFunctionurl_to_filename
Convert `url` into a hashed filename in a repeatable way. If `etag` is specified, append its hash to the url's, delimited by a period.
data_utils/file_utils.py:40
↓ 1 callersFunctionvocab_parallel_cross_entropy
Helper function for the cross entropy.
mpu/cross_entropy.py:107
↓ 1 callersMethodvocab_range_from_global_vocab_size
(global_vocab_size, rank, world_size)
mpu/utils.py:67
↓ 1 callersMethodvocab_range_from_per_partition_vocab_size
(per_partition_vocab_size, rank, world_size)
mpu/utils.py:60
↓ 1 callersFunctionwhite_space_fix
(text)
tasks/superglue/evaluate.py:23
↓ 1 callersMethodwrite_result
(data, writers)
data_utils/corpora.py:161
↓ 1 callersMethodzero_grad
Zero fp32 and fp16 parameter grads.
fp16/fp16.py:264
MethodDecodeAsTokens
(self, Ids)
data_utils/tokenization.py:1103
MethodDecodeIds
Convert a list or tokenization object of Ids to a text string
data_utils/tokenization.py:537
MethodDecodeIds
converts ascii ids to tokens before joining them into text
data_utils/tokenization.py:601
MethodDecodeIds
converts ids to a text string
data_utils/tokenization.py:771
MethodDecodeIds
converts ids to wordpiece tokens and joins them as a text string
data_utils/tokenization.py:904
MethodDecodeIds
(self, Ids, type_token=False)
data_utils/tokenization.py:1122
MethodDecodeIds
(self, Ids, type_token=False)
data_utils/tokenization.py:1243
MethodDecodeTokens
Convert a list or tokenization object of tokens to a text string
data_utils/tokenization.py:541
MethodDecodeTokens
just concatenates ascii tokens into text
data_utils/tokenization.py:607
MethodDecodeTokens
converts sentencepiece tokens to a text string
data_utils/tokenization.py:777
MethodDecodeTokens
converts wordpiece tokens to a text string
data_utils/tokenization.py:924
MethodDecodeTokens
(self, Tokens, type_token=False)
data_utils/tokenization.py:1129
MethodDecodeTokens
(self, Tokens, type_token=False)
data_utils/tokenization.py:1265
MethodEncodeAsIds
convert text to ascii 256 Ids
data_utils/tokenization.py:575
MethodEncodeAsIds
convert text to sentencepiece Ids
data_utils/tokenization.py:747
MethodEncodeAsIds
(self, text, process_fn=None)
data_utils/tokenization.py:1020
MethodEncodeAsTokens
Preprocess text and encode as tokens. Return a tokenization object with original text, processed text, and token tokenization.
data_utils/tokenization.py:522
MethodEncodeAsTokens
convert text to ascii 256 characters
data_utils/tokenization.py:584
MethodEncodeAsTokens
convert text to sentencepiece tokens
data_utils/tokenization.py:755
MethodEncodeAsTokens
convert wordpiece token to Id
data_utils/tokenization.py:877
MethodEncodeAsTokens
(self, text, process_fn=None)
data_utils/tokenization.py:1091
MethodEncodeAsTokens
(self, text, process_fn=None)
data_utils/tokenization.py:1214
MethodGetTokenizer
(self)
data_utils/datasets.py:99
MethodGetTokenizer
(self)
data_utils/datasets.py:173
MethodGetTokenizer
(self)
data_utils/datasets.py:402
MethodGetTokenizer
(self)
data_utils/lazy_loader.py:196
MethodIdToToken
Convert an Id to Token. Reverse lookup of self.vocab
data_utils/tokenization.py:529
MethodIdToToken
convert Id to sentencpiece token
data_utils/tokenization.py:885
MethodIdToToken
(self, Id, type_token=False)
data_utils/tokenization.py:1224
MethodSetTokenizer
(self, tokenizer)
data_utils/datasets.py:95
MethodSetTokenizer
(self, tokenizer)
data_utils/datasets.py:170
MethodSetTokenizer
logic to set and remove (set to None) tokenizer. combines preprocessing/tokenization into one callable.
data_utils/lazy_loader.py:184
MethodTokenToId
Convert a Token to Id. Lookup of self.vocab
data_utils/tokenization.py:533
MethodTokenToId
convert sentencpiece token to Id
data_utils/tokenization.py:767
MethodTokenToId
convert sentencpiece token to Id
data_utils/tokenization.py:895
MethodTrain
(self, corpus)
data_utils/tokenization.py:564
MethodX
(self)
data_utils/datasets.py:126
MethodX
(self)
data_utils/datasets.py:177
MethodY
(self)
data_utils/datasets.py:134
MethodY
(self)
data_utils/datasets.py:183
Method__call__
(self, name)
utils.py:163
Method__call__
Torch method for processing logits.
generation_utils.py:395
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
generation_utils.py:410
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
generation_utils.py:437
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
generation_utils.py:459
Method__call__
run preprocessing and encode text as Ids
data_utils/tokenization.py:269
Method__call__
(self, text, process_fn=None)
data_utils/tokenization.py:490
Method__call__
(self, string)
data_utils/lazy_loader.py:114
Method__getitem__
(self, idx)
configure_data.py:76
Method__getitem__
(self, idx)
tasks/superglue/dataset.py:97
Method__getitem__
(self, idx)
tasks/superglue/dataset.py:199
Method__getitem__
(self, idx)
tasks/seq2seq/dataset.py:449
Method__getitem__
(self, idx)
tasks/seq2seq/dataset.py:594
Method__getitem__
(self, idx)
tasks/seq2seq/dataset.py:702
Method__getitem__
(self, idx)
tasks/seq2seq/dataset.py:822
Method__getitem__
(self, idx)
tasks/language_model/dataset.py:37
Method__getitem__
(self, idx)
tasks/language_model/dataset.py:109
← previousnext →401–500 of 1,117, ranked by callers