在Hunyuan-A13B中启用慢速推理(链式推理)模式有以下几种方法:
- Setting in the code
enable_thinking=True
parameters - 在用户输入前添加
/think
指令前缀 - utilization
tokenizer.apply_chat_template()
when addingenable_thinking=True
options (as in computer software settings)
慢速推理模式的优势包括:
- 更详细的推理过程:模型会输出
<think>...</think>
标签内的详细推理步骤,最后再给出<answer>...
中的最终答案 - 适合复杂任务:特别适用于需要逐步推理的数学问题、代码调试、逻辑分析等场景
- 教育价值:用户可以清晰看到问题的解决过程,便于学习理解
- error detection:通过观察推理过程可以更容易发现模型处理中的问题
与之相对的快速推理模式更适合日常对话和简单问答场景,能提供更快速的响应。
This answer comes from the articleHunyuan-A13B: Efficient Open Source Large Language Modeling with Ultra-Long Context and Intelligent Reasoning SupportThe