-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
hubRelated to the Swift -> Hugging Face Hub integrationRelated to the Swift -> Hugging Face Hub integration
Description
The current implementation of Hub.Config can't be marked as Sendable, which restricts all types referencing Config from being passed across concurrency boundaries. This limitation prevents efficient use of Tokenizer in structured concurrency contexts, such as Task {}, within actors or SwiftUI. Therefore causes friction while adopting Swift 6, or some iOS features like AppIntent which requires passing concurrency boundaries.
Observations
Configinternally usesDictionarythat in combination withNSStringis inherently nonSendable.- Unlike
NSString,Stringenforces unwanted unicode canonical equivalence.
TODO
- Sendable Config
- Sendable Downloader
pcuenca
Metadata
Metadata
Assignees
Labels
hubRelated to the Swift -> Hugging Face Hub integrationRelated to the Swift -> Hugging Face Hub integration