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

Method do_item

utils/convert.py:1232–1235  ·  view source on GitHub ↗
(item: tuple[str, LazyTensor])

Source from the content-addressed store, hash-verified

1230
1231 @staticmethod
1232 def do_item(item: tuple[str, LazyTensor]) -> tuple[DataType, NDArray]:
1233 name, lazy_tensor = item
1234 tensor = lazy_tensor.load().to_ggml()
1235 return (lazy_tensor.data_type, tensor.ndarray, tensor.i2_scale)
1236
1237 @staticmethod
1238 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