Skip to main content

Module config

Module config 

Source
Expand description

Quantization configuration, algebraic modes, and bit-budget calculation.

Structs§

BitBudget
Resolved bit-budget and rank geometry for a single quantized linear layer.
LayerShape
Linear layer dimension specification (in_features, out_features, bias).
LittleBitConfig
Quantization configuration matching upstream littlebit_config.json.
LittleBitConfigOverrides
Optional CLI or API overrides applied with highest priority over config files.

Enums§

BiasMode
Whether a linear layer includes a bias vector.
CastPolicy
Serialization policy for checkpoint float tensors when saving.
InferenceMode
Runtime weight representation when loading quantized checkpoints for inference.
InitMode
Weight initialization mode when constructing crate::LittleBitLinear.
ItqMode
LittleBit-2 Joint Iterative Quantization (Joint-ITQ) rotation configuration.
QuantFunc
Binarization function and straight-through gradient estimator.
ResidualMode
Residual factorization mode for a crate::LittleBitLinear layer.
TrainMode
Whether parameters inside a quantized layer hold autograd variables or frozen tensors.
WeightState
Whether factor weights U, V in a loaded LittleBitLinear are already binarized.

Constants§

SMOOTH_SIGN_DEFAULT_ALPHA
Default sharpness hyperparameter alpha for QuantFunc::SmoothSign.

Functions§

compute_eff_bits
Compute actual effective bits per weight for a layer geometry.
estimate_split_dim
Estimate the floating-point latent rank split_dim needed to match eff_bit_target.
finalize_split_dim
Round split_float (or split_default) down to a multiple of 8 with a minimum floor.
parse_eff_bit_layers
Parse a per-block effective-bit specification such as "0-7,27:2.0;12:1.5".