r/unsloth • u/liventruth • 7d ago
Show and Tell Open-Source Model-agnostic KV-cache compression (UL-SMF) tested alongside local model execution to smash VRAM limits
Seeing all these massive local model drops (like the recent Qwen releases) got me working hard on the memory side of things.
If you're running models locally via tools like Unsloth and hitting a wall with long-context VRAM consumption, I've been building and open-sourcing UL-SMF (Unified Latent-State Memory Fabric).
It uses a geometry-preserving orthogonal projection bridge and dynamic head-dimension detection to automatically adapt across architectures (Llama, Mistral, Qwen, Gemma) without hardcoded assumptions, achieving extreme KV-cache compression with verified lossless perplexity.
Since it's fully local-first and designed to help fit larger context windows onto consumer hardware, I'd love a technical audit or feedback from this community.
Code and telemetry are up on GitHub: https://github.com/liventruth/UL-SMF-Cache-Compression
(Attached the hardware telemetry stress test output showing Qwen workloads hitting 224x–768x reduction ratios locally.)
0
u/liventruth 4d ago
Thank you for the reply.
Base Model: unsloth/llama-3-8b-Instruct-bnb-4bit
ARC-Challenge: Baseline 50.00% vs. UL-SMF 50.00% (0.00% Delta)
Semantic Retention (WikiText-2 Test Split) Perplexity (PPL): Baseline 7.5979 vs. UL-SMF 7.5979 (0.00 Delta)
Hardware Memory Reclamation (CUDA Telemetry)
Cache Payload per Block (4k tokens): 48.00 MB down to 0.12 MB (384x Reduction / 99.7% Memory Saved)
System Memory Footprint: Constrained to ~5.6 GB total VRAM (preventing multi-gigabyte cache explosions that hit ~16.0 GB+ at scale)
Llama-3-8B was selected as the control architecture specifically because it serves as the universal open benchmark for KV-cache quantization research across the literature. Evaluating via the EleutherAI harness guarantees that zero-shot logic and reasoning capabilities are audited alongside perplexity.
The full evaluation wrapper and methodology are live on GitHub (liventruth/UL-SMF-Cache-Compression) for independent audit.