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

Support baichuan2 for level0 pipeline #12289

Merged
merged 10 commits into from
Oct 29, 2024

Conversation

plusbang
Copy link
Contributor

@plusbang plusbang commented Oct 29, 2024

Description

Background: https://github.com/analytics-zoo/nano/issues/1706#issuecomment-2443913860

image

3. Summary of the change

  • Fix embedding when padded idx is not None
  • Move embedding and lmhead to common
  • Add pipeline input parameter for different model type
  • Add baichuan related change (change to int64 node, generate ir and blob, convert)
  • Add example

4. How to test?

  • Application test

@plusbang plusbang changed the title [NPU L0] Support baichuan2 for level0 pipeline [WIP] Support baichuan2 for level0 pipeline Oct 29, 2024
@plusbang plusbang changed the title [WIP] Support baichuan2 for level0 pipeline Support baichuan2 for level0 pipeline Oct 29, 2024
@plusbang plusbang marked this pull request as ready for review October 29, 2024 10:35
help='Prompt to infer')
parser.add_argument("--n-predict", type=int, default=32, help="Max tokens to predict")
parser.add_argument("--max-context-len", type=int, default=1024)
parser.add_argument("--quantization_group_size", type=int, default=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe remove this argument for now as we have not support GW for baichuan2 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe remove this argument for now as we have not support GW for baichuan2 ?

Sure, have removed.

Copy link
Contributor

@rnwang04 rnwang04 left a comment

Choose a reason for hiding this comment

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

others LGTM

@plusbang
Copy link
Contributor Author

Merge it first for other model integration. Please let me know if you have any concern or comment @jason-dai : )

@plusbang plusbang merged commit 3feb58d into intel-analytics:main Oct 29, 2024
1 check passed
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