MCPcopy Create free account

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

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

↓ 13 callersFunctionPositionalEmbedding
( num_embeddings: int, embedding_dim: int, padding_idx: int, learned: bool = False, )
fairseq/fairseq/modules/positional_embedding.py:14
↓ 13 callersMethod_test_case
(self, paths, extra_flags)
fairseq/tests/test_valid_subset_checks.py:57
↓ 13 callersMethodfinalize
Sort symbols by frequency in descending order, ignoring special ones. Args: - threshold defines the minimum word count
fairseq/fairseq/data/dictionary.py:151
↓ 13 callersMethodhas_next
Whether the iterator has been exhausted.
fairseq/fairseq/data/iterators.py:63
↓ 13 callersMethodload_model_ensemble
(self)
fairseq/examples/speech_recognition/new/infer.py:203
↓ 13 callersMethodmax_positions
Maximum input length supported by the encoder.
fairseq/fairseq/models/lstm.py:342
↓ 13 callersMethodsetup_task
(cls, args, src_dict=None, tgt_dict=None, model=None)
fairseq/tests/utils.py:451
↓ 12 callersFunctionEmbedding
( num_embeddings, embedding_dim, padding_idx=None, zero_init=False)
models/ofa/unify_transformer.py:1862
↓ 12 callersFunctionLinear
(in_features, out_features, bias=True)
fairseq/fairseq/models/lightconv.py:898
↓ 12 callersFunction_current_postion_info
()
fairseq/tests/speech_recognition/asr_test_base.py:126
↓ 12 callersMethodbuild_optimizer
Args: cfg (omegaconf.DictConfig): fairseq args params (iterable): iterable of parameters to optimize
fairseq/fairseq/optim/amp_optimizer.py:30
↓ 12 callersMethodcopy
copy the refs.
utils/cider/pyciderevalcap/cider/cider_scorer.py:56
↓ 12 callersMethoddecode
(toks, escape_unk=False)
tasks/mm_tasks/ocr.py:120
↓ 12 callersMethodforward
Generate a batch of translations. Args: sample (dict): batch prefix_tokens (torch.LongTensor, optional): force decode
fairseq/fairseq/sequence_generator.py:123
↓ 12 callersMethodforward
(self, src_tokens, src_lengths=None, **kwargs)
fairseq/tests/utils.py:482
↓ 12 callersFunctionfsdp_wrap
Helper to wrap layers/modules in FSDP. This falls back to a no-op if fairscale is not available. Args: module (nn.Module): modul
fairseq/fairseq/distributed/fully_sharded_data_parallel.py:114
↓ 12 callersMethodget_local_path
(path: str, **kwargs)
fairseq/fairseq/file_io.py:79
↓ 12 callersMethodpre_caption
(self, caption, max_words=None)
data/ofa_dataset.py:68
↓ 12 callersMethodscore
Evaluate language model based on the current lm state and new word Parameters: ----------- state: current lm state
fairseq/examples/speech_recognition/w2l_decoder.py:280
↓ 12 callersMethodstop
(self, n=1, prehook=None)
fairseq/fairseq/logging/meters.py:209
↓ 11 callersMethod__init__
(self, chunks, fn, along_dim=-1)
fairseq/fairseq/modules/kmeans_attention.py:131
↓ 11 callersMethodbuild_criterion
Build the :class:`~fairseq.criterions.FairseqCriterion` instance for this task. Args: cfg (omegaconf.DictConfig)
fairseq/fairseq/tasks/fairseq_task.py:324
↓ 11 callersMethodcuda
(self)
models/sequence_generator.py:138
↓ 11 callersMethoddataset
Return a loaded dataset split. Args: split (str): name of the split (e.g., train, valid, test) Returns:
fairseq/fairseq/tasks/fairseq_task.py:150
↓ 11 callersMethodencode
(self, line)
fairseq/examples/roberta/multiprocessing_bpe_encoder.py:99
↓ 11 callersMethodget_normalized_probs
(self, net_output, log_probs, sample=None)
fairseq/examples/speech_recognition/models/vggtransformer.py:154
↓ 11 callersMethodload_state_dict
Copies parameters and buffers from *state_dict* into this module and its descendants. Overrides the method in :class:`nn.Module`. Com
fairseq/fairseq/models/fairseq_model.py:102
↓ 11 callersFunctionnonlinearity
(x)
models/taming/modules/diffusionmodules/model.py:29
↓ 11 callersMethodstate_dict
(self, destination=None, prefix="", keep_vars=False)
fairseq/fairseq/modules/linearized_convolution.py:31
↓ 10 callersMethodassertAlmostEqual
(self, t1, t2)
fairseq/tests/test_utils.py:108
↓ 10 callersMethoddecode
(self, sentence: str)
fairseq/fairseq/hub_utils.py:286
↓ 10 callersMethoddecode
(self, emissions, padding)
fairseq/examples/speech_recognition/kaldi/kaldi_decoder.py:233
↓ 10 callersMethodencode
(self, sentence: str)
fairseq/fairseq/hub_utils.py:283
↓ 10 callersMethodflush
(self)
fairseq/examples/speech_to_text/data_utils.py:290
↓ 10 callersMethodget_model
Get the (non-wrapped) model instance.
fairseq/fairseq/trainer.py:1109
↓ 10 callersMethodget_targets
(self, *unused)
fairseq/fairseq/criterions/composite_loss.py:56
↓ 10 callersFunctionget_toy_model
( device: str, architecture: str = "roberta_enc_dec", **extra_args: Any, )
fairseq/tests/test_roberta.py:36
↓ 10 callersFunctionlengths_to_padding_mask
(lens)
fairseq/fairseq/data/data_utils.py:532
↓ 10 callersFunctionmake_data
(length=1000)
fairseq/tests/test_huffman.py:32
↓ 10 callersMethodprepare_for_inference_
Prepare model for inference.
fairseq/fairseq/models/fairseq_model.py:160
↓ 10 callersMethodtake
Truncate the iterator to n elements at most.
fairseq/fairseq/data/iterators.py:73
↓ 10 callersFunctiontrain_language_model
( data_dir, arch, extra_flags=None, run_validation=False, extra_valid_flags=None, task
fairseq/tests/utils.py:653
↓ 10 callersMethodupdate
Updates counts from new dictionary.
fairseq/fairseq/data/dictionary.py:138
↓ 10 callersFunctionuse_xla
()
fairseq/fairseq/distributed/utils.py:392
↓ 9 callersFunctionEmbedding
(num_embeddings, embedding_dim, padding_idx)
fairseq/fairseq/models/transformer/transformer_base.py:175
↓ 9 callersFunctionLinear
Weight-normalized Linear layer (input: B x T x C)
fairseq/fairseq/modules/downsampled_multihead_attention.py:300
↓ 9 callersFunctionLinear
Weight-normalized Linear layer (input: N x T x C)
fairseq/fairseq/models/fconv.py:671
↓ 9 callersFunctionNormalize
(in_channels)
models/taming/modules/diffusionmodules/model.py:34
↓ 9 callersMethod__init__
(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, attn_resolutions, dropout=0.0, resam
models/taming/modules/diffusionmodules/model.py:196
↓ 9 callersFunctionapply_to_sample
(f, sample)
fairseq/fairseq/utils.py:79
↓ 9 callersMethoddataset
(self, split)
fairseq/examples/laser/laser_src/laser_task.py:119
↓ 9 callersFunctiondefault
(x, d)
fairseq/fairseq/modules/kmeans_attention.py:30
↓ 9 callersMethodencode
(x: str)
fairseq/fairseq/data/encoders/bytes.py:26
↓ 9 callersFunctionexists
(val)
fairseq/fairseq/modules/kmeans_attention.py:22
↓ 9 callersMethodforward
query: tgt_len, bsz, embed_dim key: src_len, bsz, embed_dim value: src_len, bsz, embed_dim
fairseq/examples/simultaneous_translation/modules/monotonic_multihead_attention.py:325
↓ 9 callersFunctiongen_config_yaml
( manifest_root: Path, spm_filename: Optional[str] = None, vocab_name: Optional[str] = None, y
fairseq/examples/speech_to_text/data_utils.py:135
↓ 9 callersFunctionindex_put
(tensor, indices, value)
fairseq/fairseq/utils.py:723
↓ 9 callersMethodmax_positions
Maximum length supported by the model.
fairseq/fairseq/models/fairseq_model.py:98
↓ 9 callersMethodnext_epoch_itr
(self, shuffle=True, fix_batches_to_gpus=False)
fairseq/examples/laser/laser_src/multitask_data_utils.py:68
↓ 9 callersMethodpad_to_multiple_
Pad Dictionary size to be a multiple of *padding_factor*.
fairseq/fairseq/data/dictionary.py:190
↓ 9 callersFunctionsafe_round
(number, ndigits)
fairseq/fairseq/logging/meters.py:56
↓ 9 callersFunctionsave_df_to_tsv
(dataframe, path: Union[str, Path])
fairseq/examples/speech_to_text/data_utils.py:217
↓ 8 callersMethod__init__
(self, encoder, decoder)
fairseq/tests/utils.py:467
↓ 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/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/tests/test_noising.py:194
↓ 8 callersFunctionbase_gpt3_architecture
(args)
fairseq/fairseq/models/transformer_lm.py:463
↓ 8 callersFunctioncheckpoint_wrapper
A friendlier wrapper for performing activation checkpointing. Compared to the PyTorch version, this version: - wraps an nn.Module, so th
fairseq/fairseq/modules/checkpoint_activations.py:14
↓ 8 callersFunctiondata_file_path
(prefix_path)
fairseq/fairseq/data/indexed_dataset.py:140
↓ 8 callersFunctiondataset_dest_file
(args, output_prefix, lang, extension)
fairseq/fairseq_cli/preprocess.py:397
↓ 8 callersFunctiondecode_fn
(x, tgt_dict, bpe, generator, tokenizer=None)
utils/eval_utils.py:28
↓ 8 callersFunctioneval_lm_main
(data_dir, extra_flags=None)
fairseq/tests/test_binaries.py:1856
↓ 8 callersMethodexists
(path)
fairseq/fairseq/data/fasta_dataset.py:91
↓ 8 callersMethodgenerate
(self, smp, model)
fairseq/fairseq/tasks/online_backtranslation.py:479
↓ 8 callersFunctionget_dummy_input
(T=100, D=80, B=5, K=100)
fairseq/tests/speech_recognition/asr_test_base.py:70
↓ 8 callersMethodget_last_layer
(self)
models/taming/models/vqgan.py:132
↓ 8 callersMethodget_model
Get the (non-wrapped) model instance.
trainer.py:1131
↓ 8 callersMethodget_model
(self)
fairseq/fairseq/models/ema/ema.py:93
↓ 8 callersMethodget_normalized_probs_scriptable
Get normalized probabilities (or log probs) from a net's output.
fairseq/fairseq/models/fairseq_decoder.py:73
↓ 8 callersFunctionget_rank
(group)
fairseq/fairseq/distributed/utils.py:419
↓ 8 callersMethodhypoScore
(self, hypo, pos_probs, normalized=True, lenpen=1.0)
fairseq/tests/test_sequence_generator.py:780
↓ 8 callersMethodhypoTokens
(self, hypo, tokens)
fairseq/tests/test_sequence_generator.py:777
↓ 8 callersFunctionis_xla_tensor
(tensor)
fairseq/fairseq/utils.py:719
↓ 8 callersMethodload_checkpoint
Load all training state from a checkpoint file. rank = 0 will load the checkpoint, and then broadcast it to all other ranks.
fairseq/fairseq/trainer.py:441
↓ 8 callersMethodload_dataset
Load a given dataset split. Args: split (str): name of the split (e.g., train, valid, test)
fairseq/fairseq/tasks/masked_lm.py:127
↓ 8 callersMethodload_dictionary
Load the dictionary from the filename Args: filename (str): the filename
fairseq/fairseq/tasks/fairseq_task.py:89
↓ 8 callersMethodls
(path: str)
fairseq/fairseq/file_io.py:97
↓ 8 callersFunctionmake_code_builder
(data: tp.List[tp.List[str]])
fairseq/tests/test_huffman.py:44
↓ 8 callersFunctionmk_sample
( lang: str, device: str, tok: Sequence[int] = None, batch_size: int = 2 )
fairseq/tests/test_roberta.py:77
↓ 8 callersMethodnormalize
(self, dense_x)
fairseq/examples/wav2vec/unsupervised/models/wav2vec_u.py:493
↓ 8 callersFunctionpost_process
(sentence: str, symbol: str)
fairseq/fairseq/data/data_utils.py:369
↓ 8 callersMethodprint
Print end-of-epoch stats.
fairseq/fairseq/logging/progress_bar.py:149
↓ 8 callersFunctionread_last_log_entry
( logs: List[logging.LogRecord], logger_name: str )
fairseq/tests/test_binaries.py:1657
↓ 8 callersMethodsample
To leverage the efficiency of distributed training, samples for all layers are computed at once for each logit_idx. Logits are parameters
fairseq/examples/latent_depth/latent_depth_src/modules/latent_layers.py:26
↓ 8 callersMethodsetup_task
(cls, cfg: MaskedLMConfig, **kwargs)
fairseq/fairseq/tasks/masked_lm.py:120
↓ 7 callersFunctionLinear
Linear layer (input: N x T x C)
fairseq/examples/speech_recognition/models/vggtransformer.py:870
↓ 7 callersMethod__init__
(self, tgt_dict)
fairseq/fairseq/search.py:20
↓ 7 callersMethod__init__
( self, input_dim, clamp_grad=True, max_grad_value=256, eps=1e-5,
fairseq/fairseq/models/speech_to_text/modules/emformer.py:57
↓ 7 callersMethod__init__
(self, in_dim, sizes)
fairseq/examples/textless_nlp/gslm/unit2speech/tacotron2/model.py:91
↓ 7 callersMethod__init__
(self, tgt_dict)
models/search.py:20
↓ 7 callersFunction_lang_token_index
(dictionary, lang: str)
fairseq/fairseq/tasks/online_backtranslation.py:667
← previousnext →101–200 of 6,938, ranked by callers