(self, data_type: DataType)
| 786 | self.i2_scale = i2_scale |
| 787 | |
| 788 | def astype(self, data_type: DataType) -> UnquantizedTensor: |
| 789 | dtype = data_type.dtype |
| 790 | if self.data_type == DT_BF16: |
| 791 | self.ndarray = bf16_to_fp32(self.ndarray) |
| 792 | if dtype == np.uint8: |
| 793 | self.ndarray, self.i2_scale = transform_to_i2(self.ndarray) |
| 794 | return UnquantizedTensor(self.ndarray.astype(dtype), self.i2_scale) |
| 795 | |
| 796 | def to_ggml(self) -> Self: |
| 797 | return self |
nothing calls this directly
no test coverage detected