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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: estimate the llama.cpp auto value as off (#66)
## What
The `auto` value of a boolean flag, e.g. `--flash-attn auto`, is estimated as off.
## Why
llama.cpp means "enable it when the device supports it" by `auto`, and the device decides at
runtime. An estimate cannot tell whether the device supports the feature, so it takes the state
that uses more memory.
The backend turns the feature off when the device does not support it. On CUDA, the Flash
Attention path implements F32, F16, BF16, Q4_0, Q4_1, Q5_0, Q5_1 and Q8_0 only, see
`ggml_cuda_fattn_kv_type_supported` in `ggml/src/ggml-cuda/fattn.cu`. A K cache type outside that
list leaves the backend without Flash Attention, for example `--cache-type-k iq4_nl`. An estimate
that enabled the feature reports less memory than the backend uses.
The previous release took `auto` as enabled, so it reported less memory than the backend uses
whenever the device turned the feature off.
Signed-off-by: thxcode <thxcode0824@gmail.com>