Giter Club home page Giter Club logo

hub's Introduction

IMPORTANT NOTE

Contributing new adapters via this repository is no longer supported. Please upload all new adapters to HuggingFace's Model Hub as described in https://docs.adapterhub.ml/huggingface_hub.html.

This repository will be kept available as an archive of existing contributed adapters.


AdapterHub

Website ย  โ€ข ย  Documentation ย  โ€ข ย  Library

You have just found "the Hub", the central GitHub repository collecting all adapter modules available via the AdapterHub platform.

๐Ÿ“ If you're here because you would like to add you own adapter to AdapterHub: Great! This is exactly the place to go! Refer to our documentation on how to get started.

๐Ÿ”Ž If you're searching for the code of AdapterHub: Please go to https://github.com/adapter-hub/adapter-transformers.

โ“ If you're here but don't know what all of the above is about: No problem! Check out our website at https://adapterhub.ml and our documentation at https://docs.adapterhub.ml to learn about AdapterHub and to get started.

Structure of this Repository

This repository is divided into the following subfolders:

  • TEMPLATES contains templates for all different YAML info cards in this repository. We highly recommend you to use one of the available templates when adding your adapter, architecture, task etc. Auto-generated, do not modify anything here!

  • adapter_types contains info cards for all types of adapters supported by our framework

  • adapters is the place where all adapter info cards should go

  • architectures contains info cards for all available adapter architectures. Add your own architecture here!

  • dist contains generated files for adapters and architectures. Auto-generated, do not modify anything here!

  • scripts contains script for validating the submitted adapters and info cards

  • subtasks contains info cards for all available subtasks

  • tasks contains info cards for all available tasks

How To Contribute

Refer to the step-by-step guides in our documentation on how to contribute your adapters to the Hub.

Our template files are a good way to get started with any contribution to this repo.

AdapterHub CLI

The AdapterHub CLI provides command-line tools to help you contributing to the Hub, such as packaging adapters or validating filled-out yaml files.

To install the CLI from the cloned repository, you can run the following in this folder:

pip install -U ./scripts/.

Alternatively, you can install the CLI using:

pip install -U git+https://github.com/adapter-hub/hub.git#subdirectory=scripts

Now you can use the pack pack command to interactively prepare your adapters for upload and submission to the Hub:

adapter-hub-cli pack <folder_with_models_or_adapters>

To validate yaml files, run:

adapter-hub-cli check path/to/adapter.yaml

Read more about the AdapterHub CLI in the documentation.

Citation

Please cite our paper when using AdapterHub for your work:

@inproceedings{pfeiffer2020AdapterHub,
    title={{AdapterHub: A Framework for Adapting Transformers}},
    author={Jonas Pfeiffer and
            Andreas R\"uckl\'{e} and
            Clifton Poth and
            Aishwarya Kamath and
            Ivan Vuli\'{c} and
            Sebastian Ruder and
            Kyunghyun Cho and
            Iryna Gurevych},
    booktitle={Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP 2020): Systems Demonstrations},
    year={2020},
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.emnlp-demos.7",
    pages = "46--54",
}

hub's People

Contributors

adapter-hub-bert avatar arueckle avatar calpt avatar davanstrien avatar hsterz avatar jopfeiff avatar kabirahuja2431 avatar mapmeld avatar martiansideofthemoon avatar nirantk avatar till0r avatar vblagoje avatar yifan-h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hub's Issues

Adding adapters for CLIP - new model

