MCPcopy Create free account

hub / github.com/OFA-Sys/OFA / functions

Functions6,938 in github.com/OFA-Sys/OFA

↓ 792 callersMethodsize
(self, index)
fairseq/fairseq/data/list_dataset.py:28
↓ 614 callersMethodappend
append an existing dataset. Beware, if it wasn't built with the same coder, you are in trouble.
fairseq/fairseq/data/huffman/huffman_mmap_indexed_dataset.py:261
↓ 467 callersMethodinfo
(self)
fairseq/examples/speech_to_text/simultaneous_translation/agents/fairseq_simul_st_agent.py:107
↓ 351 callersMethodappend
(self, value)
fairseq/examples/speech_to_text/simultaneous_translation/agents/fairseq_simul_st_agent.py:99
↓ 260 callersMethodpad
Helper to get index of pad symbol
fairseq/fairseq/data/dictionary.py:203
↓ 212 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
fairseq/examples/speech_recognition/data/asr_dataset.py:111
↓ 202 callersMethodeos
Helper to get index of end-of-sentence symbol
fairseq/fairseq/data/dictionary.py:207
↓ 165 callersMethodexists
(path: str)
fairseq/fairseq/file_io.py:85
↓ 155 callersFunctionsafe_getattr
Returns obj[k] if it exists and is not None, otherwise returns default.
fairseq/fairseq/utils.py:817
↓ 134 callersMethodload
Loads the dictionary from a text file with the format: ``` <symbol0> <count0> <symbol1> <count1> ... ```
fairseq/fairseq/data/dictionary.py:216
↓ 130 callersMethodarray
Fetch a read only view of an np.array, stored in plasma.
fairseq/fairseq/data/plasma_utils.py:139
↓ 129 callersMethodwrite
(self, data)
fairseq/examples/wav2vec/wav2vec_featurize.py:102
↓ 114 callersMethodcuda
(self)
fairseq/fairseq/sequence_generator.py:118
↓ 99 callersMethodadd_symbol
Adds a word to the dictionary
fairseq/fairseq/data/dictionary.py:125
↓ 98 callersMethodeval
(self)
models/taming/modules/misc/coord.py:8
↓ 97 callersMethodlog
Log intermediate stats according to log_interval.
fairseq/fairseq/logging/progress_bar.py:145
↓ 83 callersFunctionLayerNorm
(normalized_shape, eps=1e-5, elementwise_affine=True, export=False)
fairseq/fairseq/modules/layer_norm.py:30
↓ 79 callersMethodindex
Returns the index of the specified symbol
fairseq/fairseq/data/dictionary.py:61
↓ 78 callersMethodadd
(self, ref, pred)
fairseq/fairseq/scoring/bleu.py:107
↓ 65 callersMethodwrite
(self, sizes)
fairseq/fairseq/data/indexed_dataset.py:417
↓ 62 callersMethodbos
Helper to get index of beginning-of-sentence symbol
fairseq/fairseq/data/dictionary.py:199
↓ 59 callersMethodhalf
(self)
fairseq/fairseq/modules/lightconv_layer/lightconv_layer.py:136
↓ 58 callersFunctioncreate_dummy_data
(data_dir, num_examples=100, maxlen=20, alignment=False)
fairseq/tests/utils.py:162
↓ 56 callersMethodencode_text
(self, text, length=None, append_bos=False, append_eos=False, use_bpe=True)
data/ofa_dataset.py:36
↓ 55 callersMethodnorm
(t)
fairseq/fairseq/modules/kmeans_attention.py:173
↓ 54 callersMethodunk
Helper to get index of unk symbol
fairseq/fairseq/data/dictionary.py:211
↓ 53 callersMethodencoder
(self)
fairseq/fairseq/models/fairseq_model.py:432
↓ 51 callersMethodencode_line
( self, line, line_tokenizer=tokenize_line, add_if_not_exist=True, con
fairseq/fairseq/data/dictionary.py:304
↓ 51 callersFunctiongenerate_main
(data_dir, extra_flags=None, path=None)
fairseq/tests/utils.py:388
↓ 50 callersMethodstring
Helper for converting a tensor of token indices to a string. Can optionally remove BPE symbols or escape <unk> words.
fairseq/fairseq/data/dictionary.py:68
↓ 48 callersFunctiontrain_translation_model
( data_dir, arch, extra_flags=None, task="translation", run_validation=False, lang_fla
fairseq/tests/utils.py:314
↓ 45 callersFunctionChoiceEnum
return the Enum class used to enforce list of choices
fairseq/fairseq/dataclass/constants.py:32
↓ 45 callersMethodsave
Stores dictionary into a text file
fairseq/fairseq/data/dictionary.py:288
↓ 44 callersMethoddecoder
(self)
fairseq/fairseq/models/fairseq_model.py:436
↓ 43 callersFunctionpreprocess_translation_data
(data_dir, extra_flags=None)
fairseq/tests/utils.py:224
↓ 41 callersMethodlog
(self, *args, **kwargs)
fairseq/examples/speech_recognition/new/infer.py:152
↓ 39 callersMethodmkdir
(arg)
fairseq/examples/wav2vec/vq-wav2vec_featurize.py:72
↓ 39 callersMethodopen
( path: str, mode: str = "r", buffering: int = -1, encoding: Optional[str] = N
fairseq/fairseq/file_io.py:44
↓ 34 callersFunctionconvert_namespace_to_omegaconf
Convert a flat argparse.Namespace to a structured DictConfig.
fairseq/fairseq/dataclass/utils.py:376
↓ 34 callersMethodcopy
(src_path: str, dst_path: str, overwrite: bool = False)
fairseq/fairseq/file_io.py:71
↓ 33 callersMethodassertHypoTokens
(self, hypo, tokens)
fairseq/tests/test_sequence_generator.py:168
↓ 33 callersMethodcumsum
(sequence, sample_ratios)
fairseq/fairseq/data/concat_dataset.py:16
↓ 33 callersMethodload_state_dict
(self, state_dict)
fairseq/fairseq/logging/meters.py:44
↓ 32 callersMethodset_incremental_state
Helper for setting incremental state for an nn.Module.
fairseq/fairseq/incremental_decoding_utils.py:34
↓ 31 callersMethodget_incremental_state
Helper for getting incremental state for an nn.Module.
fairseq/fairseq/incremental_decoding_utils.py:23
↓ 31 callersFunctionquant_noise
Wraps modules and applies quantization noise to the weights for subsequent quantization with Iterative Product Quantization as described
fairseq/fairseq/modules/quant_noise.py:10
↓ 30 callersMethodclose
(self)
fairseq/fairseq/nan_detector.py:106
↓ 29 callersMethodassertHypoScore
(self, hypo, pos_probs, normalized=True, lenpen=1.0)
fairseq/tests/test_sequence_generator.py:171
↓ 29 callersMethodcreate
(constraints: List[List[int]])
fairseq/fairseq/token_generation_constraints.py:146
↓ 29 callersMethodrun
(self)
fairseq/fairseq/data/iterators.py:561
↓ 28 callersMethodsize
(self, index: int)
fairseq/examples/laser/laser_src/multitask_data_utils.py:134
↓ 28 callersMethodstate_dict
(self)
fairseq/fairseq/trainer.py:381
↓ 26 callersMethodinsert
(self, word)
utils/trie.py:19
↓ 26 callersMethodupdate
(self, val)
fairseq/fairseq/logging/meters.py:122
↓ 25 callersMethodisfile
(path: str)
fairseq/fairseq/file_io.py:91
↓ 25 callersMethodsize
(self, index)
fairseq/examples/wav2vec/unsupervised/data/extracted_features_dataset.py:129
↓ 24 callersMethodbackward
(ctx, grad_output)
fairseq/fairseq/modules/base_layer.py:130
↓ 24 callersFunctionpreprocess_lm_data
(data_dir)
fairseq/tests/utils.py:206
↓ 23 callersFunctiongen_parser_from_dataclass
convert a dataclass instance to tailing parser arguments. If `with_prefix` is provided, prefix all the keys in the resulting parser
fairseq/fairseq/dataclass/utils.py:53
↓ 23 callersMethodget_smoothed_values
Get all smoothed values.
fairseq/fairseq/logging/meters.py:299
↓ 23 callersMethodinference_step
( self, generator, models, sample, prefix_tokens=None, constraints=None )
fairseq/fairseq/tasks/fairseq_task.py:513
↓ 23 callersFunctionsafe_hasattr
Returns True if the given key exists and is not None.
fairseq/fairseq/utils.py:827
↓ 22 callersMethodbuild_model
(cls, args, task)
fairseq/tests/utils.py:471
↓ 22 callersMethodload_indexed_dataset
(path, dictionary)
fairseq/fairseq/tasks/semisupervised_translation.py:165
↓ 22 callersMethodmodel
(self)
fairseq/fairseq/trainer.py:248
↓ 22 callersMethodset_lr
(self, lr)
fairseq/fairseq/optim/bmuf.py:55
↓ 22 callersMethodstate_dict
(self)
trainer.py:383
↓ 22 callersMethodtrain
(mode=True)
fairseq/fairseq/models/fairseq_model.py:210
↓ 21 callersMethodget_num_updates
Get the number of parameters updates.
trainer.py:1180
↓ 20 callersMethodget_num_updates
Get the number of parameters updates.
fairseq/fairseq/trainer.py:1158
↓ 19 callersMethodsearch
Returns if the word is in the trie. :type word: str :rtype: bool
utils/text2phone.py:39
↓ 19 callersMethodstart
(self)
fairseq/fairseq/logging/meters.py:206
↓ 19 callersMethodupdate
(self, **infos)
fairseq/examples/speech_synthesis/preprocessing/denoiser/utils.py:115
↓ 18 callersMethodclear
(self)
utils/cider/pyciderevalcap/cider/cider_scorer.py:77
↓ 18 callersMethodclose
(self)
fairseq/fairseq/data/huffman/huffman_mmap_indexed_dataset.py:279
↓ 18 callersFunctiondecode
(l)
fairseq/scripts/spm_decode.py:29
↓ 18 callersMethodencode
(self, x)
models/taming/models/vqgan.py:54
↓ 18 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
fairseq/fairseq/data/denoising_dataset.py:411
↓ 18 callersFunctiontensorize
(constraints: List[List[int]])
fairseq/tests/test_constraints.py:13
↓ 17 callersMethodadd_args
Add optimizer-specific arguments to the parser.
fairseq/fairseq/optim/sgd.py:18
↓ 17 callersMethodbuild_bpe
Build the tokenizer for this task.
fairseq/fairseq/tasks/fairseq_task.py:604
↓ 17 callersMethodempty_cache
(self)
fairseq/examples/speech_recognition/w2l_decoder.py:366
↓ 17 callersMethodget_lr
(self)
fairseq/fairseq/optim/bmuf.py:52
↓ 16 callersFunctionLinear
Weight-normalized Linear layer (input: N x T x C)
fairseq/fairseq/models/fconv_self_att.py:605
↓ 16 callersFunction_fill
Filling tensor x with y at masked positions (dim=0).
fairseq/fairseq/models/nat/levenshtein_utils.py:265
↓ 16 callersMethodbuild_tokenizer
Build the pre-tokenizer for this task.
fairseq/fairseq/tasks/fairseq_task.py:600
↓ 16 callersFunctioncall
(cmd, debug=False)
fairseq/examples/multilingual/data_scripts/download_wmt19_and_before.py:121
↓ 16 callersMethoddevice
(self)
fairseq/fairseq/hub_utils.py:118
↓ 16 callersMethodexists
(path)
fairseq/fairseq/data/indexed_dataset.py:207
↓ 16 callersMethodfrom_namespace
(cls, args)
fairseq/fairseq/models/transformer/transformer_config.py:263
↓ 16 callersFunctionsample
(id: int, length: int)
fairseq/tests/test_dataset.py:19
↓ 16 callersMethodstep
Take a single search step. Args: step: the current search step, starting at 0 lprobs: (bsz x input_beam_size x vocab_
fairseq/fairseq/search.py:30
↓ 15 callersMethodget_next_layer
(self, word)
utils/trie.py:24
↓ 14 callersFunction_pair
(v)
fairseq/fairseq/modules/vggblock.py:15
↓ 14 callersMethoddevice
(self)
fairseq/fairseq/models/roberta/hub_interface.py:32
↓ 14 callersMethodget_normalized_probs
Get normalized probabilities (or log probs) from a net's output.
models/ofa/ofa_speech.py:299
↓ 14 callersMethodload_state_dict
(self, state_dict)
fairseq/examples/laser/laser_src/multitask_data_utils.py:102
↓ 14 callersMethodnext_epoch_itr
Return a new iterator over the dataset. Args: shuffle (bool, optional): shuffle batches before returning the iter
fairseq/fairseq/data/iterators.py:343
↓ 14 callersFunctionremove_bpe
(line, bpe_symbol)
fairseq/examples/noisychannel/rerank_utils.py:248
↓ 14 callersMethodtranslate
( self, sentences: List[str], beam: int = 5, verbose: bool = False, **kwargs )
fairseq/fairseq/hub_utils.py:121
next →1–100 of 6,938, ranked by callers