-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
62 lines (61 loc) · 2.78 KB
/
Copy pathPackage.swift
File metadata and controls
62 lines (61 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// swift-tools-version:6.0
import PackageDescription
let package = Package(
name: "mlx-server",
platforms: [
.macOS(.v14),
],
products: [
.executable(name: "mlx-server", targets: ["MLXServer"]),
],
dependencies: [
// HTTP server framework. SwiftNIO-based, server-focused, low dep surface.
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.22.0"),
// CLI argument parsing.
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
// Structured logging.
.package(url: "https://github.com/apple/swift-log.git", from: "1.6.0"),
// Metrics API (Prometheus backend wired up in Phase 2).
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.5.0"),
// MLX inference for Apple Silicon: LLMs/VLMs plus the chat-template
// tool-call parsers. Consumed remotely from the v3.32.1-alpha tag.
.package(url: "https://github.com/ekryski/mlx-swift-lm", exact: "3.32.1-alpha"),
// HuggingFace hub client + tokenizers. Required by the MLXHuggingFace
// macros that generate the model Downloader / TokenizerLoader.
.package(url: "https://github.com/huggingface/swift-transformers", from: "1.3.0"),
.package(url: "https://github.com/huggingface/swift-huggingface", from: "0.9.0"),
],
targets: [
// Thin executable: CLI parsing only. All logic lives in MLXServerKit.
.executableTarget(
name: "MLXServer",
dependencies: [
"MLXServerKit",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
// Library target: server, routing, inference engine, OpenAI types.
// Separated from the executable so it is unit-testable.
.target(
name: "MLXServerKit",
dependencies: [
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Metrics", package: "swift-metrics"),
.product(name: "MLXLLM", package: "mlx-swift-lm"),
.product(name: "MLXLMCommon", package: "mlx-swift-lm"),
.product(name: "MLXHuggingFace", package: "mlx-swift-lm"),
.product(name: "Tokenizers", package: "swift-transformers"),
.product(name: "HuggingFace", package: "swift-huggingface"),
]
),
// swift-testing (ships with the Swift 6 toolchain; needs a full Xcode).
.testTarget(
name: "MLXServerTests",
dependencies: [
"MLXServerKit",
.product(name: "HummingbirdTesting", package: "hummingbird"),
]
),
]
)