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 Falcon-7B HuggingFace model #1758

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

petermcaughan
Copy link

This PR adds two features to torchbenchmark:

  1. Include tiiuae/falcon-7b model from HuggingFace in torchbenchmark suite.
  2. Include code path to pass arguments from model's __init__.py into model constructor during benchmarking. Running Falcon-7B in HuggingFace requires the parameter trust_remote_code to be passed.
    • There are two files that are executed when Falcon is loaded: configuration_RW and modelling_RW that both contain what seem to be safe code related to modeling specifics.

@facebook-github-bot
Copy link
Contributor

Hi @petermcaughan!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!


class Model(HuggingFaceModel):
task = NLP.LANGUAGE_MODELING
DEFAULT_TRAIN_BSIZE = 4
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a link to upstream code that reference the train batch size?

Copy link
Author

Choose a reason for hiding this comment

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

The Falcon README shows the training batch size to be 2304 [link] - updated comment to reference this. This seems prohibitive to run in testing suite though, so I kept the default size to 4.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for making the reference! We should use the per-device batch size here. In the link it mentioned 2304 batch size on 384 A100 GPUs, so per-GPU batch size should be 6. Can you please update it to 6 and add the link ( https://huggingface.co/tiiuae/falcon-7b/blob/main/README.md#:~:text=Batch%20size,tokens%20ramp%2Dup) as the reference?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the clarification! Updated the size and the reference link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants