Thêm nhiều bản sửa lỗi cho Gemma4 trong 24 giờ qua
Chào anh em,
Có một vài cập nhật quan trọng về Gemma4 trong 24 giờ qua mà mình muốn chia sẻ:
**Bản sửa lỗi về Reasoning budget** (đã được merge): [https://github.com/ggml-org/llama.cpp/pull/21697](https://github.com/ggml-org/llama.cpp/pull/21697)
**Các chat template mới từ Google để sửa lỗi tool calling:**
31B: [https://huggingface.co/google/gemma-4-31B-it/blob/main/chat_template.jinja](https://huggingface.co/google/gemma-4-31B-it/blob/main/chat_template.jinja)
27B: [https://huggingface.co/google/gemma-4-26B-A4B-it/blob/main/chat_template.jinja](https://huggingface.co/google/gemma-4-26B-A4B-it/blob/main/chat_template.jinja)
E4B: [https://huggingface.co/google/gemma-4-E4B-it/blob/main/chat_template.jinja](https://huggingface.co/google/gemma-4-E4B-it/blob/main/chat_template.jinja)
E2B: [https://huggingface.co/google/gemma-4-E2B-it/blob/main/chat_template.jinja](https://huggingface.co/google/gemma-4-E2B-it/blob/main/chat_template.jinja)
Nếu mình hiểu sai thì mọi người sửa giúp nhé, nhưng theo mình thì anh em nên dùng mấy cái template mới này, trừ khi đã tải lại GGUF mới được cập nhật template trong 24 giờ qua.
Mọi người có thể dùng các template cụ thể trong llama.cpp bằng cách thêm tham số dòng lệnh này:
```
--chat-template-file /models/gemma4/gemma4_chat_template_26B.jinja
```
Đây là ví dụ config llama-swap/llama.cpp 26B hiện tại của mình (đang test trên VRAM 16GB nên context window hơi bị giới hạn):
```
"Gemma4-26B-IQ4_XS":
ttl: 300 # Automatically unloads after 5 mins of inactivity
cmd: >
/usr/local/bin/llama-server
--port ${PORT}
--host 127.0.0.1
--model /models/gemma4/gemma-4-26B-A4B-it-UD-IQ4_XS.gguf
--mmproj /models/gemma4/gemma-4-26B-A4B-it.mmproj-q8_0.gguf
--chat-template-file /models/gemma4/gemma4_chat_template_26B_09APR2026.jinja
--cache-type-k q8_0
--cache-type-v q8_0
--n-gpu-layers 99
--parallel 1
--batch-size 2048
--ubatch-size 512
--ctx-size 16384
--image-min-tokens 300
--image-max-tokens 512
--flash-attn on
--jin
```
