easydel.layers.quantization.linear_8bit#

class easydel.layers.quantization.linear_8bit.Linear8bit(*args: Any, **kwargs: Any)[source]#

Bases: QauntModule

An 8-bit quantized version of the linear transformation applied over the last dimension of the input.

Uses eformer’s Array8B implicit array for efficient 8-bit quantization.

classmethod from_linear(linear: Linear, rngs: flax.nnx.rnglib.Rngs | None = None, **kwargs) Linear8bit[source]#

Create a Linear8bit module from a regular Linear module.

get_kernel()[source]#

Get the dequantized kernel weights.

get_quantized_kernel()[source]#

Get the quantized kernel weights and scales.

static metadata()[source]#
static quantization_mapping()[source]#
to_linear(rngs: flax.nnx.rnglib.Rngs | None = None) Linear[source]#

Convert this Linear8bit module back to a regular Linear module.