Repository navigation
use const auto &kv instead of auto &kv, statements into braces - #2012
mendax0110 wants to merge 4 commits into
Conversation
|
The formatting is terrible on those changes with the braces. Not sure what the Did you make these changes yourself or is it made by an analyzer? |
|
The formatting with the braces was from an analyzer, thought that looks better. The const is not from an analyzer. |
ikawrakow
left a comment
There was a problem hiding this comment.
Please remove the k-quants related changes.
| use_more_bits(i_attention_wv, n_attention_wv)) new_type = GGML_TYPE_Q6_K; | ||
| else if (QK_K == 64 && (ftype == LLAMA_FTYPE_MOSTLY_Q4_K_S || ftype == LLAMA_FTYPE_MOSTLY_Q3_K_S) && | ||
| (i_attention_wv < n_attention_wv/8 || i_attention_wv >= 7*n_attention_wv/8)) new_type = GGML_TYPE_Q6_K; | ||
| if (ftype == LLAMA_FTYPE_MOSTLY_Q3_K_M || ftype == LLAMA_FTYPE_MOSTLY_Q2_K) { new_type = GGML_TYPE_Q4_K; |
There was a problem hiding this comment.
I have written it like this on purpose, not because I didn't know better, and I strongly object against this change.
There was a problem hiding this comment.
all right, I will do that.
There was a problem hiding this comment.
I'm not sure why you're trying to revert changes to already merged code with this commit: 6e7f15d
There was a problem hiding this comment.
I apologize for the confusion. It seems there was an issue with my work in VScode and source control, resulting in this unintended mistake.
|
Hey @mendax0110, thanks for the contribution! I think it will be better to start this PR from scratch. The |
Replacing auto &kv with const auto &kv: By using const auto &kv instead of auto &kv, we explicitly communicate our intention to treat kv as a constant reference. This helps prevent accidental modifications and promotes safer code.
Enclosing statements in braces: By enclosing statements within braces, we ensure clear scoping and minimize the risk of errors caused by unintended code execution. This practice also enhances code maintainability and reduces ambiguity.