Skip to content

Commit 220a476

Browse files
Use head_dim in config if exists (#2622)
1 parent beb89f6 commit 220a476

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vllm/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ def get_hidden_size(self) -> int:
213213
return self.hf_config.hidden_size
214214

215215
def get_head_size(self) -> int:
216+
if hasattr(self.hf_config, "head_dim"):
217+
return self.hf_config.head_dim
216218
# FIXME(woosuk): This may not be true for all models.
217219
return self.hf_config.hidden_size // self.hf_config.num_attention_heads
218220

0 commit comments

Comments
 (0)