Memory-based Language Models: An Efficient, Explainable, and Eco-friendly Approach to Large Language Modeling

Antal van den Bosch, Ainhoa Risco Patón, Teun Buijse, Peter Berck, Maarten van Gompel
10/25/2025
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

We present memory-based language modeling as an efficient, eco-friendly alternative to deep neural network-based language modeling. It offers log-linearly scalable next-token prediction performance and strong memorization capabilities. Implementing fast approximations of k-nearest neighbor classification, memory-based language modeling leaves a relatively small ecological footprint both in training and in inference mode, as it relies fully on CPUs and attains low token latencies. Its internal workings are simple and fully transparent. We compare our implementation of memory-based language modeling, OLIFANT, with GPT-2 and GPT-Neo on next-token prediction accuracy, estimated emissions and speeds, and offer some deeper analyses of the model.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bosch2025memorybased,
  title  = {Memory-based Language Models: An Efficient, Explainable, and Eco-friendly Approach to Large Language Modeling},
  author = {Antal van den Bosch and Ainhoa Risco Patón and Teun Buijse and Peter Berck and Maarten van Gompel},
  year   = {2025},
  eprint = {2510.22317},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.22317v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.22317.svg)](https://codeofpaper.com/paper/2510.22317)

Discussion