Reddit · r/LocalLLaMA· /u/Brilliant-Hall1387·· 18 天前精选AI 评分62
修改 MLX 用 FP8 暂存量化权重:M6 上预填充提升 40%
Staging quantized weights to FP8 instead of fp16: 2× M6 matrix path, +40% MLX prefill (+ int8 on M5)
来源与原文
Reddit · r/LocalLLaMA
作者:/u/Brilliant-Hall1387
发布时间:(北京时间)
阅读原始来源 · reddit.com ↗完整链接与内容说明
https://www.reddit.com/r/LocalLLaMA/comments/1x13fo2/staging_quantized_weights_to_fp8_instead_of_fp16/
本站目前仅有 AI 导读与摘要,未展示原文正文;技术细节、代码和完整结论请查看原始来源。
AI 导读
作者修改 MLX 的 QMM 实现,把量化权重从 FP16 暂存改为 FP8,在 Apple Silicon M6 上启用 2 倍速 FP8 矩阵路径,Qwen3-8B 预填充提升约 40%,Qwen3.8-27B 提升约 50%;4-bit affine 权重暂存为 int8 的方案在 M5 及之后也可用。Decode 受带宽限制差异不大,建议保留默认 FP16 暂存。最坏情况困惑度增加低于 1%,代码在实验性 fork(https://github.com/precisit/mlx/tree/staged-8bit-qmm),FP8 改进需 M6 与 macOS 27 及 deployment-target-27 构建。作者披露博客来自其任职的 Precisit。
推荐理由
作者自己改 MLX 的量化矩阵路径并给出实测加速与困惑度数据,方法细节和代码都可复现。
来源:Reddit · r/LocalLLaMA · reddit.com