Jaidchen commited on
Commit
79a9f3e
·
verified ·
1 Parent(s): b0d5548

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -21
README.md CHANGED
@@ -165,30 +165,35 @@ repackaged [Qwen 3.6 27B](https://huggingface.co/Qwen/Qwen3.6-27B) with a simpli
165
 
166
  ## Jinja template changes
167
 
168
- - base: [Qwen original](https://huggingface.co/Qwen/Qwen3.5-27B/blob/main/chat_template.jinja)
169
- - adopted tweaks from [Unsloth version](https://huggingface.co/unsloth/Qwen3.5-27B/blob/main/chat_template.jinja)
170
- - Added `developer` role as alias for `system`. ([line 45–57](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L45-L57))
171
- - Merged all leading system/developer messages into a single policy message. ([line 58–75](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L58-L75))
172
- - Allowed histories without a normal human query. ([line 76–87](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L76-L87))
173
- - Retained later system/developer messages as policy messages. ([line 87–89](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L87-L89), [line 147–149](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L147-L149))
174
- - Made mapping-argument rendering portable by avoiding `|items`. ([line 108–133](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L108-L133), [line 122–130](https://huggingface.co/unsloth/Qwen3.5-27B/blob/909b2cc7dc1737891ad8f5a7213b702b39410e43/chat_template.jinja#L122-L130))
 
 
 
175
  - adopted tweaks from [Froggeric version](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja)
176
- - Added `preserve_thinking` option to retain historical reasoning. ([line 8](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L8), [line 225–230](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L225-L230))
177
- - Retained mid-conversation system/developer messages as Qwen system turns. ([line 165–182](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L165-L182), [line 167–180](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L167-L180))
178
- - Allowed string-valued `message.thinking` as fallback for historical reasoning. ([line 183–197](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L183-L197))
179
- - Applied boundary-aware `</think>` parsing. ([line 198–223](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L198-L223))
180
- - Avoided synthesizing empty historical thinking blocks. ([line 225–230](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L225-L230))
181
- - Supported both wrapped and direct tool calls, but never null-wrapped. ([line 231–237](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L231-L237))
182
- - Preserved non-empty string tool arguments. ([line 261–280](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L261-L280), [line 277–279](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L277-L279))
183
- - Used direct message indexing for tool-response grouping instead of `loop.previtem`/`loop.nextitem`. ([line 165](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L165), [line 286–318](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L286-L318))
184
  - custom tweaks
185
- - Merged any number of leading system/developer messages, not just two.
186
- - Applied boundary-aware `</think>` parsing but excluded malformed-tag recovery.
187
- - Raised an error for unknown roles instead of silently omitting or converting them.
188
- - Used direct message indexing for tool-response grouping without Froggeric’s error-escalation state.
 
 
189
  - unimodality patch
190
- - Rendered image and video content as `[image]` and `[video]`.
191
 
192
  ## license
193
 
194
- Apache 2.0 – inherited from [Qwen 3.6 27B](https://huggingface.co/Qwen/Qwen3.5-27B/blob/main/LICENSE)
 
165
 
166
  ## Jinja template changes
167
 
168
+ `chat.jinja` is reproducibly built from an untouched upstream template plus the ordered patch stack in `jinja_build/`. `jinja_build/build.ps1` applies the patches lexicographically and overwrites the final `chat.jinja`.
169
+
170
+ - base: [Qwen/Qwen3.6-27B original](https://huggingface.co/Qwen/Qwen3.6-27B/blob/6a9e13bd6fc8f0983b9b99948120bc37f49c13e9/chat_template.jinja)
171
+ - commit `6a9e13bd6fc8f0983b9b99948120bc37f49c13e9`
172
+ - SHA-256 `E84F32A23FDDA27689F868AA4A1A5621F41133E51A48D7F3EFCBEA2839574259`
173
+ - adopted tweaks from [Unsloth Qwen3.6](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja)
174
+ - Added `developer` role as alias for `system`. ([lines 45–57](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L45-L57))
175
+ - Merged leading system/developer messages into a single policy message. ([lines 45–57](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L45-L57), [lines 67–75](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L67-L75))
176
+ - Allowed histories without a normal human query. ([lines 76–86](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L76-L86))
177
+ - Made mapping-argument rendering portable by avoiding `|items`. ([lines 122–130](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L122-L130))
178
  - adopted tweaks from [Froggeric version](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja)
179
+ - Added `preserve_thinking` option to retain historical reasoning. ([line 8](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L8), [lines 225–230](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L225-L230))
180
+ - Retained mid-conversation system/developer messages as Qwen system turns. ([lines 165–182](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L165-L182))
181
+ - Allowed string-valued `message.thinking` as fallback for historical reasoning. ([lines 183–197](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L183-L197))
182
+ - Applied boundary-aware `</think>` parsing. ([lines 198–223](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L198-L223))
183
+ - Avoided synthesizing empty historical thinking blocks. ([lines 225–230](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L225-L230))
184
+ - Supported both wrapped and direct tool calls, but never null-wrapped. ([lines 231–237](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L231-L237))
185
+ - Preserved non-empty string tool arguments. ([lines 261–280](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L261-L280))
186
+ - Used direct message indexing for tool-response grouping instead of `loop.previtem`/`loop.nextitem`. ([line 165](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L165), [lines 286–318](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L286-L318))
187
  - custom tweaks
188
+ - Merged any number of leading system/developer messages, generalizing Unsloth's two-message merge. ([lines 45–57](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L45-L57))
189
+ - Applied boundary-aware `</think>` parsing but excluded Froggeric's malformed-tag recovery. ([lines 198–223](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L198-L223))
190
+ - Raised an error containing the offending role instead of Qwen's generic unknown-role error. ([lines 143–144](https://huggingface.co/Qwen/Qwen3.6-27B/blob/6a9e13bd6fc8f0983b9b99948120bc37f49c13e9/chat_template.jinja#L143-L144))
191
+ - Used direct message indexing for tool-response grouping without Froggeric's error-escalation state. ([lines 286–318](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/b225c1d63f84c65af7dd6af2ba384eb037aa885e/chat_template.jinja#L286-L318))
192
+ - Guarded undefined `tools`/`tool_calls` and handled non-mapping content items defensively.
193
+ - Adopted Qwen's proposed `continue_final_message` fix for partial assistant prefills. ([lines 130–132](https://huggingface.co/Qwen/Qwen3.6-27B/blob/0774bb84a25294dac0538c2bfc7abc08ae89d522/chat_template.jinja#L130-L132))
194
  - unimodality patch
195
+ - Removed Qwen's vision-token machinery and rendered image/video content as `[image]` and `[video]`. ([lines 1–41](https://huggingface.co/Qwen/Qwen3.6-27B/blob/6a9e13bd6fc8f0983b9b99948120bc37f49c13e9/chat_template.jinja#L1-L41))
196
 
197
  ## license
198
 
199
+ Apache 2.0 – inherited from [Qwen 3.6 27B](https://huggingface.co/Qwen/Qwen3.6-27B/blob/main/LICENSE)