# AI use cases for Phantom KV (lordx64/phantom-kv)

Repo: [lordx64/phantom-kv](https://github.com/lordx64/phantom-kv) | Use cases: 3 | Page: https://dedupedai.com/use-cases/lordx64-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.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Compare refusal-removal methods on one eval set: https://dedupedai.com/use-cases/lordx64-phantom-kv/compare-refusal-removal-methods-on-one-eval/
- Verify that a graft unloads cleanly and stays bound to its model: https://dedupedai.com/use-cases/lordx64-phantom-kv/verify-graft-reversibility-and-model-binding/
- Summarize graft dose findings for a red-team report: https://dedupedai.com/use-cases/lordx64-phantom-kv/summarize-graft-dose-findings-for-red-team-report/

## How to compare refusal-removal methods on one eval set with Phantom KV

Repo: [lordx64/phantom-kv](https://github.com/lordx64/phantom-kv) | Difficulty: Advanced | Time: half a day | Basis: From the README

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

**Who it is for:** An AI safety reviewer at a lab who must decide how to test refusal robustness of an open model and needs a fair comparison of available methods.

**The problem:** Refusal-removal methods report results with different setups, so their numbers are hard to compare directly.

**The outcome:** A side-by-side table of harmful refusals, harmless refusals, and KL divergence for the base model and each method arm, using one prompt suite and one decoding setting.

### Steps

1. Read the comparison table in the README that contrasts heretic, weightless / GLP, and Phantom KV on permanence, runtime cost, and reversibility.
2. 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.
3. Clone the repository with `git clone https://github.com/lordx64/phantom-kv`. (inferred, check the README)
4. 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).
5. Run the same harness on each method arm you are comparing and record harmful refusals, harmless refusals, and KL mean and max for each row.

### Prompt to paste into your agent

```text
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.
```

### Caveat

The README says the project is deployed so far only on Qwen3 dense models, so results on other architectures are not yet confirmed.

Risk, reverse engineering: The evaluation involves prompts and completions that show refusal behavior, so keep harmful completions inside the review and do not publish them.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lordx64-phantom-kv/compare-refusal-removal-methods-on-one-eval/

## How to verify that a graft unloads cleanly and stays bound to its model with Phantom KV

Repo: [lordx64/phantom-kv](https://github.com/lordx64/phantom-kv) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

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

**Who it is for:** A platform or security engineer who must show that a model deployment can return to a known baseline and that a graft cannot be loaded onto the wrong model.

**The problem:** Teams need proof that a cache-based change can be removed and that it fails when attached to a different model revision.

**The outcome:** A short verification record showing that base outputs match before and after unloading, and that the loader rejects a graft for a mismatched model.

### Steps

1. Read the reversibility row in the summary table and the 'Why model-agnostic' section of the README, which say the loader enforces the model-id match and that unloading returns the base model to byte-identical behavior.
2. Clone the repository with `git clone https://github.com/lordx64/phantom-kv`. (inferred, check the README)
3. Record hashes of the base model weights and the graft file `artifacts/grafts/v3.bin`, then run a fixed set of greedy prompts on the base model and save the outputs.
4. Load the graft on its bound model, run the same prompts, then unload the graft blocks and run the prompts again.
5. Compare the post-unload outputs and weight hashes with the saved baseline, and attempt to load the graft on a different model id to confirm it is rejected.

### Prompt to paste into your agent

```text
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.
```

### Caveat

The README gives the reversibility and model-id claims, but the README excerpt does not show the exact load and unload commands, so the test steps must be taken from the repo's own code and docs.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lordx64-phantom-kv/verify-graft-reversibility-and-model-binding/

## How to summarize graft dose findings for a red-team report with Phantom KV

Repo: [lordx64/phantom-kv](https://github.com/lordx64/phantom-kv) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

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

**Who it is for:** A safety evaluation lead who must brief a team on how refusal behavior of an open model holds up under context and dose changes.

**The problem:** The results section mixes measured numbers, method details, and planned work, which makes it easy to overstate what was shown.

**The outcome:** A one-page memo that cites each number from the README and marks which claims are measured, which are caveats, and which are roadmap items.

### Steps

1. Read the Results section of the README, including the v3 deliverable row, the robustness list, and the note that the 5/60 floor is dose-soft.
2. Read section 6.11 of `docs/TECHNIQUE.md` for the refresh and dose result and section 6.6 for the frontier sweep.
3. List every number in the memo and check it against its source line, including the off-suite transfer result of 2/60 on held-out harmful prompts.
4. Mark the honest caveat that deployment so far is on Qwen3 dense, and list cross-architecture and cross-quantization confirmation as roadmap item 5.
5. Send the memo for review with harmful completions left out.

### Prompt to paste into your agent

```text
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.
```

### Caveat

The dose and robustness findings are measured only on the project's own suites and one Qwen3 model, so the memo should not generalize them to other models.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lordx64-phantom-kv/summarize-graft-dose-findings-for-red-team-report/
