Analog in-memory computing attention mechanism for fast and energy-efficient large language models. Leroux, N., Manea, P., Sudarshan, C., Finkbeiner, J., Siegel, S., Strachan, J. P., & Neftci, E. Nature Computational Science, 5(9):813–824, Nature Publishing Group, September, 2025.
Paper doi abstract bibtex Transformer networks, driven by self-attention, are central to large language models. In generative transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, graphics processing unit (GPU)-stored projections must be loaded into static random-access memory for each new generation step, causing latency and energy bottlenecks. Here we present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain-cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models. To circumvent this problem, we design an initialization algorithm achieving text-processing performance comparable to GPT-2 without training from scratch. Our architecture reduces attention latency and energy consumption by up to two and four orders of magnitude, respectively, compared with GPUs, marking a substantial step toward ultrafast, low-power generative transformers.
@article{lerouxAnalogInmemoryComputing2025,
title = {Analog in-memory computing attention mechanism for fast and energy-efficient large language models},
volume = {5},
copyright = {2025 The Author(s)},
issn = {2662-8457},
url = {https://www.nature.com/articles/s43588-025-00854-1},
doi = {10.1038/s43588-025-00854-1},
abstract = {Transformer networks, driven by self-attention, are central to large language models. In generative transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, graphics processing unit (GPU)-stored projections must be loaded into static random-access memory for each new generation step, causing latency and energy bottlenecks. Here we present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain-cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models. To circumvent this problem, we design an initialization algorithm achieving text-processing performance comparable to GPT-2 without training from scratch. Our architecture reduces attention latency and energy consumption by up to two and four orders of magnitude, respectively, compared with GPUs, marking a substantial step toward ultrafast, low-power generative transformers.},
language = {en},
number = {9},
urldate = {2026-01-12},
journal = {Nature Computational Science},
publisher = {Nature Publishing Group},
author = {Leroux, Nathan and Manea, Paul-Philipp and Sudarshan, Chirag and Finkbeiner, Jan and Siegel, Sebastian and Strachan, John Paul and Neftci, Emre},
month = sep,
year = {2025},
keywords = {Computational science, Electrical and electronic engineering},
pages = {813--824},
}
Downloads: 0
{"_id":"43MpdFnt5TBKDL3we","bibbaseid":"leroux-manea-sudarshan-finkbeiner-siegel-strachan-neftci-analoginmemorycomputingattentionmechanismforfastandenergyefficientlargelanguagemodels-2025","author_short":["Leroux, N.","Manea, P.","Sudarshan, C.","Finkbeiner, J.","Siegel, S.","Strachan, J. P.","Neftci, E."],"bibdata":{"bibtype":"article","type":"article","title":"Analog in-memory computing attention mechanism for fast and energy-efficient large language models","volume":"5","copyright":"2025 The Author(s)","issn":"2662-8457","url":"https://www.nature.com/articles/s43588-025-00854-1","doi":"10.1038/s43588-025-00854-1","abstract":"Transformer networks, driven by self-attention, are central to large language models. In generative transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, graphics processing unit (GPU)-stored projections must be loaded into static random-access memory for each new generation step, causing latency and energy bottlenecks. Here we present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain-cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models. To circumvent this problem, we design an initialization algorithm achieving text-processing performance comparable to GPT-2 without training from scratch. Our architecture reduces attention latency and energy consumption by up to two and four orders of magnitude, respectively, compared with GPUs, marking a substantial step toward ultrafast, low-power generative transformers.","language":"en","number":"9","urldate":"2026-01-12","journal":"Nature Computational Science","publisher":"Nature Publishing Group","author":[{"propositions":[],"lastnames":["Leroux"],"firstnames":["Nathan"],"suffixes":[]},{"propositions":[],"lastnames":["Manea"],"firstnames":["Paul-Philipp"],"suffixes":[]},{"propositions":[],"lastnames":["Sudarshan"],"firstnames":["Chirag"],"suffixes":[]},{"propositions":[],"lastnames":["Finkbeiner"],"firstnames":["Jan"],"suffixes":[]},{"propositions":[],"lastnames":["Siegel"],"firstnames":["Sebastian"],"suffixes":[]},{"propositions":[],"lastnames":["Strachan"],"firstnames":["John","Paul"],"suffixes":[]},{"propositions":[],"lastnames":["Neftci"],"firstnames":["Emre"],"suffixes":[]}],"month":"September","year":"2025","keywords":"Computational science, Electrical and electronic engineering","pages":"813–824","bibtex":"@article{lerouxAnalogInmemoryComputing2025,\n\ttitle = {Analog in-memory computing attention mechanism for fast and energy-efficient large language models},\n\tvolume = {5},\n\tcopyright = {2025 The Author(s)},\n\tissn = {2662-8457},\n\turl = {https://www.nature.com/articles/s43588-025-00854-1},\n\tdoi = {10.1038/s43588-025-00854-1},\n\tabstract = {Transformer networks, driven by self-attention, are central to large language models. In generative transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, graphics processing unit (GPU)-stored projections must be loaded into static random-access memory for each new generation step, causing latency and energy bottlenecks. Here we present a custom self-attention in-memory computing architecture based on emerging charge-based memories called gain cells, which can be efficiently written to store new tokens during sequence generation and enable parallel analog dot-product computation required for self-attention. However, the analog gain-cell circuits introduce non-idealities and constraints preventing the direct mapping of pre-trained models. To circumvent this problem, we design an initialization algorithm achieving text-processing performance comparable to GPT-2 without training from scratch. Our architecture reduces attention latency and energy consumption by up to two and four orders of magnitude, respectively, compared with GPUs, marking a substantial step toward ultrafast, low-power generative transformers.},\n\tlanguage = {en},\n\tnumber = {9},\n\turldate = {2026-01-12},\n\tjournal = {Nature Computational Science},\n\tpublisher = {Nature Publishing Group},\n\tauthor = {Leroux, Nathan and Manea, Paul-Philipp and Sudarshan, Chirag and Finkbeiner, Jan and Siegel, Sebastian and Strachan, John Paul and Neftci, Emre},\n\tmonth = sep,\n\tyear = {2025},\n\tkeywords = {Computational science, Electrical and electronic engineering},\n\tpages = {813--824},\n}\n\n\n\n","author_short":["Leroux, N.","Manea, P.","Sudarshan, C.","Finkbeiner, J.","Siegel, S.","Strachan, J. P.","Neftci, E."],"key":"lerouxAnalogInmemoryComputing2025","id":"lerouxAnalogInmemoryComputing2025","bibbaseid":"leroux-manea-sudarshan-finkbeiner-siegel-strachan-neftci-analoginmemorycomputingattentionmechanismforfastandenergyefficientlargelanguagemodels-2025","role":"author","urls":{"Paper":"https://www.nature.com/articles/s43588-025-00854-1"},"keyword":["Computational science","Electrical and electronic engineering"],"metadata":{"authorlinks":{}},"downloads":0,"html":""},"bibtype":"article","biburl":"https://bibbase.org/zotero/saurabhr","dataSources":["nxjWwW7fWbb5tfpKz"],"keywords":["computational science","electrical and electronic engineering"],"search_terms":["analog","memory","computing","attention","mechanism","fast","energy","efficient","large","language","models","leroux","manea","sudarshan","finkbeiner","siegel","strachan","neftci"],"title":"Analog in-memory computing attention mechanism for fast and energy-efficient large language models","year":2025}