Robust Parameter-Efficient LLM Adaptation on Analog Hardware
Organizations: Cornell University
Abstract
Analog in-memory computing is a promising platform for on-device execution of large language models because it performs matrix--vector multiplications (MVMs) in memory and in parallel, reducing data movement. However, limited digital-to-analog converter precision, input noise, and finite conductance states can degrade model accuracy, while full-model retraining to address these effects can be costly. We develop an optimizer-agnostic, parameter-efficient adaptation method based on Low-Rank Adaptation (LoRA), keeping the pretrained weights stored on analog arrays fixed while training the LoRA weights to adapt to downstream tasks and hardware non-idealities. Reliable adaptation requires handling errors in both forward and backward MVMs and physical weight updates. We use input reshaping to reduce input-induced MVM errors and update accumulation to retain small updates before programming them to finite-state analog devices. Across Llama-3.2-1B-Instruct and Llama-3-8B with both Muon and AdamW, input reshaping improves analog LoRA fine-tuning under noisy MVM computation. Update accumulation separately preserves sub-threshold updates and substantially improves adaptation under finite-resolution programming, including configurations with as few as 20 conductance states. Additional experiments show consistent held-out negative log-likelihood improvements across noisy analog settings.
Figures & tables
| Model | I/O | Optimizer | No reshaping + UA | Reshaping + UA | Reshaping w/o UA |
| Llama-3-8B | Perfect | Muon | 46.84 / 37.89 | 47.84 / 39.26 | 35.51 / 26.17 |
| Llama-3-8B | Perfect | AdamW | 48.50 / 40.63 | 48.36 / 40.43 | 35.51 / 26.17 |
| Llama-3-8B | 7/0.02 | Muon | 24.49 / 18.36 | 43.55 / 35.35 | 28.73 / 19.92 |
| Llama-3-8B | 7/0.02 | AdamW | 31.51 / 24.22 | 43.86 / 35.94 | 30.32 / 20.90 |
| Llama-3.2-1B | Perfect | Muon | 30.88 / 23.24 | 30.10 / 24.22 | 10.61 / 0.00 |
| Llama-3.2-1B | Perfect | AdamW | 28.19 / 21.09 | 29.34 / 21.88 | 10.61 / 0.00 |
| I/O setting | Muon [NLL ] | AdamW [NLL ] | |||
| No reshaping | Reshaping | No reshaping | Reshaping | ||
| – | Digital | 0.6823 0.0003 | – | 0.7235 0.0001 | – |
| 100 | Perfect | 0.7121 0.0006 | – | 0.7548 0.0013 | – |
| 20 | Perfect | 0.7896 0.0025 | – | 0.8727 0.0000 | – |
| 100 | 4/0.02 | 0.7356 0.0009 | 0.7209 0.0001 | 0.7852 0.0005 | 0.7649 0.0007 |
| 100 | 6/0.01 | 0.7154 0.0004 | 0.7104 0.0002 | 0.7569 0.0007 | 0.7521 0.0005 |
| Setting | Optimizer | No reshaping | Eval-only reshaping | Train+eval reshaping |
| No adaptation | – | – | ||
| Adaptation | AdamW | |||
| Muon |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | I/O | Optimizer | Validation NLL | ||
| No reshaping + UA | Reshaping + UA | Reshaping w/o UA | |||
| Llama-3-8B | Perfect | Muon | 1.8349 | 1.8250 | – |
| Llama-3-8B | Perfect | AdamW | 1.8728 | 1.8650 | – |
| Llama-3-8B | 7/0.02 | Muon | 2.3346 | 1.9617 | 4.5610 |
| Llama-3-8B | 7/0.02 | AdamW | 2.5149 | 2.1374 | 4.4824 |
| Llama-3.2-1B | 7/0.02 | Muon | 3.0193 | 2.9235 | 6.7572 |
| Muon | AdamW | |||||
| Configuration | F1 | EM | NLL | F1 | EM | NLL |
| No reshaping + UA | 18.45 | 12.70 | 3.1689 | 26.89 | 20.31 | 3.0256 |
| Reshaping + UA | 39.96 | 31.84 | 2.3762 | 39.41 | 31.84 | 2.1780 |
| Reshaping w/o UA | 31.08 | 21.29 | 4.4745 | 30.26 | 20.70 | 4.5044 |
| I/O setting | Muon [NLL ] | AdamW [NLL ] | |||
| No reshaping | Reshaping | No reshaping | Reshaping | ||
| Perfect | 0.6841 0.0024 | – | 0.7001 0.0008 | – | |
| 100 | Perfect | 0.7164 0.0012 | – | 0.7373 0.0014 | – |
| 100 | 4/0.01 | 0.7355 0.0021 | 0.7239 0.0015 | 0.7564 0.0025 | 0.7429 0.0024 |
| 100 | 6/0.02 | 0.7302 0.0021 | 0.7211 0.0019 | 0.7488 0.0024 | 0.7419 0.0023 |
| 6/0.02 | 0.7048 0.0015 | 0.6941 0.0001 | 0.7151 0.0023 | 0.7070 0.0039 | |
| I/O | Muon | AdamW | |||
| No reshaping + UA | Reshaping + UA | No reshaping + UA | Reshaping + UA | ||
| Perfect | 51.58 1.4 / 44.33 1.4 | – | 51.84 0.7 / 44.53 1.1 | – | |
| 100 | Perfect | 50.67 1.2 / 43.69 0.5 | – | 49.95 0.9 / 42.64 0.6 | – |
| 100 | 7/0.02 | 46.84 1.3 / 39.45 1.3 | 50.81 0.3 / 43.49 0.8 | 45.00 0.4 / 38.35 0.9 | 49.06 0.2 / 41.73 0.5 |
| 100 | 6/0.01 | 49.76 1.6 / 42.06 1.4 | 50.72 0.2 / 43.29 0.2 | 48.42 0.5 / 41.60 0.6 | 48.85 0.8 / 41.15 0.2 |
| I/O | Muon | AdamW | |||
| No reshaping + UA | Reshaping + UA | No reshaping + UA | Reshaping + UA | ||
| 20 | Perfect | 49.01 / 42.38 | – | 50.00 / 43.16 | – |
| 20 | 7/0.02 | 40.42 / 33.40 | 48.08 / 41.41 | 45.85 / 38.09 | 49.64 / 42.19 |
| 20 | 6/0.01 | 47.54 / 41.21 | 48.77 / 41.80 | 48.20 / 40.62 | 47.95 / 41.02 |
| BR Off, OS Off | BR On, OS Off | BR On, OS On |
| 24.49 (18.36) | 42.01 (33.79) | 43.55 (35.35) |