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 llama example #1382

Merged
merged 6 commits into from
Sep 19, 2023
Merged

Conversation

prathikr
Copy link
Contributor

This PR adds run_classification.py example with ONNX Runtime accelerator classes. The example was taken from Hugging Face's example and was modified to use ORTTrainer/ORTTrainingArguments. Additionally, the PR adds observed performance metrics for meta-llama/Llama-2-7b-hf.

@prathikr
Copy link
Contributor Author

@JingyaHuang can you please review?

Copy link
Contributor

@JingyaHuang JingyaHuang left a comment

Choose a reason for hiding this comment

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

Hi @prathikr, thanks for adding the example, I put some minor nits. The classification example looks good to me, and I wonder if a causal language modeling fine-tuning example could also be beneficial to the community since llama2 is a generative model.

@prathikr
Copy link
Contributor Author

prathikr commented Sep 15, 2023

Hi @prathikr, thanks for adding the example, I put some minor nits. The classification example looks good to me, and I wonder if a causal language modeling fine-tuning example could also be beneficial to the community since llama2 is a generative model.

@JingyaHuang run_clm.py is already available here, though it hasn't been updated in a while. Is there anyone specific whose duty it is to update the optimum examples to stay in step with transformers examples? All the examples are the same except for the usage of ORTTrainer/ORTTrainingArguments.

@JingyaHuang
Copy link
Contributor

Hi @prathikr, it's true that the training examples of ort training last updated a while ago. I will update them this week, but in long term, it would be hard for the team to keep examples always updated with transformers releases, the best way to automate the process would be to build two CIs in optimum repo:

  • 1st CI: clone transformers repo and replace training examples with ORT APIs(ORTTrainer and ORTTrainingArguments) and open a pull request in the optimum repo.
  • 2nd CI: to valid all updated examples (probably wth test_examples.py which also need to be updated by adding all examples we have now)

Ping @fxmarty for some inputs, probably you have a better idea.

@prathikr
Copy link
Contributor Author

Hi @prathikr, it's true that the training examples of ort training last updated a while ago. I will update them this week, but in long term, it would be hard for the team to keep examples always updated with transformers releases, the best way to automate the process would be to build two CIs in optimum repo:

  • 1st CI: clone transformers repo and replace training examples with ORT APIs(ORTTrainer and ORTTrainingArguments) and open a pull request in the optimum repo.
  • 2nd CI: to valid all updated examples (probably wth test_examples.py which also need to be updated by adding all examples we have now)

Ping @fxmarty for some inputs, probably you have a better idea.

Thanks @JingyaHuang for getting the ball rolling on this. We have internal pipelines that depends on optimum and transformers examples being the same, so this will be very useful. Can we follow up on this task in a separate issue/PR and merge this example for now?

Copy link
Contributor

@fxmarty fxmarty left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

3 participants