# abertsch72/unlimiformer

Public repo for the NeurIPS 2023 paper "Unlimiformer: Long-Range Transformers with Unlimited Length Input"

Repository: https://github.com/abertsch72/unlimiformer
Canonical: https://ross.abutalabs.com/products/unlimiformer
Language: Python
License: MIT
License Family: permissive
Last push: 2024-03-07T22:05:38+00:00

## Health v2 (maintenance only)
Score: 30/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 87
- inputs: {"age_days": 1219, "days_push": 909, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1062, forks 78 (observed 2026-08-28T04:03:26.163128+00:00)

## What it is
Unlimiformer is a method and official implementation for augmenting pretrained encoder-decoder transformers with retrieval-based attention, enabling unlimited-length inputs without changing the mathematical definition of attention. It supports models like BART and Llama-2 for tasks such as long-document summarization and prompting with entire books.

## Use cases
- process unlimited length inputs with pretrained encoder-decoder transformers
- summarize entire books with Llama-2
- improve long-range attention in seq2seq models without retraining from scratch
- apply retrieval-based attention over long documents
- train models with Unlimiformer for long-input tasks

## When to choose
- you need to feed very long documents to a pretrained encoder-decoder model like BART
- you want to prompt Llama-2 with inputs longer than its context window
- you want retrieval-based attention without changing attention semantics

## When to avoid
- you need a simple short-context model with no long-input requirements
- you cannot afford the extra memory/compute for kNN datastores and indexes
- you use decoder-only models other than supported Llama derivatives

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, deep-learning, search-engine, llm-inference
- domain: large-language-models, deep-learning, machine-learning
- platform: python
- tags: long-context, retrieval-based-attention, transformers, encoder-decoder, neurips-2023, llama-2, knn-attention, natural-language-processing

## Member repositories
- abertsch72/unlimiformer (main) score 30

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:26.163128+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:56:43.150751+00:00, confidence not recorded.
  - readme: https://github.com/abertsch72/unlimiformer (fetched 2026-08-28T04:03:26.163128+00:00, sha 597a325954f7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
