Skip to content

Commit 4bc0fab

Browse files
Add OnnxConfig
1 parent 9afac3c commit 4bc0fab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

optimum/exporters/onnx/model_configs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,12 @@ class GemmaOnnxConfig(LlamaOnnxConfig):
506506
DUMMY_PKV_GENERATOR_CLASS = GemmaDummyPastKeyValuesGenerator
507507
MIN_TRANSFORMERS_VERSION = version.parse("4.38.0")
508508

509+
@register_tasks_manager_onnx("gemma3", *[*COMMON_TEXT_GENERATION_TASKS, "text-classification"])
510+
class Gemma3OnnxConfig(LlamaOnnxConfig):
511+
DUMMY_INPUT_GENERATOR_CLASSES = (DummyTextInputGenerator, GemmaDummyPastKeyValuesGenerator)
512+
DUMMY_PKV_GENERATOR_CLASS = GemmaDummyPastKeyValuesGenerator
513+
MIN_TRANSFORMERS_VERSION = version.parse("4.51.0")
514+
509515

510516
@register_tasks_manager_onnx("nemotron", *COMMON_TEXT_GENERATION_TASKS)
511517
class NemotronOnnxConfig(GemmaOnnxConfig):

0 commit comments

Comments
 (0)