Skip to content

update stateful_kv_size correctly in mismatch case#170

Merged
wine99 merged 1 commit into
dev_backend_openvinofrom
stateful_kv_size_mismatch
May 22, 2026
Merged

update stateful_kv_size correctly in mismatch case#170
wine99 merged 1 commit into
dev_backend_openvinofrom
stateful_kv_size_mismatch

Conversation

@wine99
Copy link
Copy Markdown
Collaborator

@wine99 wine99 commented May 19, 2026

No description provided.

state.set_state(new_state_tensor);
}
r_ctx->stateful_kv_size = pos_data[0] + 1;
r_ctx->stateful_kv_size = pos_data[0] + pos_shape[3];
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@cavusmustafa Although pos_data[0] + 1 did not trigger any bug and the /regen command in llama-cli was working correctly because the pos_shape[3] happened to be 1, I believe the correct expression is pos_data[0] + pos_shape[3]

@wine99 wine99 force-pushed the dev_backend_openvino branch from fba54ea to 4f247b1 Compare May 20, 2026 08:15
@wine99 wine99 force-pushed the stateful_kv_size_mismatch branch from 3227cf0 to 2896802 Compare May 22, 2026 02:44
@wine99 wine99 merged commit 9e589ee into dev_backend_openvino May 22, 2026
4 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant