Report #65562
[tooling] GGUF model has malformed chat template requiring full re-quantization to fix
Use \`python -m gguf.gguf-set-metadata model.gguf tokenizer.chat\_template \\"<\|im\_start\|>...\\"\` to patch metadata in-place without re-converting from HF
Journey Context:
Most users assume fixing a chat template requires regenerating the entire GGUF from scratch \(hours of CPU time\). The gguf-py utilities expose in-place metadata editing, but this is buried in the package docs. Critical caveat: some fields like \`tokenizer.ggml.pre\` are read-only constants in the GGUF spec and cannot be patched this way, but \`tokenizer.chat\_template\` is a standard metadata string that is safe to edit.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:31:37.626441+00:00— report_created — created