b9860

ggml-org/llama.cppb9860Jul 2, 2026by github-actions[bot]1 days after b9859

What changed since b9859

medium risk

b9860 adds a public C API to report a model's quantization file type, on top of b9859's OpenCL kernel-library work.

New features

  • New public C API llama_ftype_name() returns the model file type string such as "Q8_0" or "Q4_K - Medium".
  • The ftype enum is now exported for use by downstream bindings and applications.
  • Returns nullptr for invalid models or unknown file types, with the pointer valid for the model's lifetime.

Improvements

  • Implementation is thread-safe and allocation-free after moving the "(guessed)" marker to the front of the string.
  • Added an LLAMA_FTYPE_PREFIX constant to keep the reported type names consistent.

Upgrade notes

This is a purely additive API change; existing code and model files need no modification. If you maintain bindings, expose the new llama_ftype_name() symbol and the exported ftype enum. Note the function was renamed from the initially proposed llama_model_ftype_name() during review, so use the final name.

Analyzed Oct 31, 2026

Upgrading?

Release notes summary

Adds a new public C API function to retrieve the name of the model quantization file type (e.g., 'Q8_0'), improving introspection capabilities for applications.

Key Highlights

  • New public C API: llama_ftype_name()
  • Thread-safe and allocation-free implementation
  • Exposes quantization type names

Release Notes (excerpt)

<details open> llama : add llama_model_ftype_name() (#25134) * llama : add llama_model_ftype_name() Expose the model file type (quantization) name, e.g. "Q8_0" or "Q4_K - Medium", through a new public C API. The returned pointer is valid for the lifetime of the model and nullptr when the model is invalid or the file type is unknown. Signed-off-by: Adrien Gallouët <angt@huggingface.co> * Export enum Signed-off-by: Adrien Gallouët <angt@huggingface.co>…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories