A friendly fork of Huggingface's Transformers, adding Adapters to PyTorch language models
Project description
adapter-transformers
A friendly fork of HuggingFace's Transformers, adding Adapters to PyTorch language models
adapter-transformers
is an extension of HuggingFace's Transformers library, integrating adapters into state-of-the-art language models by incorporating AdapterHub, a central repository for pre-trained adapter modules.
💡 Important: This library can be used as a drop-in replacement for HuggingFace Transformers and regularly synchronizes new upstream changes. Thus, most files in this repository are direct copies from the HuggingFace Transformers source, modified only with changes required for the adapter implementations.
Quick tour
adapter-transformers
currently supports Python 3.6+ and PyTorch 1.3.1+.
After installing PyTorch, you can install adapter-transformers
from PyPI ...
pip install -U adapter-transformers
... or from source by cloning the repository:
git clone https://github.com/adapter-hub/adapter-transformers.git
cd adapter-transformers
pip install .
Getting Started
HuggingFace's great documentation on getting started with Transformers can be found here. adapter-transformers
is fully compatible with Transformers.
To get started with adapters, refer to these locations:
- Colab notebook tutorials, a series notebooks providing an introduction to all the main concepts of (adapter-)transformers and AdapterHub
- https://docs.adapterhub.ml, our documentation on training and using adapters with adapter-transformers
- https://adapterhub.ml to explore available pre-trained adapter modules and share your own adapters
- Examples folder of this repository containing HuggingFace's example training scripts, many adapted for training adapters
Citation
If you use this library for your work, please consider citing our paper AdapterHub: A Framework for Adapting Transformers:
@inproceedings{pfeiffer2020AdapterHub,
title={AdapterHub: A Framework for Adapting Transformers},
author={Pfeiffer, Jonas and
R{\"u}ckl{\'e}, Andreas and
Poth, Clifton and
Kamath, Aishwarya and
Vuli{\'c}, Ivan and
Ruder, Sebastian and
Cho, Kyunghyun and
Gurevych, Iryna},
booktitle={Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations},
pages={46--54},
year={2020}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for adapter-transformers-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88ba169e709e22bb9e8b9c7ccc5e9756ccd9d48953e125c3f1c45163dd67d269 |
|
MD5 | cffe534e2705550c7dd8614f407c31f2 |
|
BLAKE2b-256 | 2cf6340ca77dd49fe9c4eea3d9beeac61b77ae942599105499dfd1a79b6e0092 |
Hashes for adapter_transformers-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfa0c78bdf515a4b3bc4647899f7ca5073a2b127a5eccd2cc4fb6b17a9ec8821 |
|
MD5 | 6f5d8d167525b69661babe70448b898c |
|
BLAKE2b-256 | 550134af194deecf1db672236c1b198f4cbe03d1067c9a42330c3a2134bf15a9 |