Skip to content

Commit e0bb9ca

Browse files
committed
support hpi3 export openvino
1 parent 7a4464d commit e0bb9ca

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

optimum/exporters/openvino/model_configs.py

+16-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from transformers.utils import is_tf_available
2020

2121
from optimum.exporters.onnx.config import TextDecoderOnnxConfig, TextDecoderWithPositionIdsOnnxConfig
22-
from optimum.exporters.onnx.model_configs import GemmaOnnxConfig, LlamaOnnxConfig
22+
from optimum.exporters.onnx.model_configs import GemmaOnnxConfig, LlamaOnnxConfig, PhiOnnxConfig
2323
from optimum.exporters.tasks import TasksManager
2424
from optimum.utils import DEFAULT_DUMMY_SHAPES
2525
from optimum.utils.input_generators import (
@@ -437,3 +437,18 @@ 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(
443+
"phi3",
444+
*[
445+
"feature-extraction",
446+
"feature-extraction-with-past",
447+
"text-generation",
448+
"text-generation-with-past",
449+
"text-classification",
450+
],
451+
library_name="transformers",
452+
)
453+
class Phi3OpenVINOConfig(PhiOnnxConfig):
454+
pass

0 commit comments

Comments
 (0)