TurboQuantPolar

data class TurboQuantPolar(val bitsPerElement: Int = 4, val blockSize: Int = 128) : TensorEncoding(source)

TurboQuant PolarOnly encoding: rotation + scalar quantization + bit-packing.

Backend-friendly variant that omits the QJL residual stage. Configurable bits per element (2, 3, 4, or 8).

Block layout: scales(numGroups * 2B) codes(packed bits)

Parameters

bitsPerElement

Number of bits per quantized code (2, 3, 4, or 8)

blockSize

Number of elements per block (must be power of 2, typically 64 or 128)

Constructors

Link copied to clipboard
constructor(bitsPerElement: Int = 4, blockSize: Int = 128)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val name: String

Human-readable name for diagnostics and memory reports.

Link copied to clipboard

Number of quantization groups per block (each group has its own scale).

Functions

Link copied to clipboard
open override fun physicalBytes(elementCount: Long): Long

Physical bytes required to store elementCount logical elements in this encoding, or null if the encoding is opaque/variable.