mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-11 07:20:11 +08:00
parent
a55be1ffc5
commit
e1b6bfa824
@ -74,12 +74,12 @@ class ModelArchConfigConvertorBase:
|
|||||||
# For ChatGLM:
|
# For ChatGLM:
|
||||||
"multi_query_group_num",
|
"multi_query_group_num",
|
||||||
]
|
]
|
||||||
for attr in attributes:
|
# For non-grouped-query attention models, the number of KV heads is
|
||||||
num_kv_heads = getattr(self.hf_text_config, attr, None)
|
# equal to the number of attention heads.
|
||||||
if num_kv_heads is not None:
|
default_factory = lambda: self.hf_text_config.num_attention_heads
|
||||||
return num_kv_heads
|
return getattr_iter(
|
||||||
|
self.hf_text_config, attributes, default_factory=default_factory
|
||||||
return self.hf_text_config.num_attention_heads
|
)
|
||||||
|
|
||||||
def get_num_experts(self) -> int:
|
def get_num_experts(self) -> int:
|
||||||
"""Returns the number of experts in the model."""
|
"""Returns the number of experts in the model."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user