Skip to content

Commit 88c875c

Browse files
authored
Add SmolLM3 (#349)
* feat: Add SmolLM3 * Update swift-transformers to 0.1.22
1 parent eb10e75 commit 88c875c

File tree

6 files changed

+395
-13
lines changed

6 files changed

+395
-13
lines changed

ACKNOWLEDGMENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
MLX Swift was developed with contributions from the following individuals:
88

9-
- [John Mai](https://github.com/johnmai-dev): Added support for multiple models (Qwen2, Starcoder2, InternLM2, Qwen3, Qwen3 MoE, GLM-4, MiMo, BitNet).
9+
- [John Mai](https://github.com/johnmai-dev): Added support for multiple models (Qwen2, Starcoder2, InternLM2, Qwen3, Qwen3 MoE, GLM-4, MiMo, BitNet, SmolLM3).
1010

1111

1212
<a href="https://github.com/ml-explore/mlx-swift-examples/graphs/contributors">

Libraries/MLXLLM/LLMModelFactory.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class LLMTypeRegistry: ModelTypeRegistry, @unchecked Sendable {
4949
"glm4": create(GLM4Configuration.self, GLM4Model.init),
5050
"acereason": create(Qwen2Configuration.self, Qwen2Model.init),
5151
"bitnet": create(BitnetConfiguration.self, BitnetModel.init),
52+
"smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
5253
"ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
5354
]
5455
}
@@ -232,6 +233,11 @@ public class LLMRegistry: AbstractModelRegistry, @unchecked Sendable {
232233
defaultPrompt: "Why is the sky blue?"
233234
)
234235

236+
static public let smollm3_3b_4bit = ModelConfiguration(
237+
id: "mlx-community/SmolLM3-3B-4bit",
238+
defaultPrompt: "Why is the sky blue?"
239+
)
240+
235241
static public let ernie_45_0_3BPT_bf16_ft = ModelConfiguration(
236242
id: "mlx-community/ERNIE-4.5-0.3B-PT-bf16-ft",
237243
defaultPrompt: "Why is the sky blue?"
@@ -269,6 +275,7 @@ public class LLMRegistry: AbstractModelRegistry, @unchecked Sendable {
269275
glm4_9b_4bit,
270276
acereason_7b_4bit,
271277
bitnet_b1_58_2b_4t_4bit,
278+
smollm3_3b_4bit,
272279
ernie_45_0_3BPT_bf16_ft,
273280
]
274281
}

0 commit comments

Comments
 (0)