Skip to content

Feature Request: Metal backend support for TQ2_0 (Dynamic 2-bit) quantization #24477

Closed as not planned

Description

@anouar-bm

Description

Currently, the new TQ2_0 quantization format (such as the ones used in Gemma 4 UD-Q2_K_XL) is implemented for CPU but lacks support in the Metal backend for Apple GPUs.

When attempting to load a model containing TQ2_0 tensors (type 35) on macOS/iOS using Metal, it aborts with:
Asserting on type 35
not implemented in ggml-metal-device.cpp

Motivation

With the growing popularity of extreme low-bit quantizations for mobile devices, having Metal GPU acceleration for TQ2_0 would be immensely helpful for Apple Silicon and iOS developers.

Thank you for all the incredible work on ggml and llama.cpp!

Activity

  1. sirohikartik commented on Jun 11, 2026

    @sirohikartik
    Contributor

    I've been looking into this and traced the failure to ggml_metal_library_get_pipeline_mul_mv() in ggml-metal-device.cpp, where GGML_TYPE_TQ2_0 currently falls through to the default case and aborts.

    From what I can tell, TQ2_0 currently has CPU quantization/dequantization support but no Metal kernel implementation yet.

    I'm planning to work on adding Metal support. Before I start implementing a mul_mv kernel for TQ2_0, I wanted to ask: is mul_mv the only path that needs support for this type, or are there additional Metal kernels/paths that should be implemented as well for a complete solution?

    @ggerganov Any guidance would be appreciated.

  2. sirohikartik commented on Jun 12, 2026

    @sirohikartik
    Contributor

    hi @ggerganov
    just a friendly reminder if this got piled up in the notifications

  3. github-actions commented on Jul 27, 2026

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 14 days since being marked as stale.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions