-
Notifications
You must be signed in to change notification settings - Fork 501
Open
Description
whisperkit.download allows downloading the CoreML model without using the default endpoint, but the Tokenizer download still uses the default endpoint.
WhisperKit/Sources/WhisperKit/Core/WhisperKit.swift
Lines 241 to 252 in 4ef384e
| public static func download( | |
| variant: String, | |
| downloadBase: URL? = nil, | |
| useBackgroundSession: Bool = false, | |
| from repo: String = "argmaxinc/whisperkit-coreml", | |
| token: String? = nil, | |
| endpoint: String = Constants.defaultRemoteEndpoint, | |
| progressCallback: ((Progress) -> Void)? = nil | |
| ) async throws -> URL { | |
| let hubApi = HubApi(downloadBase: downloadBase, hfToken: token, endpoint: endpoint, useBackgroundSession: useBackgroundSession) | |
| let repo = Hub.Repo(id: repo, type: .models) | |
| var modelSearchPath = "*\(variant.description)/*" |
WhisperKit/Sources/WhisperKit/Utilities/ModelUtilities.swift
Lines 20 to 28 in 4ef384e
| public static func loadTokenizer( | |
| for pretrained: ModelVariant, | |
| tokenizerFolder: URL? = nil, | |
| additionalSearchPaths: [URL] = [], | |
| useBackgroundSession: Bool = false | |
| ) async throws -> WhisperTokenizer { | |
| let tokenizerName = tokenizerNameForVariant(pretrained) | |
| let hubApi = HubApi(downloadBase: tokenizerFolder, useBackgroundSession: useBackgroundSession) | |
| let hubTokenizerFolder = hubApi.localRepoLocation(HubApi.Repo(id: tokenizerName)) |
If I simply add the endpoint parameter to WhisperKitConfig and pass it down, the tokenizer should be able to be downloaded, right?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels