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

🇵🇭 phi3 finetune+genai #1168

Merged
merged 10 commits into from
May 24, 2024
Merged

🇵🇭 phi3 finetune+genai #1168

merged 10 commits into from
May 24, 2024

Conversation

trajepl
Copy link
Contributor

@trajepl trajepl commented May 21, 2024

Describe your changes

Existing genai example only cover the case of export model from official huggingface hub. This PR shows how to use model builder to optimize the finetune lora weights.

Note that: genai currently only works for LORA finetuned model. Qlora will use nf4 or fp4 which leads several issues in genai:

  1. nf4/fp4 will force the model on cuda when loading. This lead runtime error when convert weights from tensor to numpy (need fix from genai).
  2. weights shape dismatch error. (investigating...)

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
Contributor

@devang-ml devang-ml left a comment

Choose a reason for hiding this comment

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

Please update Phi3 example readme.

olive/passes/pytorch/merge_lora_weights.py Outdated Show resolved Hide resolved
@trajepl trajepl merged commit 7b1481e into main May 24, 2024
35 checks passed
@trajepl trajepl deleted the jiapli/qlora_output branch May 24, 2024 15:47
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

4 participants