license: other
license_name: kimi-k3.1-pro
license_link: LICENSE
base_model: moonshotai/Kimi-K3.1-Pro
base_model_relation: finetune
tags:
- model-editing
- abliteration
- weight-patch
Kimi K3.1-Pro: experimental refusal-reduction weight patch
This is an exact compressed patch for the pinned original checkpoint, not a standalone model.
It applies permanent projections to 278 BF16 attention/output-expert matrices. Quantized routed
expert tensors, embeddings, tensor names, and checkpoint headers are preserved. No prompt or
reasoning prefill is needed to use the resulting checkpoint.
The selected variant is trace4. This is partial refusal reduction, not a claim that
refusals have been eliminated or that overall model capability is unchanged.
Measured results
| Measure | Original | Runtime projection | Baked reload |
|---|---|---|---|
| Refusals | 86/89 | 33/89 | 37/89 |
| Substantive completions | 3/89 | 55/89 | 52/89 |
| Incomplete or request error | 0 | 1 | 0 |
| Judge errors | 0/89 | 0/89 | 0/89 |
| Benign completions | 58/60 | 58/60 | 58/60 |
| HumanEval tests passed | 30/30 | 30/30 | 30/30 |
After a fresh disk load, all 16 sampled GPU shards matched the baked weights and differed from the original; the final column used no runtime projections.
Exact settings and outcome breakdowns are in evaluation.json.
The 89-request refusal set was deduplicated against all stored training and development groups
before this comparison. This is an internal evaluation, not a reported score on a standard public
benchmark; the refusal corpus is not redistributed here. Coding tasks, task IDs, and tests are included.
These are limited experiments with one LLM judge and small samples. Completed text was judged
for actual substantive fulfillment, not mere promises or a cooperative opening. Truncation,
empty output, request errors, and judge errors are separate outcomes. HumanEval solutions were
executed in disposable containers with no network or host mounts; canonical solutions passed 30/30.
Apply the exact patch
Base: moonshotai/Kimi-K3.1-Pro, revision6d0a0202956796543364d666ab19c6ad1a494ee1.
Download that exact revision and this repository before applying:
python -m pip install -r requirements.txt
hf download moonshotai/Kimi-K3.1-Pro --revision 6d0a0202956796543364d666ab19c6ad1a494ee1 --local-dir /data/k31-base
python apply_exact_patch.py --base /data/k31-base --patch ./patch --out /data/k31-edited
The script leaves the base intact and requires space for an independent approximately 1.56 TB
checkpoint. The compressed delta is 14.70 GB.
It checks the index, every original edited-tensor hash, every compressed patch hash, and every
reconstructed-tensor hash. All 278 exported tensors were independently reconstructed and checked
byte-for-byte against the baked checkpoint. A .incomplete marker means application did not finish.
Load /data/k31-edited with a compatible Kimi K3.1-Pro inference runtime after completion.
Method and provenance
Per-layer direction vectors and projection coefficients are in directions/ andprojection_spec.json. Each non-embedding matrix is projected asW <- cast_dtype(W - alpha * outer(r, r @ W)), with normalized r, in the listed stage order.
The exact XOR patch is authoritative and avoids device-dependent floating-point differences
when reproducing the final stored weights. Runtime evaluation used the Kimi-specific ROCm vLLM
image vllm/vllm-openai-rocm@sha256:4930e37b377b3973384ed5e274dd3cfc18789cfd1f8a98c6cdb5c2dd359ab175 on eight MI355X GPUs, normal chat messages, low reasoning effort, and a 4096-token context.
The result has not been validated for other hardware, runtimes, context lengths, or reasoning settings.
The upstream Kimi K3.1-Pro license applies. See the preserved copyright and conditions.
HumanEval comes from openai/human-eval; its license and
dataset provenance are included under evaluation/.