Companion

Functions

Link copied to clipboard
fun fromTernaryValues(shape: Shape, values: ByteArray, scale: Float = 1.0f): Ternary2BitTensorData

Create from explicit ternary values (-1, 0, or +1).

Link copied to clipboard

Create from a TQ2_0 formatted block. TQ2_0 block: 64 bytes data + 2 bytes f16 scale = 66 bytes total for 256 elements.

Link copied to clipboard

Create a new tensor with all zeros (ternary 0 encoded as 1).