Skip to content

Commit 2eea315

Browse files
authored
Add SwiftPM installation guide to README.md (#74)
1 parent 0add1a4 commit 2eea315

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,29 @@ Encoder-decoder models such as T5 and Flan are currently _not supported_. They a
5151
- [`exporters`](https://github.com/huggingface/exporters), a Core ML conversion package for transformers models, based on Apple's [`coremltools`](https://github.com/apple/coremltools).
5252
- [`transformers-to-coreml`](https://huggingface.co/spaces/coreml-projects/transformers-to-coreml), a no-code Core ML conversion tool built on `exporters`.
5353

54+
## SwiftPM
55+
56+
To use `swift-transformers` with SwiftPM, you can add this to your `Package.swift`:
57+
58+
```swift
59+
dependencies: [
60+
.package(url: "https://github.com/huggingface/swift-transformers", from: "0.1.5")
61+
]
62+
```
63+
64+
And then, add the Transformers library as a dependency to your target:
65+
66+
```
67+
targets: [
68+
.target(
69+
name: "YourTargetName",
70+
dependencies: [
71+
.product(name: "Transformers", package: "swift-transformers")
72+
]
73+
)
74+
]
75+
```
76+
5477
## <a name="roadmap"></a> Roadmap / To Do
5578

5679
- [ ] Tokenizers: download from the Hub, port from [`tokenizers`](https://github.com/huggingface/tokenizers)

0 commit comments

Comments
 (0)