feat: switch to MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking-Q8_0 GGUF
- Updated model path + model ID for new 1B thinking model - Updated prompt builder to use MiniCPM5 native /think trigger - Updated clean_text to strip MiniCPM5 special tokens - Bumped n_ctx from 2048 to 8192
This commit is contained in:
@@ -89,8 +89,8 @@ pub fn build_prompt(messages: &[ChatMessage], tools: &Option<Vec<ToolDef>>) -> S
|
||||
}
|
||||
}
|
||||
|
||||
// Generation prompt: non-thinking mode
|
||||
prompt.push_str("<|im_start|>assistant\n<think>\n\n</think>\n\n");
|
||||
// Generation prompt: thinking mode (MiniCPM5 native)
|
||||
prompt.push_str("<|im_start|>assistant\n/think\n\n");
|
||||
prompt
|
||||
}
|
||||
|
||||
@@ -182,8 +182,13 @@ pub fn build_sampler(params: &SamplerParams) -> LlamaSampler {
|
||||
pub fn clean_text(text: &str) -> String {
|
||||
text.replace("<|im_end|>", "")
|
||||
.replace("<|im_start|>", "")
|
||||
.replace("<think>", "")
|
||||
.replace("</think>", "")
|
||||
.replace("<|thought_begin|>", "")
|
||||
.replace("<|thought_end|>", "")
|
||||
.replace("<|tool_call|>", "")
|
||||
.replace("<|execute_start|>", "")
|
||||
.replace("<|execute_end|>", "")
|
||||
.replace("/think", "")
|
||||
.replace("/no_think", "")
|
||||
.trim()
|
||||
.to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user