Skip to content

Conversation

yue-zhang-2025
Copy link

Hi nano-vllm team, this is Yue, nice to meet you, I'm just a fan of this repo and learning it! As I learn the code of block_manager, IIUC the current implementation of can_append and may_append is assuming seq already includes the upcoming token_id - this seems a bug to me as the upcoming token_id will be added in scheduler's postprocess which comes after the schedule(). I saw an existed PR fix the can_append() function, I'm creating this PR to fix the may_append() function.

I might be wrong if I miss any context, please correct me if I'm wrong :) Thanks for review!

@CZWin32768
Copy link

Hi, thanks for your fix. I tried your fix and found an edge case that could lead to assert error. If the prompt length equals to block size, the last block hash will be not -1 (refer to the allocate function), triggering the assert error at line 117.

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