phantom-kv: uncensor an LLM by injecting an ~18MB KV-cache bank, no weights touched

Anony6666 · reddit · 2026-09-22

A developer released phantom-kv, a refusal-removal system that modifies no model weights. It trains a compact bank of key/value tensors offline using the model's own objective, then injects it into the KV cache at inference, where attention treats it as conversation history — making the model compliant on targeted harmful prompts while preserving normal behavior on harmless inputs. Unlike weight-space abliteration (rewrites checkpoints, must be redone per quantization) or activation projection (engine-level hooks, assumes a single refusal direction), phantom-kv is a per-request, hot-swappable mode: unload it and the model remains byte-for-byte unchanged. Open-sourced at github.com/lordx64/phantom-kv. Notably, this demonstrates how fragile safety alignment can be against cache-level injection.

Related event: phantom-kv Removes LLM Refusals via 18MB KV Injection(2 posts)→

Original post →

More from Models

Models channel →