MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / get_gguf_split_info

Function get_gguf_split_info

common/hf-cache.cpp:514–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512};
513
514static gguf_split_info get_gguf_split_info(const std::string & path) {
515 static const std::regex re_split("^(.+)-([0-9]{5})-of-([0-9]{5})$", std::regex::icase);
516 std::smatch m;
517
518 std::string prefix = path;
519 if (!string_remove_suffix(prefix, ".gguf")) {
520 return {};
521 }
522
523 int index = 1;
524 int count = 1;
525
526 if (std::regex_match(prefix, m, re_split)) {
527 index = std::stoi(m[2].str());
528 count = std::stoi(m[3].str());
529 prefix = m[1].str();
530 }
531
532 return {std::move(prefix), index, count};
533}
534
535static std::pair<std::string, std::string> parse_manifest_name(std::string & filename) {
536 static const std::regex re(R"(^manifest=([^=]+)=([^=]+)=.*\.json$)");

Callers 1

collect_filesFunction · 0.70

Calls 2

string_remove_suffixFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected