Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FLC777/GLAT
/ functions
Functions
3,098 in github.com/FLC777/GLAT
⨍
Functions
3,098
◇
Types & classes
478
↳
Endpoints
1
Function
aggregate
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
Method
aggregate_logging_outputs
(logging_outputs)
fairseq/criterions/composite_loss.py:91
Function
align_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
Function
align_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
Function
all_gather
Perform an all-gather operation.
fairseq/distributed/utils.py:532
Function
all_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
Function
all_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
Method
all_reduce_grads
(self)
fairseq/distributed/tpu_distributed_data_parallel.py:23
Method
all_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
Method
all_reduce_grads
Manually all-reduce gradients (if required).
fairseq/optim/fairseq_optimizer.py:97
Method
all_reduce_grads
(self, module)
fairseq/optim/fp16_optimizer.py:533
Method
all_reduce_params
(params)
fairseq/distributed/legacy_distributed_data_parallel.py:82
Function
all_to_all
Perform an all-to-all operation on a 1D Tensor.
fairseq/distributed/utils.py:512
Method
allow_ensemble
(self)
fairseq/models/nat/fairseq_nat_model.py:114
Method
allow_length_beam
(self)
fairseq/models/nat/nonautoregressive_transformer.py:47
Method
allow_length_beam
(self)
fairseq/models/nat/fairseq_nat_model.py:110
Method
allow_length_beam
(self)
glat_plugins/models/glat_ctc.py:44
Method
allow_length_beam
(self)
glat_plugins/models/glat.py:44
Method
apply_bfloat16
(t)
fairseq/trainer.py:976
Method
apply_half
(t)
fairseq/trainer.py:971
Method
apply_make_generation_fast_
(module, prefix)
fairseq/models/fairseq_model.py:185
Method
apply_mask
Return the source and target datasets for masked LM training.
fairseq/data/mask_tokens_dataset.py:49
Method
apply_prepare_for_onnx_export_
(module)
fairseq/models/fairseq_model.py:215
Method
apply_remove_weight_norm
(module)
fairseq/models/fairseq_model.py:177
Method
apply_set_beam_size
(module)
fairseq/models/fairseq_incremental_decoder.py:108
Method
apply_sparse_mask
(self, attn_weights, tgt_len, src_len, bsz)
fairseq/modules/sparse_multihead_attention.py:135
Method
assign
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
Method
attr
(self, attr: str, index: int)
fairseq/data/fairseq_dataset.py:80
Method
attr
(self, attr: str, index: int)
fairseq/data/token_block_dataset.py:124
Method
attr
(self, attr: str, index: int)
fairseq/data/base_wrapper_dataset.py:45
Method
attr
(self, attr: str, index: int)
fairseq/data/concat_dataset.py:67
Method
audio_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
Method
average_params
(self)
fairseq/optim/fairseq_optimizer.py:163
Method
average_params
Reduce Params is only used during BMUF distributed training.
fairseq/optim/adam.py:85
Method
avg
(self)
fairseq/logging/meters.py:101
Method
avg
(self)
fairseq/logging/meters.py:150
Method
avg
(self)
fairseq/logging/meters.py:204
Method
backtranslate_fn
( sample, model=model.models[key], bos_token=decod
fairseq/tasks/semisupervised_translation.py:382
Method
backward
(ctx, *args)
fairseq/modules/checkpoint_activations.py:174
Method
backward
(ctx, grad)
fairseq/modules/grad_multiply.py:17
Method
backward
(ctx, grad_output)
fairseq/modules/lightconv_layer/lightconv_layer.py:26
Method
backward
(ctx, grad_output)
fairseq/modules/dynamicconv_layer/dynamicconv_layer.py:27
Method
backward
Computes the sum of gradients of the given tensor w.r.t. graph leaves.
fairseq/optim/fairseq_optimizer.py:93
Method
backward
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
Method
bank
(self)
fairseq/token_generation_constraints.py:258
Method
bank
(self)
fairseq/token_generation_constraints.py:431
Function
base_architecture
(args)
fairseq/benchmark/dummy_model.py:95
Function
base_architecture
(args)
fairseq/models/transformer_from_pretrained_xlm.py:151
Function
base_architecture2
(args)
glat_plugins/models/glat_ctc.py:334
Function
base_architecture2
(args)
glat_plugins/models/glat.py:225
Function
batch_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
Method
batch_by_size
( self, indices, max_tokens=None, max_sentences=None, required_batch_s
fairseq/data/multi_corpus_dataset.py:180
Method
batch_by_size
( self, indices, max_tokens=None, max_sentences=None, required_batch_s
fairseq/data/base_wrapper_dataset.py:54
Method
batch_for_softmax
(dec_out, target)
fairseq/sequence_scorer.py:39
Method
begin_epoch
Called at the beginning of each epoch (epochs start at 1).
fairseq/quantization_utils.py:104
Method
begin_epoch
Hook function called before the start of each epoch.
fairseq/tasks/fairseq_task.py:504
Method
begin_valid_epoch
Hook function called before the start of each validation epoch.
fairseq/tasks/fairseq_task.py:508
Function
berard_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
Function
berard_512_3_2
(args)
fairseq/models/speech_to_text/berard.py:584
Function
berard_512_5_3
(args)
fairseq/models/speech_to_text/berard.py:597
Function
bert_large_architecture
(args)
fairseq/models/masked_lm.py:372
Method
bhook_fn
(self, module, inp, output)
fairseq/nan_detector.py:102
Function
binarize
(args, filename, vocab, output_prefix, lang, offset, end, append_eos=True)
fairseq_cli/preprocess.py:336
Function
binarize_alignments
(args, filename, parse_alignment, output_prefix, offset, end)
fairseq_cli/preprocess.py:353
Function
bleu_add
fairseq/clib/libbleu/libbleu.cpp:124
Function
bleu_one_init
fairseq/clib/libbleu/libbleu.cpp:109
Method
block
(input_dim, output_dim)
fairseq/modules/gumbel_vector_quantizer.py:60
Method
block
( n_in, n_out, k, stride, is_layer_norm=False,
fairseq/models/wav2vec/wav2vec2.py:638
Method
block
(n_in, n_out, k, stride)
fairseq/models/wav2vec/wav2vec.py:380
Method
block
(n_in, n_out, k, stride)
fairseq/models/wav2vec/wav2vec.py:446
Method
block_at
(i)
fairseq/data/legacy/block_pair_dataset.py:86
Method
block_to_dataset_index
(self)
fairseq/data/token_block_dataset.py:121
Method
bpe_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
Method
broadcast_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
Function
broadcast_object
Broadcast an arbitrary Python object to other workers.
fairseq/distributed/utils.py:718
Method
buffered_future_mask
(self, tensor)
fairseq/model_parallel/models/pipeline_parallel_transformer/model.py:707
Method
buffered_future_mask
(self, tensor)
fairseq/models/lightconv.py:598
Function
build_criterion
(cfg: DictConfig, task)
fairseq/criterions/__init__.py:28
Method
build_criterion
(cls, cfg: AdaptiveLossConfig, task)
fairseq/criterions/adaptive_loss.py:34
Method
build_criterion
Construct a criterion from command-line args.
fairseq/criterions/fairseq_criterion.py:31
Method
build_criterion
Construct a criterion from command-line args.
fairseq/criterions/fairseq_criterion.py:118
Method
build_criterion
(self, args)
fairseq/tasks/speech_to_text.py:70
Method
build_criterion
Build the :class:`~fairseq.criterions.FairseqCriterion` instance for this task. Args: args (argparse.Namespace):
fairseq/tasks/fairseq_task.py:637
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, **kwargs)
fairseq/tasks/speech_to_text.py:146
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/multilingual_translation.py:252
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation_multi_simple_epoch.py:171
Method
build_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
Method
build_dataset_for_inference
( self, src_tokens: List[torch.Tensor], src_lengths: List[int], **kwargs )
fairseq/tasks/fairseq_task.py:491
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation.py:355
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, sort=True)
fairseq/tasks/multilingual_masked_lm.py:304
Method
build_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
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation_from_pretrained_bart.py:119
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
fairseq/tasks/translation_lev.py:164
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, constraints=None)
glat_plugins/tasks/translation_lev_modified.py:181
Method
build_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/model_parallel/models/transformer.py:73
Method
build_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/models/transformer_from_pretrained_xlm.py:69
Method
build_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/models/nat/nonautoregressive_transformer.py:84
Method
build_decoder
(cls, args, tgt_dict, embed_tokens)
fairseq/models/nat/fairseq_nat_model.py:131
Method
build_decoder
(cls, args, tgt_dict, embed_tokens)
glat_plugins/models/glat_ctc.py:81
Method
build_decoder
(cls, args, tgt_dict, embed_tokens)
glat_plugins/models/glat.py:81
← previous
next →
1,701–1,800 of 3,098, ranked by callers