Text Generation
Transformers
Safetensors
qwen3_5_text
dense
coding
agentic
unimodal
repackaged
conversational
Instructions to use Jaidchen/Focus-Red with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jaidchen/Focus-Red with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Jaidchen/Focus-Red") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Jaidchen/Focus-Red") model = AutoModelForCausalLM.from_pretrained("Jaidchen/Focus-Red", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Jaidchen/Focus-Red with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Jaidchen/Focus-Red" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jaidchen/Focus-Red", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Jaidchen/Focus-Red
- SGLang
How to use Jaidchen/Focus-Red with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Jaidchen/Focus-Red" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jaidchen/Focus-Red", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Jaidchen/Focus-Red" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jaidchen/Focus-Red", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Jaidchen/Focus-Red with Docker Model Runner:
docker model run hf.co/Jaidchen/Focus-Red
Update README.md
Browse files
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
|
| 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
|
| 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
|
| 90 |
<td>MTP</td>
|
| 91 |
<td>integrated</td>
|
| 92 |
-
<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 |
-
|
| 167 |
-
|
| 168 |
-
-
|
| 169 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|