PACT: NVFP4 Data-Flow LoRA Fine-Tuning on Consumer GPUs
Organizations: University of Southern California
Abstract
Fine-tuning language models on consumer GPUs is constrained by computation and memory. Although LoRA reduces trainable parameters and optimizer state, frozen projections remain expensive, and activations retained for backward can dominate memory usage. We present PACT, a LoRA fine-tuning system that accelerates frozen projections with native NVFP4 GEMMs while reducing quantization and dequantization overhead and limiting quantization error. To reduce activation memory, PACT reuses quantized RMSNorm outputs and saves gate/up activations in NVFP4 for backward. To limit numerical error, it preserves BF16 inputs for forward nonlinear operations and calibrates frozen weights offline using GPTQ adapted to NVFP4 scales and quantized activations. Fused nonlinear kernels and cached forward and backward weight layouts reduce quantization and dequantization overhead. Evaluations across multiple models and tasks on a 16,GB RTX~5080 show lower memory usage and faster LoRA fine-tuning with competitive accuracy, enabling model adaptation on resource-constrained consumer hardware.
Figures & tables
| Layer | BF16 | NVFP4 | Speedup | |
|---|---|---|---|---|
| query | 0.690 ms | 0.113 ms | ||
| gate/up | 1.778 ms | 0.304 ms | ||
| down | 1.818 ms | 0.267 ms |
| Model | Method | SST-2 | RTE | BoolQ | WSC | WiC | COPA | WinoG. | ARC-E | ARC-C | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama-1B | Zero-shot | .589 | .520 | .584 | .365 | .500 | .730 | .575 | .472 | .313 | .516 |
| BF16 LoRA | .946 | .816 | .811 | .635 | .705 | .777 | .645 | .755 | .475 | .729 | |
| QLoRA | .944 | .786 | .817 | .635 | .705 | .767 | .622 | .728 | .433 | .715 | |
| TE | .932 | .785 | .802 | .571 | .657 | .793 | .602 | .698 | .372 | .690 | |
| PACT | .940 | .823 | .790 | .551 | .665 | .777 | .612 | .729 | .444 | .703 | |
| Llama-3B | Zero-shot | .589 | .473 | .680 | .413 | .500 | .780 | .661 | .803 | .667 | .618 |
| Model | Method | SQuAD | GSM8K | SAMSum |
|---|---|---|---|---|
| F1 | EM | R-L | ||
| Llama-1B | BF16 LoRA | .806 | .170 | .418 |
| QLoRA | .793 | .161 | .413 | |
| TE | .761 | .131 | .405 | |
| PACT | .782 | .148 | .408 | |
| Llama-3B | BF16 LoRA | .837 | .393 | .444 |
| Qwen2.5-VL-3B / ScienceQA | Before | After |
|---|---|---|
| BF16 LoRA | .779 | .936 |
| PACT, text calibration | .754 | .876 |
| PACT, image-prompt calibration | .762 | .917 |
| Model | Method | Tested batch | Tokens/s |
|---|---|---|---|
| Llama-1B | BF16 LoRA | 10 | 17,162 |
| QLoRA | 12 | 16,800 | |
| TE | 12 | 27,113 | |
| PACT | 26 | 31,723 | |
| Llama-3B | BF16 LoRA | 2 | 6,217 |
| QLoRA | 4 | 6,454 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Property | MXFP4 | NVFP4 |
|---|---|---|
| Block size | 32 | 16 |
| Element format | E2M1 | E2M1 |
| Block-scale format | E8M0 | E4M3 |
| Bits per element | 4.25 | 4.50 |
| Component | Forward computation | State retained for backward | Backward computation |
|---|---|---|---|
| Frozen projections | NVFP4 GEMMs with FP32 accumulation and BF16 output | Cached forward and backward NVFP4 weight layouts | NVFP4 input-gradient GEMMs |
| RMSNorm | BF16 input and FP32 normalization | NVFP4 output and FP32 per-token normalization statistic | FP32 reconstruction and reduction, BF16 gradient |
| SiLU-multiply | BF16 gate/up inputs and FP32 arithmetic | Separate NVFP4 gate/up copies | FP32 reconstruction and derivatives, BF16 gradients |
| Attention and RoPE | BF16 tensors | Standard attention backward state | Standard attention backward path |
| LoRA branch | BF16 GEMMs on reconstructed inputs | Shared NVFP4 input and BF16 adapter parameters | BF16 adapter gradients and input gradients |
| Residuals | BF16 addition | As required by the surrounding operators | BF16 gradient accumulation |
| Task | Input structure | Target |
|---|---|---|
| SST-2 | Sentence followed by “It was” | terrible / great |
| RTE | Premise and a question asking whether the hypothesis is true | Yes / No |
| BoolQ | Passage followed by the question | Yes / No |
| WSC | Text and a question about the pronoun’s referent | Yes / No |
| WiC | Word, two sentences, and a question about shared meaning | Yes / No |
| COPA | Premise followed by “because” or “so” | Candidate continuation |
| Llama-1B | Step (ms) | Peak (GB) |
|---|---|---|
| BF16 LoRA | 240 | 7.06 |
| BF16 + checkpointing | 310 | 3.14 |
| PACT | 125 | 3.72 |
| PACT + checkpointing | 159 | 2.27 |
| Shape | HyC-LoRA setting | MiB | ms |
|---|---|---|---|
| Own baseline | 9,706 | 194 | |
| 2-bit compression | 6,112 | 219 | |
| 4-bit compression | 6,341 | n/a | |
| Own baseline | OOM | n/a | |
| 2-bit compression | 9,627 | 425 | |
| 4-bit compression | 10,088 | n/a |
| CUDA-time category (ms) | BF16 LoRA | PACT |
|---|---|---|
| BF16 GEMMs | 202.7 | 48.9 |
| NVFP4 GEMMs | 0 | 25.6 |
| Quantization / fused kernels | 0 | 17.1 |
| Attention | 12.9 | 12.7 |
| Elementwise / other | 21.5 | 21.8 |
| Reported profile total | 239.4 | 130.1 |
Memory-Efficient Fine-Tuning
Memory-efficient fine-tuning reduces the GPU, device, and communication resources needed to adapt large models while preserving task performance.
See all 60 papers