Skip to content

Optimize Gemma 4 KV cache initialization to allocate on-device in HBM. - #2055

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_973971992
Open

Optimize Gemma 4 KV cache initialization to allocate on-device in HBM.#2055
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_973971992

Conversation

@copybara-service

Copy link
Copy Markdown

Optimize Gemma 4 KV cache initialization to allocate on-device in HBM.

  • Eliminate host-to-device PCIe transfer of zeroed KV cache in Attention.init_cache().
  • Use JIT-compiled on-device allocation with explicit NamedSharding.

- Eliminate host-to-device PCIe transfer of zeroed KV cache in Attention.init_cache().
- Use JIT-compiled on-device allocation with explicit NamedSharding.

PiperOrigin-RevId: 973971992
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