Back to directory

mlx-kquant

A C++ and Metal extension for MLX on Apple Silicon that adds native K-quant quantization, alongside a toolchain to quantize, load, run, LoRA-train and fuse K-quant checkpoints on a stock MLX installation.

mlx-kquant

mlx-kquant adds a namespace of native MLX operations, dequantize, quantized matmul, gather and quantize, backed by Metal kernels compiled ahead of time into a metal library, covering all ten standard K-quant and legacy GGML codecs, nine IQ codecs, two experimental ternary codecs, and the native floating-point mxfp4 and nvfp4 wire codecs, plus fused decode and prefill kernels for mixture-of-experts and attention.

A Python-side toolchain quantizes an MLX safetensors model into a uniform- or mixed-precision K-quant checkpoint in MLX-native safetensors format, then loads, generates from, LoRA-trains and fuses it.

The project reports that K-quants roughly halve the divergence from a reference model compared with affine quantization at the same bitrate, with measured divergence figures for several models included in the README. It requires macOS 26.2 or later on Apple Silicon and ships a prebuilt wheel; it is MIT licensed.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.