[Bugfix][Parser] Scope reasoning-end detection to the current turn via turn-boundary tokens (#54089)
Signed-off-by: Mikhail Podvitskii <podvitskiymichael@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ import dataclasses
|
||||
import functools
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from vllm.parser.qwen3 import Qwen3Parser, qwen3_config
|
||||
from vllm.parser.qwen3 import CHATML_TURN_BOUNDARIES, Qwen3Parser, qwen3_config
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from vllm.entrypoints.openai.chat_completion.protocol import (
|
||||
@@ -33,7 +33,7 @@ if TYPE_CHECKING:
|
||||
@functools.cache
|
||||
def nemotron_v3_config(thinking: bool = True) -> ParserEngineConfig:
|
||||
return dataclasses.replace(
|
||||
qwen3_config(thinking=thinking),
|
||||
qwen3_config(thinking=thinking, turn_boundary_tokens=CHATML_TURN_BOUNDARIES),
|
||||
name="nemotron_v3",
|
||||
strip_trailing_reasoning_whitespace=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user