MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_quantize_q4_K

Function ggml_quantize_q4_K

ggml-quants.c:1962–1971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1960}
1961
1962size_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

Callers 1

ggml_quantize_chunkFunction · 0.85

Calls 1

Tested by

no test coverage detected