DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use Phantom KV: what you can do with it

What is Phantom KV? phantom-kv is a Python project that tests a refusal-removal method, which loads a small trained bank of key and value tensors into a language model's KV cache without changing the model weights.

How do I use it? Read the comparison table in the README that contrasts heretic, weightless / GLP, and Phantom KV on permanence, runtime cost, and reversibility; then read the Results scoreboard and the methodology in docs/TECHNIQUE.md, noting the 60-prompt harmful suite, the 20-prompt harmless suite, greedy decoding, and teacher-forced KL against the base model's completions. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

Authorization notice. This tool is dual-use. Only use it on software, sites and systems you own or have explicit permission to test, and follow the relevant licenses and terms of service.

3 use cases

  • Compare refusal-removal methods on one eval set

    Line up weight edits, activation hooks, and cache grafts on the same refusal metrics.

    View prompt
    In the repo lordx64/phantom-kv, read the Results scoreboard and the methodology in docs/TECHNIQUE.md, then reproduce the base row for <target model> on the 60-prompt harmful and 20-prompt harmless suites with greedy decoding. Expected output: harmful and harmless refusal counts plus KL mean and max for the base model. Verify that the base counts match the README row for Qwen3-4B-Instruct-2507 before reporting any other arm.
  • Verify that a graft unloads cleanly and stays bound to its model

    Check the reversibility and model-id claims before a model deployment is signed off.

    View prompt
    In the repo lordx64/phantom-kv, test the claim that unloading the graft returns <model id> to baseline behavior. Run identical greedy prompts before loading, with the graft loaded, and after unloading, then compare outputs and file hashes. Expected output: post-unload outputs and weight hashes match the pre-load baseline exactly. Verify that a load attempt with a different model id is rejected before reporting success.
  • Summarize graft dose findings for a red-team report

    Turn the README's measured robustness results into a memo that separates results from roadmap.

    View prompt
    Read the Results section of the README and docs/TECHNIQUE.md sections 6.6 and 6.11 in the repo lordx64/phantom-kv. Write a one-page memo for <team name> with each number cited to its source line and a separate list of caveats and roadmap items. Expected output: a memo with no numbers that are missing from the source. Verify that each figure in the memo appears in the README or the cited section before finishing.

Quick start with Phantom KV

  1. Check you have what it needs: Python environment and a Hugging Face causal language model (check the README for hardware and dependency versions); Access to the GitHub repo lordx64/phantom-kv and its docs/TECHNIQUE.md file; A written evaluation plan that keeps harmful-prompt completions inside the review.
  2. Open lordx64/phantom-kv on GitHub and read the README and license.
  3. Read the comparison table in the README that contrasts heretic, weightless / GLP, and Phantom KV on permanence, runtime cost, and reversibility.
  4. Read the Results scoreboard and the methodology in docs/TECHNIQUE.md, noting the 60-prompt harmful suite, the 20-prompt harmless suite, greedy decoding, and teacher-forced KL against the base model's completions.
  5. Clone the repository with git clone https://github.com/lordx64/phantom-kv. (inferred, check the README)
  6. Run your own harness on the base model first and check that its counts match the base row (25/60 harmful refusals, 0/20 harmless refusals for Qwen3-4B-Instruct-2507).

These steps come from our top use case, Compare refusal-removal methods on one eval set, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for lordx64/phantom-kv

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Security and science

About this repo

  • Who it is forWritten for AI safety reviewers, red-team leads, and researchers who need to measure refusal robustness and compare refusal-removal methods.
  • Why it is hot274 stars, launched 53 days ago
  • LanguagePython
  • Sourcegithub.com/lordx64/phantom-kv · Back to Hot repos

Requirements

  • Python environment and a Hugging Face causal language model (check the README for hardware and dependency versions)
  • Access to the GitHub repo lordx64/phantom-kv and its docs/TECHNIQUE.md file
  • A written evaluation plan that keeps harmful-prompt completions inside the review

Add this badge to your README

Maintain Phantom KV? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/lordx64/phantom-kv.svg)](https://dedupedai.com/use-cases/lordx64-phantom-kv/?utm_source=github&utm_medium=badge&utm_campaign=lordx64-phantom-kv)

HTML

<a href="https://dedupedai.com/use-cases/lordx64-phantom-kv/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=lordx64-phantom-kv"><img src="https://dedupedai.com/badge/lordx64/phantom-kv.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about Phantom KV

What is Phantom KV?

phantom-kv is a Python project that tests a refusal-removal method, which loads a small trained bank of key and value tensors into a language model's KV cache without changing the model weights. It is an open-source project on GitHub: https://github.com/lordx64/phantom-kv.

How do I use Phantom KV?

Read the comparison table in the README that contrasts heretic, weightless / GLP, and Phantom KV on permanence, runtime cost, and reversibility; then read the Results scoreboard and the methodology in docs/TECHNIQUE.md, noting the 60-prompt harmful suite, the 20-prompt harmless suite, greedy decoding, and teacher-forced KL against the base model's completions. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is Phantom KV for?

Written for AI safety reviewers, red-team leads, and researchers who need to measure refusal robustness and compare refusal-removal methods.

What can I do with Phantom KV?

3 use cases so far, for example: Compare refusal-removal methods on one eval set; Verify that a graft unloads cleanly and stays bound to its model; Summarize graft dose findings for a red-team report. Each has steps and a copy-paste agent prompt.

What do I need to run Phantom KV?

Python environment and a Hugging Face causal language model (check the README for hardware and dependency versions); Access to the GitHub repo lordx64/phantom-kv and its docs/TECHNIQUE.md file; A written evaluation plan that keeps harmful-prompt completions inside the review.

What are alternatives to Phantom KV?

Other hot AI repos in Security and science: Failproofai, Codex Security, Chgnet, Semgrep, Mace.

Is Phantom KV safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.