-
Notifications
You must be signed in to change notification settings - Fork 201
Download path #165
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
Comments
You would need to use https://github.com/huggingface/swift-transformers Hub API to check that. That said, the libraries here make use of that.
// e.g. VLMModelFactory.shared
let modelFactory: ModelFactory
// e.g. MLXVLM.ModelRegistry.paligemma3bMix4488bit
let modelConfiguration: ModelConfiguration
let container = try await modelFactory.loadContainer(configuration: modelConfiguration) The is the code used to do the download -- you could call this directly if you were not using the code above: Ultimately that calls the let repo = Hub.Repo(id: id)
let modelFiles = ["*.safetensors", "*.json"]
return try await hub.snapshot(
from: repo, matching: modelFiles, progressHandler: progressHandler) See if that works for you! |
How do I delete these downloaded models? |
If you are doing the command line tools they are in ~/Documents/huggingface/models. For the applications they are in something named after the bundle id, e.g. ~/Library/Containers/mlx.LLMEval. You can delete those directories entirely or selectively the files in them. |
Got it. Was able to get the URL in Debug mode and delete the unused model files. Thank you @davidkoski |
Amazing library!
I'd like to check if a model is downloaded or not before starting a download, however, I can't seem to find a way to check this. How can I see if a model is fully downloaded and ready to use before calling LLMEvaluator's load method?
The text was updated successfully, but these errors were encountered: