mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #2060] [Feature] Support repacking Intel Autoround format(s) into AMXINT4/AMXINT8 #1259
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#1259
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kassieclaire on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/2060
Reminder
Description
Intel AutoRound format seems to very reliably produce quantized weights that are high-quality when using a good calibration dataset, and can produce a format with scaled block sizes of 64, matching the AMXINT4 and AMXINT8 block sizes. From my understanding, the only parts missing would be numa optimization and VNNI repacking of the blocks to allow quick decode with AVX512 instructions on Xeon CPUs.
Intel AutoRound is natively supported by sglang, meaning that the only gaps would be packaging the groups for AMX prefill + AVX512 decode + NUMA node optimization on the CPU-side.
Optimally, the integration would involve allowing the user to select the specific quantization algorithm as intel autoround for the actual quantization part of convert_cpu_weights.py, while leaving the other sections untouched.
As a stretch goal: supporting the lowest-bit formats like W2A16 and W3A16 produced by autoround would be great too, and allow for very-low-bit format support in ktransformers.
Pull Request
No response
@kassieclaire commented on GitHub (Jun 24, 2026):
Similarly, MLX can use a group size of 64, if it would be possible to skip the quantization step for a format like MLX, that is already quantized, and instead replace it with unpacking -> manipulation into VNNI vectors in the tile format -> packing nibles into uint8, it should be possible to load MLX weights and convert them into AMXINT format -> convert scales from fp16 to bf16.
Having direct conversion like this from MLX format would make a lot of high-quality quants easy to use in ktransformers