Model or dataset
rednote-machine-learning/RedKnot avatar
rednote-machine-learning/RedKnot

RedKnot: the headline saving excludes memory traffic, kernel launches and interconnect

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

3,016 stars1,689 forksPythonApache-2.0

At a glance

What is it?
A long-context serving framework that states its speedups as targets rather than results, publishes an exact per-layer head policy for one model down to driver and kernel build hashes, measures against a full recompute rather than a cache hit, and lists six things its experimental shared cache component does not do, including leaving one numerical precision unqualified.
Who is it for?
RedKnot is unusually careful about its own numbers, and the caveats are the most useful part of the documentation. Take it if you serve long contexts on tensor-parallel GPU clusters and can reproduce a frozen configuration, because that is exactly what the release section is built for.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • rednote-machine-learning/RedKnot3,016 ★ · +588
Star history
Repository2026-09-102026-11-23
rednote-machine-learning/RedKnot2.4k3k

588 Stars in the last 74 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Targets, an envelope, and a ledger with exclusions

The performance section is the most careful paragraph in the repository, and it is careful in three separate ways. First, the verb. On qualified long-context profiles the project says it targets a quality regression within one percentage point, a hot-state time-to-first-token speedup of two to five times, and a saving of seventy to ninety percent. Targets, not results. Second, the presentation: the charts colour the recomputed reference in one colour and the RedKnot operating envelope in another, so a reader is shown a reference point and a range rather than a single number. Third, and most unusually, the exclusions. The compute ledger deliberately omits memory traffic, kernel-launch cost, tensor-parallel communication and every runtime component that has not been credited, and the page says outright that this is therefore not a claim about total system energy or not a claim about universal end-to-end throughput. That paragraph qualifies the headline number more than any amount of benchmark table would.

The baseline is a full recompute, not a cache hit

Most serving benchmarks compare a caching system against a system without caching, which flatters the result. This project does the opposite and says so. A full online recomputed path is kept as the reference, and reported gains are measured against the same checkpoint and the same input identifiers rather than against a prefix-cache hit. That means every measured second of the optimisation is compared against a system that genuinely recomputed the whole prompt, on identical inputs and identical weights. It is the harder baseline and the slower one, and choosing it removes the most common way this class of result is inflated. The cost is that the absolute numbers will look worse than a cache-hit comparison would, and the page adds that the achieved point depends on the model, the context length, the GPU topology and the frozen policy, with the per-suite result files named as the source of truth.

Three ideas, and the offline half of the first

The technology section presents three composable ideas rather than one model-specific shortcut. Head decomposition and aggregation classifies attention heads by their long-context behaviour: reusable local heads are prepared offline, while global, retrieval and recovery heads stay online, and the projected contributions are merged back without changing the model's external interface. Sparse feed-forward and mixture-of-experts execution uses token-level importance to decide which rows enter the expensive work, with an adaptive expert selection that engages more experts only when the router distribution calls for it, while dense boundary layers and protected query rows keep the critical path intact. SegPagedAttention organises cache pages and visibility per head and per segment, so global, local and retrieval heads can read different context scopes without one uniform layout. The offline preparation in the first idea is the part that makes the rest possible.

An exact per-layer head policy for one model

The frozen release table publishes the policy rather than describing it. For the packaged model, the first three layers and the last three are fully online. The thirty-seven layers in between use eight online global heads and fifty-six reusable local heads, with RoPE relocation and projection merge happening online. Sparsity is equally specific: row selection around checkpoint islands, plus a plan-scoped adaptive expert selection with a cumulative router mass of one half and physical selection buckets of three, four, five or six. Nothing here is a tunable range. It is a configuration that a reader can reproduce exactly, which is the point of freezing it, and it also shows how much of the model is left untouched: six of forty-three layers plus eight heads per layer stay fully online, so the saving comes from the middle of the network rather than from trimming the edges.

code
8× NVIDIA H200, 143,771 MiB per GPU, TP8; driver 570.148.08

The measurement protocol is written down

Reproducibility here means naming versions down to the commit. The published run used eight H200 accelerators with a stated memory size per GPU, tensor parallelism across all eight, and a pinned driver build. The runtime is pinned to one CPython patch release, one PyTorch release with a named CUDA version, and one Triton release. Three kernel packages are pinned too, one of them to a version plus a commit hash, which is the only entry in the table that identifies its code by hash rather than by release. The timing protocol is described just as precisely: a hot state, three paired warmups that are measured and then discarded, ten measured reference-and-optimised pairs per case, streaming first output token, and percentiles at the median and the ninety-fifth. Four frozen suites at sixty-four, one hundred and twenty-eight, two hundred and fifty-six and four hundred and forty thousand prompt tokens complete the picture.

