MCPcopy Index your code
hub / github.com/microsoft/BitNet / do_item

Method do_item

utils/convert-ms-to-gguf-bitnet.py:1301–1304  ·  view source on GitHub ↗
(item: tuple[str, LazyTensor])

Source from the content-addressed store, hash-verified

1299
1300 @staticmethod
1301 def do_item(item: tuple[str, LazyTensor]) -> tuple[DataType, NDArray]:
1302 name, lazy_tensor = item
1303 tensor = lazy_tensor.load().to_ggml()
1304 return (lazy_tensor.data_type, tensor.ndarray, tensor.i2_scale)
1305
1306 @staticmethod
1307 def maybe_do_quantize(item: tuple[DataType, NDArray]) -> NDArray:

Callers

nothing calls this directly

Calls 2

to_ggmlMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected