[Bugfix] Detect all attention-spelling variants in ModelConfig.is_hybrid (#52161)
Signed-off-by: Michal Ganczarenko <michal.ganczarenko@intel.com> Signed-off-by: Michał Ganczarenko <michal.ganczarenko@intel.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
co-authored by
Wentao Ye
parent
90984ddbed
commit
6948a43fbb
@@ -1850,7 +1850,7 @@ class ModelConfig:
|
||||
# actually contain any non-attention layers.
|
||||
layer_types = getattr(self.hf_config, "layer_types", None)
|
||||
return layer_types is None or not all(
|
||||
layer == "attention" for layer in layer_types
|
||||
layer in ("attention", "full_attention") for layer in layer_types
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user