Six things the experimental cache component does not do

The multi-request shared cache section is the most candid passage in the file. Two attention backends accept an explicitly supplied head-page manager offering request forks, copy-on-write append and repair, direct paged attention, and cross-process snapshot sharing over HTTP. Then the caveats arrive. Request lifecycle and stable batch handles must be wired by the caller, and selecting the backend alone does not enable shared ownership. The eager path does not implement the multi-head latent attention form, does not integrate with the full scheduler or tensor-parallel serving, and does not replace the dense pool automatically. Strict qualification on one model at single-precision passes while the half-precision equivalent remains unresolved. And the component capacity results, the page says plainly, do not establish an end-to-end serving speedup. Six limitations in one paragraph, none of them buried.

code
3 unmeasured paired warmups followed by 10 measured Recomputed/RedKnot pairs per case

The vLLM integration is on a side branch and unfinished

The news section leads with a migration that is complete in one sense only. The core code migration to the vLLM plugin is finished, and the plugin and the migrated benchmark entry points are available on a separate branch rather than on the default one. Model-specific runtime integration and end-to-end validation are described as ongoing. The same entry notes that adaptation to another vendor's accelerator is in progress and points at a status document. The future work section fills in the detail: that port is being driven by a cloud vendor, the short-term target is parity with the upstream baseline in the recomputed reference path, and the medium-term plan is to publish vendor-side qualification profiles for the four frozen suites. Two more model families are promised for the autumn, with a request to open an issue for anything else.

The governance line above all of this is worth quoting: the project belongs to its contributors, and meaningful contributions earn a greater voice in the community.

Rust, protocol buffers and two documentation directories

The repository is recorded as a Python project and is much more than one. There is a Rust directory beside the Python one, a directory of protocol buffer definitions, a directory of third-party code, a vendored copy of the kernel package that the release table pins by version, and a component named as a model gateway. There is also a server directory, a benchmark directory, a docker directory, and a directory of experimental work. The most telling detail is documentation: two directories exist, one of them suffixed as new. That is the fingerprint of a documentation migration in progress, and for anyone looking for the current text it means guessing which tree is authoritative. The examples directory is closer to operations than to demos, with separate directories for monitoring, profiling, a checkpoint engine, a runtime, deployment to a managed service and usage.

Editorial conclusion

RedKnot is unusually careful about its own numbers, and the caveats are the most useful part of the documentation. Take it if you serve long contexts on tensor-parallel GPU clusters and can reproduce a frozen configuration, because that is exactly what the release section is built for. Read the exclusions before quoting the saving figure anywhere, since the ledger deliberately omits memory traffic, launch cost and interconnect, which means it is not an energy claim and not an end-to-end throughput claim. Treat the multi-request cache component as research code: it needs its lifecycle wired by the caller and one precision is still unqualified. And check which branch you are on, because the vLLM integration lives on a side branch and its validation is explicitly still in progress.

Frequently asked questions

What is RedKnot?

A model-aware long-context execution framework for large language model serving, built on three composable ideas rather than one model-specific cache shortcut: head decomposition and aggregation, sparse feed-forward and mixture-of-experts execution, and SegPagedAttention, which organises cache pages and visibility per head and per segment. It is built on top of SGLang.

What speedups does RedKnot claim?

On qualified long-context profiles it states targets of a quality regression within one percentage point, a hot-state time-to-first-token speedup of two to five times, and a saving of seventy to ninety percent. It adds that the achieved point depends on the model, context length, GPU topology and frozen policy, and that the per-suite result files are the source of truth.

What does RedKnot's compute ledger exclude?

Memory traffic, kernel-launch cost, tensor-parallel communication and all uncredited runtime components. The page states explicitly that the ledger is therefore not a claim about total system energy and not a claim about universal end-to-end throughput.

What is RedKnot's Recomputed reference?

A full online recomputed path that the project keeps as its reference. Reported gains are measured against the same checkpoint and the same input identifiers rather than against a prefix-cache hit, which is the harder of the two available baselines.

Is RedKnot's multi-request shared KV backend ready to use?

It is presented as experimental. The caller must wire request lifecycle and stable batch handles, since selecting the backend alone does not enable shared ownership. The path does not implement multi-head latent attention, full scheduler or tensor-parallel serving integration, or automatic dense-pool replacement. Strict single-precision qualification passes while the half-precision equivalent remains unresolved, and the capacity results do not establish an end-to-end serving speedup.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. rednote-machine-learning/RedKnot on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rednote-machine-learning-redknot.svg)](https://hysenlabs.com/projects/rednote-machine-learning-redknot)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/rednote-machine-learning-redknot.svg)](https://hysenlabs.com/projects/rednote-machine-learning-redknot)

Was this useful?