Skip to content

Conversation

heheda12345
Copy link
Collaborator

@heheda12345 heheda12345 commented Sep 18, 2025

Purpose

The function GPUModelRunner.initialize_kv_cache and its dependency are too long. Split it to a separate file.

Add myself to codeowner of this file.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Chen Zhang <[email protected]>
Signed-off-by: Chen Zhang <[email protected]>
Signed-off-by: Chen Zhang <[email protected]>
@heheda12345 heheda12345 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 18, 2025
@mergify mergify bot added the v1 label Sep 18, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the GPUModelRunner by extracting the KV cache initialization logic into a new KVCacheInitializerMixin. This is a good change that improves code organization and makes GPUModelRunner easier to read and maintain. The implementation uses a Protocol for type-safe access to the GPUModelRunner instance from the mixin, which is a solid approach. The refactoring appears to be done correctly, and I did not find any issues with the changes.

Signed-off-by: Chen Zhang <[email protected]>
@mergify mergify bot added the ci/build label Sep 18, 2025
Copy link

mergify bot commented Sep 19, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @heheda12345.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build needs-rebase ready ONLY add when PR is ready to merge/full CI is needed v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant