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.

This library can be used as a drop-in replacement for HuggingFace Transformers and regularly synchronizes new upstream changes.

Quick tour

adapter-transformers currently supports Python 3.6+ and PyTorch 1.1.0+. 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 find this library useful, please cite 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-1.1.0.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adapter_transformers-1.1.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: adapter-transformers-1.1.0.tar.gz
  • Upload date:
  • Size: 1.0 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-1.1.0.tar.gz
Algorithm Hash digest
SHA256 75a71cf2c37def32d5618e15b8f90ef865b516733c0b3366ba59360c251c631e
MD5 ba781db05824f827dc221927ba7c7196
BLAKE2b-256 1d6cda19ae6f8f0db9e9d076a288fb96799412e35e40d150de453a0ea9778eb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: adapter_transformers-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 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-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 328f3ca1c41336eea36a9e19d650c8bd304a75d2dda480784aeb89bc4c55f70f
MD5 f4d2dfef831e9046ce27b332cdfb5b4f
BLAKE2b-256 9d441370c187aba1349d56d6813ec4de54644d15e154983050f4923ce5455069

See more details on using hashes here.

Supported by

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