MCPcopy Create free account

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

Functions256 in github.com/ant-louis/belgpt2

Functionbuild_model
Build model.
scripts/tools/xlm/model/__init__.py:106
Functioncheck_data_params
Check datasets parameters.
scripts/tools/xlm/data/loader.py:231
Functioncheck_model_params
Check models parameters.
scripts/tools/xlm/model/__init__.py:20
Methodclm_step
Next word prediction step (causal prediction). CLM objective.
scripts/tools/xlm/trainer.py:713
Functioncollate
(examples: List[torch.Tensor])
scripts/tools/run_language_modeling.py:244
Methodend_epoch
End the epoch.
scripts/tools/xlm/trainer.py:645
Methodextra_repr
(self)
scripts/tools/xlm/model/memory/query.py:76
Methodforward
Compute the loss, and optionally the scores.
scripts/tools/xlm/model/transformer.py:128
Methodforward
Self-attention (if kv is None) or attention over source sentence (provided by kv).
scripts/tools/xlm/model/transformer.py:168
Methodforward
(self, input)
scripts/tools/xlm/model/transformer.py:233
Methodforward
Read from the memory.
scripts/tools/xlm/model/memory/memory.py:138
Methodforward
(self, input)
scripts/tools/xlm/model/memory/query.py:72
Methodforward
(self, input)
scripts/tools/xlm/model/memory/query.py:104
Methodforward
Generate queries from hidden states by either repeating them or creating some shuffled version.
scripts/tools/xlm/model/memory/query.py:126
Methodforward
Compute queries using either grouped 1D convolutions or ModuleList + concat.
scripts/tools/xlm/model/memory/query.py:186
Methodforward
(self, input)
scripts/tools/xlm/model/memory/query.py:239
Functiongelu
GELU activation https://arxiv.org/abs/1606.08415 https://github.com/huggingface/pytorch-openai-transformer-lm/blob/master/model_pytorch.p
scripts/tools/xlm/model/transformer.py:73
Functionget_gaussian_keys
Generate random Gaussian keys.
scripts/tools/xlm/model/memory/utils.py:16
Methodget_indices
Generate scores and indices given unnormalized queries.
scripts/tools/xlm/model/memory/memory.py:499
Methodget_indices
Generate scores and indices given unnormalized queries.
scripts/tools/xlm/model/memory/memory.py:616
Methodget_iterator
Return a sentences iterator.
scripts/tools/xlm/data/dataset.py:67
Methodget_iterator
Return a sentences iterator.
scripts/tools/xlm/data/dataset.py:197
Methodget_iterator
Return a sentences iterator.
scripts/tools/xlm/data/dataset.py:365
Functionget_knn_pytorch
Input: - matrix of size (m, d) (keys) - matrix of size (n, d) (queries) - number of nearest neighbors - distance
scripts/tools/xlm/model/memory/utils.py:84
Functionget_uniform_keys
Generate random uniform keys (same initialization as nn.Linear).
scripts/tools/xlm/model/memory/utils.py:27
Functioninit_distributed_mode
Handle single and multi-GPU / multi-node / SLURM jobs. Initialize the following variables: - n_nodes - node_id - loca
scripts/tools/xlm/slurm.py:46
Methodinit_keys
Initialize keys.
scripts/tools/xlm/model/memory/memory.py:416
Methodinit_keys
Initialize keys.
scripts/tools/xlm/model/memory/memory.py:558
Functioninit_signal_handler
Handle signals sent by SLURM for time limit / pre-emption.
scripts/tools/xlm/slurm.py:37
Functioninitialize_exp
Initialize the experience: - dump parameters - create a logger
scripts/tools/xlm/utils.py:47
Methoditer
End of iteration.
scripts/tools/xlm/trainer.py:264
Functionload_data
Load monolingual data. The returned dictionary contains: - dico (dictionary) - vocab (FloatTensor) - train / valid /
scripts/tools/xlm/data/loader.py:330
Methodmlm_step
Masked word prediction step. MLM objective is lang2 is None, TLM objective otherwise.
scripts/tools/xlm/trainer.py:753
Methodmt_step
Machine translation step. Can also be used for denoising auto-encoding.
scripts/tools/xlm/trainer.py:876
Methodpc_step
Parallel classification step. Predict if pairs of sentences are mutual translations of each other.
scripts/tools/xlm/trainer.py:788
Functionread_codepage
Keep only characters belonging to the character set of a language Args: -- text: input text -- code page: for each language. Ex
scripts/tools/clean_text.py:37
Methodregister_args
Register memory parameters
scripts/tools/xlm/model/memory/memory.py:229
Methodreload
Create a sentence embedder from a pretrained model.
scripts/tools/xlm/model/embedder.py:26
Functionreset_time
()
scripts/tools/xlm/logger.py:62
Methodrun
Run GLUE training / evaluation.
scripts/tools/xlm/evaluation/glue.py:68
Methodrun
Run XNLI training / evaluation.
scripts/tools/xlm/evaluation/xnli.py:53
Methodrun
Run training/evaluation
scripts/tools/xlm/evaluation/flue.py:82
Methodrun_all_evals
Run all evaluations.
scripts/tools/xlm/evaluation/evaluator.py:240
Methodsave_best_model
Save best models according to given validation metrics.
scripts/tools/xlm/trainer.py:629
Methodsave_periodic
Save the models periodically.
scripts/tools/xlm/trainer.py:620
Functionsave_weights
(path, model)
scripts/tools/utils.py:4
Methodselect_data
Only select a subset of the dataset.
scripts/tools/xlm/data/dataset.py:52
Functionset_sampling_probs
Set the probability of sampling specific languages / language pairs during training.
scripts/tools/xlm/utils.py:185
Methodshape
projection
scripts/tools/xlm/model/transformer.py:184
Functionshuf_order
Randomize training order.
scripts/tools/xlm/utils.py:254
Functionsig_handler
(signum, frame)
scripts/tools/xlm/slurm.py:20
Methodstep
(self, closure=None)
scripts/tools/xlm/optim.py:135
Methodstep
(self, closure=None)
scripts/tools/xlm/optim.py:204
Functionterm_handler
(signum, frame)
scripts/tools/xlm/slurm.py:32
Methodtrain
(self)
scripts/tools/xlm/model/embedder.py:72
Methodunshape
compute context
scripts/tools/xlm/model/transformer.py:188
← previous201–256 of 256, ranked by callers