MCPcopy Create free account

hub / github.com/FLC777/GLAT / functions

Functions3,098 in github.com/FLC777/GLAT

Functionaggregate
Context manager to aggregate metrics under a given name. Aggregations can be nested. If *new_root* is ``False``, then logged metrics will be
fairseq/logging/metrics.py:46
Methodaggregate_logging_outputs
(logging_outputs)
fairseq/criterions/composite_loss.py:91
Functionalign_bpe_to_words
Helper to align GPT-2 BPE to other tokenization formats (e.g., spaCy). Args: roberta (RobertaHubInterface): RoBERTa instance
fairseq/models/roberta/alignment_utils.py:12
Functionalign_features_to_words
Align given features to words. Args: roberta (RobertaHubInterface): RoBERTa instance features (torch.Tensor): features to al
fairseq/models/roberta/alignment_utils.py:71
Functionall_gather
Perform an all-gather operation.
fairseq/distributed/utils.py:532
Functionall_gather_list
Gathers arbitrary data from all nodes into a list. Similar to :func:`~torch.distributed.all_gather` but for arbitrary Python data. Note that
fairseq/distributed/utils.py:555
Functionall_reduce_dict
AllReduce a dictionary of values across workers. We separately reduce items that are already on the device and items on CPU for better pe
fairseq/distributed/utils.py:628
Methodall_reduce_grads
(self)
fairseq/distributed/tpu_distributed_data_parallel.py:23
Methodall_reduce_grads
This function must be called explicitly after backward to reduce gradients. There is no automatic hook like c10d.
fairseq/distributed/legacy_distributed_data_parallel.py:76
Methodall_reduce_grads
Manually all-reduce gradients (if required).
fairseq/optim/fairseq_optimizer.py:97
Methodall_reduce_grads
(self, module)
fairseq/optim/fp16_optimizer.py:533
Methodall_reduce_params
(params)
fairseq/distributed/legacy_distributed_data_parallel.py:82
Functionall_to_all
Perform an all-to-all operation on a 1D Tensor.
fairseq/distributed/utils.py:512
Methodallow_ensemble
(self)
fairseq/models/nat/fairseq_nat_model.py:114
Methodallow_length_beam
(self)
fairseq/models/nat/nonautoregressive_transformer.py:47
Methodallow_length_beam
(self)
fairseq/models/nat/fairseq_nat_model.py:110
Methodallow_length_beam
(self)
glat_plugins/models/glat_ctc.py:44
Methodallow_length_beam
(self)
glat_plugins/models/glat.py:44
Methodapply_bfloat16
(t)
fairseq/trainer.py:976
Methodapply_half
(t)
fairseq/trainer.py:971
Methodapply_make_generation_fast_
(module, prefix)
fairseq/models/fairseq_model.py:185
Methodapply_mask
Return the source and target datasets for masked LM training.
fairseq/data/mask_tokens_dataset.py:49
Methodapply_prepare_for_onnx_export_
(module)
fairseq/models/fairseq_model.py:215
Methodapply_remove_weight_norm
(module)
fairseq/models/fairseq_model.py:177
Methodapply_set_beam_size
(module)
fairseq/models/fairseq_incremental_decoder.py:108
Methodapply_sparse_mask
(self, attn_weights, tgt_len, src_len, bsz)
fairseq/modules/sparse_multihead_attention.py:135
Methodassign
Assigns each column of W to its closest centroid, thus essentially performing the E-step in train(). Remarks: -
fairseq/modules/quantization/pq/em.py:164
Methodattr
(self, attr: str, index: int)
fairseq/data/fairseq_dataset.py:80
Methodattr
(self, attr: str, index: int)
fairseq/data/token_block_dataset.py:124
Methodattr
(self, attr: str, index: int)
fairseq/data/base_wrapper_dataset.py:45
Methodattr
(self, attr: str, index: int)
fairseq/data/concat_dataset.py:67
Methodaudio_root
Audio paths in the manifest TSV can be relative and this provides the root path. Set this to empty string when using absolute paths.
fairseq/data/audio/speech_to_text_dataset.py:103
Methodaverage_params
(self)
fairseq/optim/fairseq_optimizer.py:163
Methodaverage_params
Reduce Params is only used during BMUF distributed training.
fairseq/optim/adam.py:85
Methodavg
(self)
fairseq/logging/meters.py:101
Methodavg
(self)
fairseq/logging/meters.py:150
Methodavg
(self)
fairseq/logging/meters.py:204
Methodbacktranslate_fn
( sample, model=model.models[key], bos_token=decod
fairseq/tasks/semisupervised_translation.py:382
Methodbackward
(ctx, *args)
fairseq/modules/checkpoint_activations.py:174
Methodbackward
(ctx, grad)
fairseq/modules/grad_multiply.py:17
Methodbackward
(ctx, grad_output)
fairseq/modules/lightconv_layer/lightconv_layer.py:26
Methodbackward
(ctx, grad_output)
fairseq/modules/dynamicconv_layer/dynamicconv_layer.py:27
Methodbackward
Computes the sum of gradients of the given tensor w.r.t. graph leaves.
fairseq/optim/fairseq_optimizer.py:93
Methodbackward
Computes the sum of gradients of the given tensor w.r.t. graph leaves. Compared to :func:`fairseq.optim.FairseqOptimizer.backward`, this
fairseq/optim/fp16_optimizer.py:376
Methodbank
(self)
fairseq/token_generation_constraints.py:258
Methodbank
(self)
fairseq/token_generation_constraints.py:431
Functionbase_architecture
(args)
fairseq/benchmark/dummy_model.py:95
Functionbase_architecture
(args)
fairseq/models/transformer_from_pretrained_xlm.py:151
Functionbase_architecture2
(args)
glat_plugins/models/glat_ctc.py:334
Functionbase_architecture2
(args)
glat_plugins/models/glat.py:225
Functionbatch_by_size
Yield mini-batches of indices bucketed by size. Batches may contain sequences of different lengths. Args: indices (List[int]): o
fairseq/data/data_utils.py:272
Methodbatch_by_size
( self, indices, max_tokens=None, max_sentences=None, required_batch_s
fairseq/data/multi_corpus_dataset.py:180
Methodbatch_by_size
( self, indices, max_tokens=None, max_sentences=None, required_batch_s
fairseq/data/base_wrapper_dataset.py:54
Methodbatch_for_softmax
(dec_out, target)
fairseq/sequence_scorer.py:39
Methodbegin_epoch
Called at the beginning of each epoch (epochs start at 1).
fairseq/quantization_utils.py:104
Methodbegin_epoch
Hook function called before the start of each epoch.
fairseq/tasks/fairseq_task.py:504
Methodbegin_valid_epoch
Hook function called before the start of each validation epoch.
fairseq/tasks/fairseq_task.py:508
Functionberard_256_3_3
Used in * "Harnessing Indirect Training Data for End-to-End Automatic Speech Translation: Tricks of the Trade" (https://arxiv.org/abs/1909.065
fairseq/models/speech_to_text/berard.py:570
Functionberard_512_3_2
(args)
fairseq/models/speech_to_text/berard.py:584
Functionberard_512_5_3
(args)
fairseq/models/speech_to_text/berard.py:597
Functionbert_large_architecture
(args)
fairseq/models/masked_lm.py:372
Methodbhook_fn
(self, module, inp, output)
fairseq/nan_detector.py:102
Functionbinarize
(args, filename, vocab, output_prefix, lang, offset, end, append_eos=True)
fairseq_cli/preprocess.py:336
Functionbinarize_alignments
(args, filename, parse_alignment, output_prefix, offset, end)
fairseq_cli/preprocess.py:353
Functionbleu_add
fairseq/clib/libbleu/libbleu.cpp:124
Functionbleu_one_init
fairseq/clib/libbleu/libbleu.cpp:109
Methodblock
(input_dim, output_dim)
fairseq/modules/gumbel_vector_quantizer.py:60
Methodblock
( n_in, n_out, k, stride, is_layer_norm=False,
fairseq/models/wav2vec/wav2vec2.py:638
Methodblock
(n_in, n_out, k, stride)
fairseq/models/wav2vec/wav2vec.py:380
Methodblock
(n_in, n_out, k, stride)
fairseq/models/wav2vec/wav2vec.py:446
Methodblock_at
(i)
fairseq/data/legacy/block_pair_dataset.py:86
Methodblock_to_dataset_index
(self)
fairseq/data/token_block_dataset.py:121
Methodbpe_tokenizer
Subword tokenizer to apply after pre-tokenization. Returning a dictionary with `bpe` providing the tokenizer name and the other items
fairseq/data/audio/speech_to_text_dataset.py:66
Methodbroadcast_global_state_dict
Broadcasts a global state dict to all ranks. Useful for optimizers that shard state between ranks.
fairseq/optim/fairseq_optimizer.py:166
Functionbroadcast_object
Broadcast an arbitrary Python object to other workers.
fairseq/distributed/utils.py:718
Methodbuffered_future_mask
(self, tensor)
fairseq/model_parallel/models/pipeline_parallel_transformer/model.py:707
Methodbuffered_future_mask
(self, tensor)
fairseq/models/lightconv.py:598
Functionbuild_criterion
(cfg: DictConfig, task)
fairseq/criterions/__init__.py:28
Methodbuild_criterion
(cls, cfg: AdaptiveLossConfig, task)
fairseq/criterions/adaptive_loss.py:34
Methodbuild_criterion
Construct a criterion from command-line args.
fairseq/criterions/fairseq_criterion.py:31
Methodbuild_criterion
Construct a criterion from command-line args.
fairseq/criterions/fairseq_criterion.py:118
Methodbuild_criterion
(self, args)
fairseq/tasks/speech_to_text.py:70
Methodbuild_criterion
Build the :class:`~fairseq.criterions.FairseqCriterion` instance for this task. Args: args (argparse.Namespace):
fairseq/tasks/fairseq_task.py:637
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, **kwargs)
fairseq/tasks/speech_to_text.py:146
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/multilingual_translation.py:252
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation_multi_simple_epoch.py:171
Methodbuild_dataset_for_inference
Generate batches for inference. We assume that the input begins with a bos symbol (`<s>`) and ends with an eos symbol (`</s>`).
fairseq/tasks/denoising.py:227
Methodbuild_dataset_for_inference
( self, src_tokens: List[torch.Tensor], src_lengths: List[int], **kwargs )
fairseq/tasks/fairseq_task.py:491
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation.py:355
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, sort=True)
fairseq/tasks/multilingual_masked_lm.py:304
Methodbuild_dataset_for_inference
Generate batches for inference. We prepend an eos token to src_tokens (or bos if `--add-bos-token` is set) and we append a <pad> to t
fairseq/tasks/language_modeling.py:244
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation_from_pretrained_bart.py:119
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation_lev.py:164
Methodbuild_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
glat_plugins/tasks/translation_lev_modified.py:181
Methodbuild_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/model_parallel/models/transformer.py:73
Methodbuild_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/models/transformer_from_pretrained_xlm.py:69
Methodbuild_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/models/nat/nonautoregressive_transformer.py:84
Methodbuild_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/models/nat/fairseq_nat_model.py:131
Methodbuild_decoder
(cls, args, tgt_dict, embed_tokens)
glat_plugins/models/glat_ctc.py:81
Methodbuild_decoder
(cls, args, tgt_dict, embed_tokens)
glat_plugins/models/glat.py:81
← previousnext →1,701–1,800 of 3,098, ranked by callers