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

[Misc]: Prefix caching in the BlockManagerV2 #3667

Closed
cadedaniel opened this issue Mar 27, 2024 · 4 comments
Closed

[Misc]: Prefix caching in the BlockManagerV2 #3667

cadedaniel opened this issue Mar 27, 2024 · 4 comments
Labels

Comments

@cadedaniel
Copy link
Collaborator

cadedaniel commented Mar 27, 2024

Recently, we refactored the block manager subsystem to improve testability by separating concerns of each layer. See #3492 for more information.

The following features are missing to support prefix caching:

  • Eviction policies based on last access time
  • Eviction policies based on length of prefix (necessary for correctness as our prefix caching attention only supports contiguous prefixes)
  • Tracking the computed bit in prefix caching
  • E2E correctness test comparing greedy generation equality with prefix caching vs. without prefix caching (see this test for inspiration, which compares greedy generation equality between v1 and v2 block managers)
  • Performance profiling of v2 + prefix caching

For design, #3492 has more details (also feel free to reach out to me). One key is to understand how prefix caching promotion works in the new design:
image

@cadedaniel
Copy link
Collaborator Author

cc @robertgshaw2-neuralmagic

@rkooo567
Copy link
Collaborator

QQ: So the new block manager will be used just for spec decoding until these features will be available?

@cadedaniel
Copy link
Collaborator Author

cadedaniel commented Mar 28, 2024

prefix caching w/v2 block manager is blocked on these features, non-prefix caching usage is blocked by #3666 and #3665

@robertgshaw2-neuralmagic
Copy link
Collaborator

@SageMoore taking a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants