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

LLM: add alpaca qlora finetuning example #9276

Merged
merged 12 commits into from
Nov 8, 2023

Conversation

plusbang
Copy link
Contributor

@plusbang plusbang commented Oct 26, 2023

Description

  • Add alpaca qlora finetuning example with single Arc usage

(According to comparison in https://github.com/analytics-zoo/nano/issues/706#issuecomment-1793989686, use ["q_proj","v_proj","k_proj","o_proj","up_proj","down_proj","gate_proj"] as default target modules)

4. How to test?

  • Unit test
  • Local test

@yangw1234
Copy link
Contributor

This is the original code https://github.com/tloen/alpaca-lora/blob/main/finetune.py, maybe we should also add their license.

@plusbang plusbang force-pushed the add-alpaca-qlora-example branch from bc68139 to 61b3752 Compare October 31, 2023 06:36
@plusbang
Copy link
Contributor Author

This is the original code https://github.com/tloen/alpaca-lora/blob/main/finetune.py, maybe we should also add their license.

yeah, have added.

@plusbang
Copy link
Contributor Author

plusbang commented Nov 6, 2023

Please @jason-dai take a look. Example usage on single Arc is provided.

@plusbang
Copy link
Contributor Author

plusbang commented Nov 6, 2023

@jason-dai Now, the minimal necessary components to run Alpaca QloRA are updated, but I'm not sure whether need to add license comments in the JSON files of templates folder.

@jason-dai
Copy link
Contributor

@jason-dai Now, the minimal necessary components to run Alpaca QloRA are updated, but I'm not sure whether need to add license comments in the JSON files of templates folder.

Add comment "This file is copied from ..."

@plusbang
Copy link
Contributor Author

plusbang commented Nov 6, 2023

@jason-dai Now, the minimal necessary components to run Alpaca QloRA are updated, but I'm not sure whether need to add license comments in the JSON files of templates folder.

Add comment "This file is copied from ..."

OK, have added comment in JSON files.

# you can install specific ipex/torch version for your need
pip install --pre --upgrade bigdl-llm[xpu] -f https://developer.intel.com/ipex-whl-stable-xpu
pip install transformers==4.34.0
pip install fire datasets peft==0.5.0
Copy link
Contributor

Choose a reason for hiding this comment

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

add pip install accelerate==0.23.0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add pip install accelerate==0.23.0 ?

Following the provided commands, accelerate==0.21.0 is installed and experiments work fine. Is it necessary?

@plusbang plusbang requested a review from jason-dai November 8, 2023 02:10
@@ -0,0 +1,7 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

add comment for where this file is copied from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add comment for where this file is copied from

Have updated.

@plusbang plusbang requested a review from jason-dai November 8, 2023 07:10
Copy link
Contributor

@jason-dai jason-dai left a comment

Choose a reason for hiding this comment

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

LGTM

@plusbang plusbang merged commit a75624a into intel-analytics:main Nov 8, 2023
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants