for (const auto & f : files) {
if (gguf_filename_is_model(f.path) &&
std::regex_search(f.path, pattern)) {
+ auto split = get_gguf_split_info(f.path);
+ if (split.count > 1 && split.index != 1) {
+ continue;
+ }
return f;
}
}
if (tag.empty()) {
for (const auto & f : files) {
if (gguf_filename_is_model(f.path)) {
+ auto split = get_gguf_split_info(f.path);
+ if (split.count > 1 && split.index != 1) {
+ continue;
+ }
return f;
}
}
}
struct hf_plan {
+ hf_cache::hf_file primary;
hf_cache::hf_files model_files;
hf_cache::hf_file mmproj;
};
}
}
+ plan.primary = primary;
plan.model_files = get_split_files(all, primary);
if (opts.download_mmproj) {
for (const auto & f : hf.model_files) {
hf_cache::finalize_file(f);
}
- result.model_path = hf.model_files[0].final_path;
+ result.model_path = hf.primary.final_path;
if (!hf.mmproj.path.empty()) {
result.mmproj_path = hf_cache::finalize_file(hf.mmproj);