Skip to main content

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

Tests GitHub PyPI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adapter-transformers-2.0.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

adapter_transformers-2.0.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file adapter-transformers-2.0.0.tar.gz.

File metadata

  • Download URL: adapter-transformers-2.0.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.23.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for adapter-transformers-2.0.0.tar.gz
Algorithm Hash digest
SHA256 88ba169e709e22bb9e8b9c7ccc5e9756ccd9d48953e125c3f1c45163dd67d269
MD5 cffe534e2705550c7dd8614f407c31f2
BLAKE2b-256 2cf6340ca77dd49fe9c4eea3d9beeac61b77ae942599105499dfd1a79b6e0092

See more details on using hashes here.

File details

Details for the file adapter_transformers-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: adapter_transformers-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.23.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for adapter_transformers-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfa0c78bdf515a4b3bc4647899f7ca5073a2b127a5eccd2cc4fb6b17a9ec8821
MD5 6f5d8d167525b69661babe70448b898c
BLAKE2b-256 550134af194deecf1db672236c1b198f4cbe03d1067c9a42330c3a2134bf15a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page