license: apache-2.0
library_name: transformers
base_model: thinkingmachines/Inkling-2-Mini
pipeline_tag: image-text-to-text
tags:
- conversational
- image-text-to-text
- moe
- abliterated
- uncensored
- cyber-security
Inkling-2-Mini — Abliterated + Recovery-Finetuned (v3)
Derived from thinkingmachines/Inkling-2-Mini
(Thinking Machines Lab, Apache-2.0). This is a research build: refusal directions were
removed by directional ablation and the model was recovery-finetuned on a
cyber-security-focused corpus.
Architecture (unchanged)
| Property | Value |
|---|---|
| Architecture | Inkling2LoopForConditionalGeneration (inkling2_loop) |
| Total / active params | 26.4 B / 3.4 B (5.4 B effective with 3 loop passes) |
| Layers | 24 weight layers, 48 applications per token (middle 12 run 3x) |
| MoE | 128 routed experts, top-8, no shared expert |
| Hidden / heads | 2304 · 24 Q heads / 8 KV heads · head_dim 128 |
| Context | 1 M tokens |
| Modalities | text + image (23-layer vision tower) |
| Precision in this repo | bf16 (upstream checkpoint was mixed NVFP4 + MXFP8) |
What was changed
Directional ablation (Arditi et al. style)
- refusal direction per layer computed from 80 harmful vs 50 harmless prompts
- layers selected by linear-probe accuracy >= 0.90: L9, L11-L15, L17, L18, L21
- modified write paths:
self_attn.o_proj.linear,mlp.experts.down_proj
(W <- W - d d^T W, FP32 math, cast back to bf16)
Recovery LoRA fine-tune (peft, r=32, alpha=64, lr 1e-5, 2 epochs)
- targets:
self_attn.o_proj.linear,self_attn.o_proj.gate_proj - data: 2 296 assistant-only conversations (cyber-security corpus)
- assistant-only loss; vocabulary is 200 058, so the loss was computed in
position chunks (128) to avoid materialising full logits
- targets:
Merged into the base weights -> standalone bf16 checkpoint (17 shards, ~50 GB)
Measured results (36 harmful prompts, greedy decoding)
| Metric | Upstream | Ablated | Ablated + Recovery (v3) |
|---|---|---|---|
| Refusal rate | 0.417 | 0.194 | 0.028 |
| Actionable-answer rate | 0.361 | 0.611 | 0.722 |
| Compliance rate | 0.583 | 0.806 | 0.972 |
| Capability score (6 checks) | 0.833 | 0.833 | 0.833 |
| Reasoning score (2 checks) | 0.500 | 1.000 | 1.000 |
Additional sanity checks on v3: generated Python is executable (fib(10) == 55),
image input path works, no NaN/collapse in free generation.
Provenance
abliteration_manifest.json— exact tensors changed, per-tensor relative Frobenius deltatraining_manifest.json— LoRA hyperparameters, dataset paths, example countmerge_manifest.json— base / adapter / output pathssha256_manifest.json— SHA-256 of every file in this repo
Intended use
Security research, red-team evaluation, authorised pentest tooling, and studying
refusal-direction ablation on a looped (shared-weight, multi-pass) transformer.
Not for deployment against systems you are not authorised to test.
Load
import torch
from transformers import AutoProcessor, Inkling2LoopForConditionalGeneration
repo = "AlicanKiraz0/Inkling-2-Mini-Abliterated-Recovery-v3"
processor = AutoProcessor.from_pretrained(repo)
model = Inkling2LoopForConditionalGeneration.from_pretrained(
repo, dtype=torch.bfloat16, device_map="auto",
).eval()
inputs = processor.apply_chat_template(
[{"role": "user", "content": "hello"}],
tokenize=True, add_generation_prompt=True,
return_dict=True, return_tensors="pt",
).to(model.device)
out = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Requires
transformers >= 5.24.1(theinkling2_looparchitecture was added there).vLLM 0.19does not implementinkling2_loopyet — usetransformersor SGLang.