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

[deepsparse.benchmark] enable internal kv cache by default #1335

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

bfineran
Copy link
Contributor

@bfineran bfineran commented Oct 19, 2023

if a model is detected to have kv cache, default behavior on deepsparse engine is to run with internal enabled

also adds argument disable-kv-cache-overrides to skip any kv cache updates (addresses previous need for the sequence_length set requirement)

example:
with internal cache
deepsparse.benchmark zoo:nlg/text_generation/mpt-7b/pytorch/huggingface/mpt_chat/base-none
Throughput (items/sec): 2.6370

with external cache
deepsparse.benchmark zoo:nlg/text_generation/mpt-7b/pytorch/huggingface/mpt_chat/base-none --no-internal-kv-cache
Throughput (items/sec): 2.2022

with no model edits
deepsparse.benchmark zoo:nlg/text_generation/mpt-7b/pytorch/huggingface/mpt_chat/base-none --disable-kv-cache-overrides
Throughput (items/sec): 2.1987

@bfineran bfineran requested review from mgoin and dbogunowicz October 19, 2023 15:25
@bfineran bfineran self-assigned this Oct 19, 2023
mgoin
mgoin previously approved these changes Oct 19, 2023
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

appreciate it!

@mgoin mgoin merged commit eb114ba into main Oct 19, 2023
@mgoin mgoin deleted the default-benchmark-internal-kv branch October 19, 2023 16:45
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