Nunchaku AWQ config accepts any group_size, but the kernel only supports 64
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
从 src/diffusers/quantizers/quantization_config.py 开始,阅读 AWQ 验证以及 SVDQ 组大小检查。将接受的 AWQ 配置与 AWQW4A16Linear 所述的内核约束进行比较。当不支持的组大小(如 128)被拒绝,而支持的大小 64 仍被接受时,即为完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
NunchakuLiteQuantizationConfig's validation for the AWQ path (src/diffusers/quantizers/quantization_config.py) only checks precision == "int4". It never checks group_size. The actual AWQ kernel call site (AWQW4A16Linear) always calls awq_gemm_w4a16_g64_int32 / passes a literal 64 to gemv, so it only ever supports group_size=64.
A checkpoint quantized with group_size=128 loads without any error and silently produces wrong output. The SVDQ path in the same config class does validate its group size against the expected value per precision, so this looks like an oversight in the AWQ branch rather than intentional.
Reproduction
from diffusers.quantizers.quantization_config import NunchakuLiteQuantizationConfig
config = NunchakuLiteQuantizationConfig(
awq_w4a16={"precision": "int4", "group_size": 128, "targets": ["final_linear"]}
)
# No error raised here, even though the AWQ kernel only supports group_size=64.
print(config.awq_w4a16["group_size"]) # 128
System Info
diffusers@main, commitaaf57d0- Python 3.12, Linux
Who can help?
(leaving blank — no specific quantization reviewer listed in the template's tag guide)
- 主要语言
- Python
- 星标
- 34.8k
- 派生
- 7.4k
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 56
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
huggingface/diffusers 的其他 Issue
-
`encode_video` truncates a fractional `fps`, so the video runs longer than its audio可能已有人在做 @guptaishaan 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
huggingface/diffusers#15104 · 1 条评论 ·
维护者通常 1 天内回复
-
VaeImageProcessor.denormalize() raises AttributeError for NumPy inputs可能已有人在做 @tonycoder-hub 于 15 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/diffusers#15011 · 1 条评论 ·
维护者通常 1 天内回复
-
`ModelMixin.from_pretrained` on a sharded checkpoint fails under `HF_HUB_OFFLINE=1` even when fully cached (`_get_checkpoint_shard_files` still calls `model_info`)可能已有人在做 @Subodh-17 于 21 天前认领。 未关闭bug models
难度 2/5 1-3 小时 新手友好度 70/100
huggingface/diffusers#14952 · 1 条评论 ·
维护者通常 1 天内回复
-
UniPCMultistepScheduler fails in torch.linalg.solve under a float64 default dtype: the unit entry of rks takes the default dtype可能已有人在做 @deep1blue 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
huggingface/diffusers#14888 ·
维护者通常 1 天内回复
-
WanAnimatePipeline.get_i2v_mask() defaults device to "cuda", which raises on non-CUDA accelerators (NPU/XPU/MPS)可能已有人在做 @li-lizhe 于 30 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
huggingface/diffusers#14881 ·
维护者通常 1 天内回复
查看 huggingface/diffusers 的全部 Issue
相似的 Issue
-
component:benchmark
难度 2/5 1-3 小时 新手友好度 76/100
agentic-os-org/ANOLISA#9177 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
distrochooser/distrochooser#520 ·
维护者通常 2 天内回复
-
Status: Needs confirmation Status: Needs triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
[BUG] Published Docker images lack the redis extra: HEADROOM_COMPRESS_SESSION_STORE stops startup可能已有人在做 @AlessandroSpallina 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
headroomlabs-ai/headroom#4513 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
codespell-project/codespell#4060 ·
维护者通常 1 天内回复