MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / maybe_do_quantize

Method maybe_do_quantize

tokenizer/convert/convert.py:1108–1112  ·  view source on GitHub ↗
(item: tuple[DataType, NDArray])

Source from the content-addressed store, hash-verified

1106
1107 @staticmethod
1108 def maybe_do_quantize(item: tuple[DataType, NDArray]) -> NDArray:
1109 dt, arr = item
1110 if not isinstance(dt, QuantizedDataType):
1111 return arr
1112 return dt.quantize(arr)
1113
1114 @staticmethod
1115 def write_all(

Callers

nothing calls this directly

Calls 1

quantizeMethod · 0.45

Tested by

no test coverage detected