fix(nemotron3): forward tools to parse_qwen35 for schema-aware coercion (#65)
Publish / build (push) Canceled after 0s
Publish / publish (push) Canceled after 0s

This commit is contained in:
hallerite
2026-05-26 16:52:50 +02:00
committed by GitHub
parent 647335489d
commit 88aa42d40f
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -430,7 +430,7 @@ class Nemotron3Renderer:
self,
token_ids: list[int],
*,
tools: list[ToolSpec] | None = None, # noqa: ARG002 — args land in a JSON object, schema not needed
tools: list[ToolSpec] | None = None,
) -> ParsedResponse:
stop_ids = {self._im_end}
if self._endoftext is not None:
@@ -443,6 +443,7 @@ class Nemotron3Renderer:
think_end_id=self._think_end,
tool_call_id=self._tool_call,
tool_call_end_id=self._tool_call_end,
tools=tools,
)
def get_stop_token_ids(self) -> list[int]:
+2 -1
View File
@@ -26,7 +26,7 @@ import pytest
# (HuggingFace model name, renderer name). Two JSON-shaped controls
# (string types already preserved by the wire format) + four XML-style
# (string types already preserved by the wire format) + five XML-style
# parsers that rely on the schema to preserve them.
_MODELS = [
("Qwen/Qwen3-8B", "auto"), # hermes JSON — control
@@ -35,6 +35,7 @@ _MODELS = [
("zai-org/GLM-5", "auto"), # XML
("MiniMaxAI/MiniMax-M2.5", "auto"), # XML
("poolside/Laguna-XS.2", "auto"), # XML
("nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16", "auto"), # XML
]