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

Engine: Improve output structure, CLI: Configurable model options, Separate finetune+generate-adapter #1361

Merged
merged 9 commits into from
Sep 18, 2024

Conversation

jambayk
Copy link
Contributor

@jambayk jambayk commented Sep 18, 2024

Describe your changes

Engine:

  • Improve the output folder structure of a workflow run. The current structure was meant for multiple-ep, multiple-passflow worfklows but that is not the common usage for olive.
  • Unnecessary nesting for accelerator spec and pass flows is removed for single ep, single passflow scenario.
  • output_name is removed from both pass config and engine config.
    • The behavior of output_name is arbitrary. User can get the output in a specific folder by directly providing the output_dir like parent-dir/specific-dir.
    • output_name was allowed for pass config to save intermediate models. But this can be achieved by providing multiple pass flows like [[A, B], [A, B, C]]. This is cleaner than the former.
  • Refer to Engine.run for more details on the new output structure.

CLI:

  • add_model_options is made configurable so that only the desired model type related options are added.
  • save_output_model uses the new engine output directory structure to copy the output model into the final output directory.
  • finetune command separated into finetune and generate-adapter commands. These commands can be chained as shown in the llama2 multilora notebook.

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.
  • Is this PR including examples changes? If yes, please remember to update example documentation in a follow-up PR.

(Optional) Issue link

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

olive/cli/generate_adapter.py Outdated Show resolved Hide resolved
olive/cli/base.py Show resolved Hide resolved
devang-ml
devang-ml previously approved these changes Sep 18, 2024
@jambayk jambayk merged commit 9301aae into main Sep 18, 2024
33 checks passed
@jambayk jambayk deleted the jambayk/separate-cli branch September 18, 2024 22:42
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.

2 participants