MCPcopy Create free account

hub / github.com/MGheini/xattn-transfer-for-mt / functions

Functions3,697 in github.com/MGheini/xattn-transfer-for-mt

↓ 431 callersMethodsize
(self, index)
fairseq-modified/fairseq/data/list_dataset.py:29
↓ 177 callersMethodsplit
(self, string)
fairseq-modified/examples/simultaneous_translation/eval/agents/word_splitter.py:11
↓ 165 callersMethodget
(self)
fairseq-modified/examples/simultaneous_translation/eval/server.py:30
↓ 130 callersMethodeos
Helper to get index of end-of-sentence symbol
fairseq-modified/fairseq/data/dictionary.py:195
↓ 127 callersMethodpad
Helper to get index of pad symbol
fairseq-modified/fairseq/data/dictionary.py:191
↓ 90 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
fairseq-modified/examples/speech_recognition/data/asr_dataset.py:100
↓ 76 callersMethodadd_symbol
Adds a word to the dictionary
fairseq-modified/fairseq/data/dictionary.py:113
↓ 67 callersMethodwrite
(self, data)
fairseq-modified/examples/wav2vec/wav2vec_featurize.py:105
↓ 64 callersMethodlog
Log intermediate stats according to log_interval.
fairseq-modified/fairseq/logging/progress_bar.py:129
↓ 64 callersMethodwrite
(self, sizes)
fairseq-modified/fairseq/data/indexed_dataset.py:388
↓ 52 callersMethodload
Loads the dictionary from a text file with the format: ``` <symbol0> <count0> <symbol1> <count1> ... ```
fairseq-modified/fairseq/data/dictionary.py:204
↓ 42 callersMethodexists
(path: str)
fairseq-modified/fairseq/file_io.py:69
↓ 42 callersMethodunk
Helper to get index of unk symbol
fairseq-modified/fairseq/data/dictionary.py:199
↓ 41 callersMethodindex
Returns the index of the specified symbol
fairseq-modified/fairseq/data/dictionary.py:58
↓ 39 callersFunctionLayerNorm
(normalized_shape, eps=1e-5, elementwise_affine=True, export=False)
fairseq-modified/fairseq/modules/layer_norm.py:29
↓ 38 callersFunctioncreate_dummy_data
(data_dir, num_examples=100, maxlen=20, alignment=False)
fairseq-modified/tests/utils.py:131
↓ 38 callersFunctiongenerate_main
(data_dir, extra_flags=None)
fairseq-modified/tests/utils.py:260
↓ 37 callersMethodcuda
(self)
fairseq-modified/fairseq/sequence_generator.py:97
↓ 36 callersMethodbos
Helper to get index of beginning-of-sentence symbol
fairseq-modified/fairseq/data/dictionary.py:187
↓ 34 callersMethodadd
(self, ref, pred)
fairseq-modified/fairseq/scoring/bleu.py:81
↓ 33 callersMethodassertHypoTokens
(self, hypo, tokens)
fairseq-modified/tests/test_sequence_generator.py:170
↓ 32 callersFunctiontrain_translation_model
(data_dir, arch, extra_flags=None, task='translation', run_validation=False, lang_
fairseq-modified/tests/utils.py:217
↓ 29 callersMethodassertHypoScore
(self, hypo, pos_probs, normalized=True, lenpen=1.0)
fairseq-modified/tests/test_sequence_generator.py:173
↓ 29 callersMethodencode_line
( self, line, line_tokenizer=tokenize_line, add_if_not_exist=True, con
fairseq-modified/fairseq/data/dictionary.py:293
↓ 28 callersFunctionpreprocess_translation_data
(data_dir, extra_flags=None)
fairseq-modified/tests/utils.py:182
↓ 26 callersMethodclose
(self)
fairseq-modified/fairseq/nan_detector.py:103
↓ 25 callersMethodcopy
(src_path: str, dst_path: str, overwrite: bool = False)
fairseq-modified/fairseq/file_io.py:55
↓ 23 callersMethodencoder
(self)
fairseq-modified/fairseq/models/fairseq_model.py:417
↓ 22 callersMethoddecoder
(self)
fairseq-modified/fairseq/models/fairseq_model.py:421
↓ 21 callersMethodupdate
(self, val=1)
fairseq-modified/fairseq/logging/meters.py:127
↓ 19 callersFunctionquant_noise
Wraps modules and applies quantization noise to the weights for subsequent quantization with Iterative Product Quantization as described
fairseq-modified/fairseq/modules/quant_noise.py:10
↓ 19 callersMethodsave
Stores dictionary into a text file
fairseq-modified/fairseq/data/dictionary.py:277
↓ 19 callersMethodstring
Helper for converting a tensor of token indices to a string. Can optionally remove BPE symbols or escape <unk> words.
fairseq-modified/fairseq/data/dictionary.py:65
↓ 18 callersMethodget_num_updates
Get the number of parameters updates.
fairseq-modified/fairseq/trainer.py:773
↓ 18 callersMethodget_smoothed_values
Get all smoothed values.
fairseq-modified/fairseq/logging/meters.py:264
↓ 18 callersMethodset_incremental_state
Helper for setting incremental state for an nn.Module.
fairseq-modified/fairseq/incremental_decoding_utils.py:35
↓ 18 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
fairseq-modified/fairseq/data/denoising_dataset.py:386
↓ 18 callersFunctiontensorize
(constraints: List[List[int]])
fairseq-modified/tests/test_constraints.py:13
↓ 17 callersFunction_override_attr
( sub_node: str, data_class: Type[FairseqDataclass], args: Namespace )
fairseq-modified/fairseq/dataclass/data_class.py:566
↓ 17 callersMethodbuild_model
(cls, args, task)
fairseq-modified/tests/utils.py:335
↓ 17 callersMethodget_incremental_state
Helper for getting incremental state for an nn.Module.
fairseq-modified/fairseq/incremental_decoding_utils.py:24
↓ 17 callersMethodload_state_dict
(self, state_dict)
fairseq-modified/fairseq/logging/meters.py:41
↓ 16 callersFunctionLinear
Weight-normalized Linear layer (input: N x T x C)
fairseq-modified/fairseq/models/fconv_self_att.py:529
↓ 16 callersFunction_fill
Filling tensor x with y at masked positions (dim=0).
fairseq-modified/fairseq/models/nat/levenshtein_utils.py:256
↓ 16 callersMethodadd_args
Add optimizer-specific arguments to the parser.
fairseq-modified/fairseq/optim/sgd.py:18
↓ 16 callersMethodset_lr
(self, lr)
fairseq-modified/fairseq/optim/bmuf.py:85
↓ 14 callersFunction_pair
(v)
fairseq-modified/fairseq/modules/vggblock.py:15
↓ 14 callersMethodexists
(path)
fairseq-modified/fairseq/data/indexed_dataset.py:181
↓ 14 callersMethodload_indexed_dataset
(path, dictionary)
fairseq-modified/fairseq/tasks/semisupervised_translation.py:152
↓ 14 callersFunctionremove_bpe
(line, bpe_symbol)
fairseq-modified/examples/noisychannel/rerank_utils.py:227
↓ 13 callersMethodall_reduce
This function must be called explicitly after backward to reduce gradients. There is no automatic hook like c10d.
fairseq-modified/fairseq/legacy_distributed_data_parallel.py:88
↓ 13 callersMethodcumsum
(sequence, sample_ratios)
fairseq-modified/fairseq/data/concat_dataset.py:16
↓ 13 callersMethodhalf
(self)
fairseq-modified/fairseq/modules/lightconv_layer/lightconv_layer.py:128
↓ 13 callersMethodmax_positions
Maximum input length supported by the encoder.
fairseq-modified/fairseq/models/lstm.py:313
↓ 13 callersFunctionpreprocess_lm_data
(data_dir)
fairseq-modified/tests/utils.py:170
↓ 13 callersMethodstart
(self)
fairseq-modified/fairseq/logging/meters.py:171
↓ 12 callersFunctionLinear
(in_features, out_features, bias=True)
fairseq-modified/fairseq/models/lightconv.py:685
↓ 12 callersFunction_current_postion_info
()
fairseq-modified/tests/speech_recognition/asr_test_base.py:126
↓ 12 callersMethodget_lr
(self)
fairseq-modified/fairseq/optim/bmuf.py:82
↓ 12 callersMethodnext_epoch_itr
Return a new iterator over the dataset. Args: shuffle (bool, optional): shuffle batches before returning the iter
fairseq-modified/fairseq/data/iterators.py:271
↓ 12 callersMethodopen
( path: str, mode: str = "r", buffering: int = -1, encoding: Optional[str] = N
fairseq-modified/fairseq/file_io.py:28
↓ 11 callersMethodforward
Generate a batch of translations. Args: sample (dict): batch prefix_tokens (torch.LongTensor, optional): force decode
fairseq-modified/fairseq/sequence_generator.py:102
↓ 11 callersMethodhas_next
Whether the iterator has been exhausted.
fairseq-modified/fairseq/data/iterators.py:72
↓ 11 callersMethodsetup_task
(cls, args, src_dict=None, tgt_dict=None, model=None)
fairseq-modified/tests/utils.py:315
↓ 10 callersMethodbackward
(ctx, grad)
fairseq-modified/fairseq/modules/scalar_bias.py:26
↓ 10 callersMethodbuild_criterion
Build the :class:`~fairseq.criterions.FairseqCriterion` instance for this task. Args: args (argparse.Namespace):
fairseq-modified/fairseq/tasks/fairseq_task.py:274
↓ 10 callersMethodstate_dict
(self)
fairseq-modified/fairseq/logging/meters.py:38
↓ 9 callersFunctionLinear
Weight-normalized Linear layer (input: B x T x C)
fairseq-modified/fairseq/modules/downsampled_multihead_attention.py:240
↓ 9 callersFunctionLinear
Weight-normalized Linear layer (input: N x T x C)
fairseq-modified/fairseq/models/fconv.py:588
↓ 9 callersFunctionbase_lm_architecture
(args)
fairseq-modified/fairseq/models/transformer_lm.py:330
↓ 9 callersMethoddataset
Return a loaded dataset split. Args: split (str): name of the split (e.g., train, valid, test) Returns:
fairseq-modified/fairseq/tasks/fairseq_task.py:98
↓ 9 callersMethodfinalize
Sort symbols by frequency in descending order, ignoring special ones. Args: - threshold defines the minimum word count
fairseq-modified/fairseq/data/dictionary.py:139
↓ 9 callersMethodisfile
(path: str)
fairseq-modified/fairseq/file_io.py:75
↓ 9 callersMethodmax_positions
Maximum length supported by the model.
fairseq-modified/fairseq/models/fairseq_model.py:80
↓ 9 callersFunctionregister_module_dataclass
register dataclasses defined in modules in config store, for example, in migrated tasks, models, etc.
fairseq-modified/fairseq/dataclass/data_class.py:528
↓ 9 callersMethodstep
Take a single search step. Args: step: the current search step, starting at 0 lprobs: (bsz x input_beam_size x vocab_
fairseq-modified/fairseq/search.py:26
↓ 9 callersMethodtrain
(mode=True)
fairseq-modified/fairseq/models/fairseq_model.py:181
↓ 8 callersFunctionChoiceEnum
return the Enum class used to enforce list of choices
fairseq-modified/fairseq/dataclass/utils.py:34
↓ 8 callersFunctionPositionalEmbedding
( num_embeddings: int, embedding_dim: int, padding_idx: int, learned: bool = F
fairseq-modified/fairseq/modules/positional_embedding.py:11
↓ 8 callersMethod__init__
(self, encoder, decoder)
fairseq-modified/tests/utils.py:331
↓ 8 callersMethod_get_test_data_with_bpe_cont_marker
Args: append_eos: if True, each input sentence in the source tokens tensor will have an EOS appended to the end.
fairseq-modified/tests/test_noising.py:22
↓ 8 callersMethodassert_word_shuffle_matches_expected
This verifies that with a given x, x_len, max_shuffle_distance, and vocab, we get the expected shuffle result. Args:
fairseq-modified/tests/test_noising.py:194
↓ 8 callersFunctiondata_file_path
(prefix_path)
fairseq-modified/fairseq/data/indexed_dataset.py:115
↓ 8 callersFunctiondataset_dest_file
(args, output_prefix, lang, extension)
fairseq-modified/fairseq_cli/preprocess.py:348
↓ 8 callersMethoddecode
(self, sentence: str)
fairseq-modified/fairseq/hub_utils.py:253
↓ 8 callersMethodencode
(self, line)
fairseq-modified/examples/roberta/multiprocessing_bpe_encoder.py:98
↓ 8 callersFunctiongen_parser_from_dataclass
convert a dataclass instance to tailing parser arguments
fairseq-modified/fairseq/dataclass/utils.py:100
↓ 8 callersMethodget_batch_iterator
Get an iterator that yields batches of data from the given dataset. Args: dataset (~fairseq.data.FairseqDataset): datase
fairseq-modified/fairseq/tasks/fairseq_task.py:156
↓ 8 callersFunctionget_dummy_input
(T=100, D=80, B=5, K=100)
fairseq-modified/tests/speech_recognition/asr_test_base.py:70
↓ 8 callersMethodhypoScore
(self, hypo, pos_probs, normalized=True, lenpen=1.)
fairseq-modified/tests/test_sequence_generator.py:572
↓ 8 callersMethodhypoTokens
(self, hypo, tokens)
fairseq-modified/tests/test_sequence_generator.py:569
↓ 8 callersMethodload_checkpoint
Load all training state from a checkpoint file.
fairseq-modified/fairseq/trainer.py:261
↓ 8 callersMethodmodel
(self)
fairseq-modified/fairseq/trainer.py:167
↓ 8 callersFunctionsafe_round
(number, ndigits)
fairseq-modified/fairseq/logging/meters.py:53
↓ 8 callersMethodsetup_task
(cls, args, **kwargs)
fairseq-modified/fairseq/tasks/masked_lm.py:78
↓ 8 callersMethodstop
(self, n=1, prehook=None)
fairseq-modified/fairseq/logging/meters.py:174
↓ 8 callersMethodtake
Truncates the iterator to n elements at most.
fairseq-modified/fairseq/data/iterators.py:81
↓ 7 callersFunctionLinear
Linear layer (input: N x T x C)
fairseq-modified/examples/speech_recognition/models/vggtransformer.py:856
↓ 7 callersMethodalter_dataset_langtok
(self, lang_pair_dataset, src_eos=None, src_lang=None, tgt_eos=None, tgt_lang=No
fairseq-modified/fairseq/tasks/multilingual_translation.py:164
↓ 7 callersFunctionbase_architecture
(args)
fairseq-modified/fairseq/models/transformer.py:928
next →1–100 of 3,697, ranked by callers