View source on GitHub
|
Ternary quantization config.
Inherits From: QuantizationConfig
tf.keras.quantizers.TernaryQuantizationConfig()
Quantizes weights to {-1, 0, +1} (BitNet b1.58) and stores them at the
information-theoretic floor of log2(3) ~= 1.58 bits/value by packing five
trits per byte. The quantization rule (threshold and scale) is owned by the
layer, so this config takes no quantizer arguments.
Attributes | |
|---|---|
mode
|
|
Methods
activation_quantizer_or_default
@staticmethodactivation_quantizer_or_default( config, default )
from_config
@classmethodfrom_config( config )
get_config
get_config()
weight_quantizer_or_default
@staticmethodweight_quantizer_or_default( config, default )
View source on GitHub