--- id: adapters version: "1.3.0" license: Apache license_treatment: permissive maintenance: active --- # adapters — A Unified Library for Parameter-Efficient and Modular Transfer Learning License: permissive · Maintenance: active · Downloads: 82.8K/mo ## What it is and what it does Adapters is an extension library for HuggingFace Transformers that integrates parameter-efficient fine-tuning methods into transformer models. Instead of updating all model weights during training, adapters add small trainable modules (like LoRA, prefix tuning, or bottleneck adapters) that achieve competitive performance with far fewer parameters. The library provides a unified interface for training these adapters, loading pre-trained ones from AdapterHub, and composing multiple adapters together for multi-task or ensemble scenarios. The package depends on transformers and packaging, and requires Python 3.9+ and PyTorch 2.0+. It's designed for researchers and practitioners working on NLP tasks who want efficient fine-tuning without the memory and compute costs of full model updates. You can use it to adapt existing model setups, load community-shared adapters, or combine multiple adapters in a single model using composition blocks. Use it for: - Fine-tune large language models on domain-specific tasks with minimal GPU memory by training only adapter weights instead of all parameters. - Load and apply pre-trained adapters from AdapterHub to perform sentiment analysis, question classification, or other NLP tasks on models like RoBERTa or T5. - Compose multiple task-specific adapters in parallel or sequence to handle multi-task learning or ensemble predictions in a single model. - Experiment with different parameter-efficient methods (LoRA, prefix tuning, bottleneck adapters) on the same base model using a unified configuration interface. - Train quantized adapters (Q-LoRA, Q-Bottleneck) for even smaller memory footprints on resource-constrained hardware. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adapters adds parameter-efficient fine-tuning methods to HuggingFace Transformers models, letting you train and compose multiple adapter modules on top of pre-trained models with minimal parameter overhead. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It solves a real problem—efficient fine-tuning of large models—with a well-documented, unified interface. Install it if you're doing transfer learning on transformer models and want to reduce training costs and memory usage. ## Install pip install adapters uv add adapters poetry add adapters ## Installing adapters Before you install: Low install friction with only 2 runtime dependencies (transformers and packaging). The package is actively maintained with a recent release and no known vulnerabilities. License in practice: Licensed under Apache (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install -U adapters from adapters import AutoAdapterModel from transformers import AutoTokenizer model = AutoAdapterModel.from_pretrained("roberta-base") tokenizer = AutoTokenizer.from_pretrained("roberta-base") model.load_adapter("AdapterHub/roberta-base-pf-imdb", source="hf", set_active=True) print(model(**tokenizer("This works great!", return_tensors="pt")).logits) Requires Python 3.9+ and PyTorch 2.0+ Verify before relying: - Whether all 10+ adapter methods mentioned are fully functional in version 1.3.0 - Compatibility scope with the full range of 20+ Transformer models claimed - Performance characteristics and memory savings compared to full model fine-tuning ## Package facts - License: Apache (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 82.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags parameter efficient fine tuning, adapter methods transformers, lora prefix tuning, modular transfer learning nlp, lightweight model adaptation, adapter composition, peft transformers, parameter-efficient-tuning, transformer-extension, nlp-training [View on SkillFed](https://skillfed.io/packages/adapters) · [View on PyPI](https://pypi.org/project/adapters/)