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

Method maybe_do_quantize

utils/convert-ms-to-gguf-bitnet.py:1307–1311  ·  view source on GitHub ↗
(item: tuple[DataType, NDArray])

Source from the content-addressed store, hash-verified

1305
1306 @staticmethod
1307 def maybe_do_quantize(item: tuple[DataType, NDArray]) -> NDArray:
1308 dt, arr, i2_scale = item
1309 if not isinstance(dt, QuantizedDataType):
1310 return arr, i2_scale
1311 return dt.quantize(arr)
1312
1313 @staticmethod
1314 def write_all(

Callers

nothing calls this directly

Calls 1

quantizeMethod · 0.45

Tested by

no test coverage detected