Linear-Time and Constant-Memory Text Embeddings Based on Recurrent Language Models

Tobias Grantner, Emanuel Sallinger, Martin Flechl


Abstract
Transformer-based embedding models suffer from quadratic computational and linear memory complexity, limiting their utility for long sequences. We propose recurrent architectures as an efficient alternative, introducing a vertically chunked inference strategy that enables fast embedding generation with memory usage that becomes constant in the input length once it exceeds the vertical chunk size. By fine-tuning Mamba2 models, we demonstrate their viability as general-purpose text embedders, achieving competitive performance across a range of benchmarks while maintaining a substantially smaller memory footprint compared to transformer-based counterparts. We empirically validate the applicability of our inference strategy to Mamba2, RWKV, and xLSTM models, confirming consistent runtime-memory trade-offs across architectures and establishing recurrent models as a compelling alternative to transformers for efficient embedding generation.
Anthology ID:
2026.acl-long.1923
Volume:
Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
41459–41481
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.acl-long.1923/
DOI:
Bibkey:
Cite (ACL):
Tobias Grantner, Emanuel Sallinger, and Martin Flechl. 2026. Linear-Time and Constant-Memory Text Embeddings Based on Recurrent Language Models. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 41459–41481, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
Linear-Time and Constant-Memory Text Embeddings Based on Recurrent Language Models (Grantner et al., ACL 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.acl-long.1923.pdf
Checklist:
 2026.acl-long.1923.checklist.pdf