Skip to content

Conversation

xiangxu-google
Copy link
Contributor

@xiangxu-google xiangxu-google commented Jan 27, 2024

The change is for some models which set head_dim explicitly instead of using hidden_size // num_attention_heads.

The wrong head_dim read leads to the wrong size kv_cache created, which makes the PagedAttention CUDA kernel writes the new KV to unexpected GPU memory. During our case, with the head_dim setting wrong, the PagedAttention kernel writes values into model weights, which causes huge confusion and higher debugging cost (because the model can run without any CUDA memory error raised, and the model weights are modified unexpectedly during forward).

@simon-mo simon-mo merged commit 220a476 into vllm-project:main Jan 27, 2024
NikolaBorisov pushed a commit to deepinfra/vllm that referenced this pull request Jan 31, 2024
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
alexm-redhat pushed a commit to neuralmagic/nm-vllm that referenced this pull request Feb 13, 2024
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