From 986623889c7f90f51ab05215890e4f5d3f878981 Mon Sep 17 00:00:00 2001 From: v1b3coder Date: Mon, 20 Apr 2026 13:28:58 +0100 Subject: [PATCH] common: improve GGUF quantization tag regex Update the regex in get_gguf_split_info to better identify quantization tags, allowing for prefixes like 'UD-' in 'UD-Q8_K_XL'. This ensures models with these naming conventions are correctly parsed during download. --- common/download.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/download.cpp b/common/download.cpp index c4bb02d90c2..ff6bebc53a8 100644 --- a/common/download.cpp +++ b/common/download.cpp @@ -508,7 +508,7 @@ struct gguf_split_info { static gguf_split_info get_gguf_split_info(const std::string & path) { static const std::regex re_split("^(.+)-([0-9]{5})-of-([0-9]{5})$", std::regex::icase); - static const std::regex re_tag("[-.]([A-Z0-9_]+)$", std::regex::icase); + static const std::regex re_tag("[-.]((?:[A-Z]+-)?[A-Z][0-9][A-Z0-9_]*)$", std::regex::icase); std::smatch m; std::string prefix = path;