-
Notifications
You must be signed in to change notification settings - Fork 144
Stateful cache, MLTensor #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Added error for JSON serialization errors * Fix merge commit --------- Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
SPM dependencies are always compiled for the standard architectures, but Float16 is not available for `x86_64`. Thanks @joshnewnham for the workaround 🙌
Package.swift
Outdated
| let package = Package( | ||
| name: "swift-transformers", | ||
| platforms: [.iOS(.v16), .macOS(.v13)], | ||
| platforms: [.iOS("18.0"), .macOS("15.0")], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.v18 and .v15 not supported for manifests < Swift 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could revert and conditionally exclude the Generation target instead
|
This is great! Cuts out a lot of cruft we don't need any more and we can repost about the Mistral 7B example (I still use it as a reference and even I struggle to find it!!) |
|
If we go forward, we can:
|
| name: "transformers-cli", | ||
| platforms: [.iOS(.v18), .macOS(.v15)], | ||
| dependencies: [ | ||
| .package(url: "https://github.com/huggingface/swift-transformers", branch: "main"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .package(url: "https://github.com/huggingface/swift-transformers", branch: "main"), | |
| .package(url: "https://github.com/huggingface/swift-transformers", from: "1.0.0"), |
to update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use a relative import here
| .package(url: "https://github.com/huggingface/swift-transformers", branch: "main"), | |
| .package(path: "../../"), |
But keep iOS 18 / macOS 15 for Core ML
Co-authored-by: Joshua Newman <joshnewnham@users.noreply.github.com> Co-authored-by: Yuduo Wu <6426433+1duo@users.noreply.github.com> Co-authored-by: Alejandro Isaza <alejandro-isaza@users.noreply.github.com> Co-authored-by: Aseem Wadhwa <aseemw@users.noreply.github.com> Reference: #257
* feat: tokenizers and hub are the big sellers! * Update README.md Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * Update README.md Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * fix: add Mistral 7B example * Update README.md Co-authored-by: vb <vaibhavs10@gmail.com> * Update README.md Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * Link to Core ML PR Co-authored-by: Joshua Newman <joshnewnham@users.noreply.github.com> Co-authored-by: Yuduo Wu <6426433+1duo@users.noreply.github.com> Co-authored-by: Alejandro Isaza <alejandro-isaza@users.noreply.github.com> Co-authored-by: Aseem Wadhwa <aseemw@users.noreply.github.com> Reference: #257 --------- Co-authored-by: FL33TW00D <FL33TW00D@users.noreply.github.com> Co-authored-by: Pedro Cuenca <pedro@huggingface.co> Co-authored-by: vb <vaibhavs10@gmail.com> Co-authored-by: Joshua Newman <joshnewnham@users.noreply.github.com> Co-authored-by: Yuduo Wu <6426433+1duo@users.noreply.github.com> Co-authored-by: Alejandro Isaza <alejandro-isaza@users.noreply.github.com> Co-authored-by: Aseem Wadhwa <aseemw@users.noreply.github.com>
This is a rebase of the preview branch on the current
main.What we gain:
MLTensorAPIMLShapedArray,MLMultiArray🥳)What we lose:
Some cleanup still needed.
Should we move forward with this? @mattt @FL33TW00D @Vaibhavs10 @ZachNagengast