Jaidchen commited on
Commit
495e0b0
·
verified ·
1 Parent(s): 85f197c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -8
README.md CHANGED
@@ -16,7 +16,7 @@ tags:
16
  <img style='height: 16em' src='https://cdn-uploads.huggingface.co/production/uploads/63e9a1c4ccae1fe5c622b9f6/zOXMkdhMfeQWxDq6JHj0B.webp'/>
17
  </center>
18
 
19
- # Focus-Red
20
 
21
  repackaged [Qwen 3.8 27B](https://huggingface.co/Qwen/Qwen3.8-27B) with a simplified architecture and minor opinionated improvements
22
 
@@ -30,7 +30,7 @@ repackaged [Qwen 3.8 27B](https://huggingface.co/Qwen/Qwen3.8-27B) with a simpli
30
  <tr>
31
  <th></th>
32
  <th>Qwen 3.8 27B</th>
33
- <th>Focus-Red</th>
34
  </tr>
35
  <tr>
36
  <td>author</td>
@@ -86,10 +86,10 @@ repackaged [Qwen 3.8 27B](https://huggingface.co/Qwen/Qwen3.8-27B) with a simpli
86
  <td>262 144</td>
87
  <td>262 144</td>
88
  </tr>
89
- <tr style='opacity: 50%'>
90
  <td>MTP</td>
91
  <td>integrated</td>
92
- <td>detached → <a href='https://huggingface.co/Jaidchen/Focus-Red-MTP'>Focus-Red-MTP</a></td>
93
  </tr>
94
  <tr>
95
  <td>sampling strategy</td>
@@ -163,10 +163,35 @@ repackaged [Qwen 3.8 27B](https://huggingface.co/Qwen/Qwen3.8-27B) with a simpli
163
 
164
  ## Jinja template
165
 
166
- This build uses `dist/chat_template.jinja` from [jaidlab/focus-chat-template](https://github.com/jaidlab/focus-chat-template). The template is reproducibly built from Qwen/Qwen3.8-27B's pinned upstream template at commit `1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0` plus the repository's ordered patch stack.
167
-
168
- - template SHA-256: `5c381ca45e9538c7a2406331b554ee7d62cf3d0b8c115f17687d4fdd5590a239`
169
- - template size: 9,710 bytes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
  ## license
172
 
 
16
  <img style='height: 16em' src='https://cdn-uploads.huggingface.co/production/uploads/63e9a1c4ccae1fe5c622b9f6/zOXMkdhMfeQWxDq6JHj0B.webp'/>
17
  </center>
18
 
19
+ # Focus Red
20
 
21
  repackaged [Qwen 3.8 27B](https://huggingface.co/Qwen/Qwen3.8-27B) with a simplified architecture and minor opinionated improvements
22
 
 
30
  <tr>
31
  <th></th>
32
  <th>Qwen 3.8 27B</th>
33
+ <th>Focus Red</th>
34
  </tr>
35
  <tr>
36
  <td>author</td>
 
86
  <td>262 144</td>
87
  <td>262 144</td>
88
  </tr>
89
+ <tr>
90
  <td>MTP</td>
91
  <td>integrated</td>
92
+ <td><a href='https://huggingface.co/Jaidchen/Focus-Red-MTP'>Jaidchen/Focus-Red-MTP</a></td>
93
  </tr>
94
  <tr>
95
  <td>sampling strategy</td>
 
163
 
164
  ## Jinja template
165
 
166
+ - base: [Qwen/Qwen3.8-27B original](https://huggingface.co/Qwen/Qwen3.8-27B/blob/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja)
167
+ - Retains Qwen3.8's native `reasoning_effort` handling (`xhigh` by default, plus `medium` and `low`) and its reasoning instructions. ([lines 45–59](https://huggingface.co/Qwen/Qwen3.8-27B/blob/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja#L45-L59))
168
+ - Retains injection of those reasoning instructions into the tool/system preamble whenever thinking is enabled. ([lines 60–94](https://huggingface.co/Qwen/Qwen3.8-27B/blob/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja#L60-L94))
169
+ - Preserves Qwen3.8's default-on historical thinking behavior while the later Froggeric layer avoids synthesizing empty thinking blocks. ([lines 108–120](https://huggingface.co/Qwen/Qwen3.8-27B/blob/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja#L108-L120))
170
+ - adopted tweaks from [Unsloth Qwen3.8](https://huggingface.co/unsloth/Qwen3.8-27B/blob/3ea932cee0a432ae86e9c7826cbe8aef52323a28/chat_template.jinja)
171
+ - commit `3ea932cee0a432ae86e9c7826cbe8aef52323a28`
172
+ - Added `developer` role as alias for `system` and merged leading system/developer messages into a single policy message. ([lines 45–59](https://huggingface.co/unsloth/Qwen3.8-27B/blob/3ea932cee0a432ae86e9c7826cbe8aef52323a28/chat_template.jinja#L45-L59), [lines 80–93](https://huggingface.co/unsloth/Qwen3.8-27B/blob/3ea932cee0a432ae86e9c7826cbe8aef52323a28/chat_template.jinja#L80-L93))
173
+ - Allowed histories without a normal human query. ([lines 95–107](https://huggingface.co/unsloth/Qwen3.8-27B/blob/3ea932cee0a432ae86e9c7826cbe8aef52323a28/chat_template.jinja#L95-L107))
174
+ - retained compatibility tweak from the previous [Unsloth Qwen3.6 layer](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja)
175
+ - Made mapping-argument rendering portable by avoiding `|items`; the current Unsloth Qwen3.8 template uses `|items` again, so Focus deliberately keeps the portable implementation. ([lines 122–130](https://huggingface.co/unsloth/Qwen3.6-27B/blob/d6e694245c1d535508bc54062f5e258d7b1e04f5/chat_template.jinja#L122-L130))
176
+ - adopted tweaks from [Froggeric Qwen3.8 version](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja)
177
+ - commit `9f14778c92c3b5ed3e0738085694c0d3452802dd`
178
+ - Retained `preserve_thinking` semantics and avoided rendering empty historical thinking blocks. ([lines 8–15](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L8-L15), [lines 227–233](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L227-L233))
179
+ - Retained mid-conversation system/developer messages as Qwen system turns. ([lines 172–183](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L172-L183))
180
+ - Allowed string-valued `message.thinking` as fallback for historical reasoning. ([lines 186–199](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L186-L199))
181
+ - Applied boundary-aware `</think>` parsing. ([lines 200–226](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L200-L226))
182
+ - Supported both wrapped and direct tool calls, but never null-wrapped. ([lines 234–241](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L234-L241))
183
+ - Preserved non-empty string tool arguments. ([lines 248–280](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L248-L280))
184
+ - Used direct message indexing for tool-response grouping instead of `loop.previtem`/`loop.nextitem`. ([lines 298–317](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/blob/9f14778c92c3b5ed3e0738085694c0d3452802dd/chat_template.jinja#L298-L317))
185
+ - custom tweaks
186
+ - Merged any number of leading system/developer messages, generalizing the Unsloth merge behavior.
187
+ - Kept Qwen3.8's reasoning instructions ahead of both merged policy text and the tools preamble.
188
+ - Applied boundary-aware `</think>` parsing but excluded Froggeric's malformed-tag recovery.
189
+ - Raised an error containing the offending role instead of Qwen's generic unknown-role error. ([lines 160–162](https://huggingface.co/Qwen/Qwen3.8-27B/blob/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja#L160-L162))
190
+ - Used direct message indexing for tool-response grouping without Froggeric's error-escalation state.
191
+ - Guarded undefined `tools`/`tool_calls` and handled non-mapping content items defensively.
192
+ - Retained 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))
193
+ - unimodality patch
194
+ - Removed Qwen3.8's vision-token machinery and rendered image/video content as `[image]` and `[video]`. ([lines 1–41](https://huggingface.co/Qwen/Qwen3.8-27B/blob/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0/chat_template.jinja#L1-L41))
195
 
196
  ## license
197