MCPcopy Create free account

hub / github.com/adapter-hub/adapters / functions

Functions1,559 in github.com/adapter-hub/adapters

Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, **model_kwargs)
src/adapters/models/bert_generation/adapter_model.py:102
Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, **model_kwargs)
src/adapters/models/distilbert/adapter_model.py:101
Methodprepare_inputs_for_generation
(self, input_ids, past=None, **kwargs)
src/adapters/models/gptj/adapter_model.py:117
Methodprepare_inputs_for_generation
(self, input_ids, past=None, **kwargs)
src/adapters/models/gpt2/adapter_model.py:133
Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, **model_kwargs)
src/adapters/models/electra/adapter_model.py:95
Methodprepare_inputs_for_generation
( self, decoder_input_ids, past=None, attention_mask=None, head_mask=N
src/adapters/models/mbart/adapter_model.py:132
Methodprepare_inputs_for_generation
( self, input_ids, past=None, attention_mask=None, head_mask=None,
src/adapters/models/mt5/adapter_model.py:156
Methodprepare_inputs_for_generation
( self, input_ids, past=None, attention_mask=None, head_mask=None,
src/adapters/models/t5/adapter_model.py:156
Methodprepare_inputs_for_generation
( self, input_ids, past_key_values=None, inputs_embeds=None, use_cache=None, **kwargs )
examples/pytorch/text-generation/run_generation.py:267
Functionprepare_train_features
(examples)
examples/pytorch/question-answering/run_qa.py:391
Functionprepare_transfoxl_input
(args, _, tokenizer, prompt_text)
examples/pytorch/text-generation/run_generation.py:138
Functionprepare_validation_features
(examples)
examples/pytorch/question-answering/run_qa.py:497
Functionprepare_xlm_input
(args, model, tokenizer, prompt_text)
examples/pytorch/text-generation/run_generation.py:106
Functionprepare_xlnet_input
(args, _, tokenizer, prompt_text)
examples/pytorch/text-generation/run_generation.py:132
Functionpreprocess_function
(examples)
tests/fixtures/audio_datasets/prepare_audio_datasets.py:125
Functionpreprocess_function
(examples)
examples/pytorch/multiple-choice/run_swag.py:375
Functionpreprocess_function
(examples)
examples/pytorch/translation/run_translation.py:483
Functionpreprocess_function
(examples)
examples/pytorch/text-classification/run_glue.py:458
Functionpreprocess_function
(examples)
examples/pytorch/question-answering/run_seq2seq_qa.py:487
Functionpreprocess_function
(examples)
examples/pytorch/summarization/run_summarization.py:554
Methodpreprocess_function
(examples)
tests/test_methods/test_on_bert_generation.py:34
Functionpreprocess_logits_for_metrics
(logits, labels)
examples/pytorch/language-modeling/run_mlm.py:593
Functionpreprocess_logits_for_metrics
(logits, labels)
examples/pytorch/language-modeling/run_clm.py:569
Functionpreprocess_validation_function
(examples)
examples/pytorch/question-answering/run_seq2seq_qa.py:505
Methodpush_adapter_setup_to_hub
Upload an adapter setup to HuggingFace's Model Hub. Args: repo_id (str): The name of the repository on the model hub to upload to
src/adapters/hub_mixin.py:198
Methodpush_adapter_to_hub
Upload an adapter to HuggingFace's Model Hub. Args: repo_id (str): The name of the repository on the model hub to upload to.
src/adapters/hub_mixin.py:120
Functionpytest_addoption
(parser)
conftest.py:56
Functionpytest_addoption
(parser)
examples/pytorch/conftest.py:34
Functionpytest_collection_modifyitems
(items)
conftest.py:92
Functionpytest_configure
(config)
conftest.py:42
Functionpytest_sessionfinish
(session, exitstatus)
conftest.py:70
Functionpytest_terminal_summary
(terminalreporter)
conftest.py:62
Functionpytest_terminal_summary
(terminalreporter)
examples/pytorch/conftest.py:40
Functionremote_file_exists
(url)
src/adapters/utils.py:203
Methodrepeat
(self, state: PrefixTuningState, channels: int)
src/adapters/methods/prefix_tuning.py:536
Methodrepeat
(self, state: BottleneckState, channels: int)
src/adapters/methods/bottleneck.py:216
Methodreplace
Returns a new instance of the config class with the specified changes applied.
src/adapters/configuration/adapter_config.py:53
Methodreset
(self)
examples/pytorch/dependency-parsing/utils_udp.py:102
Methodreset
(self)
examples/pytorch/dependency-parsing/utils_udp.py:168
Methodreset_adapter
(self)
src/adapters/methods/lora.py:1011
Methodreset_adapter
(self)
src/adapters/methods/lora.py:1050
Methodreset_adapter
(self)
src/adapters/methods/lora.py:1195
Methodrun_train_test
(self, adapter_config, filter_keys)
tests/test_methods/method_test_impl/base.py:304
Methodsave_adapter_fusion
Saves an AdapterFusion layer and its configuration file to a directory so that it can be shared or reloaded using `load_adapter_fusio
src/adapters/model_mixin.py:2433
Methodsave_adapter_setup
Saves an adapter setup to a directory so that it can be shared or reloaded using `load_adapter_setup()`. Args: save_directory (st
src/adapters/model_mixin.py:2509
Methodsave_all_adapters
( self, save_directory: str, with_head: bool = True, meta_dict: dict = None,
src/adapters/model_mixin.py:2407
Methodsave_embeddings
(self, path, name, tokenizer=None)
src/adapters/model_mixin.py:405
Methodsave_to_state_dict
Extracts the weights of a given adapter from the model and returns them as a state dict. Args: name (str): The name of t
src/adapters/loading.py:467
Methodsave_to_state_dict
Extracts the weights of a given AdapterFusion from the model and returns them as a state dict. Args: name (str): The nam
src/adapters/loading.py:682
MethodsetUp
(self)
tests/test_misc/test_adapter_safetensors.py:16
MethodsetUp
(self)
tests/test_misc/test_adapter_save_id2label.py:17
Methodset_W
(self, W=None, W_left=None, W_right=None)
src/adapters/methods/modeling.py:721
Methodset_active_adapters
Sets the adapter modules to be used by default in every forward pass. This setting can be overriden by passing the `adapter_names` pa
src/adapters/heads/model_mixin.py:275
Methodset_active_embeddings
(self, name)
src/adapters/model_mixin.py:408
Methodset_attr
(config: AdapterConfig)
tests/test_misc/test_adapter_config.py:22
Methodset_attr
(config: AdapterFusionConfig)
tests/test_misc/test_adapter_fusion_config.py:21
Methodset_output_embeddings
(self, new_embeddings)
src/adapters/heads/language_modeling.py:80
Methodset_phm_rule
If factorized_phm_rules is set, phm_rule is a tuple, showing the left and right phm rules, and if this is not set, this is showing th
src/adapters/methods/modeling.py:710
Methodshape
separate heads
src/adapters/models/distilbert/modeling_distilbert.py:75
Methodshape
separate heads
src/adapters/models/distilbert/modeling_distilbert.py:163
Methodshare_parameters
Shares parameters across specified adapter layers and base model children. This method enables parameter sharing between multiple ad
src/adapters/model_mixin.py:790
Methodshare_parameters
( self, name: str, adapter_names: List, reference_adapter_name: Optional[str],
src/adapters/methods/adapter_layer_base.py:157
Functionskip_head_member
(app, what, name, obj, skip, options)
docs/conf.py:91
Functionsubnet
(dims_in, dims_out)
src/adapters/methods/modeling.py:463
Methodtest
(layer, model)
tests/test_methods/method_test_impl/composition/test_multi_task.py:236
Methodtest_Dora_gradient_checkpointing_single_adapter_with_LoRA
(self)
tests/test_methods/method_test_impl/peft/test_dora.py:55
Methodtest_Vera_gradient_checkpointing_single_adapter
(self)
tests/test_methods/method_test_impl/peft/test_vera.py:52
Methodtest_adapter_are_mtl_configs
(self)
tests/test_methods/method_test_impl/composition/test_multi_task.py:262
Methodtest_adapter_fusion_save_with_head
(self)
tests/test_methods/test_on_encoder_decoder.py:50
Methodtest_adapter_fusion_save_with_head
(self)
tests/test_methods/method_test_impl/core/test_adapter_fusion_common.py:161
Methodtest_adapter_fusion_save_with_head
(self)
tests/test_methods/test_on_clip/test_model.py:69
Methodtest_adapter_loading
Test saving and loading adapters.
tests/test_methods/test_all_custom_interfaces.py:295
Methodtest_adapter_with_head
(self)
tests/test_methods/method_test_impl/heads/test_adapter_heads.py:277
Methodtest_adapter_with_head_load_as
(self)
tests/test_methods/method_test_impl/heads/test_adapter_heads.py:299
Methodtest_add_Dora_with_DoRA
(self)
tests/test_methods/method_test_impl/peft/test_dora.py:348
Methodtest_add_Dora_with_DvoRA
(self)
tests/test_methods/method_test_impl/peft/test_dora.py:393
Methodtest_add_Dora_with_LoRA
(self)
tests/test_methods/method_test_impl/peft/test_dora.py:13
Methodtest_add_Dora_with_Vera
(self)
tests/test_methods/method_test_impl/peft/test_dora.py:301
Methodtest_add_Vera
(self)
tests/test_methods/method_test_impl/peft/test_vera.py:8
Methodtest_add_adapter
(self)
tests/test_methods/method_test_impl/peft/test_adapter_common.py:41
Methodtest_add_adapter_fusion
(self)
tests/test_methods/method_test_impl/core/test_adapter_fusion_common.py:17
Methodtest_add_adapter_fusion_custom_name
(self)
tests/test_methods/method_test_impl/core/test_adapter_fusion_common.py:218
Methodtest_add_adapter_fusion_different_config
(self)
tests/test_methods/method_test_impl/core/test_adapter_fusion_common.py:49
Methodtest_add_adapter_multiple_reduction_factors
(self)
tests/test_methods/method_test_impl/peft/test_adapter_common.py:197
Methodtest_add_adapter_with_invertible
(self)
tests/test_methods/method_test_impl/peft/test_adapter_common.py:85
Methodtest_add_compacter
(self)
tests/test_methods/method_test_impl/peft/test_compacter.py:10
Methodtest_add_custom_head
(self)
tests/test_misc/test_adapter_custom_head.py:32
Methodtest_add_embedding_tokens
(self)
tests/test_methods/method_test_impl/embeddings/test_adapter_embeddings.py:30
Methodtest_add_embeddings
(self)
tests/test_methods/method_test_impl/embeddings/test_adapter_embeddings.py:24
Methodtest_add_ia3
(self)
tests/test_methods/method_test_impl/peft/test_ia3.py:8
Methodtest_add_lora
(self)
tests/test_methods/method_test_impl/peft/test_lora.py:13
Methodtest_add_mtllora
(self)
tests/test_methods/method_test_impl/peft/test_mtllora.py:8
Methodtest_add_prefix_tuning
(self)
tests/test_methods/method_test_impl/peft/test_prefix_tuning.py:11
Methodtest_add_prompt_tuning
(self)
tests/test_methods/method_test_impl/peft/test_prompt_tuning.py:8
Methodtest_add_reft
(self)
tests/test_methods/method_test_impl/peft/test_reft.py:14
Methodtest_add_union_adapter
(self)
tests/test_methods/method_test_impl/peft/test_config_union.py:41
Methodtest_add_unipelt
(self)
tests/test_methods/method_test_impl/peft/test_unipelt.py:8
Methodtest_auto_set_save_adapters
(self)
tests/test_misc/test_adapter_trainer/test_adapter_trainer.py:192
Methodtest_average
(self)
tests/test_misc/test_adapter_composition.py:255
Methodtest_average_head
(self)
tests/test_methods/method_test_impl/heads/test_adapter_heads.py:485
← previousnext →1,101–1,200 of 1,559, ranked by callers