Add is_iq()

This commit is contained in:
Ed Addario 2025-08-19 11:00:50 +01:00
parent c96b8eef94
commit 9adae08789
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,22 @@ struct tensor_quantization {
ggml_type quant = GGML_TYPE_COUNT;
};
static bool is_iq(const enum ggml_type t) {
switch (t) {
case GGML_TYPE_IQ1_S:
case GGML_TYPE_IQ1_M:
case GGML_TYPE_IQ2_XXS:
case GGML_TYPE_IQ2_XS:
case GGML_TYPE_IQ2_S:
case GGML_TYPE_IQ3_XXS:
case GGML_TYPE_IQ3_S:
case GGML_TYPE_IQ4_NL:
case GGML_TYPE_IQ4_XS:
return true;
default:
return false;
}
}
static enum ggml_type fallback_type(const enum ggml_type new_type) {
switch (new_type) {
case GGML_TYPE_TQ1_0: