Skip to content

Bug: Missing Sanity Check in convert_hf_to_gguf.py #9245

Closed
@mesibo

Description

@mesibo

What happened?

The script convert_hf_to_gguf.py does not perform a sanity check on the completeness of the model files. We encountered an issue where one of the models we downloaded was incomplete (specifically, a safesensors file was missing). Despite this, convert_hf_to_gguf.py proceeded with the conversion without generating any errors or warnings.

Expected Behavior: The script should validate that all required files are present before converting. Since Hugging Face downloads are organized with sequence and total files (e.g., model-00001-of-00002), it should be easy to validate.

Steps to Reproduce:

  1. Download a model from HF and delete one of the safesensors file.
  2. Run convert_hf_to_gguf.py on the incomplete set.
  3. the script completes without any indication of missing files.

Name and Version

version: 3631 (7d787ed)
built with cc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22) for x86_64-redhat-linux

What operating system are you seeing the problem on?

Linux

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglow severityUsed to report low severity bugs in llama.cpp (e.g. cosmetic issues, non critical UI glitches)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions