Scale-QLoRA: Code-Invariant Adapter Merging for Native 4-bit Microscaling LLMs
Abstract
Merging a LoRA adapter into its base model is standard deployment practice: it removes the runtime adapter's per-forward overhead and leaves a single standalone checkpoint any serving stack can load. On a native 4-bit microscaling checkpoint (NVFP4, MXFP4) that step stops being free. The merged weights must be written back through a quantizer, which re-derives the checkpoint's discrete E2M1 code plane (roughly 90% of the artifact's bytes), so the deployed artifact becomes coupled to one quantization convention, and every later code-touching event in its lifecycle can move it. Done naively the step is worse than fragile: it deletes the adaptation, by up to 39 pp, because against an already-on-grid base the reconstruction optimum is that base. Scale-QLoRA instead adapts only the native per-block scale field, trains those scales on the deployment grid, and freezes every E2M1 code. Within a fixed native format, scale grid, block layout and code plane, merging is then a bit-exact identity and the merged artifact is code-invariant. Across four models and four tasks, Scale-QLoRA and merge-aware QAT-LoRA are both accuracy-lossless, so we claim no accuracy ordering between them; they differ structurally, in that QAT-LoRA re-derives the code plane through a quantizer while Scale-QLoRA preserves it exactly. That difference is what the lifecycle prices: nearest-rounding implementations disagree by about a point on the measured task, and more extreme rule mismatches can drive the weight-space artifact to ~0%, which we report as a sensitivity bound rather than a deployment frequency. Preserving the code plane also drops the weight-space straight-through estimator from training (3.9x per step on the dense 8B model) and enables exact rollback, code-plane deduplication, and a ~125x faster scale-only task swap.
Figures & tables
| Model / grid | Dataset | Base | Scale-QLoRA | QAT-LoRA (merge-aware) | RTN-merge (naive) |
|---|---|---|---|---|---|
| Llama-3.1-8B NVFP4 | banking77 | 49.2 | 93.7 / 0.00 | 93.0 / | 55.6 / |
| agnews | 76.3 | 94.3 / 0.00 | 94.1 / 0.00 | 80.4 / | |
| clinc150 | 60.1 | 97.6 / | 97.7 / | 68.4 / | |
| spider | 62.4 | 69.2 / 0.00 | 71.3 / | 60.7 / | |
| Qwen3-30B-A3B NVFP4 (MoE) | banking77 | 69.6 | 93.9 / 0.00 | 93.2 / 0.00 | 69.5 / |
| agnews | 80.8 | 93.4 / 0.00 | 93.1 / 0.00 | 82.8 / |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Merge wall | Peak GPU | Transient | E2M1 codes changed |
|---|---|---|---|---|
| llama-8B scale / QAT-LoRA | 0.13 s / 2.33 s | 19 / 59 GB | 1.7 / 30.5 GB | 0% / 100% repacked |
| qwen-30B scale / QAT-LoRA | 0.20 s / 5.83 s | 66.7 / 67.6 GB | 0.56 / 8.1 GB | 0% / 100% repacked |
| Grid | Cell | Headroom | RTN | MSE | AWQ | GPTQ |
|---|---|---|---|---|---|---|
| NVFP4 (E4M3) | Llama Banking77 | 43.8 | 15% | 13% | 13% | 94% |
| Llama AGNews | 17.4 | 24% | 24% | 24% | 91% | |
| Llama CLINC150 | 37.5 | 22% | 20% | 19% | 98% | |
| Qwen Banking77 | 23.1 | % | 0% | 2% | 96% | |
| Qwen AGNews | 13.1 | 15% | 14% | 17% | 98% | |
| Qwen CLINC150 | 16.5 | 15% | 15% | 20% | 98% |
| Dataset | Scale-QLoRA | QLoRA | |
|---|---|---|---|
| r58 | r32 | scale qlora | |
| banking77 | 93.72 (0.0) | 92.99 ( ) | |
| agnews | 94.26 (0.0) | 94.08 (0.0) | |
| clinc150 | 97.59 ( ) | 97.66 ( ) | |
| spider | 69.15 (0.0) | 71.28 ( ) | |
| mean | 88.68 | 89.00 |
| Method | Unmerged | Merged | Merge loss |
|---|---|---|---|
| QLoRA, naive merge | 93.6 | 54.5 | |
| Scale-QLoRA without QAST | 93.2 | 65.6 | |
| Scale-QLoRA | 93.1 | 93.1 | 0.0 |
| Method | ms/step | tok/s | Peak alloc GB | vs. no-STE |
|---|---|---|---|---|
| Dense: Llama-8B NVFP4 (100 steps/rep, no grad-checkpointing) | ||||
| scale r58 (QAST e4m3) | 356.6 | 5742 | 49.3 | ms |
| QAT-LoRA r32 (merge-aware STE) | 1400.8 | 1462 | 57.7 | ms |
| RTN-merge r32 (no STE) | 308.0 | 6648 | 56.6 | — |
| MoE: Qwen3-30B-A3B NVFP4 (40 steps/rep, grad-checkpointing on) | ||||
| scale r54 (QAST e4m3) | 3958 | 517 | 73.6 | ms |
| Option | Store | Decode | Wt mem | Acc | Accuracy- | Bit-exact | Merge quant. |
|---|---|---|---|---|---|---|---|
| GiB | tok/s | GiB | lossless? | merge? | indep.? | ||
| 1. Unmerged (4-bit base fp16 LoRA) | 5.77 | latency | 5.81 | 92.4 | n/a | n/a | yes |
| 2. QLoRA dequant fp16 merge | 14.96 | 4057 | 14.99 | 95.0 | yes | yes, dequant. | cond. |
| 3. QLoRA re-quant 4-bit (QAT-LoRA) | 5.61 | 3769 | 5.65 | 93.6 | yes † | no | cond. |
| 4. Scale-QLoRA merge (ours) | 5.61 | 4081 | 5.65 | 94.8 | yes | yes | yes |
| State | MMLU | ARC-C | HellaSwag | TruthfulQA-mc2 | GSM8K |
|---|---|---|---|---|---|
| base | 65.91 | 53.07 | 78.79 | 52.29 | 73.39 |
| Scale-QLoRA banking77 | 64.87 ( ) | 54.35 ( ) | 78.14 ( ) | 51.98 ( ) | 71.72 ( ) |
| Scale-QLoRA clinc150 | 65.82 ( ) | 57.42 ( ) | 78.99 ( ) | 50.01 ( ) | 72.55 ( ) |
| QAT-LoRA banking77 | 65.40 ( ) | 53.84 ( ) | 78.38 ( ) | 52.67 ( ) | 72.10 ( ) |
| QAT-LoRA clinc150 | 65.13 ( ) | 54.95 ( ) | 78.83 ( ) | 52.83 ( ) | 71.87 ( ) |
| Model | Method | CE | merge |
|---|---|---|---|
| Llama-8B | Scale-QLoRA r58 | ||
| QAT-LoRA r32 | |||
| RTN-merge r32 | |||
| Qwen3-30B MoE | Scale-QLoRA r54 | ||
| QAT-LoRA r32 | |||
| RTN-merge r32 |
| projected onto | Energy % | Gain rec. % |
|---|---|---|
| PEQA (per-row) | 0.03/0.02 | / |
| Scale-QLoRA (per-block) | 6.25/6.26 | 18.9/38.8 |
| independent training (pilot) | — |
| Model | Dataset | PEQA ( ) | PEQA-block | |||
|---|---|---|---|---|---|---|
| Llama-8B | Banking77 | 87.25 | 78.25 | 81.5 | 84.5 | 69.75 |
| CLINC150 | 91.75 | 95.75 | 95.25 | 87.75 | 85.25 | |
| AGNews | 89.75 | 89.5 | 91.25 | 89.75 | 88.5 | |
| Spider | 64.0 | 66.0 | 64.5 | 65.0 | 64.5 | |
| Qwen3-30B | Banking77 | 89.75 | 86.75 | 89.75 | 81.5 | 78.0 |
| CLINC150 | 92.75 | 90.75 | 89.5 | 89.5 | 89.5 |
| Dataset | PEQA | Scale-best | QLoRA-best | Gap | Scale gain | Frac of gap | PEQA-block PEQA |
|---|---|---|---|---|---|---|---|
| CLINC150 | 91.75 | 95.5 | 95.0 | 1.15 | |||
| Spider | 64.0 | 73.75 | 72.0 | 1.22 | |||
| Banking77 | 87.25 | 87.0 | 84.0 | PEQA QLoRA | |||
| AGNews | 89.75 | 88.75 | 89.75 | saturated |
| Training grid | Merge grid | Unmerged | Merged | Merge loss | Verdict |
|---|---|---|---|---|---|
| no-QAST (continuous) | fp16 (ref) | 93.4 | 93.2 | lossless ref | |
| no-QAST (continuous) | e4m3 | 93.4 | 74.6 | lossy (PTQ round) | |
| QAST-e4m3 | e4m3 | 92.8 | 92.8 | 0.0 | lossless (matched) |
| QAST-e8m0 | e8m0 | 86.4 | 86.4 | 0.0 | lossless (matched) |
| QAST-e4m3 | e8m0 (mismatch) | 92.2 | 79.2 | NOT lossless (cross-grid) |
| Tuning | banking77 | clinc150 |
|---|---|---|
| (weak base) | (base 76) | |
| fixed LR | 82.0 | 70.6 |
| fixed LR | 92.4 | 18.6 (collapse) |
| early-stop val | 89.6 | 76.0 |
| tanh-clamp | 52.8 | 72.2 |
| Task | bf16 zero-shot | bf16 LoRA FT (upper bound) | Quantized Scale+QAST (deployable) |
|---|---|---|---|
| banking77 | 60.0 | 90.6 | 91.3 3-seed mean |
| agnews | 79.0 | 90.8 | 90.4 3-seed mean |
| clinc150 | 76.0 | 76.0 | 70.6–76.0 over LR recipes |
| spider (SQL) | 66.0 | 67.2 | 63.0–67.0 over rank r58/r32 |
| Model | Dataset | Base | RTN | MSE | AWQ | GPTQ |
|---|---|---|---|---|---|---|
| Llama-8B NVFP4 | banking77 | 49.2 | ||||
| agnews | 76.3 | |||||
| clinc150 | 60.1 | |||||
| spider | 62.4 | |||||
| Qwen3-30B NVFP4 (MoE) | banking77 | 69.6 | ||||
| agnews | 80.8 |