MCPcopy Create free account

hub / github.com/XiangLi1999/PrefixTuning / functions

Functions3,725 in github.com/XiangLi1999/PrefixTuning

Methodall_special_tokens_extended
:obj:`List[Union[str, tokenizers.AddedToken]]`: All the special tokens (:obj:`'<unk>'`, :obj:`'<cls>'`, etc.) mapped to class attribu
transformers/src/transformers/tokenization_utils_base.py:1027
Functionany_requires_grad
(model: nn.Module)
seq2seq/utils.py:410
Methodappend_response
Append a response to the list of generated responses. Args: response (:obj:`str`): The model generated response.
transformers/src/transformers/pipelines.py:2262
Methodapply_gradients
(self, grads_and_vars, name=None, **kwargs)
transformers/src/transformers/optimization_tf.py:226
Methodapply_gradients
(self, features, labels, nb_instances_in_global_batch)
transformers/src/transformers/trainer_tf.py:648
Functionassert_not_all_frozen
(model)
seq2seq/utils.py:421
Functionassert_screenout
(out, what)
transformers/src/transformers/testing_utils.py:214
Methodavailable_indices
(self)
seq2seq/utils.py:310
Methodbackend_tokenizer
:obj:`tokenizers.implementations.BaseTokenizer`: The Rust tokenizer used as a backend.
transformers/src/transformers/tokenization_utils_fast.py:119
Methodbackward
(ctx, grad_hidden_states)
transformers/src/transformers/modeling_reformer.py:1649
Methodbackward_compatible
(self)
transformers/src/transformers/modeling_tf_transfo_xl.py:460
Methodbackward_compatible
(self)
transformers/src/transformers/modeling_transfo_xl.py:787
Methodbase_model
:obj:`torch.nn.Module`: The main body of the model.
transformers/src/transformers/modeling_utils.py:425
Methodbatch_decode
Convert a list of lists of token ids into a list of strings by calling decode. Args: sequences (:obj:`List[List[int]]`):
transformers/src/transformers/tokenization_utils_base.py:2677
Methodbos_token
:obj:`str`: Beginning of sentence token. Log an error if used while not having been set.
transformers/src/transformers/tokenization_utils_base.py:782
Methodbos_token_id
:obj:`Optional[int]`: Id of the beginning of sentence token in the vocabulary. Returns :obj:`None` if the token has not been set.
transformers/src/transformers/tokenization_utils_base.py:898
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_electra.py:804
Methodbuild
Build shared word embedding layer
transformers/src/transformers/modeling_tf_albert.py:102
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_transfo_xl.py:153
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_transfo_xl.py:337
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_transfo_xl.py:441
Methodbuild
Build shared word embedding layer
transformers/src/transformers/modeling_tf_mobilebert.py:142
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_mobilebert.py:645
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_lxmert.py:1031
Methodbuild
Build shared token embedding layer Shared weights logic adapted from https://github.com/tensorflow/models/blob/a009f4fb9d2fc4949e3
transformers/src/transformers/modeling_tf_utils.py:738
Methodbuild
Build shared word embedding layer
transformers/src/transformers/modeling_tf_longformer.py:152
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_bert.py:468
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_distilbert.py:611
Methodbuild
Build shared word embedding layer
transformers/src/transformers/modeling_tf_roberta.py:97
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_xlnet.py:84
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_xlnet.py:450
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_transfo_xl_utilities.py:45
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_flaubert.py:655
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_xlm.py:735
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_funnel.py:438
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_funnel.py:985
Methodbuild
Build shared word embedding layer
transformers/src/transformers/modeling_tf_t5.py:76
Methodbuild
(self, input_shape)
transformers/src/transformers/modeling_tf_ctrl.py:572
Methodbuild_corpus
(self, path, dataset)
transformers/src/transformers/tokenization_transfo_xl.py:848
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_xlm_roberta.py:175
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_roberta.py:177
Methodbuild_inputs_with_special_tokens
(self, token_ids_0, token_ids_1=None)
transformers/src/transformers/tokenization_roberta.py:393
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_albert.py:235
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_phobert.py:159
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_bertweet.py:177
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_mbart.py:133
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_xlm.py:847
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_xlnet.py:239
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence by adding eos to the end. no bos token is added to the front. - single sequence: ``X </s>``
transformers/src/transformers/tokenization_pegasus.py:86
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_bert.py:243
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_bert.py:653
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence by appending eos_token_id.
transformers/src/transformers/tokenization_marian.py:121
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_camembert.py:142
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
transformers/src/transformers/tokenization_fsmt.py:365
Methodcalc_generative_metrics
(self, preds, target)
seq2seq/finetune.py:729
Methodcall
(self, hidden_states, attention_mask, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_electra.py:87
Methodcall
(self, hidden_states, input_tensor, training=False)
transformers/src/transformers/modeling_tf_electra.py:139
Methodcall
(self, input_tensor, attention_mask, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_electra.py:158
Methodcall
(self, hidden_states)
transformers/src/transformers/modeling_tf_electra.py:182
Methodcall
(self, hidden_states, input_tensor, training=False)
transformers/src/transformers/modeling_tf_electra.py:200
Methodcall
(self, hidden_states, attention_mask, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_electra.py:217
Methodcall
( self, hidden_states, attention_mask, head_mask, output_attentions,
transformers/src/transformers/modeling_tf_electra.py:236
Methodcall
(self, hidden_states)
transformers/src/transformers/modeling_tf_electra.py:285
Methodcall
Get token embeddings of inputs. Args: inputs: list of three int64 tensors with shape [batch_size, length]: (input_ids, position_id
transformers/src/transformers/modeling_tf_electra.py:335
Methodcall
(self, discriminator_hidden_states, training=False)
transformers/src/transformers/modeling_tf_electra.py:417
Methodcall
(self, generator_hidden_states, training=False)
transformers/src/transformers/modeling_tf_electra.py:432
Methodcall
( self, inputs, attention_mask=None, token_type_ids=None, position_ids
transformers/src/transformers/modeling_tf_electra.py:510
Methodcall
(self, inputs, **kwargs)
transformers/src/transformers/modeling_tf_electra.py:721
Methodcall
r""" Returns: Examples:: >>> import tensorflow as tf >>> from transformers import ElectraTokenizer, TFElectr
transformers/src/transformers/modeling_tf_electra.py:744
Methodcall
(self, hidden_states, training=False)
transformers/src/transformers/modeling_tf_electra.py:809
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length)`, `optional`): Labels for computing the masked language
transformers/src/transformers/modeling_tf_electra.py:848
Methodcall
(self, inputs, **kwargs)
transformers/src/transformers/modeling_tf_electra.py:923
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size,)`, `optional`): Labels for computing the sequence classification/regress
transformers/src/transformers/modeling_tf_electra.py:953
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size,)`, `optional`): Labels for computing the multiple choice classification
transformers/src/transformers/modeling_tf_electra.py:1045
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length)`, `optional`): Labels for computing the token classific
transformers/src/transformers/modeling_tf_electra.py:1163
Methodcall
r""" start_positions (:obj:`tf.Tensor` of shape :obj:`(batch_size,)`, `optional`): Labels for position (index) of the start of the
transformers/src/transformers/modeling_tf_electra.py:1244
Methodcall
Get token embeddings of inputs. Args: inputs: list of three int64 tensors with shape [batch_size, length]: (input_ids, position_id
transformers/src/transformers/modeling_tf_albert.py:114
Methodcall
(self, hidden_states, input_tensor, training=False)
transformers/src/transformers/modeling_tf_albert.py:192
Methodcall
(self, input_tensor, attention_mask, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_albert.py:237
Methodcall
(self, hidden_states, attention_mask, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_albert.py:312
Methodcall
(self, hidden_states, attention_mask, head_mask, output_attentions, output_hidden_states, training=False)
transformers/src/transformers/modeling_tf_albert.py:338
Methodcall
( self, hidden_states, attention_mask, head_mask, output_attentions,
transformers/src/transformers/modeling_tf_albert.py:378
Methodcall
(self, hidden_states)
transformers/src/transformers/modeling_tf_albert.py:457
Methodcall
( self, inputs, attention_mask=None, token_type_ids=None, position_ids
transformers/src/transformers/modeling_tf_albert.py:502
Methodcall
(self, inputs, **kwargs)
transformers/src/transformers/modeling_tf_albert.py:750
Methodcall
r""" Return: Example:: >>> import tensorflow as tf >>> from transformers import AlbertTokenizer, TFAlbertFor
transformers/src/transformers/modeling_tf_albert.py:774
Methodcall
(self, pooled_output, training: bool)
transformers/src/transformers/modeling_tf_albert.py:821
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length)`, `optional`): Labels for computing the masked language
transformers/src/transformers/modeling_tf_albert.py:848
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size,)`, `optional`): Labels for computing the sequence classification/regress
transformers/src/transformers/modeling_tf_albert.py:930
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length)`, `optional`): Labels for computing the token classific
transformers/src/transformers/modeling_tf_albert.py:1017
Methodcall
r""" start_positions (:obj:`tf.Tensor` of shape :obj:`(batch_size,)`, `optional`): Labels for position (index) of the start of the
transformers/src/transformers/modeling_tf_albert.py:1101
Methodcall
r""" labels (:obj:`tf.Tensor` of shape :obj:`(batch_size,)`, `optional`): Labels for computing the multiple choice classification
transformers/src/transformers/modeling_tf_albert.py:1206
Methodcall
(self, pos_seq, bsz=None)
transformers/src/transformers/modeling_tf_transfo_xl.py:49
Methodcall
(self, inp, training=False)
transformers/src/transformers/modeling_tf_transfo_xl.py:78
Methodcall
(self, w, r, attn_mask, mems, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_transfo_xl.py:173
Methodcall
(self, dec_inp, r, dec_attn_mask, mems, head_mask, output_attentions, training=False)
transformers/src/transformers/modeling_tf_transfo_xl.py:295
Methodcall
(self, inp)
transformers/src/transformers/modeling_tf_transfo_xl.py:350
Methodcall
( self, inputs, mems=None, head_mask=None, inputs_embeds=None,
transformers/src/transformers/modeling_tf_transfo_xl.py:500
Methodcall
(self, inputs, **kwargs)
transformers/src/transformers/modeling_tf_transfo_xl.py:811
Methodcall
(self, hidden_states)
transformers/src/transformers/modeling_tf_transfo_xl.py:829
← previousnext →2,201–2,300 of 3,725, ranked by callers