Publication date: 24th July 2026
Electrochemical random-access memory (ECRAM) is a promising synaptic device for analog in-memory computing because its conductance can be gradually modulated through ionic motion. While ECRAM linearity and symmetry are often evaluated using small neural-network benchmarks, it remains unclear how experimentally measured ECRAM switching behavior affects pretrained language-model fine-tuning, where update errors can accumulate across many transformer layers.
Here, we develop an ECRAM switching-curve-aware analog fine-tuning framework for pretrained language models. A pretrained EleutherAI Pythia-70M [1] causal language model is fine-tuned on WikiText-2 after converting its linear layers into AIHWKIT [2] analog layers. Measured ECRAM potentiation/depression curves are incorporated into the analog optimizer through a PiecewiseStepDevice model, allowing weight updates to follow the device response. Inspired by Analog Foundation Models [3], we further examine knowledge distillation from a digital teacher, iterative weight clipping, and input/output quantization as stabilization and calibration components.
A pilot sweep over ECRAM curve representations, distillation weights, SI/O quantization settings, and clipping conditions showed that all 48 non-quantized forward-path runs remained stable, whereas uncalibrated SI/O quantized settings produced high-perplexity behavior. Among stable conditions, interpolated ECRAM curves improved perplexity over the original sparse switching curve. In full WikiText-2 fine-tuning, the best condition, using the 5000-state interpolated ECRAM curve with distillation weight 0.2 and no clipping, achieved a perplexity of 75.79.
These results show that measured ECRAM update behavior can be integrated into analog-aware language-model fine-tuning, while clarifying the need for device-specific SI/O calibration. The framework can be extended to larger pretrained models, such as Pythia-160M and Pythia-410M, toward robust in-situ fine-tuning on ECRAM-based analog synaptic arrays.
