simongonzalezdc writes about a serving-side tool-attention failure in Qwen3.8-27B via llama-server (jinja templates) where the position of tools in the rendered payload determines whether the model will invoke them. With an 8-tool list, early-positioned, description-less tools were verbally refused as "not wired up" (0/6 success), while the same tools worked perfectly when moved to the tail (3/3) or given a one-line description (6/6). A follow-up with 13 tools confirmed the pattern: a mid-list pair prescribed by name failed 0/5, but tail placement restored 3/3 clean invocation.
- Hypothesis: later tools in the rendered template output receive more attention; compact single-JSON-blob rendering may amplify the position effect versus per-tool natural-language rendering.
- Controlled matrix (24 runs + 27 curl controls) ruled out tool count, context/style, effort level, and fresh-session as causes.
- Test hardware: AMD Strix Halo (gfx1151/HIP) running Q4_K_XL quantization on current llama-server.
- Full methodology and ledgers published in a companion repo: KyaniteLabs/qwen38-27b-strix-halo.
This repository provides optimized Jinja chat templates designed to fix critical rendering errors, KV cache invalidation, and agentic stalling issues found in official Qwen 3.5 and 3.6 templates. It is compatible with major inference engines including LM Studio, llama.cpp, vLLM, and MLX.
Learn to build modular Flask applications using Jinja and templates. This article covers what Jinja is, how to create templates, and the benefits of using templates and the Jinja template engine. The article includes code examples and a GitHub link to the source code.