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

Update benchmark script for NPU #11932

Merged
merged 8 commits into from
Aug 27, 2024
Merged

Conversation

plusbang
Copy link
Contributor

@plusbang plusbang commented Aug 27, 2024

Description

Update all-in-one benchmark script, we could also use all-in-one benchmark npu models with fused decoderlayer optimization.

usage:
set optimize_model as True in config.yaml

4. How to test?

  • Application test

@plusbang plusbang requested review from sgwhat and cyita August 27, 2024 05:39
torch_dtype='auto', attn_implementation="eager").eval()
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
elif repo_id in LLAMA_IDS:
model = AutoModelForCausalLM.from_pretrained(model_path, load_in_low_bit=low_bit, trust_remote_code=True,
optimize_model=optimize_model, max_output_len=max_output_len, max_prompt_len=int(in_out_len[0]), transpose_value_cache=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add torch_dtype=torch.float16 as suggested in our example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we add torch_dtype=torch.float16 as suggested in our example?

Have updated.

@plusbang plusbang merged commit 7c8c9a0 into intel-analytics:main Aug 27, 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.

3 participants