Skip to content

Fix flashinfer plan call to use positional arguments for #3165 #3166

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions server/text_generation_server/layers/attention/flashinfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ def use_prefill_with_paged_kv_state(
token = prefill_with_paged_kv_state.set(state)
try:
state.plan(
qo_indptr=cu_seqlens,
paged_kv_indptr=indptr,
paged_kv_indices=block_tables,
paged_kv_last_page_len=last_page_len,
num_qo_heads=num_heads,
num_kv_heads=num_kv_heads,
head_dim=head_size,
kv_data_type=kv_dtype,
cu_seqlens,
indptr,
block_tables,
last_page_len,
num_heads,
num_kv_heads,
head_size,
page_size,
Comment on lines +87 to +94
Copy link
Member

Choose a reason for hiding this comment

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

I don't think moving away from kwargs is the right solution. The error show exactly why using kwargs is good - it catches changes to arguments. We should update to the latest flashinfer, see: https://github.com/huggingface/text-generation-inference/pull/3164/files

But a lot of the test outputs change after upgrading, I haven't had the time yet to go through them and see if they are all minor fluctuations or not.

q_data_type=q_dtype,
page_size=page_size,
kv_data_type=kv_dtype,
)
yield
finally:
Expand Down