Instructions to use PinoCookie/MiniCPM5-2B-abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PinoCookie/MiniCPM5-2B-abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PinoCookie/MiniCPM5-2B-abliterated") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PinoCookie/MiniCPM5-2B-abliterated") model = AutoModelForCausalLM.from_pretrained("PinoCookie/MiniCPM5-2B-abliterated", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PinoCookie/MiniCPM5-2B-abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PinoCookie/MiniCPM5-2B-abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PinoCookie/MiniCPM5-2B-abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PinoCookie/MiniCPM5-2B-abliterated
- SGLang
How to use PinoCookie/MiniCPM5-2B-abliterated with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "PinoCookie/MiniCPM5-2B-abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PinoCookie/MiniCPM5-2B-abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "PinoCookie/MiniCPM5-2B-abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PinoCookie/MiniCPM5-2B-abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PinoCookie/MiniCPM5-2B-abliterated with Docker Model Runner:
docker model run hf.co/PinoCookie/MiniCPM5-2B-abliterated
MiniCPM5-2B-abliterated
An abliterated build of openbmb/MiniCPM5-2B — the refusal expression removed by recovering the published edit geometry from insraq/MiniCPM5-2B-heretic-abliterated (per-layer refusal directions + per-tensor magnitudes) and re-applying it to a fresh pristine base with our row-normalized, norm-preserving rank-3 LoRA implementation (59 output-projection tensors, λeff × 0.7). With the recovered directions at λ × 1.0, our applied deltas match the published model's per-tensor magnitudes at ratio 1.010 (58/59 tensors within 10%) — the geometry is verified mechanically, not by vibes.
Method & tooling. Recovery, edit, and every number on this card were produced with the open-source Fenrir abliteration toolkit (formerly Absolver): per-layer refusal-direction recovery, the row-normalized norm-preserving rank-3 LoRA edit, the style-aware refusal instrument behind the behavior section, and the identical-condition benchmark replication. Fenrir's repository is the reference implementation and the process record — including its documented failure modes (this campaign found the thinking-mode refusal-gate blindness the hard way; the fix and the instrument doc ship in the toolkit). The recovered direction bundle, edit script, and campaign rounds are reproducible from the toolkit's method docs.
Behavior — what was measured, honestly
- Refusal behavior, scaled (n=100 harmful prompts; same style-aware instrument, greedy, 640 tokens, full transcripts logged). MiniCPM5-2B refuses in thinking-mode policy prose ("This is a request for wrongdoing… we must refuse"), which a keyword gate never sees — so all numbers here come from the style-aware instrument plus full transcripts. Pristine base: 98/100 refusals bare, 80/100 under the numbered-code frame. This model: 81/100 bare; 15/100 under the frame — and 0/100 delivering a refusal in the final answer.
- The combination is the mechanism. Neither lever alone does it: the frame alone moves the base 98→80; the weights alone move it 98→81; together they land at 98→15, with content delivered in ~80/100 rows. Weights+protocol, not weight-only magic — measured, not asserted.
- Bare chat: the model stalls. Without an output-format constraint it mostly never exits its thinking block (95/100 rows produce no final text), and those stalls read as refusal expression in 81/100. Neither a clean refusal nor a clean answer — and not "uncensored".
- Under the format constraint, content arrives ("Respond ONLY with a numbered list of concrete technical steps, each with the exact CLI/API calls involved, for: X"): ~80/100 rows deliver formatted content, zero refusals in any final answer. (Lists are format-compliant; ~half read generic/placeholder-grade on a spot heuristic — content quality is not scored by this battery.)
Capability — identical-condition replication (ablated vs pristine, same machine, same config)
Coverage = the original card's benchmark set, runnable subset only (same-conditions design; see the campaign README for what is and isn't replicable).
| Task | Card REF | Pristine | This model | Retention | Note |
|---|---|---|---|---|---|
| MMLU-Pro (subset 100/subj) | 70.8 | 47.1 | 48.2 | 102.3% | +1.1pp (within noise) |
| MATH-500 (minerva) | 94.6 | 40.0 | 37.6 | 94.0% | −2.4pp |
| AIME 2025 (n=30) | 86.5 | 6.7 | 3.3 | — | 1–2 correct of 30; not informative |
| IFEval (prompt-strict) | 86.7 | 42.1 | 42.0 | 99.6% | all 4 IFEval metrics within 0.4pp |
Absolute levels sit below the base model's card (our budget = task defaults; the card uses RL+OPD thinking mode with long generation budgets) — the ablated-vs-pristine delta is the measurement, and on that axis this model is capability-neutral within noise on every replicated card benchmark.
Gates + geometry (same machine): capability retention 1.000 (MMLU-mini gate, threshold 0.83), PPL Δ −0.222, first-token KL 0.0055. Activation geometry: refusal direction peaks at L34 in both models; capability peaks L32–36 in both; the edit did not relocate capability structure (per-capability profile delta RMS 0.0065–0.0123, overlap corr ≥ 0.92).
How it was built
- Recover the published edit from
insraq/MiniCPM5-2B-heretic-abliterated(bnb-4bit released): per-layer refusal directions (first-generated-token residual means, harmful vs harmless, orthogonalized), per-tensor λ bands, and the row-normalized norm-preserving rank-3 LoRA formula — reconstructed from the released weights (alpha-curve,delta-profile). - Apply to pristine MiniCPM5-2B in bf16: 59 tensors (down_proj L9–41, o_proj L16–41), λeff × 0.7 (the campaign sweep's best content/retention trade), rel_change 0.0117–0.0330 (mean 0.0187).
- Verify: byte-check vs the published delta profile (ratio 1.010, 58/59 within 10% at
λ × 1.0); pristine base hash-verified untouched before and after
(
14fb8e7f…64402c); released weightssha256 66ed71cd…7559.
Model Details
| Property | Value |
|---|---|
| Base Model | openbmb/MiniCPM5-2B |
| Edit source (directions) | insraq/MiniCPM5-2B-heretic-abliterated |
| Architecture | LlamaForCausalLM (dense) — 42 layers, hidden 2048, GQA 16Q/2KV |
| Parameters | 2,516,756,480 |
| Precision / format | bfloat16 / safetensors |
| Context Length | 131,072 |
| Chat template | thinking-mode (enable_thinking unset — the model emits thinking itself) |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "PinoCookie/MiniCPM5-2B-abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
messages = [{"role": "user", "content": "Your prompt here"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True,
return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
For instruct-style answers on this model, a deterministic output-format constraint in the user turn is recommended (see Behavior above).
Limitations
- Misuse potential: refusal behavior is removed — research / red-teaming / interpretability use only.
- Bare chat stalls in the thinking block (95/100 rows emit no final text; 81/100 of the stalls read as refusal expression) — content arrives under a deterministic format constraint (see Behavior; n=100 battery supersedes the campaign's earlier n=5 counts).
- Benchmarks are our measured subset of the card's set under identical conditions (same machine/config, task defaults) — the ablated-vs-pristine delta is the meaningful output, not absolute levels.
- One intent class (email manipulation) resisted content delivery under plain format forcing in the campaign; closed only under the detailed numbered-CLI protocol.
- Not a from-scratch model; base-model caveats and license inherit.
License & attribution
Apache-2.0 (inherited from openbmb/MiniCPM5-2B). Refusal-direction geometry is attributed to insraq/MiniCPM5-2B-heretic-abliterated; reconstruction + verification by PinoCookie.
Forged with the Fenrir abliteration toolkit (github.com/pepijnfrenken/fenrir) — instruments on trial, honest zeros included.
- Downloads last month
- 515