Skip to content

Commit f589f17

Browse files
committed
add olmo support
1 parent 7a4464d commit f589f17

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

optimum/exporters/openvino/model_configs.py

+6
Original file line numberDiff line numberDiff line change
@@ -437,3 +437,9 @@ class OrionOpenVINOConfig(TextDecoderWithPositionIdsOnnxConfig):
437437
DUMMY_INPUT_GENERATOR_CLASSES = (DummyTextInputGenerator, MistralDummyPastKeyValuesGenerator)
438438
DUMMY_PKV_GENERATOR_CLASS = MistralDummyPastKeyValuesGenerator
439439
NORMALIZED_CONFIG_CLASS = NormalizedTextConfig
440+
441+
442+
@register_in_tasks_manager("olmo", *["text-generation", "text-generation-with-past"], library_name="transformers")
443+
class OLMoOpenVINOConfig(TextDecoderWithPositionIdsOnnxConfig):
444+
DEFAULT_ONNX_OPSET = 14
445+
NORMALIZED_CONFIG_CLASS = NormalizedTextConfig

tests/openvino/test_modeling.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
528528
"mistral",
529529
"mixtral",
530530
"mpt",
531+
"olmo",
531532
"opt",
532533
"pegasus",
533534
"qwen",
@@ -540,7 +541,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
540541
"falcon",
541542
)
542543
GENERATION_LENGTH = 100
543-
REMOTE_CODE_MODELS = ("chatglm", "minicpm", "baichuan2", "jais", "qwen", "internlm2", "olmo", "orion")
544+
REMOTE_CODE_MODELS = ("chatglm", "minicpm", "baichuan2", "jais", "qwen", "internlm2", "orion")
544545

545546
@parameterized.expand(SUPPORTED_ARCHITECTURES)
546547
def test_compare_to_transformers(self, model_arch):

tests/openvino/utils_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"mpt": "hf-internal-testing/tiny-random-MptForCausalLM",
7373
"mt5": "stas/mt5-tiny-random",
7474
"nystromformer": "hf-internal-testing/tiny-random-NystromformerModel",
75-
"olmo": "katuni4ka/tiny-random-olmo",
75+
"olmo": "katuni4ka/tiny-random-olmo-hf",
7676
"orion": "katuni4ka/tiny-random-orion",
7777
"pegasus": "hf-internal-testing/tiny-random-pegasus",
7878
"pix2struct": "fxmarty/pix2struct-tiny-random",

0 commit comments

Comments
 (0)