Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/XiangLi1999/PrefixTuning
/ functions
Functions
3,725 in github.com/XiangLi1999/PrefixTuning
⨍
Functions
3,725
◇
Types & classes
1,052
↳
Endpoints
47
Method
__setstate__
(self, d: Dict)
transformers/src/transformers/tokenization_marian.py:190
Method
__setstate__
(self, d)
transformers/src/transformers/tokenization_camembert.py:249
Method
__setstate__
(self, state)
transformers/src/transformers/tokenization_utils_base.py:222
Method
_add_tokens
(self, new_tokens: List[Union[str, AddedToken]], special_tokens=False)
transformers/src/transformers/tokenization_utils_fast.py:208
Method
_batch_encode_plus
(self, *args, **kwargs)
transformers/src/transformers/tokenization_gpt2.py:389
Method
_batch_encode_plus
( self, batch_text_or_text_pairs: Union[ List[TextInput], List[TextInp
transformers/src/transformers/tokenization_utils.py:486
Function
_check_is_max_context
Check if this is the 'max context' doc span for the token.
transformers/src/transformers/data/processors/squad.py:43
Function
_check_shapes
(shape_1, shape2)
transformers/src/transformers/modeling_bart.py:200
Function
_check_shapes
(shape_1, shape2)
transformers/src/transformers/modeling_fsmt.py:339
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
transformers/src/transformers/tokenization_bert.py:493
Method
_convert_encoding
(self, encoding, **kwargs)
transformers/src/transformers/tokenization_funnel.py:221
Function
_convert_entity
(match)
transformers/src/transformers/tokenization_bertweet.py:660
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_bert_generation.py:134
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_xlm_roberta.py:279
Method
_convert_id_to_token
Converts an id in a token (BPE) using the vocab.
transformers/src/transformers/tokenization_openai.py:196
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_albert.py:227
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_phobert.py:306
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_reformer.py:156
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_bertweet.py:378
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_gpt2.py:250
Method
_convert_id_to_token
Converts an id in a token (BPE) using the vocab.
transformers/src/transformers/tokenization_transfo_xl.py:409
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_ctrl.py:216
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_xlm.py:838
Method
_convert_id_to_token
(self, index: int)
transformers/src/transformers/tokenization_utils_fast.py:205
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_t5.py:252
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_xlnet.py:230
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_pegasus.py:45
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_bert.py:234
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the encoder.
transformers/src/transformers/tokenization_marian.py:113
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_camembert.py:238
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_fsmt.py:351
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_bert_generation.py:130
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_xlm_roberta.py:270
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_openai.py:192
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_albert.py:223
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_phobert.py:302
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_reformer.py:152
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_bertweet.py:374
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_gpt2.py:246
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_transfo_xl.py:414
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_ctrl.py:212
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_xlm.py:834
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_t5.py:244
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_xlnet.py:226
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_pegasus.py:36
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_bert.py:230
Method
_convert_token_to_id
(self, token)
transformers/src/transformers/tokenization_marian.py:99
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_camembert.py:229
Method
_convert_token_to_id
Converts a token (str) in an id using the vocab.
transformers/src/transformers/tokenization_fsmt.py:347
Method
_encode_plus
(self, *args, **kwargs)
transformers/src/transformers/tokenization_gpt2.py:405
Method
_encode_plus
( self, text: Union[TextInput, PreTokenizedInput], text_pair: Optional[Union[TextInput
transformers/src/transformers/tokenization_utils_fast.py:427
Method
_encode_plus
( self, text: Union[TextInput, PreTokenizedInput, EncodedInput], text_pair: Optional[U
transformers/src/transformers/tokenization_utils.py:403
Method
_feature_file
(self, mode)
seq2seq/lightning_base.py:268
Method
_feature_file
(self, mode)
seq2seq/lightning_base.py:569
Function
_gelu_python
Original Implementation of the gelu activation function in Google Bert repo when initially created. For information: OpenAI GPT's gelu is slightly
transformers/src/transformers/activations.py:16
Function
_get_shape
(t)
transformers/src/transformers/modeling_bart.py:1193
Function
_get_shape
(t)
transformers/src/transformers/modeling_fsmt.py:880
Method
_hook_rss_memory_post_forward
(module, *args, **kwargs)
transformers/src/transformers/modeling_utils.py:107
Method
_hook_rss_memory_pre_forward
(module, *args, **kwargs)
transformers/src/transformers/modeling_utils.py:95
Method
_inference_memory
( self, model_name: str, batch_size: int, sequence_length: int )
transformers/src/transformers/benchmark/benchmark.py:65
Method
_inference_memory
( self, model_name: str, batch_size: int, sequence_length: int )
transformers/src/transformers/benchmark/benchmark_utils.py:625
Method
_inference_memory
( self, model_name: str, batch_size: int, sequence_length: int )
transformers/src/transformers/benchmark/benchmark_tf.py:103
Method
_inference_speed
(self, model_name: str, batch_size: int, sequence_length: int)
transformers/src/transformers/benchmark/benchmark.py:61
Method
_inference_speed
(self, model_name: str, batch_size: int, sequence_length: int)
transformers/src/transformers/benchmark/benchmark_utils.py:617
Method
_inference_speed
(self, model_name: str, batch_size: int, sequence_length: int)
transformers/src/transformers/benchmark/benchmark_tf.py:90
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_distilbert.py:359
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_ctrl.py:222
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_xlnet.py:552
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_xlm.py:252
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_transfo_xl.py:476
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_retribert.py:51
Method
_init_weights
(self, module)
transformers/src/transformers/modeling_fsmt.py:307
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_reformer.py:1795
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_bert.py:592
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_bert_generation.py:177
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_gpt2.py:347
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_albert.py:464
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_mobilebert.py:681
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_gpt2_adapter.py:431
Method
_init_weights
Initialize the weights.
transformers/src/transformers/modeling_openai.py:284
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_roberta.py:465
Method
_init_weights
(self, module)
transformers/src/transformers/modeling_funnel.py:759
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_layoutlm.py:494
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_electra.py:540
Method
_init_weights
Initialize the weights
transformers/src/transformers/modeling_longformer.py:976
Function
_make_linear_from_emb
(emb)
transformers/src/transformers/modeling_fsmt.py:331
Method
_mask_pads
(ll, smooth_obj)
transformers/src/transformers/modeling_rag.py:922
Method
_mask_pads
(ll, smooth_obj)
transformers/src/transformers/modeling_rag.py:1444
Method
_missing_
(cls, value)
transformers/src/transformers/tokenization_utils_base.py:81
Function
_mp_fn
(index)
gpt2/run_language_modeling.py:1152
Function
_objective
(trial, checkpoint_dir=None)
transformers/src/transformers/integrations.py:91
Method
_parse_and_tokenize
Parse arguments and tokenize only_first so that hypothesis (label) is not truncated
transformers/src/transformers/pipelines.py:1047
Method
_prepare_local
(self, var_device, var_dtype, apply_state)
transformers/src/transformers/optimization_tf.py:211
Function
_process_benchmark_table_row
(x)
transformers/src/transformers/convert_marian_to_pytorch.py:26
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
transformers/src/transformers/modeling_tf_electra.py:474
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
transformers/src/transformers/modeling_distilbert.py:448
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer}
transformers/src/transformers/modeling_ctrl.py:346
Method
_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
transformers/src/transformers/modeling_tf_albert.py:495
Method
_prune_heads
(self, heads)
transformers/src/transformers/modeling_tf_transfo_xl.py:466
Method
_prune_heads
(self, heads_to_prune)
transformers/src/transformers/modeling_xlnet.py:961
← previous
next →
2,001–2,100 of 3,725, ranked by callers