遇见数据集

Multi-Layer Prompt Compression for Local LLM Inference

收藏
Zenodo2026-04-25 更新2026-05-26 收录
官方服务:

资源简介:

We present Omega-CACHE, a six-layer prompt compression middleware for local large language model inference that achieves 74% context reduction on organic multi-turn sessions without model modification or third-party API dependency. The system operates as a transparent pipeline between the application layer and an unmodified Ollama backend running qwen2.5:14b (9.0 GB, 14B parameters) on consumer hardware (AMD Ryzen 9 7900X, AMD RX 9070, 16 GB VRAM). The pipeline implements five active compression layers and a gating mechanism: (1a) Lexical Sparse V collapses exact sentence repetition; (1b) Semantic Sparse V deduplicates near-duplicate meaning via TF-IDF cosine similarity at threshold 0.82; (2) an Operator Token Library encodes session state fragments as FSM-style shorthand tokens expanded by the model via a one-time system preamble; (3) a Prose Eliminator strips connective tissue using a 35-pattern regex library with quote protection and a 60-character greedy cap to prevent content noun loss; (4) Temporal Decay truncates stale middle context while preserving head anchors and recent tail; and (5) Asymmetric Split protects instruction tokens from all upstream compression stages. A character-count gate bypasses the pipeline entirely below 1500 characters where overhead exceeds savings. Validated on a 10-turn organic conversation accumulating 40,000 characters of context, the compound compression ratio reached 0.260 at turn 10 (74.0% savings), with Layer 2 operator tokens contributing +59.4 percentage points over the pre-L2 baseline of 14.6%. On a synthetic prompt ladder, the compressed route reduced latency by 59.7% at 2048 tokens and collapsed inference standard deviation from 248ms to 2.7ms — a 92x reduction in variance (92-fold). The system produced zero false positives on clean, information-dense research text across all validation phases. The architecture requires no fine-tuning, no embedding model, no vector database, and no external service. The entire pipeline executes in under 2ms on CPU before the prompt reaches the inference engine. All compression is performed on the prompt side; the model receives a shorter, cleaner input and produces equivalent or improved output. The approach is model-agnostic and has been validated against three model families (Mistral 7B, Llama3 8B, Qwen 2.5 14B) on the same hardware. **Keywords:** prompt compression, KV cache optimization, local LLM inference, context window management, session state compression, operator token systems, asymmetric compression, variance reduction, consumer hardware AI --- **Platform:** Prometheus HQ — FastAPI/Ollama on Ubuntu (kernel 6.17.0-19-generic, Mesa 25.2.8)**Hardware:** AMD Ryzen 9 7900X (24 threads), AMD Radeon RX 9070 (16 GB VRAM), Samsung 990 PRO NVMe**Software:** qwen2.5:14b via Ollama, Python 3.12, zero external ML dependencies**Data availability:** All validation scripts, results JSON, and middleware source included in supplementary materials.

提供机构:
Zenodo
创建时间:
2026-04-11
二维码
社区交流群
二维码
科研交流群
商业服务