-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPackage.swift
110 lines (108 loc) · 3.06 KB
/
Package.swift
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
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "swift-embeddings",
platforms: [
.macOS(.v15),
.iOS(.v18),
.tvOS(.v18),
.visionOS(.v2),
.watchOS(.v11),
],
products: [
.executable(
name: "embeddings-cli",
targets: ["EmbeddingsCLI"]
),
.library(
name: "Embeddings",
targets: ["Embeddings"]),
.library(
name: "MLTensorUtils",
targets: ["MLTensorUtils"]),
],
dependencies: [
.package(
url: "https://github.com/apple/swift-numerics.git",
from: "1.0.2"
),
.package(
url: "https://github.com/huggingface/swift-transformers.git",
from: "0.1.14"
),
.package(
url: "https://github.com/jkrukowski/swift-safetensors.git",
from: "0.0.7"
),
.package(
url: "https://github.com/apple/swift-argument-parser.git",
from: "1.5.0"
),
.package(
url: "https://github.com/jkrukowski/swift-sentencepiece",
from: "0.0.5"
),
.package(
url: "https://github.com/tuist/Command.git",
from: "0.11.16"
),
],
targets: [
.executableTarget(
name: "EmbeddingsCLI",
dependencies: [
"Embeddings",
"MLTensorUtils",
.product(name: "Safetensors", package: "swift-safetensors"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
.target(
name: "Embeddings",
dependencies: [
"MLTensorUtils",
.product(name: "Safetensors", package: "swift-safetensors"),
.product(name: "Transformers", package: "swift-transformers"),
.product(name: "SentencepieceTokenizer", package: "swift-sentencepiece"),
]
),
.target(
name: "MLTensorUtils"),
.target(
name: "TestingUtils",
dependencies: [
.product(name: "Numerics", package: "swift-numerics")
]
),
.testTarget(
name: "EmbeddingsTests",
dependencies: [
"Embeddings",
"MLTensorUtils",
"TestingUtils",
.product(name: "Safetensors", package: "swift-safetensors"),
],
resources: [
.copy("Resources")
]
),
.testTarget(
name: "AccuracyTests",
dependencies: [
"Embeddings",
"TestingUtils",
.product(name: "Command", package: "Command"),
],
resources: [
.copy("Scripts")
]
),
.testTarget(
name: "MLTensorUtilsTests",
dependencies: [
"MLTensorUtils",
"TestingUtils",
]
),
]
)