Skip to content

Commit 7bd7175

Browse files
committed
docs: clarify enable_thinking compatibility for Gemma 4 models
- Update `Gemma4ChatHandler` class docstring and `__init__` args documentation. - Specify that the `enable_thinking` toggle is exclusively supported by Gemma4 31B and 26BA4B variants. - Explicitly note that E2B and E4B models do not currently support this feature to prevent configuration errors. Signed-off-by: JamePeng <jame_peng@sina.com>
1 parent 6e99244 commit 7bd7175

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

llama_cpp/llama_chat_format.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4338,6 +4338,10 @@ class Gemma3ChatHandler(MTMDChatHandler):
43384338
class Gemma4ChatHandler(MTMDChatHandler):
43394339
"""
43404340
Handler for Gemma 4 models.
4341+
4342+
Note on `enable_thinking`:
4343+
The `enable_thinking` toggle is currently ONLY supported by Gemma4 31B and 26BA4B models.
4344+
It is NOT supported by Gemma4 E2B and E4B models.
43414345
"""
43424346

43434347
# The special token in Gemma 4
@@ -4641,6 +4645,8 @@ def __init__(self, enable_thinking: bool = True, **kwargs):
46414645
Args:
46424646
enable_thinking (bool): Controls whether the <|think|> tag is injected and
46434647
manages <|channel>thought behavior.
4648+
Note: ONLY supported on Gemma4 31B and 26BA4B models.
4649+
NOT supported on Gemma4 E2B and E4B models.
46444650
"""
46454651
self.enable_thinking = enable_thinking
46464652
super().__init__(**kwargs)

0 commit comments

Comments
 (0)