You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[PERF] AUTO picks ExllamaV2 for bf16 asym 4-bit GPTQ; its bf16 path rebuilds a dense fp16 weight + fp32 copy on every forward (~10–20× slower, ~266 MiB scratch per 4096×11008 layer) #4213
Severity: medium (output is correct) Version: 7.11.0 @ 9dad249
Summary
gptqmodel_ext/exllamav2/ext_gptq.cpp:144-161: for any input that isn't kHalf, it reconstructs the full fp16 weight and runs at::matmul(a.to(kFloat), weights.to(kFloat)). ext_awq.cpp:~122 does the same.
AUTO order: ['ExllamaV2Linear', 'TritonV2Linear', 'TorchLinear']. Decode at M=1:
Kernel / dtype
Time
Transient memory
ExllamaV2 fp16
~30 µs
1.4 MiB
ExllamaV2 bf16
~650–680 µs
266 MiB
TritonV2 bf16
~60–175 µs
0 MiB
Expected
Don't rank ExllamaV2 first for non-fp16 activations: restrict SUPPORTS_DTYPES to fp16 for AUTO, or demote it for bf16.
Minor: with a bias, bf16 output is rounded twice (kernel → bf16, then + fp32 bias → cast) because wide_bias applies only to fp16 (exllamav2.py:~312). That is within one ulp.
Found during an AI-assisted review (Claude Code) of 9dad249; repros were run on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Activity
perf(auto): rank ExLlamaV2 below native bf16 kernels for non-fp16 (Mo…