Skip to content

Commit a6ee92e

Browse files
eaidovaecharlaix
andauthored
Update optimum/exporters/openvino/model_configs.py
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
1 parent eaad28f commit a6ee92e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

optimum/exporters/openvino/model_configs.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,8 @@ def __init__(
460460
random_sequence_length_range=random_sequence_length_range,
461461
**kwargs,
462462
)
463-
if normalized_config.new_decoder_architecture and normalized_config.multi_query:
464-
self.num_kv_heads = normalized_config.num_attention_heads
465-
elif normalized_config.new_decoder_architecture and not normalized_config.multi_query:
466-
self.num_kv_heads = normalized_config.num_kv_heads
463+
if normalized_config.new_decoder_architecture:
464+
self.num_kv_heads = normalized_config.num_attention_heads if normalized_config.multi_query else normalized_config.num_kv_heads
467465
else:
468466
self.num_kv_heads = 1
469467

0 commit comments

Comments
 (0)