@@ -208,13 +208,29 @@ public class LLMRegistry: AbstractModelRegistry, @unchecked Sendable {
208208 static public let gemma4_e4b_it_4bit = ModelConfiguration (
209209 id: " mlx-community/gemma-4-e4b-it-4bit " ,
210210 defaultPrompt: " What is the difference between a fruit and a vegetable? " ,
211- extraEOSTokens: [ " <turn|> " ]
211+ extraEOSTokens: [ " <turn|> " , " <pad> " ] ,
212+ eosTokenIds: [ 0 ]
212213 )
213214
214215 static public let gemma4_e2b_it_4bit = ModelConfiguration (
215216 id: " mlx-community/gemma-4-e2b-it-4bit " ,
216217 defaultPrompt: " What is the difference between a fruit and a vegetable? " ,
217- extraEOSTokens: [ " <turn|> " ]
218+ extraEOSTokens: [ " <turn|> " , " <pad> " ] ,
219+ eosTokenIds: [ 0 ]
220+ )
221+
222+ static public let gemma4_26BA4B_it_4bit = ModelConfiguration (
223+ id: " mlx-community/gemma-4-26b-a4b-it-4bit " ,
224+ defaultPrompt: " What is the difference between a fruit and a vegetable? " ,
225+ extraEOSTokens: [ " <turn|> " , " <pad> " ] ,
226+ eosTokenIds: [ 0 ]
227+ )
228+
229+ static public let gemma4_31B_it_4bit = ModelConfiguration (
230+ id: " mlx-community/gemma-4-31b-it-4bit " ,
231+ defaultPrompt: " What is the difference between a fruit and a vegetable? " ,
232+ extraEOSTokens: [ " <turn|> " , " <pad> " ] ,
233+ eosTokenIds: [ 0 ]
218234 )
219235
220236 static public let qwen205b4bit = ModelConfiguration (
@@ -400,6 +416,8 @@ public class LLMRegistry: AbstractModelRegistry, @unchecked Sendable {
400416 gemma3n_E2B_it_lm_4bit,
401417 gemma4_e4b_it_4bit,
402418 gemma4_e2b_it_4bit,
419+ gemma4_26BA4B_it_4bit,
420+ gemma4_31B_it_4bit,
403421 granite3_3_2b_4bit,
404422 granite_4_0_h_tiny_4bit_dwq,
405423 llama3_1_8B_4bit,
@@ -556,6 +574,7 @@ public final class LLMModelFactory: ModelFactory {
556574
557575 // Build a ModelConfiguration with loaded EOS token IDs and tool call format
558576 var mutableConfiguration = configuration
577+ eosTokenIds. formUnion ( configuration. eosTokenIds)
559578 mutableConfiguration. eosTokenIds = eosTokenIds
560579 if mutableConfiguration. toolCallFormat == nil {
561580 mutableConfiguration. toolCallFormat = ToolCallFormat . infer (
0 commit comments