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 <ghart@us.ibm.com>
This commit is contained in:
Gabe Goodhart committed 2026-10-16 08:09:24 -06:00
1 parent 2a667032dc
commit 952ef56764
2 files changed
+5

No files matched your search

+2
View File
@@ -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:
+3
View File
@@ -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)