froggeric/Qwen-Fixed-Chat-Templates
Fixed jinja chat templates for Qwen 3.5 & 3.6 (v20) Update History & Changelog (v20) 2026-06-05 Update (v20): The Architect Patch. A monumental structural overhaul targeting deep agentic loops and C++ inference engine compatibility. (1) Minja AST Fl...
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của ngày
#1 Repository của tuần
#1 Repository của ngày
🔧 Qwen-Fixed-Chat-Templates: Template Jinja chuẩn hoá Qwen 3.5 & 3.6
Bản vá cấu trúc lớn nhằm tối ưu hóa vòng lặp agentic và khả năng tương thích với engine suy diễn C++ như llama.cpp.
Dự án cung cấp các bản template Jinja đã được sửa lỗi và tối ưu hiệu suất cho các mô hình Qwen 3.5 và 3.6, hỗ trợ đầy đủ tính năng gọi công cụ (tool-calling) và suy luận (thinking). Được thiết kế để hoạt động trơn tru trên nhiều nền tảng như LM Studio, MLX, llama.cpp, vLLM...
✨ Điểm nổi bật
- Tối ưu Minja AST: Giảm độ sâu lồng Jinja nghiêm trọng, khắc phục tình trạng giảm tốc độ suy diễn 80% trên llama.cpp.
- Vá lỗi replace index 0: Bypass lỗi C++ nghiêm trọng gây mất dữ liệu prompt khi dùng bộ lọc replace ở vị trí đầu tiên.
- Tắt suy luận tự động khi dùng công cụ: Tham số
auto_disable_thinking_with_toolsmới cho phép tắt nhanh khối suy luận trong quá trình gọi công cụ. - Hỗ trợ vòng lặp agent sâu: Xử lý ngoại lệ khi có system prompt xen kẽ hoặc thiếu tin nhắn người dùng trong vòng lặp.
- Cắt ngắn payload lớn: Cấu hình
max_tool_arg_charsvàmax_tool_response_charsngăn tràn bộ nhớ ngữ cảnh từ dữ liệu trả về khổng lồ. - Loại bỏ suy luận rỗng: Ngăn chặn hiện tượng model bỏ qua suy luận chỉ vì muốn gọi công cụ, giảm đáng kể việc kết thúc trước thời gian.
- Giữ nguyên KV Cache 100%: Chuẩn hóa khoảng trắng nội bộ để khớp hoàn toàn với token sinh ra, tránh tính toán lại toàn bộ prompt.
- Phát hiện lỗi chính xác: Chuyển từ so khớp chuỗi con sang định dạng cấu trúc, tránh lỗi phát hiện sai gây vòng lặp lại không cần thiết.
💡 Vì sao đáng chú ý
Template này không chỉ là bản vá lỗi thông thường — nó tái cấu trúc toàn bộ cách xử lý lịch sử hội thoại và công cụ gọi để đảm bảo hiệu suất tối ưu trên cả nền tảng Python và C++. Nhờ các cải tiến như Minja AST flattening và chuẩn hóa KV Cache, người dùng có thể triển khai Qwen 3.5/3.6 trong môi trường agentic phức tạp mà không lo giảm tốc độ hoặc lỗi suy diễn.
#Qwen #ChatTemplate #Jinja #ToolCalling #LLM #AI #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
Qwen-Sharp-Chat-Templates froggeric's Qwen-Fixed-Chat-Templates(https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates) v21.3, with a terseness system prompt spliced in. Model-agnostic: it names no model, so it drops into any Qwen3.5 or Qwen3.6...
all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...
Read our How to Run Qwen3.8-27B Guide!(https://unsloth.ai/docs/models/qwen3.8) This GGUF uses Unsloth Dynamic V3.0 (preview) for SOTA quantization performance. Developer Role Support so Qwen3.8 can work in agentic tools like Codex and more! MTP for...
autotrust/JEV-27B-VL JEV-27B that can see: the same System 1 decisions and System 2, now on images autotrust/JEV-27B-VL is autotrust/JEV-27B(https://huggingface.co/autotrust/JEV-27B) with vision. | | what it does | output | |---|---|---| | System 1...
Try gpt-oss · Guides · Model card · OpenAI blog Welcome to the gpt-oss series, OpenAI’s open-weight models(https://openai.com/open-models) designed for powerful reasoning, agentic tasks, and versatile developer use cases. We’re releasing two flavors...
Try gpt-oss · Guides · Model card · OpenAI blog Welcome to the gpt-oss series, OpenAI’s open-weight models(https://openai.com/open-models) designed for powerful reasoning, agentic tasks, and versatile developer use cases. We’re releasing two flavors...
Qwen-Image-2.1 Turbo Quantized GGUF, Safetensors, and MLX quantized formats of Qwen/Qwen-Image-2.1-Turbo(https://huggingface.co/Qwen/Qwen-Image-2.1-Turbo) for local image generation using the official turbo base weights. Benchmark !Qwen-Image-2.1 be...
!🤗 Model Requests(https://img.shields.io/badge/%F0%9F%A4%97ModelRequests-SubmitHere-f59e0b?style=for-the-badge&labelColor=1f2937)(https://abenzerps.com/request-a-model/) Qwen-Image-2.1 Uncensored Quantized GGUF, Safetensors, and MLX quantized format...
!IMPORTANT Notice: A fully uncensored version is currently in development and will be added to this repository soon. Qwen-Image-2.1 GGUF GGUF quantizations of Qwen/Qwen-Image-2.1(https://huggingface.co/Qwen/Qwen-Image-2.1) for local image generation...