Skip to content
1 change: 1 addition & 0 deletions docs/source/openvino/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Here is the list of the supported architectures :
- SEW-D
- SegFormer
- SigLIP
- SmolLM3
- SmolVLM (SmolVLM2)
- SpeechT5 (text-to-speech)
- SqueezeBERT
Expand Down
16 changes: 16 additions & 0 deletions optimum/exporters/openvino/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,22 @@ class MiniCPM3OpenVINOConfig(TextDecoderWithPositionIdsOnnxConfig):
_MODEL_PATCHER = MiniCPM3Patcher


@register_in_tasks_manager(
"smollm3",
*[
"feature-extraction",
"feature-extraction-with-past",
"text-generation",
"text-generation-with-past",
"text-classification",
Comment thread
popovaan marked this conversation as resolved.
],
library_name="transformers",
)
class SmolLM3OpenVINOConfig(LlamaOnnxConfig):
MIN_TRANSFORMERS_VERSION = "4.53.0"
_MODEL_PATCHER = OVDecoderModelPatcher


@register_in_tasks_manager("stablelm", *["text-generation", "text-generation-with-past"], library_name="transformers")
class StableLMOpenVINOConfig(TextDecoderWithPositionIdsOnnxConfig):
DEFAULT_ONNX_OPSET = 14
Expand Down
1 change: 0 additions & 1 deletion optimum/exporters/openvino/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ def _get_kokoro_submodels(model):
"rt_detr",
"rt_detr_v2",
"siglip_vision_model",
"smollm3",
Comment thread
popovaan marked this conversation as resolved.
"speech_to_text",
"splinter",
"swin2sr",
Expand Down
3 changes: 2 additions & 1 deletion tests/openvino/test_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
SUPPORTED_ARCHITECTURES += ("glm4",)

if is_transformers_version(">=", "4.53.0"):
SUPPORTED_ARCHITECTURES += ("arcee",)
SUPPORTED_ARCHITECTURES += ("arcee", "smollm3")

# TODO: add fix for v5 and update MAX_TRANSFORMERS_VERSION accordingly
if is_transformers_version(">=", "4.52.1") and is_transformers_version("<", "5"):
Expand Down Expand Up @@ -253,6 +253,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
"mamba": 0,
"falcon_mamba": 0,
"arcee": 2,
"smollm3": 2,
"gpt_oss": 2,
"gpt_oss_mxfp4": 2,
"zamba2": 1,
Expand Down
2 changes: 1 addition & 1 deletion tests/openvino/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class ExportModelTest(unittest.TestCase):
SUPPORTED_ARCHITECTURES.update({"zamba2": OVModelForCausalLM})

if is_transformers_version(">=", "4.53.0"):
SUPPORTED_ARCHITECTURES.update({"granitemoehybrid": OVModelForCausalLM})
SUPPORTED_ARCHITECTURES.update({"granitemoehybrid": OVModelForCausalLM, "smollm3": OVModelForCausalLM})

if is_transformers_version(">=", "4.54") and is_transformers_version("<", "5"):
SUPPORTED_ARCHITECTURES.update({"exaone4": OVModelForCausalLM, "lfm2": OVModelForCausalLM})
Expand Down
10 changes: 9 additions & 1 deletion tests/openvino/test_exporters_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
AutoTokenizer,
)
from utils_tests import (
_ARCHITECTURES_INT8_TASK_OVERRIDES,
_ARCHITECTURES_TO_EXPECTED_INT8,
MODEL_NAMES,
OPENVINO_DEVICE,
Expand Down Expand Up @@ -163,6 +164,9 @@ class OVCLIExportTestCase(unittest.TestCase):
SUPPORTED_ARCHITECTURES.extend(
[
("text-generation-with-past", "granitemoehybrid"),
("text-generation-with-past", "smollm3"),
("text-classification", "smollm3"),
("feature-extraction", "smollm3"),
]
)

Expand Down Expand Up @@ -228,6 +232,7 @@ class OVCLIExportTestCase(unittest.TestCase):
"exaone4": 2,
"bitnet": 2,
"granitemoehybrid": 2,
"smollm3": 2,
"qwen3_vl_eagle3": 0,
}

Expand Down Expand Up @@ -1156,7 +1161,10 @@ def test_exporters_cli_int8(self, task: str, model_type: str):
else:
automodel_cls = _HEAD_TO_AUTOMODELS[model_type.replace("-refiner", "")]
model = eval(automodel_cls).from_pretrained(tmpdir, **model_kwargs)
expected_int8 = _ARCHITECTURES_TO_EXPECTED_INT8[model_type]
expected_int8 = (
_ARCHITECTURES_INT8_TASK_OVERRIDES.get(model_type, {}).get(task)
or _ARCHITECTURES_TO_EXPECTED_INT8[model_type]
)
expected_int8 = {k: {"int8": v} for k, v in expected_int8.items()}
if task.startswith("text2text-generation") and (not task.endswith("with-past") or model.decoder.stateful):
del expected_int8["decoder_with_past"]
Expand Down
2 changes: 1 addition & 1 deletion tests/openvino/test_genai.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class LLMPipelineTestCase(unittest.TestCase):
if is_transformers_version(">=", "4.51.3"):
ALL_SUPPORTED_ARCHITECTURES += ("glm4",)
if is_transformers_version(">=", "4.53.0"):
ALL_SUPPORTED_ARCHITECTURES += ("arcee",)
ALL_SUPPORTED_ARCHITECTURES += ("arcee", "smollm3")
if is_transformers_version(">=", "4.54.0") and is_transformers_version("<", "5"):
ALL_SUPPORTED_ARCHITECTURES += ("exaone4",)
if is_transformers_version(">=", "4.55.1"):
Expand Down
3 changes: 3 additions & 0 deletions tests/openvino/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,9 @@ class OVWeightCompressionTest(unittest.TestCase):
if is_transformers_version(">=", "4.48.0"):
SUPPORTED_ARCHITECTURES_WITH_AUTO_COMPRESSION.append((OVModelForCausalLM, "cohere2", False))

if is_transformers_version(">=", "4.53.0"):
SUPPORTED_ARCHITECTURES_WITH_AUTO_COMPRESSION.append((OVModelForCausalLM, "smollm3", False))

if is_transformers_version(">=", "4.54.0") and is_transformers_version("<", "5"):
SUPPORTED_ARCHITECTURES_WITH_AUTO_COMPRESSION.append((OVModelForCausalLM, "exaone4", True))

Expand Down
8 changes: 8 additions & 0 deletions tests/openvino/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def _create_tiny_kokoro_model():
"segformer": "optimum-intel-internal-testing/tiny-random-SegformerModel",
"sentence-transformers-bert": "optimum-intel-internal-testing/stsb-bert-tiny-safetensors",
"sam": "optimum-intel-internal-testing/sam-vit-tiny-random",
"smollm3": "optimum-intel-internal-testing/tiny-random-smollm3",
"smolvlm": "optimum-intel-internal-testing/tiny-random-smolvlm2",
"speecht5": "optimum-intel-internal-testing/tiny-random-SpeechT5ForTextToSpeech",
"speech_to_text": "optimum-intel-internal-testing/tiny-random-Speech2TextModel",
Expand Down Expand Up @@ -543,13 +544,20 @@ def _create_tiny_kokoro_model():
"vision_embeddings_model": 10,
"text_embeddings_per_layer_model": 0,
},
"smollm3": {"model": 30},
"qwen3_asr": {
"encoder": 36,
"decoder": 30,
"decoder_with_past": 30,
},
}

_ARCHITECTURES_INT8_TASK_OVERRIDES = {
"smollm3": {
"text-classification": {"model": 32},
},
}

TEST_IMAGE_URL = "http://images.cocodataset.org/val2017/000000039769.jpg"

REMOTE_CODE_MODELS = (
Expand Down
Loading