Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions benchmarks/performance/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ excluded_profiles:
reason: >-
The pinned Diffusers reference for MiniMax-H3 has not yet been integrated
into the release performance runner.
- model: smollm3-3b
reason: >-
Dense SmolLM3 functional and reference-parity qualification is present, but
this change does not add a matching release-performance workload or receipt.

entries:
- id: albert.encode
Expand Down
22 changes: 22 additions & 0 deletions python/tensorrt_model_connect/families/smollm3/MODEL.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

id = "smollm3"
plugin = "smollm3"
module = "plugin"
capabilities = ["split_decoder_roles", "debug_layer_outputs"]
aliases = [
"smollm3",
"SmolLM3",
]
prefixes = [
"smollm3",
]
architecture_patterns = [
"SmolLM3ForCausalLM",
]
debug_runner = "debug_runner.py|runner_from_bundle"
default_build_route = "build_routing.py|prefer_native_default"
debug_runtime_strategies = [
"smollm3_decoder_kv_cache",
]
64 changes: 64 additions & 0 deletions python/tensorrt_model_connect/families/smollm3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

import importlib
import sys
import types
from typing import Any

_plugin = None


def _load_plugin_module():
global _plugin
if _plugin is None:
_plugin = importlib.import_module(f"{__name__}.plugin")
globals().update({
_name: _value
for _name, _value in vars(_plugin).items()
if not _name.startswith("__")
})
return _plugin


def __getattr__(name: str) -> Any:
if name.startswith("__"):
raise AttributeError(name)
if name in {"graph_blocks", "graph_ops"}:
return importlib.import_module(f"{__name__}.{name}")
plugin_module = _load_plugin_module()
if name == "plugin":
return getattr(plugin_module, "plugin")
try:
return getattr(plugin_module, name)
except AttributeError:
raise AttributeError(name) from None


def __dir__() -> list[str]:
plugin_module = _load_plugin_module()
return sorted(set(globals()) | {
_name for _name in vars(plugin_module) if not _name.startswith("__")
})


class _FamilyModule(types.ModuleType):
def __setattr__(self, name, value):
# Importlib publishes a directly imported plugin submodule on its parent.
# Keep the public package attribute bound to the FamilyPlugin instance.
if name == "plugin" and isinstance(value, types.ModuleType):
super().__setattr__("_plugin", value)
super().__setattr__("plugin", value.plugin)
return
super().__setattr__(name, value)
if (
not name.startswith("__")
and name not in {"_plugin", "plugin"}
and not isinstance(value, types.ModuleType)
):
setattr(_load_plugin_module(), name, value)


sys.modules[__name__].__class__ = _FamilyModule
Loading
Loading