Observability
W&B compression tracking
Weights & Biases is the standard ML experiment tracker. Log SuperCompress metrics to W&B to visualize token savings over time.
W&B integration
import wandb
from supercompress import Compressor
wandb.init(project="llm-cost-optimization")
comp = Compressor()
def tracked_compress(context, query):
result = comp.compress(context, query)
wandb.log({
"original_tokens": result.original_tokens,
"kept_tokens": result.kept_tokens,
"savings_pct": round((1 - result.kept_tokens /
max(result.original_tokens, 1)) * 100, 1),
"tokens_removed": result.tokens_removed,
})
return result
Frequently asked questions
Can I track savings by model or use case?
Yes. Add model_name and use_case as additional wandb.log fields.
Does W&B support team dashboards for this?
Yes. Create a W&B report showing token savings over time for each team.
Try it yourself
Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.