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

Function ggml_quantize_q2_K

ggml-quants.c:1585–1593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1583}
1584
1585size_t ggml_quantize_q2_K(const float * restrict src, void * restrict dst, int n, int k, int64_t * restrict hist) {
1586 (void)hist; // TODO: collect histograms
1587
1588 for (int j = 0; j < n; j += k) {
1589 block_q2_K * restrict y = (block_q2_K *)dst + j/QK_K;
1590 quantize_row_q2_K_reference(src + j, y, k);
1591 }
1592 return (n/QK_K*sizeof(block_q2_K));
1593}
1594
1595//========================= 3-bit (de)-quantization
1596

Callers 1

ggml_quantize_chunkFunction · 0.85

Calls 1

Tested by

no test coverage detected