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
Function
dummy_dataloader
( samples, padding_idx=1, eos_idx=2, batch_size=None, )
tests/utils.py:29
Method
dummy_sentence
(self, length)
fairseq/data/dictionary.py:239
Method
dummy_train_step
Dummy training step for warming caching allocator.
fairseq/trainer.py:445
Method
elapsed_time
(self)
fairseq/meters.py:45
Method
encode
(self, sentence: str)
fairseq/hub_utils.py:217
Method
encode
(self, x: str)
fairseq/data/encoders/subword_nmt_bpe.py:44
Method
encode
(self, x: str)
fairseq/data/encoders/moses_tokenizer.py:40
Method
encode
(self, x: str)
fairseq/data/encoders/fastbpe.py:31
Method
encode
(self, x: str)
fairseq/data/encoders/nltk_tokenizer.py:19
Method
encode
(self, text)
fairseq/data/encoders/gpt2_bpe_utils.py:106
Method
encode
(self, x: str)
fairseq/data/encoders/gpt2_bpe.py:39
Method
encode
(self, x: str)
fairseq/data/encoders/space_tokenizer.py:17
Method
encode
(self, x: str)
fairseq/data/encoders/sentencepiece_bpe.py:29
Function
encode_line
(line)
scripts/spm_encode.py:74
Method
encode_lines
Encode a set of lines. All lines will be encoded together.
examples/roberta/multiprocessing_bpe_encoder.py:107
Method
end_of_epoch
Returns whether the most recent epoch iterator has been exhausted
fairseq/data/iterators.py:59
Method
end_of_epoch
(self)
fairseq/data/iterators.py:96
Function
eval_bool
(x, default=False)
fairseq/options.py:70
Method
exists
(path)
fairseq/data/indexed_dataset.py:281
Method
exists
(path)
fairseq/data/indexed_dataset.py:490
Method
expand_bool_array
(val)
fairseq/models/fconv_self_att.py:169
Method
expand_bool_array
(val)
fairseq/models/fconv_self_att.py:291
Function
extended_noun_chunks
(sentence)
examples/roberta/wsc/wsc_utils.py:36
Method
extra_repr
(self)
fairseq/modules/dynamic_convolution.py:214
Method
extra_repr
(self)
fairseq/modules/lightweight_convolution.py:230
Method
extra_repr
(self)
fairseq/models/lightconv.py:512
Method
extra_repr
(self)
fairseq/models/lightconv.py:645
Method
extract_features
Returns: tuple: - the decoder's features of shape `(batch, tgt_len, embed_dim)` - a dictionary wi
fairseq/models/fairseq_incremental_decoder.py:51
Method
extract_features
Similar to *forward* but only return features. Returns: tuple: - the decoder's features of shape `(batch
fairseq/models/fairseq_model.py:225
Method
extract_features
Similar to *forward* but only return features. Returns: tuple: - the decoder's features of shape `(batch
fairseq/models/fairseq_model.py:369
Method
extract_features_aligned_to_words
Extract RoBERTa features, aligned to spaCy's word-level tokenizer.
fairseq/models/roberta/hub_interface.py:110
Method
f
(l)
tests/test_multi_corpus_sampled_dataset.py:82
Function
fconv_iwslt_de_en
(args)
fairseq/models/fconv.py:617
Function
fconv_lm_dauphin_gbw
(args)
fairseq/models/fconv_lm.py:94
Function
fconv_lm_dauphin_wikitext103
(args)
fairseq/models/fconv_lm.py:78
Function
fconv_self_att_wp
(args)
fairseq/models/fconv_self_att.py:552
Function
fconv_wmt_en_de
(args)
fairseq/models/fconv.py:633
Function
fconv_wmt_en_fr
(args)
fairseq/models/fconv.py:647
Function
fconv_wmt_en_ro
(args)
fairseq/models/fconv.py:627
Function
filename_to_url
Return the url and etag (which may be ``None``) stored for `filename`. Raise ``EnvironmentError`` if `filename` or its stored metadata do not
fairseq/file_utils.py:108
Method
fill_mask
(self, masked_input: str, topk: int = 5)
fairseq/models/roberta/hub_interface.py:139
Function
fill_with_neg_inf
FP16-compatible function that fills a tensor with -inf.
fairseq/utils.py:233
Function
filter_by_size
Filter indices based on their size. Args: indices (List[int]): ordered list of dataset indices size_fn (callable): function
fairseq/data/data_utils.py:125
Function
filter_noun_chunks
(chunks, exclude_pronouns=False, exclude_query=None, exact_match=False)
examples/roberta/wsc/wsc_utils.py:193
Method
finalize
(self, index_file)
fairseq/data/indexed_dataset.py:332
Method
finalize
(self, index_file)
fairseq/data/indexed_dataset.py:519
Method
finalize_hypos
Finalize the given hypotheses at this step, while keeping the total number of finalized hypotheses per sentence <= beam_size.
fairseq/sequence_generator.py:197
Method
forward
(self, *inputs, **kwargs)
fairseq/legacy_distributed_data_parallel.py:85
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as
fairseq/criterions/adaptive_loss.py:30
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as t
fairseq/criterions/legacy_masked_lm.py:64
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as
fairseq/criterions/sentence_prediction.py:26
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as
fairseq/criterions/cross_entropy.py:20
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as t
fairseq/criterions/masked_lm.py:25
Method
forward
(self, **unused)
fairseq/criterions/composite_loss.py:46
Method
forward
(self, model, sample, reduce=True)
fairseq/criterions/composite_loss.py:65
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as
fairseq/criterions/label_smoothed_cross_entropy.py:48
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as
fairseq/criterions/binary_cross_entropy.py:21
Method
forward
Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as
fairseq/criterions/fairseq_criterion.py:26
Method
forward
Compute ranking loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used
fairseq/criterions/sentence_ranking.py:37
Method
forward
Assuming the input, x, of the shape T x B x C and producing an output in the shape T x B x C args: x: Input of shape T x B x C, i.
fairseq/modules/dynamic_convolution.py:79
Method
forward
Input is expected to be of size [bsz x seqlen].
fairseq/modules/sinusoidal_positional_embedding.py:55
Method
forward
(ctx, x, scale)
fairseq/modules/grad_multiply.py:11
Method
forward
input size: B x C x T output size: B x C x T
fairseq/modules/lightweight_convolution.py:59
Method
forward
Assuming the input, x, of the shape T x B x C and producing an output in the shape T x B x C args: x: Input of shape T x B x C, i.
fairseq/modules/lightweight_convolution.py:130
Method
forward
(ctx, logp, posterior, dim=-1)
fairseq/modules/logsumexp_moe.py:17
Method
forward
(self, input)
fairseq/modules/adaptive_softmax.py:20
Method
forward
(self, input)
fairseq/modules/adaptive_softmax.py:42
Method
forward
Args: input: (b x t x d) target: (b x t) Returns: 2 lists: output for each cutoff section and new
fairseq/modules/adaptive_softmax.py:147
Method
forward
( self, tokens: torch.Tensor, segment_labels: torch.Tensor = None, last_state_
fairseq/modules/transformer_sentence_encoder.py:169
Method
forward
Args: incremental_state: Used to buffer signal; if not None, then input is expected to contain a single frame. If
fairseq/modules/linearized_convolution.py:28
Method
forward
Input is expected to be of size [bsz x seqlen].
fairseq/modules/learned_positional_embedding.py:28
Method
forward
(self, input)
fairseq/modules/conv_tbc.py:27
Method
forward
Args: x (Tensor): input to the layer of shape `(seq_len, batch, embed_dim)` encoder_padding_mask (ByteTensor): binary
fairseq/modules/transformer_layer.py:67
Method
forward
Args: x (Tensor): input to the layer of shape `(seq_len, batch, embed_dim)` encoder_padding_mask (ByteTensor): binary
fairseq/modules/transformer_layer.py:186
Method
forward
(self, input1, input2)
fairseq/modules/beamable_mm.py:22
Method
forward
Input shape: Time x Batch x Channel Self-attention can be implemented by passing in the same arguments for query, key and value. Futur
fairseq/modules/downsampled_multihead_attention.py:62
Method
forward
( self, query, key, value, mask_future_timesteps=False, key_padding_mask=None, use_scalar_bias
fairseq/modules/downsampled_multihead_attention.py:188
Method
forward
(self, x)
fairseq/modules/downsampled_multihead_attention.py:236
Method
forward
LayerNorm is applied either before or after the self-attention/ffn modules similar to the original Transformer imlementation.
fairseq/modules/transformer_sentence_encoder_layer.py:62
Method
forward
(self, encoder_out)
fairseq/modules/mean_pool_gating_network.py:27
Method
forward
(ctx, input, dim, bias_init)
fairseq/modules/scalar_bias.py:17
Method
forward
(self, x)
fairseq/modules/vggblock.py:112
Method
forward
(self, input: torch.Tensor)
fairseq/modules/adaptive_input.py:61
Method
forward
( self, input: torch.Tensor, )
fairseq/modules/character_token_embedder.py:97
Method
forward
Input shape: Time x Batch x Channel Timesteps can be masked by supplying a T x T mask in the `attn_mask` argument. Padding elements c
fairseq/modules/multihead_attention.py:95
Method
forward
Args: prev_output_tokens (LongTensor): shifted output tokens of shape `(batch, tgt_len)`, for teacher forcing
fairseq/models/fairseq_decoder.py:19
Method
forward
Args: src_tokens (LongTensor): tokens in the source language of shape `(batch, src_len)` src_lengths
fairseq/models/fconv.py:188
Method
forward
(self, x, target_embedding, encoder_out, encoder_padding_mask)
fairseq/models/fconv.py:296
Method
forward
(self, prev_output_tokens, encoder_out=None, incremental_state=None, **unused)
fairseq/models/fconv.py:415
Method
forward
Args: src_tokens (LongTensor): tokens in the source language of shape `(batch, src_len)` Returns:
fairseq/models/lightconv.py:213
Method
forward
Args: prev_output_tokens (LongTensor): previous decoder outputs of shape `(batch, tgt_len)`, for teacher forcing
fairseq/models/lightconv.py:342
Method
forward
Args: x (Tensor): input to the layer of shape `(seq_len, batch, embed_dim)` encoder_padding_mask (ByteTensor): binary
fairseq/models/lightconv.py:471
Method
forward
Args: x (Tensor): input to the layer of shape `(seq_len, batch, embed_dim)` encoder_padding_mask (ByteTensor): binary
fairseq/models/lightconv.py:574
Method
forward
Args: prev_output_tokens (LongTensor): shifted output tokens of shape `(batch, tgt_len)`, for teacher forcing
fairseq/models/fairseq_incremental_decoder.py:34
Method
forward
(self, prev_output_tokens, encoder_out)
fairseq/models/fconv_self_att.py:381
Method
forward
(self, x)
fairseq/models/fconv_self_att.py:482
Method
forward
Run the forward pass for an encoder-decoder model. First feed a batch of source tokens through the encoder. Then, feed the e
fairseq/models/fairseq_model.py:198
Method
forward
(self, src_tokens, src_lengths, prev_output_tokens, **kwargs)
fairseq/models/fairseq_model.py:310
Method
forward
Run the forward pass for a decoder-only model. Feeds a batch of tokens through the decoder to predict the next tokens. Args
fairseq/models/fairseq_model.py:351
Method
forward
Run the forward pass for a encoder-only model. Feeds a batch of tokens through the encoder to generate features. Args:
fairseq/models/fairseq_model.py:409
← previous
next →
1,301–1,400 of 2,038, ranked by callers