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

Pass to export a PyTorch model using GenAI exporter #940

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Conversation

shaahji
Copy link
Contributor

@shaahji shaahji commented Feb 14, 2024

Describe your changes

Pass to export a PyTorch model using GenAI exporter

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

examples/llama2/llama2_genai.json Outdated Show resolved Hide resolved
examples/llama2/llama2_genai.json Show resolved Hide resolved
examples/llama2/llama2_genai.json Show resolved Hide resolved
kunal-vaishnavi added a commit to microsoft/onnxruntime-genai that referenced this pull request Feb 22, 2024
### Description

This PR enhances the model builder tool for building and running models
by adding the following.

- Adds a README file to show how to use the tool
- Creates a GenAI JSON config file that users can customize
- Saves the tokenization files from Hugging Face
- Adds additional options for customizing how the model is built
- Allows mini models to be created for testing purposes
- Rewrites `create_model` for integration with Olive

### Motivation and Context

- The README file showcases the tool's full usage.
- The JSON file has two groups, `model` and `search`. The `model`
section contains information about the model and the parameters in the
`search` section can be modified as desired.
- The tokenization files are needed for the tokenizers in the ORT GenAI
library.
- The full list of additional options can be viewed in the usage section
of the README.
- By reducing the number of hidden layers, mini models can be created
with the model builder tool for testing purposes (e.g. unit testing,
CIs).
- [This PR](microsoft/Olive#940) is integrating
the model builder tool into Olive and wants to import the `create_model`
method directly instead of running the script.
@shaahji shaahji marked this pull request as ready for review February 28, 2024 07:23
@trajepl
Copy link
Contributor

trajepl commented Feb 28, 2024

c093dd9
Could you help also update the docs to introduce the new GenAI converter pass?

@shaahji shaahji force-pushed the shaahji/genai branch 3 times, most recently from 8b4841b to 47c513d Compare February 28, 2024 20:03
docs/source/api/passes.rst Outdated Show resolved Hide resolved
@shaahji shaahji merged commit a23a222 into main Mar 1, 2024
33 checks passed
@shaahji shaahji deleted the shaahji/genai branch March 1, 2024 07:32
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.

None yet

6 participants