MCPcopy Create free account

hub / github.com/adapter-hub/adapters / types & classes

Types & classes451 in github.com/adapter-hub/adapters

↓ 47 callersClassLoRAConfig
The Low-Rank Adaptation (LoRA) architecture proposed by Hu et al. (2021). See https://arxiv.org/pdf/2106.09685.pdf. LoRA adapts a model by re
src/adapters/configuration/adapter_config.py:479
↓ 26 callersClassVeraConfig
Lora Config that applies vector-based random matrix adaptation. It adds trainable matrices 'd' and 'b' while keeping the original LoRA matric
src/adapters/configuration/adapter_config.py:571
↓ 23 callersClassFuse
src/adapters/composition.py:94
↓ 23 callersClassSeqBnConfig
The adapter architecture proposed by Pfeiffer et al. (2020). See https://arxiv.org/pdf/2005.00247.pdf.
src/adapters/configuration/adapter_config.py:282
↓ 21 callersClassPrefixTuningConfig
The Prefix Tuning architecture proposed by Li & Liang (2021). See https://arxiv.org/pdf/2101.00190.pdf. Args: encoder_prefix (bool):
src/adapters/configuration/adapter_config.py:407
↓ 18 callersClassBottleneckLayer
src/adapters/methods/bottleneck.py:51
↓ 18 callersClassStack
src/adapters/composition.py:89
↓ 16 callersClassIA3Config
The 'Infused Adapter by Inhibiting and Amplifying Inner Activations' ((IA)^3) architecture proposed by Liu et al. (2022). See https://arxiv.o
src/adapters/configuration/adapter_config.py:548
↓ 16 callersClassPrefixTuningLayer
Representation of a Prefix Tuning layer within one Transformer layer. This class implements `AdapterLayerBase` for compatibility with adapter
src/adapters/methods/prefix_tuning.py:317
↓ 14 callersClassAdapterTrainer
src/adapters/trainer.py:36
↓ 13 callersClassBatchSplit
src/adapters/composition.py:125
↓ 12 callersClassDoRAConfig
LoRA Config that applies DoRA, which is a variant of LoRA that decomposes the weight matrix into a magnitude and directional component. S
src/adapters/configuration/adapter_config.py:594
↓ 12 callersClassDvoRAConfig
Lora Config that applies vector-based random matrix adaptation. It adds trainable matrices 'd' and 'b' while keeping the original LoRA matric
src/adapters/configuration/adapter_config.py:618
↓ 11 callersClassMTLLoRAConfig
The MTL-LoRA architecture, proposed by Yang et al. (2024), combine LoRA with multi-task learning. See https://arxiv.org/pdf/2410.09437.pdf. T
src/adapters/configuration/adapter_config.py:658
↓ 11 callersClassPromptTuningConfig
The Prompt Tuning architecture proposed by Lester et al. (2021). See https://arxiv.org/pdf/2104.08691.pdf Args: prompt_length (int):
src/adapters/configuration/adapter_config.py:448
↓ 11 callersClassUniPELTConfig
The UniPELT adapter architecture proposed by Mao et al. (2022). See https://arxiv.org/pdf/2110.07577.pdf.
src/adapters/configuration/adapter_config.py:884
↓ 9 callersClassDoubleSeqBnConfig
The adapter architecture proposed by Houlsby et al. (2019). See https://arxiv.org/pdf/1902.00751.pdf.
src/adapters/configuration/adapter_config.py:321
↓ 8 callersClassCompacterPlusPlusConfig
The Compacter++ architecture proposed by Mahabadi et al. (2021). See https://arxiv.org/pdf/2106.04647.pdf.
src/adapters/configuration/adapter_config.py:300
↓ 8 callersClassLoReftConfig
Low-Rank Linear Subspace ReFT method proposed in Wu et al. (2024). See https://arxiv.org/pdf/2404.03592.
src/adapters/configuration/adapter_config.py:722
↓ 8 callersClassMultiTask
src/adapters/composition.py:138
↓ 8 callersClassParallel
src/adapters/composition.py:75
↓ 7 callersClassParBnConfig
The parallel adapter architecture proposed by He et al. (2021). See https://arxiv.org/pdf/2110.04366.pdf.
src/adapters/configuration/adapter_config.py:360
↓ 6 callersClassActivation_Function_Class
Implementation of various activation function.
src/adapters/methods/modeling.py:14
↓ 6 callersClassBertAdapterModel
src/adapters/models/bert/adapter_model.py:15
↓ 6 callersClassBottleneckState
Models the input and output states of a bottleneck adapter layer. Args: hidden_states (torch.Tensor): The layer input/ output hidden
src/adapters/methods/bottleneck.py:29
↓ 6 callersClassMAMConfig
The Mix-And-Match adapter architecture proposed by He et al. (2021). See https://arxiv.org/pdf/2110.04366.pdf.
src/adapters/configuration/adapter_config.py:858
↓ 6 callersClassPredictionHeadLoader
A class providing methods for saving and loading prediction head modules from the file system. Model classes supporting configurable head mo
src/adapters/loading.py:832
↓ 6 callersClassSplit
src/adapters/composition.py:112
↓ 5 callersClassAdapterSetup
Represents an adapter setup of a model including active adapters and active heads. This class is intended to be used as a context manager usi
src/adapters/context.py:9
↓ 5 callersClassConfigUnion
Composes multiple adaptation method configurations into one. This class can be used to define complex adaptation method setups.
src/adapters/configuration/adapter_config.py:767
↓ 5 callersClassLoRAState
Models the input and output states of a LoRA layer. Args: layer_input (torch.Tensor): The input states to the adapted layer. hidd
src/adapters/methods/lora.py:737
↓ 4 callersClassAdapterModelInterface
Defines the main interface for integrating adapter methods into a model class. This interface translates generic accessor names to model-spec
src/adapters/interface.py:57
↓ 4 callersClassPrefixTuningState
Models the input and output states of a prefix tuning layer. Args: key_states (torch.Tensor): The key states of the attention layer.
src/adapters/methods/prefix_tuning.py:295
↓ 3 callersClassCompacterConfig
The Compacter architecture proposed by Mahabadi et al. (2021). See https://arxiv.org/pdf/2106.04647.pdf.
src/adapters/configuration/adapter_config.py:339
↓ 3 callersClassDoubleSeqBnInvConfig
The adapter architecture proposed by Houlsby et. al. (2019). See https://arxiv.org/pdf/1902.00751.pdf.
src/adapters/configuration/adapter_config.py:350
↓ 3 callersClassForwardContext
Holds context information during a forward pass through a model. This class should be used via the ``ForwardContext.wrap()`` method. Not
src/adapters/context.py:72
↓ 3 callersClassSeqBnInvConfig
The adapter architecture proposed by Pfeiffer et al. (2020). See https://arxiv.org/pdf/2005.00247.pdf.
src/adapters/configuration/adapter_config.py:311
↓ 2 callersClassAdapterFusionLoader
A class providing methods for saving and loading AdapterFusion modules from the file system.
src/adapters/loading.py:657
↓ 2 callersClassAdapterInfo
Holds information about an adapter publicly available on the Hub. Returned by :func:`list_adapters()`. Args: source (str): The s
src/adapters/utils.py:114
↓ 2 callersClassAdapterLoader
A class providing methods for saving and loading adapter modules from the Hub, the filesystem or a remote url. Model classes passed to this
src/adapters/loading.py:364
↓ 2 callersClassDiReftConfig
Variation of LoReft without orthogonality constraint and projection subtraction as proposed in Wu et al. (2024). See https://arxiv.org/pdf/2404.0
src/adapters/configuration/adapter_config.py:752
↓ 2 callersClassGLOWCouplingBlock
Coupling Block following the GLOW design. The only difference to the RealNVP coupling blocks, is the fact that it uses a single subnetwork to
src/adapters/methods/modeling.py:516
↓ 2 callersClassNICECouplingBlock
Coupling Block following the NICE design.
src/adapters/methods/modeling.py:473
↓ 2 callersClassNoReftConfig
Variation of LoReft without orthogonality constraint.
src/adapters/configuration/adapter_config.py:737
↓ 2 callersClassPrefixTuningPool
The model layer that holds all Prefix Tuning prefixes. While each Transformers layer has its own prefix, this layer is shared across all Tran
src/adapters/methods/prefix_tuning.py:145
↓ 2 callersClassPromptTuningLayer
Prompt Tuning implementation. Args: model_config: The model configuration. adapters_config: The adapter configuration.
src/adapters/methods/prompt_tuning.py:134
↓ 2 callersClassReftLayer
src/adapters/methods/reft.py:184
↓ 1 callersClassAdapterTrainerCallback
src/adapters/trainer.py:246
↓ 1 callersClassAverage
src/adapters/composition.py:143
↓ 1 callersClassBertFusion
Implementation of an AdapterFusion block.
src/adapters/methods/modeling.py:359
↓ 1 callersClassBertStyleMaskedLMHead
src/adapters/heads/language_modeling.py:185
↓ 1 callersClassBiaffine
src/adapters/heads/dependency_parsing.py:29
↓ 1 callersClassBiaffineParsingHead
Credit: G. Glavaš & I. Vulić Based on paper "Is Supervised Syntactic Parsing Beneficial for Language Understanding? An Empirical Investigatio
src/adapters/heads/dependency_parsing.py:63
↓ 1 callersClassCastOutputToFloat
tests/test_misc/test_adapter_trainer/test_adapter_trainer.py:591
↓ 1 callersClassCausalLMHead
src/adapters/heads/language_modeling.py:10
↓ 1 callersClassClassificationHead
src/adapters/heads/base.py:133
↓ 1 callersClassCustomAdapterConfig
tests/test_misc/test_adapter_config.py:43
↓ 1 callersClassDataCollatorForMultipleChoice
Data collator that will dynamically pad the inputs for multiple choice received. Args: tokenizer ([`PreTrainedTokenizer`] or [`PreTr
examples/pytorch/multiple-choice/run_swag.py:171
↓ 1 callersClassDependencyParsingOutput
src/adapters/heads/dependency_parsing.py:19
↓ 1 callersClassDynamicAdapterFusionConfig
Dynamic version of adapter fusion with a value matrix and regularization. See https://arxiv.org/pdf/2005.00247.pdf.
src/adapters/configuration/adapter_fusion_config.py:66
↓ 1 callersClassFlatPrefixTuning
src/adapters/methods/prefix_tuning.py:77
↓ 1 callersClassImageClassificationHead
src/adapters/heads/base.py:464
↓ 1 callersClassInvertibleAdapterLayer
src/adapters/methods/invertible.py:13
↓ 1 callersClassLoRALinearTorch
src/adapters/methods/lora.py:976
↓ 1 callersClassModelAdaptersConfig
This class manages the setup and configuration of adapter modules in a pre-trained model.
src/adapters/configuration/model_adapters_config.py:16
↓ 1 callersClassMultiHeadOutput
src/adapters/heads/base.py:29
↓ 1 callersClassMultiLabelClassificationHead
src/adapters/heads/base.py:201
↓ 1 callersClassMultipleChoiceHead
src/adapters/heads/base.py:266
↓ 1 callersClassPHMLayer
This class is adapted from the compacter implementation at https://github.com/rabeehk/compacter
src/adapters/methods/modeling.py:601
↓ 1 callersClassParsingMetric
based on allennlp.training.metrics.AttachmentScores Computes labeled and unlabeled attachment scores for a dependency parse. Note that the in
examples/pytorch/dependency-parsing/utils_udp.py:110
↓ 1 callersClassPrefixTuningGroup
src/adapters/methods/prefix_tuning.py:122
↓ 1 callersClassPromptTuning
Generate a Prompt and concatenate it with the input. This is the training time version of prompting a model. Calling the injected `prompt` module
src/adapters/methods/prompt_tuning.py:21
↓ 1 callersClassQuestionAnsweringHead
src/adapters/heads/base.py:382
↓ 1 callersClassReftModule
src/adapters/methods/reft.py:65
↓ 1 callersClassReftUnit
src/adapters/methods/reft.py:17
↓ 1 callersClassSeq2SeqLMHead
src/adapters/heads/language_modeling.py:145
↓ 1 callersClassStaticAdapterFusionConfig
Static version of adapter fusion without a value matrix. See https://arxiv.org/pdf/2005.00247.pdf.
src/adapters/configuration/adapter_fusion_config.py:48
↓ 1 callersClassTaggingHead
src/adapters/heads/base.py:315
↓ 1 callersClassWeightsLoaderHelper
A class providing helper methods for saving and loading module weights.
src/adapters/loading.py:40
↓ 1 callersClass_EATAttention
tests/test_methods/test_all_custom_interfaces.py:49
↓ 1 callersClass_EATBackbone
Mimics the inner EAT backbone (model.local_encoder, model.blocks).
tests/test_methods/test_all_custom_interfaces.py:91
↓ 1 callersClass_EATBlock
tests/test_methods/test_all_custom_interfaces.py:77
↓ 1 callersClass_EATConfig
tests/test_methods/test_all_custom_interfaces.py:36
↓ 1 callersClass_EATMlp
tests/test_methods/test_all_custom_interfaces.py:66
↓ 1 callersClass_EATModel
tests/test_methods/test_all_custom_interfaces.py:114
↓ 1 callersClass_LazyAdapterModelAutoMapping
src/adapters/models/auto/auto_factory.py:6
↓ 1 callersClass_ModelFallbackWrapper
examples/pytorch/text-generation/run_generation.py:238
ClassAbstractAdapterTestBase
Base class for adapter tests. Defines basic functions and attributes with default values which are used in the tests. Model test classes should in
tests/test_methods/base.py:12
ClassAdapter
Implementation of a sequential bottleneck adapter block.
src/adapters/methods/modeling.py:35
ClassAdapterArguments
The subset of arguments related to adapter training. Args: train_adapter (bool): Whether to train an adapter instead of the full mod
src/adapters/training.py:9
ClassAdapterCompositionBlock
src/adapters/composition.py:10
ClassAdapterCompositionParsingTest
tests/test_misc/test_adapter_composition.py:13
ClassAdapterCompositionTest
tests/test_misc/test_adapter_composition.py:40
ClassAdapterConfig
Base class for all adaptation methods. This class does not define specific configuration keys, but only provides some common helper methods.
src/adapters/configuration/adapter_config.py:12
ClassAdapterConfigTest
tests/test_misc/test_adapter_config.py:20
ClassAdapterCustomHeadTest
tests/test_misc/test_adapter_custom_head.py:31
ClassAdapterExamplesTests
examples/pytorch/test_adapter_examples.py:59
ClassAdapterFusionConfig
Base class that models the architecture of an adapter fusion layer.
src/adapters/configuration/adapter_fusion_config.py:9
ClassAdapterFusionConfigTest
tests/test_misc/test_adapter_fusion_config.py:9
ClassAdapterFusionModelTestMixin
tests/test_methods/method_test_impl/core/test_adapter_fusion_common.py:16
next →1–100 of 451, ranked by callers