wilpel/caveman-compression
Caveman Compression is a semantic compression method for LLM contexts. It removes predictable grammar while preserving the unpredictable, factual content that defines meaning. observed · 2026-08-28
Health v2 · maintenance only
41/100
- Activity 55
- Release rhythm 35
- Longevity 20
Flags: no_releases no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 289
- days_rel: n/a
- days_push: 273
- n_releases_24m: 0
Adoption not part of the score
1092 stars · 67 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Python tool that compresses text for LLM contexts by stripping predictable grammar while preserving factual content, reducing token usage by 15-58%. It offers three modes: LLM-based (best compression via OpenAI API), NLP-based (free, offline, multilingual via spaCy), and MLM-based (free, offline, predictability-aware).
Use cases
- reduce token costs when sending long context to an LLM
- compress prompt text to fit more content in a context window
- shrink RAG retrieved documents before passing to a model
- compress verbose documentation for LLM consumption
- offline text compression without an API
- compress multilingual text for LLM contexts
When to choose
- you pay per token and want 15-58% context reduction
- you need a free, offline compression option via spaCy or masked language models
- you want to fit more retrieved documents into a fixed context window
When to avoid
- you need byte-perfect lossless reconstruction of original text
- your content is mostly facts with little redundant grammar
- you cannot tolerate LLM-based decompression ambiguity in critical data
Facets
library · maturity active
nlp llm-inference compression prompt-engineering large-language-models python cli semantic-compression token-reduction context-optimization text-compression natural-language-processing
1 source
- readme: https://github.com/wilpel/caveman-compression · fetched 2026-08-28 · f29d9d076842
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| wilpel/caveman-compression | main | 41 |
For agents
markdown · JSON · MCP: product_card(name="wilpel/caveman-compression")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem