mirror of
https://github.com/vllm-project/vllm.git
synced 2025-10-20 14:53:52 +08:00
Use head_dim in config if exists (#2622)
This commit is contained in:
@ -213,6 +213,8 @@ class ModelConfig:
|
||||
return self.hf_config.hidden_size
|
||||
|
||||
def get_head_size(self) -> int:
|
||||
if hasattr(self.hf_config, "head_dim"):
|
||||
return self.hf_config.head_dim
|
||||
# FIXME(woosuk): This may not be true for all models.
|
||||
return self.hf_config.hidden_size // self.hf_config.num_attention_heads
|
||||
|
||||
|
Reference in New Issue
Block a user