[Bug]: template error with qwen3.5-27b (llama.cpp)
Bug Description
here is the Jinja error:
srv operator(): got exception: {"error":{"code":400,"message":"Unable to generate parser for this template. Automatic parser generation failed: \n------------\nWhile executing CallExpression at line 85, column 32 in source:\n...first %}↵ {{- raise_exception('System message must be at the beginnin...\n ^\nError: Jinja Exception: System message must be at the beginning.","type":"invalid_request_error"}}
it seems to indicate that something other than "system" role is being used for the first message
Steps to Reproduce
- launch llama.cpp server:
$ llama-server --port 7916 --n-gpu-layers all --
ctx-size 262144 --min-p 0 --top-p 0.95 --top-k 20 --presence-penalty 0 --repeat-penalty 1 --flash-
attn on --parallel 2 --cache-type-k q8_0 --cache-type-v q8_0 --cache-reuse 256 --hf-repo unsloth/Q
wen3.5-27B-GGUF:Q8_0
- launch forge and configure provider
- select the model
- send a simple prompt like "hello"
Expected Behavior
respond to the prompt
Actual Behavior
receive Jinja template error
Error Logs
Forge Version
v2.0.3
Operating System
Linux (Debian)
OS Version
Debian Forky
AI Provider
OpenAI-compatible
Model
qwen3.5-27b:Q8_0
Installation Method
npx forgecode@latest
Configuration
🚀 I want to work on this Bounty!
GitHub Account: jiarongmai
About Me: I'm a professional developer with expertise in Python, TypeScript, Go, and smart contract development. I have extensive experience contributing to open source projects.
My Plan:
- First, analyze the requirements and existing codebase
- Create a detailed technical implementation plan
- Implement in phases while maintaining communication
- Provide comprehensive tests and documentation
Time Estimate: Based on complexity, I estimate 1-7 days to complete
How I'll Start:
- Fork the repository and set up the development environment
- Analyze the issue requirements in detail
- Propose a specific implementation plan
- Start immediately after approval
Looking forward to working with you! 🙌
@khimaros are u using {{}} handlebar syntax in your prompts somewhere?
/attempt
using the default template for this model which is produced by unsloth: https://huggingface.co/unsloth/Qwen3.5-27B-GGUF?chat_template=default#L85
Any update guys? i tried changing teh chat template with /llama-cli -m model.gguf --chat-template-file path/to/template.jinja. still nothing
Action required: Issue inactive for 30 days. Status update or closure in 7 days.
Same issue with Qwen3.6 35B A3B.
[06:36:45] ERROR: POST http://127.0.0.1:8080/v1/chat/completions
Caused by:
0: 500 Internal Server Error Reason: {"error":{"code":500,"message":"\n------------\nWhile executing CallExpression at line 85, column 32 in source:\n...first %}↵ {{- raise_exception('System message must be at the beginnin...\n ^\nError: Jinja Exception: System message must be at the beginning.","type":"server_error"}}
Action required: Issue inactive for 30 days. Status update or closure in 7 days.
Issue closed after 7 days of inactivity.