Transformers recently landed support for running llama.cpp / ggml quantization schemes directly, backed by a set of ggml kernels distributed through the kernels library. Write-up: https://huggingface.co/blog/transformers-llama-cpp-quants
This looks potentially interesting for our GGUF integration in Diffusers:
- Today our GGUF support dequantizes on the fly; the ggml kernels could let us run quantized ops natively instead, which should help both memory and speed.
- It could also open up nicer MPS / local-inference angles, which is a frequent ask for Diffusers users.
Relevant kernels (currently being moved from transformers-community to the ggml-org org):
Next steps to figure out:
- Which of these kernels are actually applicable to diffusion model architectures (quantization/norm most likely; attn depends on our attention dispatch).
- Whether they can be plugged into the existing
GGUFQuantizer path via the kernels library.
- Benchmark quality/speed/memory vs. the current dequantize-on-load behaviour, including on MPS.
Requested by Sayak Paul - Slack thread - Agent trace
Transformers recently landed support for running llama.cpp / ggml quantization schemes directly, backed by a set of ggml kernels distributed through the
kernelslibrary. Write-up: https://huggingface.co/blog/transformers-llama-cpp-quantsThis looks potentially interesting for our GGUF integration in Diffusers:
Relevant kernels (currently being moved from
transformers-communityto theggml-orgorg):Next steps to figure out:
GGUFQuantizerpath via thekernelslibrary.Requested by Sayak Paul - Slack thread - Agent trace