Linear Transformers with Learnable Kernel Functions are Better In-Context Models

Yaroslav Aksenov, Nikita Balagansky, Sofia Maria Lo Cicero Vaina, Boris Shaposhnikov, Alexey Gorbatovski +1 more
2/16/2024
cs.LGcs.CL

No official code found. Best implementation: fla-org/flash-linear-attention (5,257 stars, MIT, last commit 2026-04-29). 2 more below.

Abstract

Advancing the frontier of subquadratic architectures for Language Models (LMs) is crucial in the rapidly evolving field of natural language processing. Current innovations, including State Space Models, were initially celebrated for surpassing Transformer performance on language modeling tasks. However, these models have revealed deficiencies in essential In-Context Learning capabilities - a domain where the Transformer traditionally shines. The Based model emerged as a hybrid solution, blending a Linear Transformer with a kernel inspired by the Taylor expansion of exponential functions, augmented by convolutional networks. Mirroring the Transformer's in-context adeptness, it became a strong contender in the field. In our work, we present a singular, elegant alteration to the Based kernel that amplifies its In-Context Learning abilities evaluated with the Multi-Query Associative Recall task and overall language modeling process, as demonstrated on the Pile dataset.

View on arXivView PDF

Code Implementations(3)

MIT

🚀 Efficient implementations for emerging model architectures

5,257563Shell, PythonDec 20, 20235 months agoMIT
large-language-modelsmachine-learning-systemsnatural-language-processingsequence-modeling
corl-team/rebasedCommunity100%
PyTorchApache-2.0

Official implementation of the paper "Linear Transformers with Learnable Kernel Functions are Better In-Context Models"

1683C++, CudaFeb 16, 20241 years agoApache-2.0
acl2024in-context-learningnlppytorchtransformer
MIT

Reviewed the paper "Linear Transformers with Learnable Kernel Functions are Better In-Context Models" as a part of Introduction to Deep Learning Internals Course, IITG

00Sep 30, 20251 years agoMIT

Similar Papers

Cite this paper

@article{aksenov2024linear,
  title  = {Linear Transformers with Learnable Kernel Functions are Better In-Context Models},
  author = {Yaroslav Aksenov and Nikita Balagansky and Sofia Maria Lo Cicero Vaina and Boris Shaposhnikov and Alexey Gorbatovski and Daniil Gavrilov},
  year   = {2024},
  eprint = {2402.10644},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.10644v2}
}

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/2402.10644.svg)](https://codeofpaper.com/paper/2402.10644)

Discussion