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

Method __init__

utils/convert-ms-to-gguf-bitnet.py:782–786  ·  view source on GitHub ↗
(self, ndarray: NDArray, i2_scale: NDArray = None)

Source from the content-addressed store, hash-verified

780
781class UnquantizedTensor(Tensor):
782 def __init__(self, ndarray: NDArray, i2_scale: NDArray = None):
783 assert isinstance(ndarray, np.ndarray)
784 self.ndarray = ndarray
785 self.data_type = NUMPY_TYPE_TO_DATA_TYPE[ndarray.dtype]
786 self.i2_scale = i2_scale
787
788 def astype(self, data_type: DataType) -> UnquantizedTensor:
789 dtype = data_type.dtype

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected