Skip to content
Merged
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 vllm/reasoning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
"hunyuan_a13b_reasoning_parser",
"HunyuanA13BReasoningParser",
),
"kimi_k2": (
"deepseek_r1_reasoning_parser",
"DeepSeekR1ReasoningParser",
),
Comment on lines +51 to +54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change maps the kimi_k2 model to use the DeepSeekR1ReasoningParser. Reusing a parser from a different model family (DeepSeek) for a model from another provider (Moonshot AI) is a likely source of errors, as they probably do not share the same reasoning format and special tokens. This can lead to incorrect reasoning extraction for kimi_k2.

A dedicated KimiK2ReasoningParser should be created to handle the specific format of the kimi_k2 model. This would ensure correctness and improve maintainability, following the pattern of having model-specific parsers like the KimiK2ToolParser that appears to be part of this overall change.

Suggested change
"kimi_k2": (
"deepseek_r1_reasoning_parser",
"DeepSeekR1ReasoningParser",
),
"kimi_k2": (
"kimi_k2_reasoning_parser",
"KimiK2ReasoningParser",
),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bruh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

"minimax_m2": (
"minimax_m2_reasoning_parser",
"MiniMaxM2ReasoningParser",
Expand Down