Downloads · 30 days
0
HattoriHanzo1/Qwen-3.8-27B
Qwen-3.8-27B is a text generation model from HattoriHanzo1. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository provides a replacement chattemplate.jinja for Qwen/Qwen3.8-27B, intended for use with llama.cpp / llama-server (and any GGUF-based backend that accepts a custom chat template).
Downloads · 30 days
0
Access
Public
Updated Aug 21, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.jinja9.1 KB · 67%
From the Hugging Face model README
This repository provides a replacement chat_template.jinja for Qwen/Qwen3.8-27B, intended for use with llama.cpp / llama-server (and any GGUF-based backend that accepts a custom chat template).
The stock chat template shipped with Qwen3.8-27B crashes with a hard exception when a system / developer message is not the first message in the conversation (e.g. when an agent or client injects system content mid-conversation). With llama-server this surfaces as:
operator(): got exception: {"error":{"code":500,"message":"
------------
While executing CallExpression at line 110, column 28 in source:
...eveloper\" %}
{{- raise_exception('System message must be at the beginnin...
^
Error: Jinja Exception: System message must be at the beginning.","type":"server_error"}}
This template eliminates that error. System and developer messages are accepted at any position in the message list and are rendered in place, instead of raising Jinja Exception: System message must be at the beginning.
system / developer messages at any position — no hard exceptionenable_thinking and reasoning_effort (xhigh (default), medium, low)preserve_thinking for multi-turn reasoning continuity<tool_call>/<function> rendering, multi-step tool loopsPicture N:) and video (Video N:) placeholders via add_vision_idPoint your backend at this file:
# llama-server
# or any other GGUF from the Qwen 3.8 27B family — this template fits the whole family and looks very good with all of them
llama-server \
-m /path/to/Qwen3.8-27B-Q5_K_S.gguf \
--jinja \
--chat-template /path/to/chat_template.jinja
Or any other Qwen 3.8 27B GGUF (any quant, any GGUF build of the family) — set the chat template to the contents of chat_template.jinja in any client that allows a custom Jinja chat template (e.g. pi's llamacpp provider, Ollama's TEMPLATE, LM Studio's chat template field).
| File | Description |
|---|---|
chat_template.jinja | The fixed chat template (merged v1.0) |
namespace, raise_exception); llama.cpp ≥ 0.16 is recommended.