Skip to content

Commit 7b1e160

Browse files
committed
add test model
1 parent eaad28f commit 7b1e160

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

optimum/exporters/openvino/model_configs.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,10 @@ 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:
463+
if normalized_config.new_decoder_architecture:
464464
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
467465
else:
468-
self.num_kv_heads = 1
466+
self.num_kv_heads = normalized_config.num_kv_heads if not normalized_config.multi_query else 1
469467

470468
self.head_dim = self.hidden_size // self.num_attention_heads
471469

tests/openvino/test_modeling.py

+1
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
538538
"internlm2",
539539
"orion",
540540
"falcon",
541+
"falcon-40b",
541542
)
542543
GENERATION_LENGTH = 100
543544
REMOTE_CODE_MODELS = ("chatglm", "minicpm", "baichuan2", "jais", "qwen", "internlm2", "olmo", "orion")

tests/openvino/utils_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"electra": "hf-internal-testing/tiny-random-electra",
4545
"gemma": "fxmarty/tiny-random-GemmaForCausalLM",
4646
"falcon": "fxmarty/really-tiny-falcon-testing",
47+
"falcon-40b": "katuni4ka/tiny-random-falcon-40b",
4748
"flaubert": "hf-internal-testing/tiny-random-flaubert",
4849
"gpt_bigcode": "hf-internal-testing/tiny-random-GPTBigCodeModel",
4950
"gpt2": "hf-internal-testing/tiny-random-gpt2",

0 commit comments

Comments
 (0)