MCPcopy Create free account
hub / github.com/microsoft/BitNet / quantize

Method quantize

utils/convert.py:84–85  ·  view source on GitHub ↗
(self, arr: NDArray)

Source from the content-addressed store, hash-verified

82 ggml_type: gguf.GGMLQuantizationType
83
84 def quantize(self, arr: NDArray) -> NDArray:
85 raise NotImplementedError(f'Quantization for {self.name} not implemented')
86
87 def elements_to_bytes(self, n_elements: int) -> int:
88 assert n_elements % self.block_size == 0, f'Invalid number of elements {n_elements} for {self.name} with block size {self.block_size}'

Callers 1

maybe_do_quantizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected