[feat request] llama.cpp --reasoning-preserve

#54
by crusaderky - opened

Could you add the alias preserve_reasoning to preserve_thinking, to make it compatible with llama.cpp --reasoning-reserve command line arg?

https://github.com/ggml-org/llama.cpp/blob/c8ae9a750c6c89dc928503a16175b7b3c2d224e4/common/arg.cpp#L3301-L3313

Huh, that's weird. we used to have --chat-template-kwargs "{\"preserve_thinking\":true}" but that doesnt seem like an argument there in the sourcecode. i wonder if they renamed it to reasoning now?

Huh, that's weird. we used to have --chat-template-kwargs "{\"preserve_thinking\":true}" but that doesnt seem like an argument there in the sourcecode. i wonder if they renamed it to reasoning now?

The preserve_thinking doesn't have to be in llama.cpp code, it's just a template argument and can be named anything.
It's in the template, so the chat-template-kwargswill still work, however llama introduced a server-side flag that they want to impose onto chat templates so you don't use chat-template-kwargs and use a more "generic" --reasoning-preserve that should work on all models (if their template implements that).

Sign up or log in to comment