MCPcopy Create free account

hub / github.com/FLC777/GLAT / functions

Functions3,098 in github.com/FLC777/GLAT

↓ 2 callersMethodextract_features
( self, tokens: torch.LongTensor, return_all_hiddens: bool = False )
fairseq/models/roberta/hub_interface.py:82
↓ 2 callersMethodextract_features
Similar to *forward* but only return features. Returns: tuple: - the decoder's features of shape `(batch
fairseq/models/wav2vec/wav2vec2_asr.py:496
↓ 2 callersFunctionfile_name
(prefix, lang)
fairseq_cli/preprocess.py:49
↓ 2 callersMethodfilter_indices_by_size
Filter examples that are too large Args: indices (np.array): original array of sample indices dataset (~fair
fairseq/tasks/fairseq_task.py:171
↓ 2 callersFunctionformat_stat
(stat)
fairseq/logging/progress_bar.py:101
↓ 2 callersMethodforward
Args: tokens(Tensor): Input tokens(Bsz*beam, seq_len) lprobs(Tensor): likelihood probability, Expected to
fairseq/ngram_repeat_block.py:63
↓ 2 callersMethodforward
(self)
fairseq/sequence_generator.py:741
↓ 2 callersMethodforward
(self, input)
fairseq/modules/layer_norm.py:42
↓ 2 callersMethodforward
Args: src_tokens (LongTensor): tokens in the source language of shape `(batch, src_len)` src_lengths
fairseq/models/fairseq_encoder.py:33
↓ 2 callersMethodforward_decoder
( self, tokens, encoder_outs: List[Dict[str, List[Tensor]]], incremental_state
fairseq/sequence_generator.py:760
↓ 2 callersMethodforward_embedding
(self, prev_output_tokens, states=None)
fairseq/models/nat/nonautoregressive_transformer.py:357
↓ 2 callersMethodforward_encoder
(self, net_input: Dict[str, Tensor])
fairseq/sequence_generator.py:754
↓ 2 callersMethodgenerate
( self, tokenized_sentences: List[torch.LongTensor], beam: int = 5, verbose: b
fairseq/hub_utils.py:147
↓ 2 callersMethodget_cached_state
( self, incremental_state: Dict[str, Dict[str, Optional[Tensor]]], )
fairseq/models/lstm.py:618
↓ 2 callersMethodget_codebook_indices
(self)
fairseq/modules/gumbel_vector_quantizer.py:90
↓ 2 callersFunctionget_data_parallel_group
Get the data parallel group the caller rank belongs to.
fairseq/distributed/utils.py:445
↓ 2 callersMethodget_data_paths_and_lang_pairs
(self, split)
fairseq/data/multilingual/multilingual_data_manager.py:842
↓ 2 callersMethodget_dataset_key
(cls, data_category, src, tgt)
fairseq/data/multilingual/multilingual_data_manager.py:858
↓ 2 callersMethodget_embedding
Build sinusoidal embeddings. This matches the implementation in tensor2tensor, but differs slightly from the description in Section 3
fairseq/modules/sinusoidal_positional_embedding.py:36
↓ 2 callersFunctionget_fbank
Get mel-filter bank features via PyKaldi or TorchAudio. Prefer PyKaldi (faster CPP implementation) to TorchAudio (Python implementation). Note tha
fairseq/data/audio/audio_utils.py:77
↓ 2 callersFunctionget_features_or_waveform
Get speech features from .npy file or waveform from .wav/.flac file. The file may be inside an uncompressed ZIP file and is accessed via byte
fairseq/data/audio/speech_to_text_dataset.py:162
↓ 2 callersFunctionget_files
(path, relative_to="fairseq")
setup.py:234
↓ 2 callersFunctionget_global_rank
()
fairseq/distributed/utils.py:427
↓ 2 callersMethodget_label
(self, index)
fairseq/data/add_target_dataset.py:30
↓ 2 callersMethodget_langtok_index
(cls, lang_tok, dic)
fairseq/data/multilingual/multilingual_data_manager.py:452
↓ 2 callersFunctionget_layers
Filters out the layers according to a regexp. Note that we omit biases. Args: - model: a nn.Module - filter_regexp: a re
fairseq/modules/quantization/pq/utils.py:155
↓ 2 callersMethodget_log_prob
Computes the log probabilities for all the words of the vocabulary, given a 2D tensor of hidden vectors.
fairseq/modules/adaptive_softmax.py:228
↓ 2 callersMethodget_lprobs_and_target
(self, model, net_output, sample)
fairseq/criterions/label_smoothed_cross_entropy.py:97
↓ 2 callersFunctionget_model_parallel_group
()
fairseq/distributed/utils.py:466
↓ 2 callersMethodget_original_text
(self, i)
fairseq/data/indexed_dataset.py:291
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
fairseq/data/encoders/gpt2_bpe_utils.py:39
↓ 2 callersFunctionget_param
Given a quantization configuration, get the right parameter for the module to be quantized. Args: - module: a nn.Module
fairseq/modules/quantization/pq/utils.py:193
↓ 2 callersMethodget_sampling_ratios
(self, data_param_list, datasets, epoch, shard_epoch=None)
fairseq/data/multilingual/multilingual_data_manager.py:1014
↓ 2 callersMethodget_shard_id
(cls, num_shards, epoch, shard_epoch=None)
fairseq/data/multilingual/multilingual_data_manager.py:911
↓ 2 callersMethodget_split_num_data_shards
(self, split)
fairseq/data/multilingual/multilingual_data_manager.py:876
↓ 2 callersFunctionget_time_gap
(s, e)
fairseq/data/multilingual/sampled_multi_dataset.py:21
↓ 2 callersFunctionget_token_to_word_mapping
(tokens, exclude_list)
fairseq/utils.py:604
↓ 2 callersFunctionget_training_stats
(stats: Dict[str, Any])
fairseq_cli/train.py:358
↓ 2 callersMethodhas_incremental_states
(self)
fairseq/sequence_generator.py:747
↓ 2 callersFunctionhydra_init
(cfg_name="config")
fairseq/dataclass/initialize.py:16
↓ 2 callersFunctioninfer_conv_output_dim
(conv_op, input_dim, sample_inchannel)
fairseq/modules/vggblock.py:22
↓ 2 callersMethodinitialize_ctc_input
(self, src_tokens)
glat_plugins/models/glat_ctc.py:129
↓ 2 callersMethodinject_noise
(self, target_tokens)
fairseq/tasks/translation_lev.py:66
↓ 2 callersMethodinject_noise
(self, target_tokens)
glat_plugins/tasks/translation_lev_modified.py:83
↓ 2 callersFunctioninterpret_dc_type
(field_type)
fairseq/dataclass/utils.py:38
↓ 2 callersFunctionis_better
(a, b)
fairseq/checkpoint_utils.py:59
↓ 2 callersFunctionis_master
(cfg: DistributedTrainingConfig)
fairseq/distributed/utils.py:42
↓ 2 callersFunctionkeys
(ns)
scripts/compare_namespaces.py:12
↓ 2 callersFunctionlightconv_wmt_en_de_big
(args)
fairseq/models/lightconv.py:994
↓ 2 callersMethodload_a_dataset
( self, split, data_path, src, src_dict, tgt, tgt_dict
fairseq/data/multilingual/multilingual_data_manager.py:748
↓ 2 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/trainer.py:297
↓ 2 callersFunctionload_checkpoint_to_cpu
Loads a checkpoint to CPU (with upgrading for backward compatibility). If doing single-GPU training or if the checkpoint is only being loaded by
fairseq/checkpoint_utils.py:229
↓ 2 callersMethodload_data
(cls, path, vdict, impl)
fairseq/data/multilingual/multilingual_data_manager.py:487
↓ 2 callersMethodload_dictionary
Load the dictionary from the filename Args: filename (str): the filename
fairseq/tasks/sentence_prediction.py:100
↓ 2 callersMethodload_into_concat_dataset
(self, split, datasets, data_param_list)
fairseq/data/multilingual/multilingual_data_manager.py:1060
↓ 2 callersMethodload_split_datasets
( self, split, training, epoch=1, combine=False, shard_epoch=None, **kwargs )
fairseq/data/multilingual/multilingual_data_manager.py:1038
↓ 2 callersFunctionlog_metric
(key, logging_outputs)
glat_plugins/criterions/ctc_loss.py:245
↓ 2 callersFunctionlog_metric
(key, logging_outputs)
glat_plugins/criterions/glat_loss.py:199
↓ 2 callersFunctionlogsumexp
(x, dim=1)
fairseq/modules/dynamic_crf_layer.py:24
↓ 2 callersFunctionmain
(cfg: FairseqConfig)
fairseq_cli/train.py:46
↓ 2 callersFunctionmake_all
(lang, vocab)
fairseq_cli/preprocess.py:250
↓ 2 callersMethodmake_dataset
(type, dictionary)
fairseq/tasks/sentence_ranking.py:109
↓ 2 callersMethodmake_generation_fast_
Legacy entry point to optimize model for faster generation. Prefer prepare_for_inference_.
fairseq/models/fairseq_model.py:167
↓ 2 callersMethodmax_positions_helper
Maximum input length supported by the encoder or decoder.
fairseq/model_parallel/models/pipeline_parallel_transformer/model.py:330
↓ 2 callersFunctionmerge
(key, is_list=False)
fairseq/data/monolingual_dataset.py:16
↓ 2 callersMethodmerge_file_
(self, another_file)
fairseq/data/indexed_dataset.py:339
↓ 2 callersFunctionmigrate_registry
( name, value, registry, args, overrides, deletes, use_name_as_val=False )
fairseq/dataclass/utils.py:267
↓ 2 callersMethodmultiply_grads
Multiplies grads by a constant ``c``.
fairseq/optim/fp16_optimizer.py:180
↓ 2 callersFunctionnew_arange
Return a Tensor of `size` filled with a range function on the device of x. If size is empty, using the size of the variable x.
fairseq/utils.py:653
↓ 2 callersMethodno_sync
A context manager to disable gradient synchronization.
fairseq/distributed/legacy_distributed_data_parallel.py:66
↓ 2 callersFunctionnorm_block
(is_layer_norm, dim, affine=True)
fairseq/models/wav2vec/wav2vec.py:354
↓ 2 callersMethodordered_indices
(self)
fairseq/data/sort_dataset.py:20
↓ 2 callersFunctionoutput_doc
(i)
scripts/shard_docs.py:35
↓ 2 callersMethodoutput_layer
(self, features, masked_tokens=None, **unused)
fairseq/models/roberta/model.py:490
↓ 2 callersFunctionoverride_module_args
use the field in args to overrides those in cfg
fairseq/dataclass/utils.py:280
↓ 2 callersFunctionparse_checkpoints
(files)
scripts/rm_pt.py:19
↓ 2 callersMethodparse_manuallr_args
(self, lr_args_str)
fairseq/optim/lr_scheduler/manual_lr_scheduler.py:34
↓ 2 callersFunctionpost_process
(sentence: str, symbol: str)
fairseq/data/data_utils.py:361
↓ 2 callersMethodprecision
(self)
fairseq/scoring/bleu.py:137
↓ 2 callersFunctionprune_state_dict
Prune the given state_dict if desired for LayerDrop (https://arxiv.org/abs/1909.11556). Training with LayerDrop allows models to be robust to
fairseq/checkpoint_utils.py:568
↓ 2 callersMethodread_data
(self, path)
fairseq/data/indexed_dataset.py:163
↓ 2 callersMethodreduce_metrics
Aggregate logging outputs from data parallel training.
fairseq/criterions/ctc.py:219
↓ 2 callersMethodregister_hook
(self)
fairseq/modules/quantization/scalar/modules/qact.py:55
↓ 2 callersMethodreorder_encoder_out
Reorder encoder output according to *new_order*. Args: encoder_out: output from the ``forward()`` method new
fairseq/sequence_generator.py:825
↓ 2 callersFunctionrequest_wrap_timeout
(func, url)
fairseq/file_utils.py:229
↓ 2 callersMethodreset_dummy_batch
(self, batch)
fairseq/trainer.py:520
↓ 2 callersMethodresidual_connection
(self, x, residual)
fairseq/modules/transformer_layer.py:89
↓ 2 callersFunctions2t_transformer_s
(args)
fairseq/models/speech_to_text/s2t_transformer.py:416
↓ 2 callersMethodsave_checkpoint
Save all training state in a checkpoint file.
fairseq/trainer.py:277
↓ 2 callersFunctionscalar_bias
(input, dim, bias_init=0)
fairseq/modules/scalar_bias.py:30
↓ 2 callersMethodscale
(self, outputs)
fairseq/optim/dynamic_loss_scaler.py:28
↓ 2 callersFunctionscore
(fdsys)
fairseq_cli/score.py:59
↓ 2 callersMethodsep
Helper to get index of sep symbol
fairseq/data/legacy/masked_lm_dictionary.py:58
↓ 2 callersMethodset_num_updates
Set the number of parameters updates.
fairseq/trainer.py:922
↓ 2 callersMethodset_num_updates
Set the number of parameters updates.
fairseq/optim/bmuf.py:142
↓ 2 callersMethodsetup_sampling
(self, sample_ratios, virtual_size)
fairseq/data/multilingual/sampled_multi_dataset.py:133
↓ 2 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
fairseq/data/language_pair_dataset.py:416
↓ 2 callersMethodsize
(self, index)
fairseq/data/add_target_dataset.py:42
↓ 2 callersMethodsize
(self, index)
fairseq/data/indexed_dataset.py:194
↓ 2 callersMethodsize
(self, index)
fairseq/data/multilingual/sampled_multi_dataset.py:246
← previousnext →401–500 of 3,098, ranked by callers