The frozen base model is stored in 4-bit NormalFloat (NF4), a data type designed for normally distributed weights; LoRA adapters train in higher precision (BF16).
Double quantization quantizes the quantization constants themselves, saving additional memory.
Paged optimizers use unified memory to absorb memory spikes (for example from long sequences) and avoid out-of-memory crashes.
During the forward and backward pass, weights are dequantized on the fly to compute in BF16; gradients flow only into the adapters.
Loading…