Skip to content

Products

GPU CloudAMD MI325X and NVIDIA H200 by the hour or on reservation.
Dedicated ClustersPreviewPrivate, interconnected GPU clusters for sustained workloads.
SandboxesPreviewIsolated, short-lived environments for developers and AI agents.
Serverless GPUPreviewGPU containers that scale with requests, down to zero.
Serverless InferenceOpen models behind one OpenAI-compatible endpoint.
Dedicated EndpointsReserved serving capacity for one model, billed per GPU-hour.
PlaygroundSend a prompt to any model your workspace can reach.
Model DeploymentsPreviewImmutable deployments with instant promote and rollback.
Fine-tuningLoRA fine-tunes on the open models in our catalog.
Model TrainingPreviewFoundation-model training runs, managed end to end.
EvaluationsPreviewBenchmark suites and model comparisons you can rerun.
DatasetsManaged and synthetic training data, versioned and ready to use.
Data ManagementPreviewDatasets, connections and storage, with lineage across the platform.
PipelinesPreviewVersioned DAGs that automate data, training and deployment.
Data RoomsPreviewSecure document sharing with guests, NDAs and an audit trail.
NokuvaPreviewThe AI-native design editor.
TavocPreviewA Rust-native code platform: IDE and desktop apps.
FoltracComing soonMulti-cloud deployment with autonomous operations.
W0rkTreeComing soonVersion control for agent fleets.
Identity & AccessMembers, roles, policies, SSO and audit for every workspace.
Billing & CostUsage, invoices, credits and budgets in one place.
Logs & MonitoringRequest logs, latency and error rates across services.
Project CanvasPreviewSee and change a project's resources on one live canvas.

Pages

Home/
Platform/platform
All products/products
Pricing/pricing
GPU pricing/pricing#compute
Inference services/services/inference
Model training services/services/model-training
Protocol design/services/protocol-design
Research partnerships/services/research-partnerships
Protocols/protocols
Datasets/datasets
Documentationdocs.legionedge.ai
Changelog/changelog
News/news
Research/research
Blog/blog
Articles/articles
Events/events
Startup Program/programs/startup
Ambassador Program/programs/ambassador
Partner Program/programs/partner
Event Program/programs/events
Company/company
Careers/careers
Partners/partners
Contact/contact
Statusstatus.legionedge.ai
Terms of Service/legal/terms
Privacy Policy/legal/privacy

Context layer

v0.9Beta

Context Compression

Reducing token usage while preserving model understanding.

Available for
  • Rust
  • Python
cargo add legion-compress
context-compression.pyPython
from legion_compress import compress
 
ctx = compress(session.history,
               mode="bounded", max_drift=0.02)
 
print(ctx.ratio)  # ~50x on long-horizon traces
model.generate(ctx.tokens)
Version
v0.9
Status
Beta
License
Open specification
Implementations
Rust · Python
Stack layer
Context

What the spec defines

The guarantees, not the vibes.

  1. Structure-aware compression — lossless where the format allows it

  2. Bounded-loss modes with measurable, capped semantic drift

  3. Up to 50x context efficiency on long-horizon tasks

  4. Drop-in pipelines for both training and inference

Overview

Why it's built this way.

Spec, schemas and conformance suite

Context Compression is our protocol for reducing token usage while preserving model understanding — lossless where structure allows it, and measurably bounded where it doesn't. It's how we reach 50x context efficiency on long-horizon tasks without losing the thread.

The protocol grew out of measurement, not intuition. Our field study found the median production request spends under a fifth of its tokens on content that influences the output; compression targets the rest, and the ablation probes that found the waste are the same machinery that verifies drift stays inside the bound you set.

Bounded-loss is the design decision that makes the protocol honest: instead of promising losslessness it can't keep, every mode declares its maximum semantic drift and the verification suite holds it there. You choose the trade; the protocol enforces it.

The Rust core does the heavy lifting, with Python bindings for training and evaluation pipelines. The spec is in beta at v0.9 alongside the published compression paper and its evaluation suite.

Proven in production

If a protocol can't survive contact with a real product, it isn't finished. This one ships inside Tavoc.

Explore Tavoc

Implement it

Implementing Context Compression?

The conformance suite is public, and the team that wrote the spec reads its issue tracker. Independent implementations are the point.