You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Selected Model Format Downloads and Zip Downloads #78
In testing various models, I'm noticing that the downloader is downloading ALL files for models including:
original/compiled
original/packaged
split_einsum/compiled (or sometimes split_einsum_v2)
split_einsum/packaged
This potentially leads to 3-4 times the download size / storage required
Ideally we'd specify the variant we want to download and only download that. I think only the compiled version is necessary.
Separately, sometimes the files in each folders are zipped. Ideally if a zip is detected, it would be expanded after download automatically.
Thanks. The primary goal would be to limit the total download size and support models that store files on huggingface as zip files. I guess LLMSession could also support choosing which variant to use if multiple are downloaded but I think usually you wouldn't want to download multiple variants due to space and you'd just pick one.
I’ve added an API that allows you to pass the Source of FileDownloader directly.
By specifying the necessary files using globs, you can avoid downloading unnecessary files.
Please try it out on the main branch.
I could either choose a zip file option and have it expand or would want to specify the a specific folder and the files in it such as original/compiled.
The two reference links you provided are for CoreML models, not MLX.
These are entirely different types of models and are not supported by this library.
Is there a repository with a similar structure that uses an MLX model?
Ok. I built my own stable diffusion pipeline since this library did not support it and that's what I'm using these models for. I don't have other examples off the top of my head but having unzip capabilities seems useful.
I have a custom downloader right now so this isn't high priority. I was just hoping to use a centralized method for all downloads.
This library is currently focused on llama.cpp, MLX, and Foundation Models, and I’d like to concentrate on supporting use cases that are needed for those.
Regarding the downloader, I’m also open to considering it if many use cases require it for those libraries.
This is because I believe it would become difficult to maintain if I tried to support every possible case.
It might be a good idea to use a custom downloader suited to your app’s use case to handle the download, and then use this library’s feature to load the model from a local path.
Activity
tattn commentedon Oct 20, 2025
Thank you for your feedback.
It seems that this can be achieved by making the globs API provided in
FileDownloaderavailable for use in LLMSession as well.LocalLLMClient/Sources/LocalLLMClientUtility/FileDownloader.swift
Line 52 in 085e287
I will consider implementing this.
james-333i commentedon Oct 20, 2025
Thanks. The primary goal would be to limit the total download size and support models that store files on huggingface as zip files. I guess LLMSession could also support choosing which variant to use if multiple are downloaded but I think usually you wouldn't want to download multiple variants due to space and you'd just pick one.
tattn commentedon Oct 27, 2025
I’ve added an API that allows you to pass the Source of FileDownloader directly.
By specifying the necessary files using globs, you can avoid downloading unnecessary files.
Please try it out on the main branch.
https://github.com/tattn/LocalLLMClient/blob/main/Sources/LocalLLMClientMLX/LLMSession%2BMLX.swift#L20
james-333i commentedon Oct 27, 2025
Thank you. Could you please provide an example for this so that it is clear?
tattn commentedon Oct 28, 2025
The following is the default globs configuration.
Please configure the globs so that unnecessary files are excluded. Specify the patterns in a format supported by
fnmatch, which is the internal implementation of globs.https://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html
james-333i commentedon Oct 28, 2025
Thanks. A few points of feedback / questions:
https://huggingface.co/Narsa3/coreml-Qwen2.5-0.5B-Instruct-4bit/tree/main
Correct me if I'm wrong, but I don't believe you are handling expanding zip files automatically after download.
globs: ["original/compiled/."]
Take this one for example:
https://huggingface.co/apple/coreml-stable-diffusion-v1-5-palettized/tree/main
I could either choose a zip file option and have it expand or would want to specify the a specific folder and the files in it such as original/compiled.
tattn commentedon Oct 28, 2025
The two reference links you provided are for CoreML models, not MLX.
These are entirely different types of models and are not supported by this library.
Is there a repository with a similar structure that uses an MLX model?
james-333i commentedon Oct 28, 2025
Ok. I built my own stable diffusion pipeline since this library did not support it and that's what I'm using these models for. I don't have other examples off the top of my head but having unzip capabilities seems useful.
I have a custom downloader right now so this isn't high priority. I was just hoping to use a centralized method for all downloads.
tattn commentedon Oct 28, 2025
Thank you for sharing the situation!
This library is currently focused on llama.cpp, MLX, and Foundation Models, and I’d like to concentrate on supporting use cases that are needed for those.
Regarding the downloader, I’m also open to considering it if many use cases require it for those libraries.
This is because I believe it would become difficult to maintain if I tried to support every possible case.
tattn commentedon Oct 28, 2025
It might be a good idea to use a custom downloader suited to your app’s use case to handle the download, and then use this library’s feature to load the model from a local path.