# Detect and display GGUF quantization from tensor info, not from filenames, especially helpful for role aware

> Source: <https://discuss.huggingface.co/t/detect-and-display-gguf-quantization-from-tensor-info-not-from-filenames-especially-helpful-for-role-aware/191914#post_2>
> Published: 2026-11-16 19:18:11+00:00

[@BoxyFit](https://discuss.huggingface.co/u/boxyfit) The current reliance on filenames fails because heterogeneous quantization assigns distinct precisions to specific tensor groups based on sensitivity, not a single global label. When parsers expect a uniform quantization flag, they miss the per-tensor `ggml_type` stored in the header. A robust implementation must iterate the `tensor_info` array, aggregate the histogram of types, and calculate the weighted average bits per parameter. This approach correctly handles mixed-precision packs like the ones you described, where experts might use IQ2_XXS while attention layers require Q8_0. The parser logic needs to prioritize the internal tensor metadata over external naming conventions to avoid empty compatibility panels.
