{"record":{"id":"d77a1c6e643b2e80","repo":"oobabooga/textgen","slug":"no-gguf-models-found-in-directory-path","errorCode":null,"errorMessage":"No .gguf models found in directory: {path}","messagePattern":"No \\.gguf models found in directory: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"modules/models_settings.py","lineNumber":59,"sourceCode":"            model_settings,\n            hf_quant_method=quant_method\n        )\n\n    # Default bos/eos tokens (may be overridden by GGUF metadata or tokenizer_config.json)\n    shared.bos_token = '<s>'\n    shared.eos_token = '</s>'\n\n    # GGUF metadata\n    if model_settings['loader'] == 'llama.cpp':\n        path = model_path\n        if path.is_file():\n            model_file = path\n        else:\n            gguf_files = list(path.glob('*.gguf'))\n            if not gguf_files:\n                error_msg = f\"No .gguf models found in directory: {path}\"\n                logger.error(error_msg)\n                raise FileNotFoundError(error_msg)\n\n            model_file = gguf_files[0]\n\n        metadata = load_gguf_metadata_with_cache(model_file)\n\n        for k in metadata:\n            if k.endswith('.context_length'):\n                model_settings['ctx_size'] = 0\n                model_settings['truncation_length_info'] = metadata[k]\n            elif k.endswith('.block_count'):\n                model_settings['gpu_layers'] = -1\n                model_settings['max_gpu_layers'] = metadata[k] + 1\n            elif k.endswith('.nextn_predict_layers') and metadata[k] > 0:\n                model_settings['spec_type'] = 'draft-mtp'\n\n        if 'tokenizer.chat_template' in metadata:\n            template = metadata['tokenizer.chat_template']\n            if 'tokenizer.ggml.eos_token_id' in metadata:","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/oobabooga/textgen/blob/ed888c71f221df552750e1834b3654abab8ae345/modules/models_settings.py#L41-L77","documentation":"Error \"No .gguf models found in directory: {path}\" thrown in oobabooga/textgen.","triggerScenarios":"Raised when scanning a model directory for llama.cpp models and no .gguf files are found. Triggers when the model folder path is wrong, the model was not downloaded, or the folder only contains sharded/non-GGUF weights.","commonSituations":"See trigger scenarios.","solutions":["Place at least one .gguf model file in the reported directory.","Point the model directory setting at the folder that actually contains your .gguf files."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ed888c71f221df552750e1834b3654abab8ae345","analyzedAt":"2026-08-15T05:24:21.000Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}