fix: incorrect bigcode attention heads num (#676)
This commit is contained in:
parent
aa84c92ef6
commit
621980bdc0
@ -98,9 +98,11 @@ class ModelConfig:
|
|||||||
# Note: for falcon, when new_decoder_architecture is True, the
|
# Note: for falcon, when new_decoder_architecture is True, the
|
||||||
# multi_query flag is ignored and we use n_head_kv for the number of
|
# multi_query flag is ignored and we use n_head_kv for the number of
|
||||||
# KV heads.
|
# KV heads.
|
||||||
if (getattr(self.hf_config, "multi_query", False) and
|
new_decoder_arch_falcon = (
|
||||||
(self.hf_config.model_type == "falcon" and
|
self.hf_config.model_type == "falcon"
|
||||||
not getattr(self.hf_config, "new_decoder_architecture", False))):
|
and getattr(self.hf_config, "new_decoder_architecture", False))
|
||||||
|
if not new_decoder_arch_falcon and getattr(self.hf_config,
|
||||||
|
"multi_query", False):
|
||||||
# Multi-query attention, only one KV head.
|
# Multi-query attention, only one KV head.
|
||||||
return 1
|
return 1
|
||||||
# For Falcon:
|
# For Falcon:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user