[Perf][Parser] Stream Qwen3 tool argument values incrementally (12 KB call: 2.1 s to 11 ms) (#62027)
Signed-off-by: Afonso Ribeiro <afonso.diamantino2@gmail.com> Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
co-authored by
Flora Feng
parent
bafb263664
commit
5c1c903501
@@ -2,6 +2,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""MiMo's compact XML parameters contain verbatim string values."""
|
||||
|
||||
import functools
|
||||
import json
|
||||
from dataclasses import replace
|
||||
|
||||
@@ -10,6 +11,7 @@ from vllm.parser.qwen3 import (
|
||||
_PARTIAL_PARAM_RE,
|
||||
CHATML_TURN_BOUNDARIES,
|
||||
Qwen3Parser,
|
||||
_param_value_extender,
|
||||
qwen3_config,
|
||||
)
|
||||
|
||||
@@ -37,6 +39,9 @@ class MiMoParser(Qwen3Parser):
|
||||
turn_boundary_tokens=CHATML_TURN_BOUNDARIES,
|
||||
),
|
||||
arg_converter=_mimo_arg_converter,
|
||||
arg_value_extender=functools.partial(
|
||||
_param_value_extender, trim_newlines=False
|
||||
),
|
||||
),
|
||||
)
|
||||
super().__init__(tokenizer, tools, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user