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

Training a Model from Huggingface with InfoBERT #4

Closed
eaberman opened this issue May 30, 2021 · 1 comment
Closed

Training a Model from Huggingface with InfoBERT #4

eaberman opened this issue May 30, 2021 · 1 comment

Comments

@eaberman
Copy link

Hi, I am attempting to use an ALBERT model, e.g. albert-base-v2 from https://huggingface.co/albert-base-v2, and usingalbert-base-v2 as the argument when I run source setup.sh && runexp.

Unfortunately, I am getting an AttributeError: 'AlbertForSequenceClassification' object has no attribute 'clear_mask'

Are there any functions I need to implement in order for this to work, or any advice about getting an approach like this to work with your code base?

Thank you!

@boxin-wbx
Copy link
Member

Hi,

Thanks for your interest in our work. Our current code base only supports BERT and RoBERTa.

To make ALBERT support our framework, I think you should implement the mask reusing mentioned in the FreeLB paper (https://arxiv.org/pdf/1909.11764.pdf). You can follow how bert.py achieves mask reusing and implements that for ALBERT. Basically, you just need to take care of self.dp_mask and clear_mask().

@eaberman eaberman closed this as completed Jun 1, 2021
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

No branches or pull requests

2 participants