mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-17 20:31:47 +02:00
fix: detect sidecar GGUFs nested in repo folders
extractQuantMeta parsed the full sibling path, so repo layouts that nest sidecars in a folder (e.g. MTP/mtp-Model-Q4_0.gguf) failed the sidecar prefix match and were classified as main weights. Assisted-by: pi:GLM-5.3-Flash
This commit is contained in:
@@ -184,7 +184,12 @@ export class HuggingFaceService {
|
||||
} | null {
|
||||
if (!MODEL_ID.WEIGHT_EXTENSION_REGEX.test(filename)) return null;
|
||||
|
||||
let source = filename.replace(MODEL_ID.WEIGHT_EXTENSION_REGEX, '');
|
||||
// HF repos may nest sidecars in a folder (e.g. `MTP/mtp-Model-Q4_0.gguf`);
|
||||
// parse the file name only, the folder adds no quant information.
|
||||
let source = (filename.split('/').pop() ?? filename).replace(
|
||||
MODEL_ID.WEIGHT_EXTENSION_REGEX,
|
||||
''
|
||||
);
|
||||
let sidecar: ModelSidecar | null = null;
|
||||
let sidecarForm: SidecarForm | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user