Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adapter-hub/adapters
/ types & classes
Types & classes
451 in github.com/adapter-hub/adapters
⨍
Functions
1,559
◇
Types & classes
451
↳
Endpoints
1
↓ 47 callers
Class
LoRAConfig
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 callers
Class
VeraConfig
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 callers
Class
Fuse
src/adapters/composition.py:94
↓ 23 callers
Class
SeqBnConfig
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 callers
Class
PrefixTuningConfig
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 callers
Class
BottleneckLayer
src/adapters/methods/bottleneck.py:51
↓ 18 callers
Class
Stack
src/adapters/composition.py:89
↓ 16 callers
Class
IA3Config
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 callers
Class
PrefixTuningLayer
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 callers
Class
AdapterTrainer
src/adapters/trainer.py:36
↓ 13 callers
Class
BatchSplit
src/adapters/composition.py:125
↓ 12 callers
Class
DoRAConfig
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 callers
Class
DvoRAConfig
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 callers
Class
MTLLoRAConfig
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 callers
Class
PromptTuningConfig
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 callers
Class
UniPELTConfig
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 callers
Class
DoubleSeqBnConfig
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 callers
Class
CompacterPlusPlusConfig
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 callers
Class
LoReftConfig
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 callers
Class
MultiTask
src/adapters/composition.py:138
↓ 8 callers
Class
Parallel
src/adapters/composition.py:75
↓ 7 callers
Class
ParBnConfig
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 callers
Class
Activation_Function_Class
Implementation of various activation function.
src/adapters/methods/modeling.py:14
↓ 6 callers
Class
BertAdapterModel
src/adapters/models/bert/adapter_model.py:15
↓ 6 callers
Class
BottleneckState
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 callers
Class
MAMConfig
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 callers
Class
PredictionHeadLoader
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 callers
Class
Split
src/adapters/composition.py:112
↓ 5 callers
Class
AdapterSetup
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 callers
Class
ConfigUnion
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 callers
Class
LoRAState
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 callers
Class
AdapterModelInterface
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 callers
Class
PrefixTuningState
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 callers
Class
CompacterConfig
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 callers
Class
DoubleSeqBnInvConfig
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 callers
Class
ForwardContext
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 callers
Class
SeqBnInvConfig
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 callers
Class
AdapterFusionLoader
A class providing methods for saving and loading AdapterFusion modules from the file system.
src/adapters/loading.py:657
↓ 2 callers
Class
AdapterInfo
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 callers
Class
AdapterLoader
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 callers
Class
DiReftConfig
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 callers
Class
GLOWCouplingBlock
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 callers
Class
NICECouplingBlock
Coupling Block following the NICE design.
src/adapters/methods/modeling.py:473
↓ 2 callers
Class
NoReftConfig
Variation of LoReft without orthogonality constraint.
src/adapters/configuration/adapter_config.py:737
↓ 2 callers
Class
PrefixTuningPool
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 callers
Class
PromptTuningLayer
Prompt Tuning implementation. Args: model_config: The model configuration. adapters_config: The adapter configuration.
src/adapters/methods/prompt_tuning.py:134
↓ 2 callers
Class
ReftLayer
src/adapters/methods/reft.py:184
↓ 1 callers
Class
AdapterTrainerCallback
src/adapters/trainer.py:246
↓ 1 callers
Class
Average
src/adapters/composition.py:143
↓ 1 callers
Class
BertFusion
Implementation of an AdapterFusion block.
src/adapters/methods/modeling.py:359
↓ 1 callers
Class
BertStyleMaskedLMHead
src/adapters/heads/language_modeling.py:185
↓ 1 callers
Class
Biaffine
src/adapters/heads/dependency_parsing.py:29
↓ 1 callers
Class
BiaffineParsingHead
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 callers
Class
CastOutputToFloat
tests/test_misc/test_adapter_trainer/test_adapter_trainer.py:591
↓ 1 callers
Class
CausalLMHead
src/adapters/heads/language_modeling.py:10
↓ 1 callers
Class
ClassificationHead
src/adapters/heads/base.py:133
↓ 1 callers
Class
CustomAdapterConfig
tests/test_misc/test_adapter_config.py:43
↓ 1 callers
Class
DataCollatorForMultipleChoice
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 callers
Class
DependencyParsingOutput
src/adapters/heads/dependency_parsing.py:19
↓ 1 callers
Class
DynamicAdapterFusionConfig
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 callers
Class
FlatPrefixTuning
src/adapters/methods/prefix_tuning.py:77
↓ 1 callers
Class
ImageClassificationHead
src/adapters/heads/base.py:464
↓ 1 callers
Class
InvertibleAdapterLayer
src/adapters/methods/invertible.py:13
↓ 1 callers
Class
LoRALinearTorch
src/adapters/methods/lora.py:976
↓ 1 callers
Class
ModelAdaptersConfig
This class manages the setup and configuration of adapter modules in a pre-trained model.
src/adapters/configuration/model_adapters_config.py:16
↓ 1 callers
Class
MultiHeadOutput
src/adapters/heads/base.py:29
↓ 1 callers
Class
MultiLabelClassificationHead
src/adapters/heads/base.py:201
↓ 1 callers
Class
MultipleChoiceHead
src/adapters/heads/base.py:266
↓ 1 callers
Class
PHMLayer
This class is adapted from the compacter implementation at https://github.com/rabeehk/compacter
src/adapters/methods/modeling.py:601
↓ 1 callers
Class
ParsingMetric
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 callers
Class
PrefixTuningGroup
src/adapters/methods/prefix_tuning.py:122
↓ 1 callers
Class
PromptTuning
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 callers
Class
QuestionAnsweringHead
src/adapters/heads/base.py:382
↓ 1 callers
Class
ReftModule
src/adapters/methods/reft.py:65
↓ 1 callers
Class
ReftUnit
src/adapters/methods/reft.py:17
↓ 1 callers
Class
Seq2SeqLMHead
src/adapters/heads/language_modeling.py:145
↓ 1 callers
Class
StaticAdapterFusionConfig
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 callers
Class
TaggingHead
src/adapters/heads/base.py:315
↓ 1 callers
Class
WeightsLoaderHelper
A class providing helper methods for saving and loading module weights.
src/adapters/loading.py:40
↓ 1 callers
Class
_EATAttention
tests/test_methods/test_all_custom_interfaces.py:49
↓ 1 callers
Class
_EATBackbone
Mimics the inner EAT backbone (model.local_encoder, model.blocks).
tests/test_methods/test_all_custom_interfaces.py:91
↓ 1 callers
Class
_EATBlock
tests/test_methods/test_all_custom_interfaces.py:77
↓ 1 callers
Class
_EATConfig
tests/test_methods/test_all_custom_interfaces.py:36
↓ 1 callers
Class
_EATMlp
tests/test_methods/test_all_custom_interfaces.py:66
↓ 1 callers
Class
_EATModel
tests/test_methods/test_all_custom_interfaces.py:114
↓ 1 callers
Class
_LazyAdapterModelAutoMapping
src/adapters/models/auto/auto_factory.py:6
↓ 1 callers
Class
_ModelFallbackWrapper
examples/pytorch/text-generation/run_generation.py:238
Class
AbstractAdapterTestBase
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
Class
Adapter
Implementation of a sequential bottleneck adapter block.
src/adapters/methods/modeling.py:35
Class
AdapterArguments
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
Class
AdapterCompositionBlock
src/adapters/composition.py:10
Class
AdapterCompositionParsingTest
tests/test_misc/test_adapter_composition.py:13
Class
AdapterCompositionTest
tests/test_misc/test_adapter_composition.py:40
Class
AdapterConfig
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
Class
AdapterConfigTest
tests/test_misc/test_adapter_config.py:20
Class
AdapterCustomHeadTest
tests/test_misc/test_adapter_custom_head.py:31
Class
AdapterExamplesTests
examples/pytorch/test_adapter_examples.py:59
Class
AdapterFusionConfig
Base class that models the architecture of an adapter fusion layer.
src/adapters/configuration/adapter_fusion_config.py:9
Class
AdapterFusionConfigTest
tests/test_misc/test_adapter_fusion_config.py:9
Class
AdapterFusionModelTestMixin
tests/test_methods/method_test_impl/core/test_adapter_fusion_common.py:16
next →
1–100 of 451, ranked by callers