-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: support downloading multiple model files #3216
feat: support downloading multiple model files #3216
Conversation
related registry-tabby pr |
I would not recommend reusing the
|
I considered adding
So, I've expanded the semantic of fn filter_download_urls(model_info: &ModelInfo) -> Vec<String> {
let download_host = tabby_common::env::get_download_host();
model_info
.urls
.iter()
.flatten()
.filter_map(|f| {
if f.contains(&download_host) {
if let Some(mirror_host) = tabby_common::env::get_huggingface_mirror_host() {
Some(f.replace("huggingface.co", &mirror_host))
} else {
Some(f.to_owned())
}
} else {
None
}
})
.collect() Let me know if partitioned_urls is necessary and how to maintain compatibility with existing urls. Adding partitioned_urls is not troublesome for me. |
|
ok i will work on this when i'm back from vacation
Meng Zhang ***@***.***> 于 2024年10月4日周五 下午5:48写道:
…
1. I still recommend adding partitioned_urls (perhaps using a typed
struct that contains both the URL and the SHA256 value).
2. With proper refactoring, the mirror host semantics can also be
applied to partitioned_urls.
—
Reply to this email directly, view it on GitHub
<#3216 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGXMPU4AGYPZIKZUKMCUI3ZZZI7RAVCNFSM6AAAAABPA4NTCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJTGE3TMMJSGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi @umialpha, sorry for the late reply and thanks for raising the PR! before heading to the code changes, may I ask some questions to make sure we are on the same page.
WDYT @wsxiaoys ? |
@zwpaper The filename is inferred, first by looking for "CONTENT_DISPOSITION" in the HTTP header, and second by deducing from the URL. I reviewed the llma.cpp documentation and found only one relevant content, here. It doesn't provide a detailed explanation of name. I am not sure whether it is a good idea to couple our implementation with other internal implementations. |
closing in favor of #3258, commits squashed |
fix #3181
Changes
ModelInfo
urls
andurls_sha256
are for multiple files besides the original use(find the download host)entrypoint
is for the entrypoint of the models. it is set to "model.gguf" for legacy case, if there are multiple parts of model,entrypoint
must be set.urls
are set, the filename are inferenced by the functiontryget_download_filename
example: