- Remove P/D transfer connectors: nixl, nixl_chat, mooncake x2, hf3fs, moriio, hisparse, example and hidden-states connectors - Reduce weight_transfer to the base API used by model loading - Remove kv_offload tiering, simple_kv_offload, ec cpu/example, snapshot command, engine snapshot server - Remove transformers model fallback, dsv4 tokenizers, dead platforms cpu/tpu/xpu, flashmla third_party, dsa, megamoe/flydsl, dead attn ops, dead layers (short_conv, fused_embed_norm, indexer_topk, relu2 gemma_ar, lightning_attn, minimax_rms_norm), gemm_rs_ar - Keep MoE LoRA op (imported eagerly by punica_gpu); drop fp8 variant - Rebuild parser hubs around Qwen3 adapters only (36 dead adapters) - Remove dead tests with the code they covered Co-authored-by: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
|
|
from vllm.tool_parsers.abstract_tool_parser import (
|
|
ToolParser,
|
|
ToolParserManager,
|
|
)
|
|
|
|
__all__ = ["ToolParser", "ToolParserManager"]
|
|
|
|
|
|
"""
|
|
Register a lazy module mapping.
|
|
|
|
Example:
|
|
ToolParserManager.register_lazy_module(
|
|
name="kimi_k2",
|
|
class_name="KimiK2ToolParser",
|
|
)
|
|
"""
|
|
|
|
|
|
_TOOL_PARSERS_TO_REGISTER = {
|
|
"qwen3_coder": (
|
|
"qwen3_engine_tool_parser",
|
|
"Qwen3EngineToolParser",
|
|
),
|
|
# TODO: Qwen2.5/QwQ/Qwen3 JSON tool calls. Aliased to `hermes` for now;
|
|
# a dedicated parser should treat the template's newline before and
|
|
# between `<tool_call>` blocks as framing, as the Rust frontend does.
|
|
"qwen3_xml": (
|
|
"qwen3_engine_tool_parser",
|
|
"Qwen3EngineToolParser",
|
|
),
|
|
}
|
|
|
|
|
|
def register_lazy_tool_parsers():
|
|
for name, (file_name, class_name) in _TOOL_PARSERS_TO_REGISTER.items():
|
|
module_path = f"vllm.tool_parsers.{file_name}"
|
|
ToolParserManager.register_lazy_module(name, module_path, class_name)
|
|
|
|
|
|
register_lazy_tool_parsers()
|