MCPcopy Create free account

hub / github.com/ant-louis/belgpt2 / functions

Functions256 in github.com/ant-louis/belgpt2

↓ 1 callersMethodindex_data
Index sentences with a dictionary.
scripts/tools/xlm/data/dictionary.py:166
↓ 1 callersMethodinit_amp
Initialize AMP optimizer.
scripts/tools/xlm/trainer.py:197
↓ 1 callersMethodinit_keys
(self)
scripts/tools/xlm/model/memory/memory.py:219
↓ 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
scripts/tools/xlm/model/transformer.py:773
↓ 1 callersFunctionload_bin_embeddings
Reload pretrained embeddings from a fastText binary file.
scripts/tools/xlm/model/pretrain.py:69
↓ 1 callersMethodload_data
Load pair regression/classification bi-sentence tasks
scripts/tools/xlm/evaluation/glue.py:265
↓ 1 callersMethodload_data
Load XNLI cross-lingual classification data.
scripts/tools/xlm/evaluation/xnli.py:214
↓ 1 callersMethodload_data
Load pair regression/classification bi-sentence tasks
scripts/tools/xlm/evaluation/flue.py:325
↓ 1 callersFunctionload_fasttext_model
Load a binarized fastText model.
scripts/tools/xlm/model/pretrain.py:17
↓ 1 callersFunctionload_model
Loads the saved model from disk if the directory exists. Otherwise it will download the model and tokenizer from hugging face. Returns
scripts/tools/generate_text.py:21
↓ 1 callersFunctionload_mono_data
Load monolingual data.
scripts/tools/xlm/data/loader.py:105
↓ 1 callersFunctionload_para_data
Load parallel data.
scripts/tools/xlm/data/loader.py:168
↓ 1 callersFunctionmain
scripts/tools/generate_text.py:64
↓ 1 callersFunctionmain
scripts/tools/merge_files.py:30
↓ 1 callersFunctionmain
()
scripts/tools/gutenberg_downloader.py:219
↓ 1 callersFunctionmain
()
scripts/tools/run_language_modeling.py:500
↓ 1 callersFunctionmain
scripts/tools/learn_bpe.py:40
↓ 1 callersFunctionmain_gutenberg_cleaner
()
scripts/tools/gutenberg_cleaner.py:283
↓ 1 callersMethodmask_out
Decide of random words to mask out, and what target they get assigned.
scripts/tools/xlm/trainer.py:446
↓ 1 callersMethodmask_out
Decide of random words to mask out. We specify the random generator to ensure that the test is the same at each epoch.
scripts/tools/xlm/evaluation/evaluator.py:210
↓ 1 callersMethodmax_vocab
Limit the vocabulary size.
scripts/tools/xlm/data/dictionary.py:98
↓ 1 callersMethodmin_count
Threshold on the word frequency counts.
scripts/tools/xlm/data/dictionary.py:111
↓ 1 callersFunctionnormalize_unicode
Normalize unicode underlying representation
scripts/tools/clean_text.py:28
↓ 1 callersFunctionparse_arguments
Parser.
scripts/tools/generate_text.py:7
↓ 1 callersFunctionparse_arguments
Parser.
scripts/tools/merge_files.py:6
↓ 1 callersFunctionparse_arguments
()
scripts/tools/learn_bpe.py:10
↓ 1 callersFunctionparse_lambda_config
Parse the configuration of lambda coefficient (for scheduling). x = "3" # lambda will be a constant equal to x x = "0:1,
scripts/tools/xlm/utils.py:138
↓ 1 callersMethodpredict
Given the last hidden state, compute word scores and/or the loss. `pred_mask` is a ByteTensor of shape (slen, bs), filled with 1
scripts/tools/xlm/model/transformer.py:465
↓ 1 callersMethodprint_stats
Print statistics about the training.
scripts/tools/xlm/trainer.py:273
↓ 1 callersFunctionprocess_binarized
Process a binarized dataset and log main statistics.
scripts/tools/xlm/data/loader.py:20
↓ 1 callersFunctionprocess_url_html
Remove URLs in text
scripts/tools/clean_text.py:63
↓ 1 callersFunctionread_txt_embeddings
Reload pretrained embeddings from a text file.
scripts/tools/xlm/model/pretrain.py:29
↓ 1 callersMethodread_vocab
Create a dictionary from a vocabulary file.
scripts/tools/xlm/data/dictionary.py:125
↓ 1 callersMethodreload_checkpoint
Reload a checkpoint if we find one.
scripts/tools/xlm/trainer.py:560
↓ 1 callersMethodremove_empty_sentences
Remove empty sentences.
scripts/tools/xlm/data/dataset.py:135
↓ 1 callersMethodremove_long_sentences
Remove sentences exceeding a certain length.
scripts/tools/xlm/data/dataset.py:147
↓ 1 callersMethodremove_long_sentences
Remove sentences exceeding a certain length.
scripts/tools/xlm/data/dataset.py:305
↓ 1 callersFunctionrm_spaces
Remove multiple spaces
scripts/tools/clean_text.py:53
↓ 1 callersFunctionrun_cleaner
()
scripts/tools/clean_text.py:101
↓ 1 callersFunctionsave_to_json
Save clean txt files to json format
scripts/tools/gutenberg_cleaner.py:231
↓ 1 callersFunctionsave_to_txt
Clean txt files in indir and save clean file to output directory
scripts/tools/gutenberg_cleaner.py:183
↓ 1 callersMethodselect_data
Only select a subset of the dataset.
scripts/tools/xlm/data/dataset.py:323
↓ 1 callersMethodset_optimizers
Set optimizers.
scripts/tools/xlm/trainer.py:180
↓ 1 callersMethodset_parameters
Set parameters.
scripts/tools/xlm/trainer.py:157
↓ 1 callersFunctionsix_ensure_text
(s, encoding='utf-8', errors='strict')
scripts/tools/clean_text.py:17
↓ 1 callersFunctionsplit_sentences
Split text into 1 sentence per line
scripts/tools/split_sentences.py:11
↓ 1 callersFunctionswig_ptr_from_LongTensor
(x)
scripts/tools/xlm/model/memory/utils.py:78
↓ 1 callersFunctiontrain
Train the model
scripts/tools/run_language_modeling.py:237
↓ 1 callersMethodtrain
Finetune for one epoch on the XNLI English training set.
scripts/tools/xlm/evaluation/xnli.py:96
↓ 1 callersMethodtrain
Finetune for one epoch on the training set.
scripts/tools/xlm/evaluation/flue.py:164
↓ 1 callersFunctionupdate_lambdas
Update all lambda coefficients.
scripts/tools/xlm/utils.py:175
↓ 1 callersMethodword_blank
Randomly blank input words.
scripts/tools/xlm/trainer.py:408
↓ 1 callersMethodword_dropout
Randomly drop input words.
scripts/tools/xlm/trainer.py:373
↓ 1 callersMethodword_shuffle
Randomly shuffle input words.
scripts/tools/xlm/trainer.py:352
Method__contains__
Returns whether a word is in the dictionary.
scripts/tools/xlm/data/dictionary.py:54
Method__eq__
Compare this dictionary with another one.
scripts/tools/xlm/data/dictionary.py:60
Method__getitem__
(self, item)
scripts/tools/run_language_modeling.py:113
Method__getitem__
(self, i)
scripts/tools/run_language_modeling.py:133
Method__getitem__
Returns the word of the specified index.
scripts/tools/xlm/data/dictionary.py:48
Method__init__
(self, tokenizer: PreTrainedTokenizer, args, file_path: str, block_size=512)
scripts/tools/run_language_modeling.py:70
Method__init__
(self, tokenizer: PreTrainedTokenizer, args, file_path: str, block_size=512)
scripts/tools/run_language_modeling.py:118
Method__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, warmup_updates=4000, wa
scripts/tools/xlm/optim.py:104
Method__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, warmup_updates=4000, wa
scripts/tools/xlm/optim.py:158
Method__init__
(self, *args, **kwargs)
scripts/tools/xlm/utils.py:30
Method__init__
(self)
scripts/tools/xlm/logger.py:15
Method__init__
(self, model, data, params)
scripts/tools/xlm/trainer.py:846
Method__init__
(self, encoder, decoder, data, params)
scripts/tools/xlm/trainer.py:864
Method__init__
(self, n_heads, dim, dropout)
scripts/tools/xlm/model/transformer.py:155
Method__init__
(self, in_dim, dim_hidden, out_dim, dropout, gelu_activation)
scripts/tools/xlm/model/transformer.py:226
Method__init__
Transformer model (encoder or decoder).
scripts/tools/xlm/model/transformer.py:245
Method__init__
Initialize n-best list of hypotheses.
scripts/tools/xlm/model/transformer.py:742
Method__init__
Wrapper on top of the different sentence embedders. Returns sequence-wise or single-vector sentence representations.
scripts/tools/xlm/model/embedder.py:60
Method__init__
(self, input_dim, output_dim, params)
scripts/tools/xlm/model/memory/memory.py:411
Method__init__
(self, input_dim, output_dim, params)
scripts/tools/xlm/model/memory/memory.py:520
Method__init__
(self, input_dim, output_dim, params)
scripts/tools/xlm/model/memory/memory.py:637
Method__init__
(self, in_features, out_features, bias=True, groups=1)
scripts/tools/xlm/model/memory/query.py:61
Method__init__
(self, input_channels, output_channels, kernel_size, bias=True, batchnorm=True, groups=1)
scripts/tools/xlm/model/memory/query.py:84
Method__init__
(self, input_dim, heads, shuffle_hidden)
scripts/tools/xlm/model/memory/query.py:116
Method__init__
( self, input_dim, heads, k_dim, product_quantization, multi_query_net, sizes, kernel_sizes, b
scripts/tools/xlm/model/memory/query.py:206
Method__init__
(self, id2word, word2id, counts)
scripts/tools/xlm/data/dictionary.py:31
Method__init__
Prepare batches for data iterator.
scripts/tools/xlm/data/dataset.py:19
Method__init__
(self, sent, pos, params)
scripts/tools/xlm/data/dataset.py:82
Method__init__
(self, sent1, pos1, sent2, pos2, params)
scripts/tools/xlm/data/dataset.py:246
Method__init__
Build language model evaluator.
scripts/tools/xlm/evaluation/evaluator.py:450
Method__init__
Build encoder / decoder evaluator.
scripts/tools/xlm/evaluation/evaluator.py:463
Method__init__
Initialize GLUE trainer / evaluator. Initial `embedder` should be on CPU to save memory.
scripts/tools/xlm/evaluation/glue.py:49
Method__init__
Initialize XNLI trainer / evaluator. Initial `embedder` should be on CPU to save memory.
scripts/tools/xlm/evaluation/xnli.py:33
Method__init__
(self, embedder, scores, params)
scripts/tools/xlm/evaluation/flue.py:42
Method__len__
(self)
scripts/tools/run_language_modeling.py:110
Method__len__
(self)
scripts/tools/run_language_modeling.py:130
Method__len__
Number of hypotheses in the list.
scripts/tools/xlm/model/transformer.py:753
Method__len__
Returns the number of words in the dictionary.
scripts/tools/xlm/data/dictionary.py:42
Method__len__
Number of sentences in the dataset.
scripts/tools/xlm/data/dataset.py:46
Method__len__
Number of sentences in the dataset.
scripts/tools/xlm/data/dataset.py:103
Method__len__
Number of sentences in the dataset.
scripts/tools/xlm/data/dataset.py:271
Method__setstate__
(self, state)
scripts/tools/xlm/optim.py:42
Method_get_indices
(self, query, knn, keys)
scripts/tools/xlm/model/memory/memory.py:222
Method_get_indices
Generate scores and indices given keys and unnormalized queries.
scripts/tools/xlm/model/memory/memory.py:640
Functionbool_flag
Parse boolean arguments from the command line.
scripts/tools/xlm/utils.py:35
Methodbt_step
Back-translation step for machine translation.
scripts/tools/xlm/trainer.py:930
← previousnext →101–200 of 256, ranked by callers