| 1960 | } |
| 1961 | |
| 1962 | size_t ggml_quantize_q4_K(const float * restrict src, void * restrict dst, int n, int k, int64_t * restrict hist) { |
| 1963 | assert(k % QK_K == 0); |
| 1964 | (void)hist; // TODO: collect histograms |
| 1965 | |
| 1966 | for (int j = 0; j < n; j += k) { |
| 1967 | block_q4_K * restrict y = (block_q4_K *)dst + j/QK_K; |
| 1968 | quantize_row_q4_K_reference(src + j, y, k); |
| 1969 | } |
| 1970 | return (n/QK_K*sizeof(block_q4_K)); |
| 1971 | } |
| 1972 | |
| 1973 | // ====================== 5-bit (de)-quantization |
| 1974 |
no test coverage detected