Skip to content

gguf: Q5_0 weights are unsupported — llama-quantize's Q4_K_M of small models does not load #675

Closed

Description

@geisten

Found by the conversion pipeline of #623.

llama-quantize ... Q4_K_M keeps some tensors of small models in Q5_0. For Gemma 3 270M this includes blk.*.attn_q.weight. geist refuses the load:

geist_model_load failed: transformer: 'blk.0.attn_q.weight' has unsupported dtype Q5_0

The same file runs in llama.cpp (perplexity 46.0 on tools/data/ppl_alice.txt). A user who quantizes a small model with the standard tool therefore cannot run it in geist.

Proposal: support GGML_TYPE_Q5_0 (32-element blocks: fp16 d, 4 bytes of high bits, 16 bytes of nibbles) at least through the reference dequant + cpu_scalar linear, with the fast paths following the Q4_0/Q5_K kernels.

Done when:

  • The Q4_K_M of Gemma 3 270M and of Qwen3 0.6B from tools/convert_hf.py convert --quant q4_k_m load.
  • The perplexity gate passes for both.
  • A dequant unit test against the GGML reference layout exists.

🤖 Generated with Claude Code

Activity

  1. geisten commented on Oct 8, 2026

    @geisten
    OwnerAuthor

    Status (sweep 2026-10-08): still valid. The fix is #685, auto-merge on. Q5_0 loads and runs on cpu_scalar, cpu_x86, cpu_neon (dequant + SGEMM) and Vulkan (host path). Qwen3 0.6B perplexity +2.7 % vs BF16 (llama.cpp +1.7 %); greedy tokens identical to Q8_0 on cpu_x86. This issue closes when #685 merges. Native Q5_0 kernels are a follow-up.


    Generated by Claude Code

  2. added a commit that references this issue on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions