common : respect specified tag, only fallback when tag is empty (#21413)
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
parent
650bf14eb9
commit
d01f6274c0
1 changed files with 6 additions and 3 deletions
|
|
@ -596,9 +596,12 @@ static hf_cache::hf_file find_best_model(const hf_cache::hf_files & files,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto & f : files) {
|
// fallback to first available model only if tag is empty
|
||||||
if (gguf_filename_is_model(f.path)) {
|
if (tag.empty()) {
|
||||||
return f;
|
for (const auto & f : files) {
|
||||||
|
if (gguf_filename_is_model(f.path)) {
|
||||||
|
return f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue