Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
206 lines (205 loc) · 10.8 KB
/
Copy pathPackage.swift
File metadata and controls
206 lines (205 loc) · 10.8 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "Particle",
platforms: [
.macOS(.v26),
.iOS(.v26),
],
products: [
.executable(name: "ParticleMLXCLI", targets: ["ParticleMLXCLI"]),
.executable(name: "ParticleLibraryCLI", targets: ["ParticleLibraryCLI"]),
.library(name: "ParticleCore", targets: ["ParticleCore"]),
.executable(name: "ParticlePack", targets: ["ParticlePack"]),
.executable(name: "ParticleCLI", targets: ["ParticleCLI"]),
.executable(name: "ParticleOne", targets: ["ParticleOne"]),
.library(name: "TurboFieldfare", targets: ["TurboFieldfare"]),
.executable(name: "TurboFieldfareRepack", targets: ["TurboFieldfareRepack"]),
.executable(name: "TurboFieldfareCLI", targets: ["TurboFieldfareCLI"]),
.executable(name: "TurboFieldfareMac", targets: ["TurboFieldfareMac"]),
.executable(name: "TurboFieldfareDecodeService", targets: ["TurboFieldfareDecodeService"]),
.executable(name: "TurboFieldfareServer", targets: ["TurboFieldfareServer"]),
],
dependencies: [
.package(url: "https://github.com/ml-explore/mlx-swift-lm", exact: "3.32.3", traits: []),
.package(url: "https://github.com/ml-explore/mlx-swift", exact: "0.32.3"),
.package(url: "https://github.com/sparkle-project/Sparkle", exact: "2.9.6"),
.package(url: "https://github.com/huggingface/swift-transformers", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-nio.git", exact: "2.101.3"),
// Pinned by revision: tag 1.7.3 predates the `\left...\right`
// duplication fix and typesets 433 of the 607-string coverage sweep
// against this revision's 479.
.package(
url: "https://github.com/mgriebling/SwiftMath.git",
revision: "1d2c90827e9c3908269d810d055fb03b7da5fd53"),
],
targets: [
.testTarget(name: "ParticleMLXTests", dependencies: ["ParticleMLXCLI", "ParticleModelLibrary", "ParticleFormat", .product(name: "MLX", package: "mlx-swift"), .product(name: "MLXNN", package: "mlx-swift")], path: "Tests/ParticleMLXTests"),
.executableTarget(name: "ParticleMLXCLI", dependencies: ["ParticleModelLibrary", "ParticleCore", "ParticleDesktopProtocol", .product(name: "MLXLLM", package: "mlx-swift-lm"), .product(name: "MLXLMCommon", package: "mlx-swift-lm"), .product(name: "MLX", package: "mlx-swift"), .product(name: "MLXNN", package: "mlx-swift"), .product(name: "Tokenizers", package: "swift-transformers"), .product(name: "Hub", package: "swift-transformers")], path: "Sources/ParticleMLXCLI"),
.executableTarget(name: "ParticleLibraryCLI", dependencies: ["ParticleModelLibrary", "ParticlePackCore", "ParticleGGUF", "ParticleFormat"], path: "Sources/ParticleLibraryCLI"),
.target(name: "ParticleModelLibrary", dependencies: ["ParticleFormat", "ParticleGGUF", "ParticleDesktopProtocol"], path: "Sources/ParticleModelLibrary"),
.testTarget(name: "ModelLibraryTests", dependencies: ["ParticleModelLibrary", "ParticleOneCore"], path: "Tests/ModelLibraryTests", resources: [.copy("Fixtures")]),
.testTarget(name: "ParticleTests", dependencies: ["ParticleGGUF", "ParticleCore", "ParticleFormat", "ParticlePackCore"], path: "Tests/ParticleTests", resources: [.copy("Fixtures")]),
.target(name: "ParticleFormat", path: "Sources/ParticleFormat"),
.target(name: "ParticleGGUF", dependencies: ["ParticleFormat"], path: "Sources/ParticleGGUF"),
.target(name: "ParticlePackCore", dependencies: ["ParticleFormat", "ParticleGGUF", "ParticleModelLibrary"], path: "Sources/ParticlePackCore"),
.executableTarget(name: "ParticlePack", dependencies: ["ParticlePackCore", "ParticleGGUF"], path: "Sources/ParticlePack"),
.target(name: "ParticleCore", dependencies: ["ParticleGGUF", "ParticleFormat", "ParticleDesktopProtocol", "TurboFieldfare", .product(name: "Tokenizers", package: "swift-transformers"), .product(name: "Hub", package: "swift-transformers")], path: "Sources/ParticleCore", resources: [.copy("Metal")]),
.target(name: "ParticleDesktopProtocol", path: "Sources/ParticleDesktopProtocol"),
.systemLibrary(name: "CSQLite", path: "Sources/CSQLite"),
.target(name: "ParticleOneCore", dependencies: ["ParticleDesktopProtocol", "CSQLite", "ParticleModelLibrary"], path: "Sources/ParticleOneCore"),
.executableTarget(name: "ParticleOne", dependencies: ["ParticleOneCore", "ParticleDesktopProtocol", "TurboFieldfareMacPresentation", .product(name: "Sparkle", package: "Sparkle")], path: "Sources/ParticleOne", resources: [.copy("Resources")], linkerSettings: [.unsafeFlags(["-Xlinker", "-rpath", "-Xlinker", "@executable_path/../Frameworks"])]),
.testTarget(name: "ParticleOneTests", dependencies: ["ParticleOneCore", "ParticleDesktopProtocol", "ParticleCore"], path: "Tests/ParticleOneTests"),
.executableTarget(name: "ParticleCLI", dependencies: ["ParticleCore", "ParticleGGUF", "ParticleDesktopProtocol"], path: "Sources/ParticleCLI"),
.target(
name: "TurboFieldfareFormat",
path: "Sources/TurboFieldfareFormat"
),
.target(
name: "TurboFieldfare",
dependencies: [
"TurboFieldfareFormat",
.product(name: "Tokenizers", package: "swift-transformers"),
.product(name: "Hub", package: "swift-transformers"),
],
path: "Sources/TurboFieldfare",
resources: [
.copy("Metal"),
]
),
.target(
name: "TurboFieldfareRepackCore",
dependencies: ["TurboFieldfareFormat"],
path: "Sources/TurboFieldfareRepack/Core"
),
.executableTarget(
name: "TurboFieldfareRepack",
dependencies: ["TurboFieldfareRepackCore"],
path: "Sources/TurboFieldfareRepack/Command"
),
.target(
name: "TurboFieldfareCLICore",
dependencies: ["TurboFieldfare"],
path: "Sources/TurboFieldfareCLI",
exclude: ["Command"]
),
.executableTarget(
name: "TurboFieldfareCLI",
dependencies: ["TurboFieldfareCLICore"],
path: "Sources/TurboFieldfareCLI/Command"
),
.target(
name: "TurboFieldfareAppCore",
dependencies: ["TurboFieldfare", "TurboFieldfareRepackCore", "TurboFieldfareDecodeProtocol"],
path: "Sources/TurboFieldfareApp/Core",
resources: [
.copy("Resources/app-prompts.json"),
]
),
.target(
name: "TurboFieldfareMacPresentation",
dependencies: [
"TurboFieldfare",
"TurboFieldfareAppCore",
.product(name: "SwiftMath", package: "SwiftMath"),
],
path: "Sources/TurboFieldfareApp/MacPresentation"
),
.target(
name: "TurboFieldfareDecodeProtocol",
path: "Sources/TurboFieldfareDecodeProtocol"
),
.executableTarget(
name: "TurboFieldfareDecodeService",
dependencies: ["TurboFieldfareAppCore", "TurboFieldfareDecodeProtocol"],
path: "Sources/TurboFieldfareDecodeService"
),
.target(
name: "TurboFieldfareServerCore",
dependencies: [
"TurboFieldfare",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
],
path: "Sources/TurboFieldfareServer/Core"
),
.executableTarget(
name: "TurboFieldfareServer",
dependencies: ["TurboFieldfareServerCore"],
path: "Sources/TurboFieldfareServer/Command"
),
.executableTarget(
name: "TurboFieldfareMac",
dependencies: ["TurboFieldfareAppCore", "TurboFieldfareMacPresentation"],
path: "Sources/TurboFieldfareApp/Mac",
resources: [
.copy("Resources/turbofieldfare-app-icon.png"),
]
),
.target(
name: "TurboFieldfareValidationSupport",
dependencies: ["TurboFieldfare"],
path: "Sources/TurboFieldfareValidation/Support"
),
.testTarget(
name: "TurboFieldfareFormatTests",
dependencies: ["TurboFieldfareFormat"],
path: "Tests/TurboFieldfareFormat"
),
.testTarget(
name: "TurboFieldfareFormatCompatibilityTests",
dependencies: ["TurboFieldfareFormat", "TurboFieldfare", "TurboFieldfareRepackCore"],
path: "Tests/TurboFieldfareFormatCompatibility",
resources: [.copy("Fixtures")]
),
.testTarget(
name: "TurboFieldfareTestsCore",
dependencies: [
"TurboFieldfare",
"TurboFieldfareValidationSupport",
"TurboFieldfareRepackCore",
"TurboFieldfareCLICore",
.product(name: "Hub", package: "swift-transformers"),
],
path: "Tests/TurboFieldfare/Core",
resources: [.copy("Runtime/Vision/Fixtures/images")]
),
.testTarget(
name: "TurboFieldfareRepackTests",
dependencies: ["TurboFieldfareFormat", "TurboFieldfareRepackCore"],
path: "Tests/TurboFieldfareRepack/Core"
),
.testTarget(
name: "TurboFieldfareAppCoreTests",
dependencies: [
"TurboFieldfareAppCore", "TurboFieldfare", "TurboFieldfareRepackCore",
"TurboFieldfareDecodeProtocol",
// `SplitMix64`, for the seeded conversation-history walk. The
// only seeded generator in the tree; a second copy would drift.
"TurboFieldfareValidationSupport",
],
path: "Tests/TurboFieldfareApp/Core"
),
.testTarget(
name: "TurboFieldfareDecodeServiceTests",
dependencies: ["TurboFieldfare", "TurboFieldfareDecodeService", "TurboFieldfareAppCore", "TurboFieldfareDecodeProtocol"],
path: "Tests/TurboFieldfareDecodeService"
),
.testTarget(
name: "TurboFieldfareMacPresentationTests",
dependencies: ["TurboFieldfareAppCore", "TurboFieldfareMacPresentation", "TurboFieldfareMac"],
path: "Tests/TurboFieldfareApp/MacPresentation",
resources: [.copy("Fixtures")]
),
.testTarget(
name: "TurboFieldfareServerTests",
dependencies: [
"TurboFieldfareServerCore",
.product(name: "NIOEmbedded", package: "swift-nio"),
],
path: "Tests/TurboFieldfareServer",
resources: [.copy("Fixtures")]
),
]
)