huggingface / swift-transformers

Swift Package to implement a transformers-like API in Swift
Apache License 2.0
657 stars 70 forks source link

Make `Tokenizer` conform to `Sendable` protocol #100

Closed DePasqualeOrg closed 3 months ago

DePasqualeOrg commented 3 months ago

After setting "Strict Concurrency Checking" to "Complete" in my app's build settings in preparation for migrating to Swift 6, I get warnings about Tokenizer from swift-transformers, which doesn't currently conform to the Sendable protocol. Is it possible to make this conform to Sendable?

DePasqualeOrg commented 3 months ago

https://github.com/huggingface/swift-transformers/pull/101

DePasqualeOrg commented 3 months ago

https://github.com/ml-explore/mlx-swift-examples/pull/90