A Unified Library for Parameter-Efficient and Modular Transfer Learning
This version is built for Hugging Face Transformers v4.39.x.
This version is built for Hugging Face Transformers v4.35.x.
leave_out
to LoRA and (IA)³ (@calpt via #608)skip_layers
/ AdapterDrop training (@calpt via #634)Blog post: https://adapterhub.ml/blog/2023/11/introducing-adapters/
With the new Adapters library, we fundamentally refactored the adapter-transformers library and added support for new models and adapter methods.
This version is compatible with Hugging Face Transformers version 4.35.2.
For a guide on how to migrate from adapter-transformers to Adapters have a look at https://docs.adapterhub.ml/transitioning.md. Changes are given compared to the latest adapters-transformers v3.2.1.
PretrainedConfig
) from the adapters config (ModelAdaptersConfig
) (@calpt)load_model
function to load models containing adapters. This replaces the Hugging Face from_pretrained
function used in the adapter-transformers
library (@lenglaender)ModelUsingSubmodelsAdaptersMixin
) for models that contain other models (@lenglaender)AdapterConfigBase
into AdapterConfig
(@hSterz via #603)This is the last release of adapter-transformers
. See here for the legacy codebase: https://github.com/adapter-hub/adapter-transformers-legacy.
Based on transformers v4.26.1
resume_from_checkpoint
in AdapterTrainer
class (@hSterz via #514)Based on transformers v4.26.1
pfeiffer[reduction_factor=16]
. Especially for experiments using different hyperparameters or the example scripts, this can come in handy. Learn more
Stack
, Parallel
& BatchSplit
composition to prefix tuning (@calpt via #476)
In previous adapter-transformers
versions, you could combine multiple bottleneck adapters. You could use them in parallel or stack them. Now, this is also possible for prefix-tuning adapters. Add multiple prefixes to the same model to combine the functionality of multiple adapters (Stack) or perform several tasks simultaneously (Parallel, BatchSplit) Learn more
MultiLingAdapterArguments
class. Use the AdapterArguments
class and setup_adapter_training
method instead. Learn more.T5EncoderModel
(@calpt via #437)Based on transformers v4.21.3
Deberta
and DebertaV2
integration(@hSterz via #340)adapter_summary()
method (@calpt via #371): More info
output_adapter_fusion_attentions
argument (@calpt via #417): Documentation
torch.save()
& torch.load()
(@calpt via #406)Based on transformers v4.17.0
preprocess_logits_for_metrics
argument (@stefan-it via #317)load_best_model_at_end
(@calpt via #341)Based on transformers v4.17.0
XAdapterModel
classes as central & recommended model classes (@calpt via #289)ConfigUnion
class for flexible combination of adapter configs (@calpt via #292)AdapterSetup
context manager to replace adapter_names
parameter (@calpt via #257)ForwardContext
to wrap model forward pass with adapters (@calpt via #267, #295)source=None
(new default) to load_adapter()
(@calpt via #309)XModelWithHeads
in favor of XAdapterModel
(@calpt via #289)Parallel
composition for XLM-Roberta (@calpt via #305)Based on transformers v4.12.5