compression with a quality contract

Frequently Asked Questions

Honest answers to the questions that matter most — including the things Distil won't pretend.


"Is 100% decision-equivalence real, or is it marketing?"

It is real, in a specific and honest sense. 100% decision-equivalence means 100% of turns in the default corpus trajectories produced the same decision (tool call name + arguments, or final answer) when using the distil strategy versus the uncompressed baseline, as measured by the deterministic offline runner.

Three caveats the numbers depend on:

What makes this different from other "100% accuracy" claims: accuracy and compression are measured on the same trajectories in the same run. No separate "quality benchmark at low compression" and "compression benchmark at high compression." You see both numbers for the same corpus, or you see nothing.

"Is the compression lossless?"

Depends on the tier — and the answer is precise:

TierLossless?How
Tier 0 — JSON minify, RLE Provably lossless Reconstructable by inversion — no side state needed. The original can always be recovered from the transform output alone.
Tier 1 — Digest + handles Reversible The original is stored in a local RestoreStore keyed by an 8-hex SHA-256 handle embedded in the compressed text. Recovery requires the RestoreStore, which is kept locally and never sent to the model.
Certified — Pruning Not lossless — but causally certified Pruned blocks are causally inert: ablation confirmed they never changed any decision. The bytes are dropped but the agent behaviour is preserved within the non-inferiority margin.

The byte-fidelity gate (distil verify) confirms that every Tier-0 and Tier-1 operation across the corpus is byte-reversible and that frozen history never mutates between turns.


"How accurate is the tokenizer?"

The default tokenizer is an offline heuristic — it estimates tokens by a character-based approximation without calling any API. This means:

To get billing-grade token counts:

pip install 'distil-llm[live]'
export ANTHROPIC_API_KEY=sk-ant-…
distil savings --tokenizer anthropic
distil bench   --tokenizer anthropic

This calls the Anthropic count_tokens API — accurate billing-grade counts, but requires network access and consumes a small amount of API quota.


"What is not done yet?"

From the roadmap — implemented items that are real and wired, and items that are planned seams:

ItemStatus
Real tokenizer + live runner (billing-grade)Done--tokenizer anthropic / --runner anthropic
Multi-domain trajectory corpus + CI gateDonedistil bench
Runtime adapter (no-code-change compression)Donewrap(client)
Auth-mode gatingDonedistil/policy.py
Holdout A/B with confidence intervalsDonedistil holdout
Byte-fidelity invariantsDonedistil verify
BM25 partial retrieval · delta context · keep-model codec · gist cachingDone — all wired, real implementations
Provider proxy + managed gatewayDonedistil proxy / distil gateway (live per-tenant dashboard)
Output compression (input and output)Done — gated shaping + lossless re-entry digest, distil output-savings
Learned keep-model (logistic + transformer)Done — logistic ships built-in (96.4%/0.98 on held-out lines, labels from the heuristic); transformer adapter + training pipeline + demo checkpoint
Certified compression frontier (proof pack)Donedistil eval
Self-distilling keep-model (causal labels, never-regressing)Donedistil online
Verifiable federated telemetryDonedistil federated-leaderboard
Async high-concurrency proxy · Rust hot-path coreDonedistil proxy --async · rust/distil-core (python parity fallback)
Real-trace ingestion · performance benchmarkDonedistil ingest · distil perf
Production keep-model checkpointYour turn — a demo checkpoint ships on the release; production = retrain on your traces (distil train-transformer)
--runner anthropic verified against live modelNeeds a key — implemented but UNVERIFIED without one; the deterministic runner covers all offline measurements
Proven at scale / adoptionNeeds real traffic — every tool to prove it ships (distil ingest + distil eval --runner anthropic); run it on your traces and publish

"Does it work with models other than Claude?"

The core techniques — cache-aware compression, causal pruning, TOST certification, byte-fidelity invariants — are model-agnostic and apply to any LLM with prompt caching. The corpus trajectories and the adapter are built around the Anthropic Messages API format, but:


"Where can I see community savings?"

By design, savings are local-first and privacy-preserving — Distil never sends your prompts or responses anywhere. There are three views:

There is no hosted public dashboard harvesting your data — opt-in federation means you control submission and verification (ed25519 public-key signing is the documented upgrade for share-the-key-free verification).


"What is the license?"

Apache-2.0. See LICENSE in the repository.

The short version: you can use it commercially, modify it, distribute it, and sublicense it. The only requirements are attribution and preservation of the license notice. There are no patent traps beyond the standard Apache-2.0 patent grant.


"Can I contribute a new compression strategy?"

Yes — PRs are welcome. The rule is simple: a new strategy must pass make gate (non-inferior on every corpus domain, byte-reversible on Tier-0/1 operations). No green gate, no merge. See CONTRIBUTING.md for details.

The gate is the philosophy in one sentence. If a strategy can't pass non-inferiority on the bundled corpus with the default tokenizer and runner, it is not safe to ship — regardless of how impressive the savings look.