Hi, in my Master thesis I am currently working with fine-tuning CLIP on specific image-text datasets. Concretely, I am using the MIMIC-CXR dataset (https://physionet.org/content/mimic-cxr/2.0.0/).I'm training Adapters for the model and therefore I thought of possibly uploading them to AdapterHub! I think it would be a great addition to have the CLIP model available too, as we could then extend it as a community.

It seems like the main point would be to add the model architecture of the OpenAI CLIP model from here: https://github.com/openai/CLIP/blob/main/clip/model.py
I was planning on adding adapters to the ResidualAttentionBlock.

So I'm basically asking: is there interest for this model? If so, I would gladly try to contribute this, but I might need some help as I am not super familiar with AdapterHub yet. If there are some instructions of how I could best add a new model that would be amazing.

Getting Check Error while Uploading Pre-trained Adapters

Hello,

I have been trying to upload some pre-trained adapters for XNLI task. I am seeing the following error in the file format check in the install step:

ERROR: Cannot install -r scripts/requirements.txt (line 5) and pyyaml because these package versions have conflicting dependencies.

The conflict is caused by:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
The user requested pyyaml
adapter-transformers 3.1.0a0 depends on pyyaml>=5.1

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

I am not sure if there is something wrong with my yaml file, since it does pass the tests when I test it through adapter-hub-cli:
adapter-hub-cli check adapters/kabirahuja2431/bert-base-multilingual-cased_nli_MultiNLI_adapter_config.yaml

Appreciate any help on this. Thanks!

Running adapterhub-cli causes "ImportError: cannot import name 'ADAPTER_CONFIG_MAP' from 'transformers' "

How to reproduce:

  1. Install adapterhub-cli as specified in the README.md
  2. Run $ adapterhub-cli in the terminal

Frequency of occurring: 100%

System: Ubuntu Linux 22.04

Traceback:

Traceback (most recent call last):
File "/home/dboumber/anaconda3/envs/hfcli/bin/adapter-hub-cli", line 5, in
from adapter_hub_cli import main
File "/home/dboumber/anaconda3/envs/hfcli/lib/python3.9/site-packages/adapter_hub_cli/init.py", line 5, in
from .pack import AdapterPackCommand
File "/home/dboumber/anaconda3/envs/hfcli/lib/python3.9/site-packages/adapter_hub_cli/pack.py", line 13, in
from transformers import ADAPTER_CONFIG_MAP, WEIGHTS_NAME, AutoModel
ImportError: cannot import name 'ADAPTER_CONFIG_MAP' from 'transformers' (/home/dboumber/anaconda3/envs/hfcli/lib/python3.9/site-packages/transformers/init.py)

Time!

Hello Adapter-hub team,

I'm working with the T5-small model for text summarization. I fine-tuned it and also trained the adapter for the same dataset on the same machine and with the same configuration.

I was expecting lesser time for adapter training as it is not changing all the parameters of the model. But surprisingly, It took same time as fine-tuning the model. I used that run_summarization for adapter training.

Can you help why it took the same time! or am I missing something?

Looking for a solution!

Thanks
Darshan Tank

Contribution to adapter hub

Hey,
I have trained an adapter for my model.
For contribution, when I apply adapter-hub-cli pack /path/to/adapter/folder, it only create ~ folder and .PACK_OUTPUT folder.

Now the question is, how do I find that so-called Zipped folder for my adapter which I need to upload on my place and pass the URL of it to download?

Thanks

Please add a license to this repo

First, thank you for sharing this project with us!

Could you please add an explicit LICENSE file to the repo so that it's clear
under what terms the content is provided, and under what terms user
contributions are licensed?

Per GitHub docs on licensing:

[...] without a license, the default copyright laws apply, meaning that you
retain all rights to your source code and no one may reproduce, distribute,
or create derivative works from your work. If you're creating an open source
project, we strongly encourage you to include an open source license.

Thanks!

โœ˜ Failed to pack adapter 'config_id'

While packing adapter I got this error โœ˜ Failed to pack adapter 'config_id'. What exact problem is happening here?

I have one more question, if I have to upload 60+ adapters, is there any way I can automate this whole process?

How to separate adapter after training?

I want to contribute my trained adapter to the adapter hub.
It requires a zip folder of the adapter with two files! (we can get it through model.save_adapter(....)) but but but,

The question is how? how do I create that adapter zip folder from the folder I got after training adapter(which has spiece.model file and training_args.bin file and also JSON files containing results after training and evaluation)!!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.