Skip to content

Commit 06dc7ff

Browse files
hasnatawnidavidkoski
authored
Update LLMModelFactory.swift (#183)
* Update LLMModelFactory.swift Adds in DeepSeek (mlx-community/DeepSeek-R1-Distill-Qwen-7B-4bit) ModelConfiguration * Update LLMModelFactory.swift * update swift transformers and jinja --------- Co-authored-by: Awni Hannun <awni@apple.com> Co-authored-by: David Koski <dkoski@apple.com>
1 parent d189ae3 commit 06dc7ff

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

Libraries/MLXLLM/LLMModelFactory.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ public class ModelRegistry: @unchecked Sendable {
9696
defaultPrompt: "func sortArray(_ array: [Int]) -> String { <FILL_ME> }"
9797
)
9898

99+
static public let deepSeekR1_7B_4bit = ModelConfiguration(
100+
id: "mlx-community/DeepSeek-R1-Distill-Qwen-7B-4bit",
101+
defaultPrompt: "Is 9.9 greater or 9.11?"
102+
)
103+
99104
static public let phi4bit = ModelConfiguration(
100105
id: "mlx-community/phi-2-hf-4bit-mlx",
101106
// https://www.promptingguide.ai/models/phi-2
@@ -173,6 +178,7 @@ public class ModelRegistry: @unchecked Sendable {
173178
private static func all() -> [ModelConfiguration] {
174179
[
175180
codeLlama13b4bit,
181+
deepSeekR1_7B_4bit,
176182
gemma2bQuantized,
177183
gemma_2_2b_it_4bit,
178184
gemma_2_9b_it_4bit,

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let package = Package(
2929
dependencies: [
3030
.package(url: "https://github.com/ml-explore/mlx-swift", .upToNextMinor(from: "0.21.2")),
3131
.package(
32-
url: "https://github.com/huggingface/swift-transformers", .upToNextMinor(from: "0.1.13")
32+
url: "https://github.com/huggingface/swift-transformers", .upToNextMinor(from: "0.1.15")
3333
),
3434
.package(
3535
url: "https://github.com/apple/swift-async-algorithms", .upToNextMinor(from: "1.0.0")),

mlx-swift-examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 16 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)