# rednote-machine-learning/RedKnot

Efficient Long-Context LLM Serving with Head-Aware KV Reuse and SegPagedAttention

Repository: https://github.com/rednote-machine-learning/RedKnot
Canonical: https://ross.abutalabs.com/products/redknot
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-08-17T04:01:06+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 35, longevity 6
- inputs: {"age_days": 90, "days_push": 16, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, young
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1880, forks 762 (observed 2026-08-28T04:05:47.275266+00:00)

## What it is
RedKnot is a long-context LLM inference acceleration library built on SGLang, using head-classified KV reuse, offline KV storage with RoPE relocation, sparse FFN, and a SegPagedAttention runtime. It reduces prefill FLOPs by 50-70% and speeds up TTFT 1.35x-3.2x with near-lossless accuracy.

## Use cases
- serve long-context LLMs with lower latency
- speed up prefill for large prompt inference
- reduce KV cache memory usage in LLM serving
- run Qwen3 or Llama models with sparse attention efficiently
- accelerate TTFT for RAG workloads with reusable prompt segments
- deploy LLM inference on limited GPU memory

## When to choose
- you serve long-context models and prefill latency is a bottleneck
- you already use SGLang and want drop-in attention acceleration
- your workloads have reusable prompt prefixes like RAG or system prompts
- you want near-lossless quality with large FLOPs savings

## When to avoid
- you need short-context inference where the overhead outweighs gains
- you require a fully stable release for models like DeepSeek-V4 or Qwen3.5 that are still being adapted
- you need Ascend NPU support that is still work in progress
- you need a simple inference stack without SGLang's complexity

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, machine-learning, gpu-computing
- domain: large-language-models, machine-learning, gpu-computing
- platform: python
- tags: kv-cache-reuse, long-context, attention-optimization, sglang, sparse-attention, inference-acceleration, gpu, linux, docker

## Member repositories
- rednote-machine-learning/RedKnot (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:47.275266+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-30T03:14:01.565091+00:00, confidence not recorded.
  - readme: https://github.com/rednote-machine-learning/RedKnot (fetched 2026-08-28T04:05:47.275266+00:00, sha c1a4c9787952)
- Data as of 2026-08-30T08:39:29.467469+00:00.
