Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HA-Transformer/MAT
/ functions
Functions
2,038 in github.com/HA-Transformer/MAT
⨍
Functions
2,038
◇
Types & classes
299
↓ 3 callers
Function
average_checkpoints
Loads checkpoints from inputs and returns a model with averaged weights. Args: inputs: An iterable of string paths of checkpoints to load f
scripts/average_checkpoints.py:14
↓ 3 callers
Function
base_architecture
(args)
fairseq/models/masked_lm.py:270
↓ 3 callers
Function
base_architecture
(args)
fairseq/models/lstm.py:504
↓ 3 callers
Function
base_architecture
(args)
fairseq/models/roberta/model.py:305
↓ 3 callers
Function
base_lm_architecture
(args)
fairseq/models/fconv_lm.py:68
↓ 3 callers
Method
buffered_sparse_mask
(self, tensor, tgt_len, src_len)
fairseq/modules/sparse_multihead_attention.py:85
↓ 3 callers
Method
build_criterion
Build the :class:`~fairseq.criterions.FairseqCriterion` instance for this task. Args: args (argparse.Namespace):
fairseq/tasks/fairseq_task.py:170
↓ 3 callers
Method
build_dataset_for_inference
(self, src_tokens, src_lengths, sort=True)
fairseq/tasks/masked_lm.py:175
↓ 3 callers
Function
build_dictionary
(filenames, src=False, tgt=False)
preprocess.py:48
↓ 3 callers
Function
build_dictionary
(filenames, src=False, tgt=False)
fairseq_cli/preprocess.py:48
↓ 3 callers
Method
build_model
Build a new model instance.
fairseq/models/lstm.py:80
↓ 3 callers
Method
build_shared_embeddings
Helper function to build shared embeddings for a set of languages after checking that all dicts corresponding to those languages are
fairseq/models/fairseq_model.py:279
↓ 3 callers
Function
corpus_bleu
(sys_stream, ref_streams)
examples/translation_moe/score.py:105
↓ 3 callers
Method
encode
BPE-encode a sentence (or multiple sentences). Every sequence begins with a beginning-of-sentence (`<s>`) symbol. Every sent
fairseq/models/roberta/hub_interface.py:36
↓ 3 callers
Method
encoder_attn
(self, query, key, value, **kwargs)
fairseq/models/transformer_mb/transformer_mb_layer.py:260
↓ 3 callers
Method
expert_index
(self, i)
fairseq/tasks/translation_moe.py:113
↓ 3 callers
Method
get_input_path
(self, fname=None)
scripts/wav2vec_featurize.py:161
↓ 3 callers
Method
get_num_updates
Get the number of parameters updates.
fairseq/optim/bmuf.py:130
↓ 3 callers
Function
get_trainer_and_epoch_itr
(epoch, epoch_size, num_updates, iterations_in_epoch)
tests/test_train.py:37
↓ 3 callers
Method
has_encoder
(self)
fairseq/sequence_generator.py:529
↓ 3 callers
Function
make_dataset
(vocab, input_prefix, output_prefix, lang, num_workers=1)
preprocess.py:161
↓ 3 callers
Function
make_dataset
(vocab, input_prefix, output_prefix, lang, num_workers=1)
fairseq_cli/preprocess.py:161
↓ 3 callers
Method
mask
Helper to get index of mask symbol
fairseq/data/legacy/masked_lm_dictionary.py:26
↓ 3 callers
Function
merge
(key, left_pad, move_eos_to_beginning=False)
fairseq/data/language_pair_dataset.py:19
↓ 3 callers
Function
merge_result
(worker_result)
fairseq_cli/preprocess.py:102
↓ 3 callers
Function
mock_dict
()
tests/test_train.py:29
↓ 3 callers
Function
parse_lambda_config
Parse the configuration of lambda coefficient (for scheduling). x = "3" # lambda will be a constant equal to x x = "0:1,
fairseq/tasks/semisupervised_translation.py:35
↓ 3 callers
Function
print_keys
(ks, ns1, ns2=None)
scripts/compare_namespaces.py:22
↓ 3 callers
Function
read_longs
(f, n)
fairseq/data/indexed_dataset.py:73
↓ 3 callers
Function
safe_readline
(f)
fairseq/binarizer.py:12
↓ 3 callers
Function
sentence_bleu
(hypothesis, reference)
examples/translation_moe/score.py:110
↓ 3 callers
Method
setUpModel
(self, model)
tests/speech_recognition/asr_test_base.py:241
↓ 3 callers
Function
transformer_vaswani_wmt_en_de_big
(args)
fairseq/models/transformer.py:576
↓ 3 callers
Function
transformer_vaswani_wmt_en_de_big
(args)
fairseq/models/transformer_mb/transformer_mb.py:659
↓ 3 callers
Method
valid_step
Do forward pass in evaluation mode.
fairseq/trainer.py:382
↓ 3 callers
Function
write_longs
(f, a)
fairseq/data/indexed_dataset.py:79
↓ 2 callers
Function
Embedding
(num_embeddings, embedding_dim, padding_idx)
fairseq/models/fconv.py:561
↓ 2 callers
Function
Embedding
(num_embeddings, embedding_dim, padding_idx)
fairseq/models/lightconv.py:650
↓ 2 callers
Function
Embedding
(num_embeddings, embedding_dim, padding_idx)
fairseq/models/fconv_self_att.py:491
↓ 2 callers
Function
Linear
(in_features, out_features, bias=True)
fairseq/modules/dynamic_convolution.py:14
↓ 2 callers
Function
Linear
(in_features, out_features, bias=True)
fairseq/models/transformer.py:517
↓ 2 callers
Function
Linear
(in_features, out_features, bias=True)
fairseq/models/transformer_mb/transformer_mb.py:589
↓ 2 callers
Function
LinearizedConv1d
Weight-normalized Conv1d layer optimized for decoding
examples/speech_recognition/models/vggtransformer.py:729
↓ 2 callers
Function
PositionalEmbedding
(num_embeddings, embedding_dim, padding_idx)
fairseq/models/fconv.py:568
↓ 2 callers
Function
PositionalEmbedding
(num_embeddings, embedding_dim, padding_idx)
fairseq/models/fconv_self_att.py:497
↓ 2 callers
Method
__init__
(self, bpe, **kwargs)
fairseq/hub_utils.py:195
↓ 2 callers
Method
__init__
(self, weight, transpose)
fairseq/modules/adaptive_softmax.py:15
↓ 2 callers
Method
__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, amsgrad=False)
fairseq/optim/adam.py:84
↓ 2 callers
Method
__init__
(self, dataset, pad_idx, left_pad)
fairseq/data/pad_dataset.py:13
↓ 2 callers
Method
__init__
(self, path, fix_lua_indexing=False)
fairseq/data/indexed_dataset.py:114
↓ 2 callers
Method
__init__
(self, encoder, decoder)
fairseq/models/transformer.py:69
↓ 2 callers
Method
__init__
(self, encoder, decoder)
fairseq/models/transformer_mb/transformer_mb.py:52
↓ 2 callers
Method
__init__
(self, fname)
scripts/wav2vec_featurize.py:96
↓ 2 callers
Method
__init__
(self, args)
tests/speech_recognition/asr_test_base.py:41
↓ 2 callers
Method
__init__
( self, dictionary, embed_dim=512, transformer_config=DEFAULT_ENC_TRANSFORMER_
examples/speech_recognition/models/vggtransformer.py:565
↓ 2 callers
Method
_check_src
(self, src, expect_eos)
fairseq/data/transform_eos_dataset.py:61
↓ 2 callers
Method
_check_tgt
(self, tgt, expect_eos)
fairseq/data/transform_eos_dataset.py:66
↓ 2 callers
Method
_cut_sentence
Cut a sentence based on the numbers of tokens to be cut from beginning and end Represent the sentence as dataset idx and return
fairseq/data/legacy/block_pair_dataset.py:259
↓ 2 callers
Method
_decode_one
( self, tokens, model, encoder_out, incremental_states, log_probs, temperature=1., )
fairseq/sequence_generator.py:575
↓ 2 callers
Method
_do_init
(self, path)
fairseq/data/indexed_dataset.py:456
↓ 2 callers
Method
_fetch_block
Fetch a block of tokens based on its dataset idx
fairseq/data/legacy/block_pair_dataset.py:281
↓ 2 callers
Method
_format_stats
(self, stats, epoch=None, update=None)
fairseq/progress_bar.py:145
↓ 2 callers
Method
_get_dataset_and_sample_index
(self, idx: int)
fairseq/data/concat_dataset.py:41
↓ 2 callers
Function
_get_full_incremental_state_key
(module_instance, key)
fairseq/utils.py:64
↓ 2 callers
Method
_get_input_buffer
(self, incremental_state)
fairseq/modules/lightweight_convolution.py:224
↓ 2 callers
Method
_get_input_buffer
(self, incremental_state)
fairseq/modules/linearized_convolution.py:72
↓ 2 callers
Method
_get_input_buffer
(self, incremental_state)
fairseq/modules/multihead_attention.py:331
↓ 2 callers
Method
_get_iterator_for_epoch
(self, epoch, shuffle, fix_batches_to_gpus=False, offset=0)
fairseq/data/iterators.py:217
↓ 2 callers
Method
_get_loss
(self, sample, model, criterion)
fairseq/tasks/translation_moe.py:116
↓ 2 callers
Method
_get_noising_dataset_batch
Constructs a NoisingDataset and the corresponding ``LanguagePairDataset(NoisingDataset(src), src)``. If *append_eos_to_tgt* i
tests/test_noising.py:410
↓ 2 callers
Function
_lang_token
(lang: str)
fairseq/tasks/multilingual_translation.py:25
↓ 2 callers
Method
_log_to_tensorboard
(self, stats, tag='', step=None)
fairseq/progress_bar.py:271
↓ 2 callers
Method
_mask_block
Mask tokens for Masked Language Model training Samples mask_ratio tokens that will be predicted by LM. Note:This function ma
fairseq/data/legacy/masked_lm_dataset.py:122
↓ 2 callers
Method
_register_grad_hook
This function registers the callback all-reduction function for the NCCL backend. All gradients will be all reduced in one single ste
fairseq/legacy_distributed_data_parallel.py:88
↓ 2 callers
Method
_rms
(self, tensor)
fairseq/optim/adafactor.py:120
↓ 2 callers
Method
_set_input_buffer
(self, incremental_state, new_buffer)
fairseq/modules/lightweight_convolution.py:227
↓ 2 callers
Method
_set_input_buffer
(self, incremental_state, new_buffer)
fairseq/modules/linearized_convolution.py:75
↓ 2 callers
Method
_set_input_buffer
(self, incremental_state, buffer)
fairseq/modules/multihead_attention.py:338
↓ 2 callers
Method
_skip_sampling
Generate a random integer which is not in skip_ids. Sample range is [0, total) TODO: ids in skip_ids should be consecutive, we can ex
fairseq/data/legacy/block_pair_dataset.py:216
↓ 2 callers
Method
_str_pipes
(self, stats)
fairseq/progress_bar.py:103
↓ 2 callers
Method
_test_sample_helper
( self, expected_sample_from_first_ds_percentage, num_samples=1000, sampling_f
tests/test_multi_corpus_sampled_dataset.py:44
↓ 2 callers
Function
_warmup_mmap_file
(path)
fairseq/data/indexed_dataset.py:345
↓ 2 callers
Method
adapt_target
In order to be efficient, the AdaptiveSoftMax does not compute the scores for all the word of the vocabulary for all the examples. It
fairseq/modules/adaptive_softmax.py:122
↓ 2 callers
Method
add
increments counters for the sum of log probs of current word and next word (given context ending at current word). Since the next word mi
fairseq_cli/eval_lm.py:29
↓ 2 callers
Method
add_string
(self, ref, pred)
fairseq/bleu.py:185
↓ 2 callers
Method
assertTensorEqual
(self, t1, t2)
tests/test_backtranslation_dataset.py:110
↓ 2 callers
Method
assert_no_eos_at_end
Asserts that the last token of each sentence in x is not EOS
tests/test_noising.py:375
↓ 2 callers
Method
assert_word_blanking_correct
(self, x, x_noised, x_len, l_noised, unk)
tests/test_noising.py:170
↓ 2 callers
Method
assert_word_dropout_correct
(self, x, x_noised, x_len, l_noised)
tests/test_noising.py:152
↓ 2 callers
Function
base_lm_architecture
(args)
fairseq/models/lightconv_lm.py:134
↓ 2 callers
Function
base_multilingual_architecture
(args)
fairseq/models/multilingual_transformer.py:178
↓ 2 callers
Function
bleu_hash
fairseq/clib/libbleu/libbleu.cpp:55
↓ 2 callers
Function
bleu_trim
left and right trim
fairseq/clib/libbleu/libbleu.cpp:50
↓ 2 callers
Method
brevity
(self)
fairseq/bleu.py:335
↓ 2 callers
Method
buffered_future_mask
(self, tensor)
fairseq/models/transformer_mb/transformer_mb.py:532
↓ 2 callers
Method
build_dictionary
Build the dictionary Args: filenames (list): list of filenames workers (int): number of concurrent workers
fairseq/tasks/fairseq_task.py:37
↓ 2 callers
Method
build_model
(cls, args, task)
tests/speech_recognition/asr_test_base.py:478
↓ 2 callers
Function
check_args
(args)
examples/speech_recognition/infer.py:50
↓ 2 callers
Function
check_decoder_output
we expect output from a decoder is a tuple with the following constraint: - the first element is a torch.Tensor - the second element can be an
tests/speech_recognition/asr_test_base.py:202
↓ 2 callers
Function
check_encoder_output
we expect encoder_output to be a dict with the following key/value pairs: - encoder_out: a Torch.Tensor - encoder_padding_mask: a binary T
tests/speech_recognition/asr_test_base.py:134
← previous
next →
201–300 of 2,038, ranked by callers