Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JeremySun1224/CCFBDCI2020
/ functions
Functions
7,969 in github.com/JeremySun1224/CCFBDCI2020
⨍
Functions
7,969
◇
Types & classes
2,151
↳
Endpoints
56
↓ 6 callers
Method
from_question_encoder_generator_configs
r""" Instantiate a :class:`~transformers.EncoderDecoderConfig` (or a derived class) from a pre-trained encoder model configuration and
transformers/src/transformers/configuration_rag.py:160
↓ 6 callers
Function
gelu
Gaussian Error Linear Unit. Original Implementation of the gelu activation function in Google Bert repo when initially created. For informati
transformers/src/transformers/activations_tf.py:6
↓ 6 callers
Method
get_expected_events
(self, trainer)
transformers/tests/test_trainer_callback.py:106
↓ 6 callers
Method
get_input_embeddings
(self)
transformers/src/transformers/modeling_transfo_xl.py:790
↓ 6 callers
Method
get_labels
See base class.
transformers/examples/multiple-choice/utils_multiple_choice.py:434
↓ 6 callers
Method
get_retriever
(self, config)
transformers/tests/test_modeling_rag.py:193
↓ 6 callers
Method
is_initialized
Returns :obj:`True` if index is already initialized.
transformers/src/transformers/retrieval_rag.py:83
↓ 6 callers
Function
list_field
(default=None, metadata=None)
transformers/tests/test_hf_argparser.py:11
↓ 6 callers
Function
load_json
(path)
transformers/examples/seq2seq/utils.py:454
↓ 6 callers
Method
make_dataloader
(self, rank, data_dict, batch_size)
code/unlabeledExtraction/src/trainer.py:240
↓ 6 callers
Method
prepare_beam_scorer
(self, **kwargs)
transformers/tests/test_generation_beam_search.py:59
↓ 6 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_tf_longformer.py:87
↓ 6 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_tf_t5.py:55
↓ 6 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_tf_roberta.py:69
↓ 6 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_deberta.py:112
↓ 6 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_dpr.py:86
↓ 6 callers
Method
process
( self, input_ids: torch.LongTensor, next_scores: torch.FloatTensor, next_toke
transformers/src/transformers/generation_beam_search.py:95
↓ 6 callers
Method
register_subcommand
(parser: ArgumentParser)
transformers/src/transformers/commands/run.py:51
↓ 6 callers
Method
shape
projection
transformers/src/transformers/modeling_t5.py:343
↓ 6 callers
Function
split_text_in_lines
Split `text` in the biggest lines possible with the constraint of `max_len` using `prefix` on the first line and then indenting with the same
transformers/utils/style_doc.py:74
↓ 6 callers
Method
transpose_for_scores
(self, x)
transformers/src/transformers/modeling_deberta.py:524
↓ 5 callers
Function
_collate_batch
Collate `examples` into a batch, using the information in `tokenizer` for padding if necessary.
transformers/src/transformers/data/data_collator.py:179
↓ 5 callers
Method
_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:450
↓ 5 callers
Function
_dump_articles
(path: Path, articles: list)
transformers/examples/seq2seq/test_seq2seq_examples.py:102
↓ 5 callers
Method
_get_input_ids_and_config
(self)
transformers/tests/test_generation_utils.py:44
↓ 5 callers
Method
_get_input_ids_and_mask
(self)
transformers/tests/test_modeling_reformer.py:820
↓ 5 callers
Method
_parse_and_tokenize
Parse arguments and tokenize
transformers/src/transformers/pipelines.py:620
↓ 5 callers
Method
_reshape
(self, tensor, first_dim, batch_size)
transformers/src/transformers/modeling_prophetnet.py:625
↓ 5 callers
Method
_test_export
(self, model, framework, opset, tokenizer=None)
transformers/tests/test_onnx.py:79
↓ 5 callers
Method
add_callback
Add a callback to the current list of :class:`~transformer.TrainerCallback`. Args: callback (:obj:`type` or :class:`~tran
transformers/src/transformers/trainer.py:338
↓ 5 callers
Method
analyze_directory
Runs through the specific directory, looking for the files identified with `identifier`. Executes the doctests in those files
transformers/tests/test_doc_samples.py:35
↓ 5 callers
Method
assertListAlmostEqual
(self, list1, list2, tol)
transformers/tests/test_optimization_tf.py:17
↓ 5 callers
Method
check_copy_consistency
(self, comment, class_name, class_code, overwrite_result=None)
transformers/tests/test_utils_check_copies.py:50
↓ 5 callers
Function
compute_heads_importance
This method shows how to compute: - head attention entropy - head importance scores according to http://arxiv.org/abs/1905.10650
transformers/examples/bertology/run_bertology.py:66
↓ 5 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
transformers/examples/contrib/run_swag.py:118
↓ 5 callers
Function
create_dummy_object
Create the code for the dummy object corresponding to `name`.
transformers/utils/check_dummies.py:256
↓ 5 callers
Method
cuda_mem_error
(self, err, mode, rank)
code/unlabeledExtraction/src/trainer.py:668
↓ 5 callers
Method
evaluate
Run evaluation and returns metrics. The calling script will be responsible for providing a method to compute metrics, as they are ta
transformers/src/transformers/trainer_tf.py:424
↓ 5 callers
Method
finalize
( self, input_ids: torch.LongTensor, next_scores: torch.FloatTensor, next_toke
transformers/src/transformers/generation_beam_search.py:107
↓ 5 callers
Method
finalize
Return the properly gathered arrays and truncate to the number of samples (since the sampler added some extras to get each process a
transformers/src/transformers/trainer_pt_utils.py:353
↓ 5 callers
Method
for_model
(cls, model_type: str, *args, **kwargs)
transformers/src/transformers/configuration_auto.py:245
↓ 5 callers
Method
from_pretrained
(self, *args, **kwargs)
transformers/src/transformers/utils/dummy_pt_objects.py:1687
↓ 5 callers
Method
from_pretrained_question_encoder_generator
r""" Instantiates an question encoder and a generator from one or two base classes of the library from pretrained model checkpoints.
transformers/src/transformers/modeling_rag.py:222
↓ 5 callers
Method
generator
(self)
transformers/src/transformers/modeling_rag.py:1047
↓ 5 callers
Method
get_clean_sequence
(self, tokenizer, with_prefix_space=False, max_length=20, min_length=5)
transformers/tests/test_tokenization_common.py:118
↓ 5 callers
Method
get_config_dict
From a ``pretrained_model_name_or_path``, resolve to a dictionary of parameters, to be used for instantiating a :class:`~transformers
transformers/src/transformers/configuration_utils.py:347
↓ 5 callers
Function
get_norm
(norm, out_channels)
transformers/examples/lxmert/modeling_frcnn.py:159
↓ 5 callers
Method
get_output_embeddings
(self)
transformers/templates/adding_a_new_model/modeling_xxx.py:391
↓ 5 callers
Method
get_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
transformers/src/transformers/tokenization_t5.py:150
↓ 5 callers
Method
get_train_dataloader
Returns the training :class:`~torch.utils.data.DataLoader`. Will use no sampler if :obj:`self.train_dataset` does not implement :obj
transformers/src/transformers/trainer.py:406
↓ 5 callers
Function
glue_compute_metrics
(task_name, preds, labels)
transformers/src/transformers/data/metrics/__init__.py:65
↓ 5 callers
Function
h
(e,t,o)
transformers/docs/source/_static/js/custom.js:300
↓ 5 callers
Function
is_optuna_available
()
transformers/src/transformers/integrations.py:99
↓ 5 callers
Function
is_psutil_available
()
transformers/src/transformers/file_utils.py:246
↓ 5 callers
Function
is_ray_available
()
transformers/src/transformers/integrations.py:103
↓ 5 callers
Method
make_sortish_sampler
(self, batch_size, distributed=False, shuffle=True, **kwargs)
transformers/examples/seq2seq/utils.py:154
↓ 5 callers
Method
model_list
Get the public list of all the models on huggingface, including the community models
transformers/src/transformers/hf_api.py:193
↓ 5 callers
Method
moses_pipeline
(self, text, lang)
transformers/src/transformers/tokenization_xlm.py:673
↓ 5 callers
Method
num_special_tokens_to_add
(self, pair: bool = False)
transformers/src/transformers/tokenization_utils_base.py:1992
↓ 5 callers
Method
positional_embedding
(pos_seq, inv_freq, bsz=None)
transformers/src/transformers/modeling_xlnet.py:1016
↓ 5 callers
Method
positional_embedding
(pos_seq, inv_freq, bsz=None)
transformers/src/transformers/modeling_tf_xlnet.py:505
↓ 5 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_fsmt.py:74
↓ 5 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_lxmert.py:127
↓ 5 callers
Method
prepare_config_and_inputs
(self)
transformers/tests/test_modeling_openai.py:68
↓ 5 callers
Method
prepare_config_and_inputs_for_decoder
(self)
transformers/tests/test_modeling_bert.py:132
↓ 5 callers
Method
prepare_for_model
Prepares a sequence of input id, or a pair of sequences of inputs ids so that it can be used by the model. It adds special tokens, tr
transformers/src/transformers/tokenization_utils_base.py:2628
↓ 5 callers
Method
presign
Call HF API to get a presigned url to upload `filename` to S3.
transformers/src/transformers/hf_api.py:135
↓ 5 callers
Function
print_2d_tensor
Print a 2D tensor
transformers/examples/bertology/run_bertology.py:56
↓ 5 callers
Function
prune_conv1d_layer
Prune a Conv1D layer to keep only entries in index. A Conv1D work as a Linear layer (see e.g. BERT) but the weights are transposed. Used
transformers/src/transformers/modeling_utils.py:1575
↓ 5 callers
Method
red
(cls, s)
transformers/src/transformers/commands/user.py:61
↓ 5 callers
Function
requires_sklearn
(obj)
transformers/src/transformers/file_utils.py:390
↓ 5 callers
Method
sample
r""" Generates sequences for models with a language modeling head using multinomial sampling. Parameters: input_ids (:ob
transformers/src/transformers/generation_utils.py:716
↓ 5 callers
Method
save_model
Will save the model, so you can reload it using :obj:`from_pretrained()`.
transformers/src/transformers/trainer_tf.py:784
↓ 5 callers
Function
set_seed
(args)
transformers/examples/text-classification/run_xnli.py:55
↓ 5 callers
Function
set_verbosity
Set the vebosity level for the 🤗 Transformers's root logger. Args: verbosity (:obj:`int`): Logging level, e.g., one of:
transformers/src/transformers/utils/logging.py:139
↓ 5 callers
Method
train
Train method to train the model.
transformers/src/transformers/trainer_tf.py:477
↓ 5 callers
Function
use_task_specific_params
Update config with summarization specific params.
transformers/examples/seq2seq/utils.py:417
↓ 4 callers
Method
__init__
(self, config: DPRConfig)
transformers/src/transformers/modeling_dpr.py:588
↓ 4 callers
Method
_actual_model
Args: model: (:obj:`Union[torch.nn.DataParallel, torch.nn.parallel.DistributedDataParallel, torch.nn.modules.Module]`):
transformers/src/transformers/trainer.py:1563
↓ 4 callers
Function
_assert_tensors_equal
If tensors not close, or a and b arent both tensors, raise a nice Assertion error.
transformers/tests/test_modeling_rag.py:68
↓ 4 callers
Method
_feature_file
(self, mode)
transformers/examples/lightning_base.py:197
↓ 4 callers
Method
_force_token_id_to_be_generated
force one of token_ids to be generated by setting prob of all other tokens to 0 (logprob=-float("inf"))
transformers/src/transformers/modeling_bart.py:1118
↓ 4 callers
Method
_generate_random_bad_tokens
(self, num_bad_tokens, model)
transformers/tests/test_modeling_tf_common.py:878
↓ 4 callers
Method
_get_hidden_states
(self)
transformers/tests/test_modeling_reformer.py:735
↓ 4 callers
Method
_get_padding_truncation_strategies
Find the correct padding/truncation strategy with backward compatibility for old arguments (truncation_strategy and pad_to_max_length
transformers/src/transformers/tokenization_utils_base.py:1995
↓ 4 callers
Method
_get_resized_embeddings
Build a resized Embedding Module from a provided token Embedding Module. Increasing the size will add newly initialized vectors at th
transformers/src/transformers/modeling_utils.py:627
↓ 4 callers
Method
_init_bias
(self, bias)
transformers/src/transformers/modeling_transfo_xl.py:480
↓ 4 callers
Method
_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
transformers/tests/test_modeling_lxmert.py:545
↓ 4 callers
Method
_remove_unused_columns
(self, dataset: "datasets.Dataset", description: Optional[str] = None)
transformers/src/transformers/trainer.py:376
↓ 4 callers
Method
_test_distiller_cli
(self, updates, check_contents=True)
transformers/examples/seq2seq/test_seq2seq_examples.py:242
↓ 4 callers
Method
_test_pipeline
(self, nlp: Pipeline)
transformers/tests/test_pipelines_common.py:83
↓ 4 callers
Method
_test_pipeline
(self, nlp: Pipeline)
transformers/tests/test_pipelines_common.py:169
↓ 4 callers
Method
_tie_or_clone_weights
Tie or clone module weights depending of whether we are using TorchScript or not
transformers/src/transformers/modeling_utils.py:571
↓ 4 callers
Method
_update_model_kwargs_for_generation
( outputs: ModelOutput, model_kwargs: Dict[str, Any], is_encoder_decoder: bool = False )
transformers/src/transformers/generation_utils.py:184
↓ 4 callers
Function
add_generic_args
(parser, root_dir)
transformers/examples/lightning_base.py:303
↓ 4 callers
Method
add_model_specific_args
(parser, root_dir)
transformers/examples/seq2seq/finetune.py:298
↓ 4 callers
Method
add_user_input
Add a user input to the conversation for the next round. This populates the internal :obj:`new_user_input` field. Args:
transformers/src/transformers/pipelines.py:2308
↓ 4 callers
Method
backward
(ctx, gradOutput)
transformers/examples/movement-pruning/emmental/modules/binarizer.py:107
↓ 4 callers
Method
beam_search
r""" Generates sequences for models with a language modeling head using beam search decoding. Parameters: input_ids (:ob
transformers/src/transformers/generation_utils.py:847
↓ 4 callers
Method
build_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_t5.py:190
← previous
next →
301–400 of 7,969, ranked by callers