ggml : remove old quantization functions#5942
Merged
Conversation
Member
|
We could probably use |
Member
Author
|
The |
4b0ddcd to
5460dcc
Compare
slaren
reviewed
Mar 9, 2024
Member
There was a problem hiding this comment.
I see that the code to collect the histograms has been removed, are there any plans to reintroduce it? Otherwise, this parameter could be removed.
1c37d3e to
95ea0ff
Compare
slaren
reviewed
Mar 9, 2024
Comment on lines
+4105
to
+4107
| std::vector<int64_t> hist_cur(1 << 4, 0); | ||
|
|
||
| switch(quant) { | ||
| case GGML_TYPE_F32: | ||
| memcpy(to, from, sizeof(float) * ne); | ||
| break; | ||
| case GGML_TYPE_Q4_0: | ||
| ggml_quantize_q4_0(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q4_1: | ||
| ggml_quantize_q4_1(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q5_0: | ||
| ggml_quantize_q5_0(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q5_1: | ||
| ggml_quantize_q5_1(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q8_0: | ||
| ggml_quantize_q8_0(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q2_K: | ||
| ggml_quantize_q2_K(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q3_K: | ||
| ggml_quantize_q3_K(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q4_K: | ||
| ggml_quantize_q4_K(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q5_K: | ||
| ggml_quantize_q5_K(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| case GGML_TYPE_Q6_K: | ||
| ggml_quantize_q6_K(from, to, ne, ne, hist_cur.data()); | ||
| break; | ||
| default: | ||
| GGML_ASSERT(false); | ||
| } | ||
| gml_quantize_chunk(quant, from, to, 0, 1, ne, hist_cur.data(), nullptr); |
Member
There was a problem hiding this comment.
hist should be removed here too, and there is a typo in the function name.
slaren
approved these changes
Mar 9, 2024
hazelnutcloud
pushed a commit
to hazelnutcloud/llama.cpp
that referenced
this pull request
Mar 10, 2024
* ggml : remove old quantization functions ggml-ci * ggml : simplify ggml_quantize_chunk ggml-ci * ggml : restrict correctness ggml-ci * ggml : remove hist data from the quantization API ggml-ci * tests : remove hist usage in test-backend-ops ggml-ci * vulkan : remove hist and fix typo
NeoZhangJianyu
pushed a commit
to NeoZhangJianyu/llama.cpp
that referenced
this pull request
Mar 12, 2024
* ggml : remove old quantization functions ggml-ci * ggml : simplify ggml_quantize_chunk ggml-ci * ggml : restrict correctness ggml-ci * ggml : remove hist data from the quantization API ggml-ci * tests : remove hist usage in test-backend-ops ggml-ci * vulkan : remove hist and fix typo
jordankanter
pushed a commit
to jordankanter/llama.cpp
that referenced
this pull request
Mar 13, 2024
* ggml : remove old quantization functions ggml-ci * ggml : simplify ggml_quantize_chunk ggml-ci * ggml : restrict correctness ggml-ci * ggml : remove hist data from the quantization API ggml-ci * tests : remove hist usage in test-backend-ops ggml-ci * vulkan : remove hist and fix typo
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* ggml : remove old quantization functions ggml-ci * ggml : simplify ggml_quantize_chunk ggml-ci * ggml : restrict correctness ggml-ci * ggml : remove hist data from the quantization API ggml-ci * tests : remove hist usage in test-backend-ops ggml-ci * vulkan : remove hist and fix typo
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
* ggml : remove old quantization functions ggml-ci * ggml : simplify ggml_quantize_chunk ggml-ci * ggml : restrict correctness ggml-ci * ggml : remove hist data from the quantization API ggml-ci * tests : remove hist usage in test-backend-ops ggml-ci * vulkan : remove hist and fix typo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
ggml_quantize_API in favor ofggml_quantize_chunkNo longer computing hists, but we can re-introduce this later