-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Prerequisites
- I am running the latest code. Mention the version if possible as well.
- I carefully followed the README.md.
- I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
- I reviewed the Discussions, and have a new and useful enhancement to share.
Feature Description
Support the tool calling (function calling) of Kimi-K2 series natively, including Kimi-K2-Thinking and maybe also Kimi-K2-Instruct.
Motivation
- Tool calling: Kimi-K2-Thinking's model card said it can "maintaining stable tool-use across 200–300 sequential calls", but we currently have no support on it, falling back to the generic json method.
- Reasoning: Currently we must use
--specialto make thinking work as said in Unsloth Documentation.
Possible Implementation
ik_llama.cpp had implemented it before, but now they are using mainline function calling: ikawrakow/ik_llama.cpp#628
I'm trying to implement it at https://github.com/KiruyaMomochi/llama.cpp/tree/kimi-k2-thinking, by copying DeepSeek-V3.1's implementation in a silly way. However, Kimi-K2 seems to have different function name syntax than DeepSeek. I also get an extra <|tool_calls_section_end|> token, maybe due to the --special flag.
sousekd, matbgn, calvin2021y and lavdnone2
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request