Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Adapters to DistilBERT #67

Merged
merged 7 commits into from
Oct 27, 2020
Merged

Conversation

calpt
Copy link
Member

@calpt calpt commented Sep 29, 2020

Changes:

  • Adds adapter support to DistilBERT models (via mixins in adapter_distilbert.py)
  • Adds a flex-head model for DistilBERT (DistilBertModelWithHeads)
  • Moved invertible adapters to separate InvertibleAdaptersMixin to improve modularity
  • Adjustments in BERT adapters implementation to allow partial reuse for DistilBERT

TODO:

Closes #58.


Results on GLUE:

Task Pfeiffer (dev) Houlsby (dev)
RTE (acc) 61.97 * 60.17 *
MRPC (acc) 85.29 * 85.94 *
STS-B (spearmanr) 85.75 * 85.83 *
CoLA (acc) 51.44 * 51.86 *
SST-2 (acc) 90.36 * 90.71 *
QNLI (acc) 88.5 * 88.67 *
QQP (acc) 89.28 90
MNLI (acc) 81.33 82.08

(*) mean of 3 runs

@calpt calpt marked this pull request as ready for review October 9, 2020 09:45
Copy link
Member

@hSterz hSterz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good I just have question about the code conventions

src/transformers/adapter_bert.py Show resolved Hide resolved
@calpt calpt merged commit 6588b3f into adapter-hub:master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supporting DistilBERT model
4 participants