SnifferCaptain commited on
Commit
7fb6c33
·
verified ·
1 Parent(s): 154b42c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md CHANGED
@@ -65,6 +65,39 @@ model = AutoModelForCausalLM.from_pretrained(
65
  )
66
  ```
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  注意:该架构的 `generate()` 为模型自定义实现,不使用 KV cache(每步重算完整前缀),长序列生成会相应变慢。
69
 
70
  ## Notes
@@ -126,6 +159,37 @@ model = AutoModelForCausalLM.from_pretrained(
126
  )
127
  ```
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  Note: this architecture ships a custom `generate()` implementation without KV caching (the full prefix is recomputed each step), so long-sequence generation is correspondingly slower.
130
 
131
  ## Notes
 
65
  )
66
  ```
67
 
68
+
69
+ ### 对话格式
70
+
71
+ 模型使用 ChatML 风格的对话边界。完整的输入可以写成:
72
+
73
+ ```text
74
+ <|im_start|>system
75
+ {system prompt}<|im_end|>
76
+ <|im_start|>user
77
+ {user content}<|im_end|>
78
+ <|im_start|>assistant
79
+ <think>{thinking_definitions}
80
+ {reasoning content}</think>
81
+
82
+ {assistant content}<|im_end|>
83
+ ```
84
+
85
+ 其中,`{thinking_definitions}` 是紧跟在 `<think>` 后面的**第一行控制信息**,不是思考正文。它可以是:
86
+
87
+ - `juice = 1.23`:思考预算提示,可以使用小数。
88
+ - `structured = true`:表示结构化思考。
89
+ - `juice = 1.23; structured = true`:同时指定预算和结构化思考。
90
+
91
+ 控制行结束后换行,再写入 `{reasoning content}`;思考结束使用 `</think>`,之后空一行写最终的 `{assistant content}`。自由形式思考可以省略 `structured`,也可以显式写成 `structured = false`。如果没有控制字段,保留空的控制行即可:
92
+
93
+ ```text
94
+ <think>
95
+ {reasoning content}
96
+ </think>
97
+ ```
98
+
99
+ 每个角色都使用 `<|im_start|>role\n...<|im_end|>` 边界;`system` 和 `user` 内容不会放入 `<think>`,思考与最终回答只属于 `assistant` 消息。
100
+
101
  注意:该架构的 `generate()` 为模型自定义实现,不使用 KV cache(每步重算完整前缀),长序列生成会相应变慢。
102
 
103
  ## Notes
 
159
  )
160
  ```
161
 
162
+
163
+ ### Chat Format
164
+
165
+ The model uses ChatML-style turn boundaries. A complete input can be written as:
166
+
167
+ ```text
168
+ <|im_start|>system
169
+ {system prompt}<|im_end|>
170
+ <|im_start|>user
171
+ {user content}<|im_end|>
172
+ <|im_start|>assistant
173
+ <think>{thinking_definitions}
174
+ {reasoning content}</think>
175
+
176
+ {assistant content}<|im_end|>
177
+ ```
178
+
179
+ `{thinking_definitions}` is the **first control line** immediately after `<think>`, not the reasoning body. It may be:
180
+
181
+ - `juice = 1.23` for a numeric reasoning-budget hint;
182
+ - `structured = true` to mark structured reasoning; or
183
+ - `juice = 1.23; structured = true` to provide both fields.
184
+
185
+ Terminate the control line with a newline, then place the reasoning in `{reasoning content}`. Close it with `</think>`, leave one blank line, and put the final answer in `{assistant content}`. For free-form reasoning, `structured` may be omitted or written as `structured = false`. If no control field is needed, keep an empty control line:
186
+
187
+ ```text
188
+ <think>
189
+ {reasoning content}
190
+ </think>
191
+ ```
192
+
193
  Note: this architecture ships a custom `generate()` implementation without KV caching (the full prefix is recomputed each step), so long-sequence generation is correspondingly slower.
194
 
195
  ## Notes