Instructions to use mrfakename/Inkling-2-Mini-abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrfakename/Inkling-2-Mini-abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mrfakename/Inkling-2-Mini-abliterated") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("mrfakename/Inkling-2-Mini-abliterated") model = AutoModelForMultimodalLM.from_pretrained("mrfakename/Inkling-2-Mini-abliterated", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mrfakename/Inkling-2-Mini-abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mrfakename/Inkling-2-Mini-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": "mrfakename/Inkling-2-Mini-abliterated", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/mrfakename/Inkling-2-Mini-abliterated
- SGLang
How to use mrfakename/Inkling-2-Mini-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 "mrfakename/Inkling-2-Mini-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": "mrfakename/Inkling-2-Mini-abliterated", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "mrfakename/Inkling-2-Mini-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": "mrfakename/Inkling-2-Mini-abliterated", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use mrfakename/Inkling-2-Mini-abliterated with Docker Model Runner:
docker model run hf.co/mrfakename/Inkling-2-Mini-abliterated
Inkling-2-Mini (abliterated)
Huge thanks to Hugging Face for generously sponsoring the compute used to abliterate these models! This was done on HF Jobs, which makes it incredibly easy to run tasks such as these :)
Join the Discord: https://discord.com/invite/foss
This is thinkingmachines/Inkling-2-Mini with its refusal behaviour removed by directional ablation. It has the same files and the same NVFP4 (modelopt) format as the original, so it loads anywhere the original loads.
GGUF quants: mrfakename/Inkling-2-Mini-abliterated-GGUF.
What changed
- Refusal directions were measured separately for chat (reasoning effort
none) and think prompts on the Q8_0 GGUF, at every one of the 48 layer slots the looped model runs per token (layers 6–17 run three times). The subspace candidates are the top singular vectors of the directions from the later slots, where refusal separates best. - A multi-objective search (minimise refusals, keep the first-token KL on harmless prompts low) chose the subspace rank and per-layer strengths. It settled on a single direction (rank 1). Expert down-projections get strength 0.47–0.65 on layers 6–23. Attention outputs get 0.97–1.31 on layers 8–23. Layers 0–5 are left alone.
- That direction was projected out of the residual-stream writes:
attn.wo_ud(BF16) on 16 layers andmlp.experts.w2_weightfor all 128 experts on 18 layers. That is 34 tensors. Because the core layers share weights across their three passes, the edit applies to every pass. - The expert weights stay in their native formats: NVFP4 on layers 6–19 and MXFP8 on layers 20–23. Every scale is kept and only the 4-/8-bit codes change. Plain re-rounding would leave about 60% of the removed direction behind as rounding noise. Instead, each weight goes to the grid value just below or above its target, chosen row by row so the rounding errors cancel along the removed direction. About 1.4% is left on the NVFP4 layers and 0.4% on the MXFP8 ones.
bake-stats.txtlists every tensor.
Nothing else was touched: layers 0–5, the router, the shared attention and loop controllers, embeddings, the vision tower and mtp.safetensors are bit-identical to the original.
Results (Q8_0 GGUF, greedy)
| refusals, chat (/100) | think mode, reasoning or answer refuses (/100) | KL, harmless first token | |
|---|---|---|---|
| original | 100 | 76 | 0 |
| abliterated | 1 | 0 | 0.116 |
The 100 prompts are held-out harmful requests. Chat replies were 384 tokens. Think mode also got 384 tokens, and none of the replies finished reasoning in that budget, so the reasoning text itself was judged. The KL figure includes a small noise floor from batched inference. Replies to harmless prompts are about the same length (587 vs 638 characters on average) and show no repetition.
Files
model-00001-of-00001.safetensors: the patched NVFP4 checkpoint (same index as the original).abliteration-lora.gguf: a rank-1 LoRA that applies the same edit to the original GGUFs, e.g.llama-server -m Inkling-2-Mini-Q8_0.gguf --lora abliteration-lora.gguf.abliteration-edit.npz: the subspace basisQand the per-layer strengthsscales[layer, (attn, experts)]. The edit isW' = W - s·QQᵀW.bake-stats.txt: per-tensor check of how much of the subspace is left after the edit.
This model will comply with harmful requests. You are responsible for how you use it.
Abliterated with Lucid (lucid-toolkit.org).
- Downloads last month
- 1,388
