# mit-han-lab/streaming-llm

[ICLR 2024] Efficient Streaming Language Models with Attention Sinks

Repository: https://github.com/mit-han-lab/streaming-llm
Canonical: https://ross.abutalabs.com/products/streaming-llm
Homepage: https://arxiv.org/abs/2309.17453
Language: Python
License: MIT
License Family: permissive
Last push: 2024-07-11T08:14:43+00:00

## Health v2 (maintenance only)
Score: 27/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 76
- inputs: {"age_days": 1069, "days_push": 783, "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 7268, forks 400 (observed 2026-08-28T04:09:57.922334+00:00)

## What it is
StreamingLLM is a research framework from MIT Han Lab implementing the Attention Sinks method (ICLR 2024) for efficient streaming language model inference. It enables LLMs like Llama-2, MPT, Falcon, and Pythia to handle effectively infinite input lengths without fine-tuning by preserving the KV cache of initial tokens.

## Use cases
- run llm inference on very long or infinite-length inputs
- stream multi-round dialogue without exceeding context window
- reduce kv cache memory usage during llm decoding
- enable window attention to work beyond cache size
- deploy chatbots that can converse indefinitely without crashing

## When to choose
- you need stable LLM generation over millions of tokens without fine-tuning
- you want memory-efficient streaming inference with a sliding window plus attention sinks
- you use supported models like Llama-2, MPT, Falcon, or Pythia with HuggingFace Transformers

## When to avoid
- you need true long-range recall of arbitrary old tokens rather than recent-window coherence
- your model or serving stack is not supported by the attention-sink approach
- you need a production inference server rather than a research codebase

## Facets
- artifact type: library
- maturity: stable
- function: llm-inference, machine-learning, deep-learning
- domain: large-language-models, deep-learning
- platform: python
- tags: attention-sinks, kv-cache, streaming-inference, long-context, research-paper, transformers, natural-language-processing, gpu, linux

## Member repositories
- mit-han-lab/streaming-llm (main) score 27

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:57.922334+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-29T17:38:55.984978+00:00, confidence not recorded.
  - readme: https://github.com/mit-han-lab/streaming-llm (fetched 2026-08-28T04:09:57.922334+00:00, sha 9eed606df41c)
  - homepage: https://arxiv.org/abs/2309.17453 (fetched 2026-08-29T08:34:21.874454+00:00, sha 0136218468e6)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T08:34:21.883480+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T08:34:21.892075+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T08:34:21.908496+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T08:34:21.885148+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
