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

Method maybe_do_quantize

utils/convert.py:1238–1242  ·  view source on GitHub ↗
(item: tuple[DataType, NDArray])

Source from the content-addressed store, hash-verified

1236
1237 @staticmethod
1238 def maybe_do_quantize(item: tuple[DataType, NDArray]) -> NDArray:
1239 dt, arr, i2_scale = item
1240 if not isinstance(dt, QuantizedDataType):
1241 return arr, i2_scale
1242 return dt.quantize(arr)
1243
1244 @staticmethod
1245 def write_all(

Callers

nothing calls this directly

Calls 1

quantizeMethod · 0.45

Tested by

no test coverage detected