From 952ef567647e53ac9beda7a1f79d6927240d068d Mon Sep 17 00:00:00 2001 From: Gabe Goodhart Date: Fri, 16 Oct 2026 08:01:54 -0600 Subject: [PATCH] feat(convert): Add decision.chat to support decision models that can also chat Branch: GraniteSwitchDecision AI-usage: full (Claude + Sonnet 5.5) Signed-off-by: Gabe Goodhart --- gguf-py/gguf/constants.py | 2 ++ gguf-py/gguf/gguf_writer.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/gguf-py/gguf/constants.py b/gguf-py/gguf/constants.py index 00b51165c9..c81d715270 100644 --- a/gguf-py/gguf/constants.py +++ b/gguf-py/gguf/constants.py @@ -339,6 +339,7 @@ class Keys: class Decision: TYPE = "{arch}.decision.type" + CHAT = "{arch}.decision.chat" # bool, the model also does text generation # note: single-use-case keys can be hard-coded in cpp code BLOCK_COUNT = "{arch}.decision.block_count" ROUTING_BLOCK_COUNT = "{arch}.decision.routing_block_count" @@ -6283,6 +6284,7 @@ class DecisionType: VLLM_D3 = "vllm-d3" # same as pplx-decider, non-causal attention LFM2_D1 = "lfm2-d1" # same as openjev, the labels depend on the question type LFM2_D1_OMNI = "lfm2-d1-omni" # same head as laya on a bidirectional LFM2 trunk, other prompt layout + GRANITE_SWITCH = "granite-switch" # same as openjev, run by the decision aLoRA of granite switch class VisionProjectorType: diff --git a/gguf-py/gguf/gguf_writer.py b/gguf-py/gguf/gguf_writer.py index 93ec95eb64..6bd6aa5edb 100644 --- a/gguf-py/gguf/gguf_writer.py +++ b/gguf-py/gguf/gguf_writer.py @@ -1386,6 +1386,9 @@ class GGUFWriter: def add_decision_type(self, value: str) -> None: self.add_string(Keys.Decision.TYPE.format(arch=self.arch), value) + def add_decision_chat(self, value: bool) -> None: + self.add_bool(Keys.Decision.CHAT.format(arch=self.arch), value) + def add_decision_block_count(self, value: int) -> None: self.add_uint32(Keys.Decision.BLOCK_COUNT.format(arch=self.arch), value)