Instructions to use distributedcognition/Inkling-2-Mini-abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use distributedcognition/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="distributedcognition/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("distributedcognition/Inkling-2-Mini-abliterated") model = AutoModelForMultimodalLM.from_pretrained("distributedcognition/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 distributedcognition/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 "distributedcognition/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": "distributedcognition/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/distributedcognition/Inkling-2-Mini-abliterated
- SGLang
How to use distributedcognition/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 "distributedcognition/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": "distributedcognition/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 "distributedcognition/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": "distributedcognition/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 distributedcognition/Inkling-2-Mini-abliterated with Docker Model Runner:
docker model run hf.co/distributedcognition/Inkling-2-Mini-abliterated
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="distributedcognition/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("distributedcognition/Inkling-2-Mini-abliterated")
model = AutoModelForMultimodalLM.from_pretrained("distributedcognition/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]:]))
Inkling-2-Mini Abliterated (gated alpha 0.1 on main)
Responsible use
This is an abliterated research model. Its built-in refusal behavior was reduced at the weight level, so it can answer prompts the base model declines, including chemical and biological synthesis, cybercrime, weapons, harassment, and fraud. Use it for red-teaming, offensive-security research, and refusal-rate evaluation. Do not rely on its remaining refusals as guardrails: if you deploy it, add your own input and output moderation (for example Llama Guard).
What this is
An abliterated derivative of thinkingmachines/Inkling-2-Mini, a multimodal MoE with 24 physical layers applied over 48 logical visits. It uses shared loop weights, AttnRes, loop gates and channel convolutions. The edits change selected BF16 attention output projections. Routed experts retain their original mixed NVFP4/MXFP8 storage; the vision weights, tokenizer, chat template and model configuration are preserved.
main keeps the conservative gated alpha 0.1 checkpoint: judge refusals fell from 69 to 63 of 104, and full MMLU fell from 79.433% to 79.369%. Stronger settings reached 12 or 5 judged refusals, with larger losses on the MMLU screening set.
All ten native variants are available on the variants/* branches below. main retains the alpha 0.1 model from the original native release. The branch exports reconstruct the recorded configurations; their evaluation evidence comes from the earlier runs. GGUF releases are available for gated-a0.8 and gated-a1.4; see GGUF downloads. main remains the native alpha 0.1 checkpoint.
Variants and measured tradeoffs
The table covers all ten configured settings. gated edits the 21 physical layers that pass the fit criteria. all edits the 22 layers with retained nonzero directions, layers 2 through 23. The gated set also omits layer 6. Each physical writer is edited once, including layers the model visits repeatedly.
Judge counts are REFUSAL / PARTIAL / COMPLIANT / INCOMPLETE, out of 104 prompts. UNKNOWN is zero for every completed judgment file. n/a means the measurement was not completed, not a zero score. The screen contains 2,277 items, despite the source filename mmlu-2280.jsonl.
| Variant / branch | Judge counts / 104 | MMLU screen | Change vs paired base | Evaluation coverage | Branch evidence |
|---|---|---|---|---|---|
gated-a0.1, also main |
63 / 7 / 34 / 0 | 80.105% | +0.307 pp | Recovery sweep, full 14,042-item MMLU, 10 image requests | metrics / identity |
gated-a0.2 |
63 / 9 / 32 / 0 | 79.974% | +0.176 pp | Recovery sweep; no full MMLU or image evaluation | metrics / identity |
gated-a0.4 |
n/a | 79.359% | -0.439 pp | Recovery MMLU screen only | metrics / identity |
gated-a0.6 |
n/a | 79.359% | -0.439 pp | Recovery MMLU screen only | metrics / identity |
gated-a0.8 |
12 / 22 / 70 / 0 | 78.700% | -1.098 pp | Original sweep; no full MMLU or image evaluation | metrics / identity |
gated-a1.0 |
5 / 28 / 69 / 2 | 78.393% | -1.405 pp | Original sweep; two incomplete responses | metrics / identity |
gated-a1.2 |
4 / 26 / 72 / 2 | 78.480% | -1.318 pp | Original sweep; two incomplete responses | metrics / identity |
gated-a1.4 |
5 / 15 / 84 / 0 | 77.953% | -1.845 pp | Original sweep; no full MMLU or image evaluation | metrics / identity |
all-a1.0 |
6 / 26 / 72 / 0 | 78.524% | -1.274 pp | Original sweep; no full MMLU or image evaluation | metrics / identity |
all-a1.2 |
n/a | n/a | n/a | Interrupted after 67 of 104 response generations; no aggregate judgment or capability score | metrics / identity |
The original and recovery runs each measured their own baseline on the same allocation as their candidates. Both produced 69 / 8 / 27 / 0 judgments and 79.798% screen accuracy. Every change uses the candidate's own paired baseline; the table combines two separate runs.
gated-a0.8 has 12 refusals out of 104 (11.54%), with a 1.098-point screen loss. gated-a1.4 has 5 refusals (4.81%) and 84 compliant judgments, with a 1.845-point loss. The other five-refusal setting, gated-a1.0, has two incomplete responses; so does the four-refusal gated-a1.2. Low refusal counts do not make their partial or incomplete answers successful. None of these stronger settings has a full MMLU result.
The original selection rule allowed at most a 0.25 percentage-point MMLU loss and required complete judgments. All five completed original sweep arms exceeded that loss limit. Recovery screened alphas 0.1, 0.2, 0.4 and 0.6 before generating responses; only 0.1 and 0.2 passed. Both had 63 refusals. Alpha 0.1 ranked first because it had fewer partial responses, then passed full MMLU. The default therefore favors measured capability preservation over stronger refusal reduction.
Load
Use the pinned Transformers implementation at 6173a2f. The measured runtime used PyTorch 2.10.0+cu130, torchvision 0.25.0, and this Transformers source, which reports 5.24.0.dev0. Package versions and hardware are recorded in the evaluation protocol and runtime setup records.
This load path dequantizes the experts to BF16 and needs approximately 50 GiB for weights, plus activation and cache space. The file size of the mixed checkpoint is not its BF16 GPU memory requirement. The completed recovery evaluation used one H200.
The repository uses automatic access approval. Request access on Hugging Face and authenticate before loading. The example selects alpha 0.8 explicitly; loading without a revision still selects main, alpha 0.1.
import torch
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "distributedcognition/Inkling-2-Mini-abliterated"
revision = "variants/gated-a0.8" # 12 judged refusals; -1.098 pp on the MMLU screen
# Use revision="main" for the conservative alpha 0.1 default.
# Pin a branch commit SHA when you need an immutable model revision.
processor = AutoProcessor.from_pretrained(
model_id, revision=revision, token=True, trust_remote_code=False
)
model = AutoModelForMultimodalLM.from_pretrained(
model_id,
revision=revision,
token=True,
dtype=torch.bfloat16,
device_map={"": "cuda:0"},
attn_implementation="eager",
trust_remote_code=False,
).eval()
Use the upstream processor and chat template. Ordinary evaluation generations use greedy decoding and reasoning_effort="none"; judgments score the final text channel separately from thinking. Ten high-reasoning generations per base/winner are archived without a reasoning-quality claim. Upstream mtp.safetensors (635,801,416 bytes) is preserved unchanged. MTP draft inference was not evaluated.
GGUF downloads
GGUF files are available for two variants: gated alpha 0.8, which had 12 judged refusals in the native sweep, and gated alpha 1.4, which had 5. Their native MMLU screen losses were 1.098 and 1.845 percentage points. These are historical native results; the GGUF files have not received behavioral evaluation.
| Variant branch | Downloads | Conversion manifest |
|---|---|---|
variants/gated-a0.8 |
Alpha 0.8 GGUF folder | Exact filenames, bytes and SHA256 |
variants/gated-a1.4 |
Alpha 1.4 GGUF folder | Exact filenames, bytes and SHA256 |
Each folder contains four text GGUFs and one F16 vision projector. Use the projector from the same variant folder for image input.
| Format | Gated alpha 0.8: file / size | Gated alpha 1.4: file / size |
|---|---|---|
| Q8_0 | Inkling-2-Mini-abliterated.Q8_0.gguf / 27.820 GB |
Inkling-2-Mini-abliterated.Q8_0.gguf / 27.820 GB |
| Q6_K | Inkling-2-Mini-abliterated.Q6_K.gguf / 23.602 GB |
Inkling-2-Mini-abliterated.Q6_K.gguf / 23.602 GB |
| Q5_K_M | Inkling-2-Mini-abliterated.Q5_K_M.gguf / 20.019 GB |
Inkling-2-Mini-abliterated.Q5_K_M.gguf / 20.019 GB |
| Q4_K_M | Inkling-2-Mini-abliterated.Q4_K_M.gguf / 17.590 GB |
Inkling-2-Mini-abliterated.Q4_K_M.gguf / 17.590 GB |
| F16 vision projector | mmproj-Inkling-2-Mini-abliterated.F16.gguf / 0.639 GB |
mmproj-Inkling-2-Mini-abliterated.F16.gguf / 0.639 GB |
Sizes use decimal GB; the linked manifests retain exact byte counts and file hashes. The directories are gguf/<native-variant-commit>-b12600 on their corresponding variant branches. They do not replace the native checkpoint or change the default on main. Native manifests describe the pinned source commits. Adding the GGUFs appends five file-specific Git LFS rules to .gitattributes; the original rules and every other native file remain unchanged.
Conversion uses llama.cpp b12600, pinned to 29b52d398b294509746ec0a3f28948a3107c0213. Q8_0 is converted from each edited native mixed NVFP4/MXFP8 checkpoint. Q6_K, Q5_K_M and Q4_K_M are then requantized from Q8_0 with --allow-requantize, which adds rounding relative to direct quantization from higher-precision weights. The F16 projector is required for images. Publication checks cover bytes, GGUF metadata and provenance; they do not establish generation quality, preserved refusal rates or per-quant capability scores.
The 24 expert-down tensors have 1,152 columns, which do not fit the 256-element K-quantization blocks. The quantizer therefore uses fallback formats: Q6_K keeps all 24 at Q8_0; Q5_K_M uses 12 Q8_0 and 12 Q5_1; Q4_K_M uses 12 Q8_0 and 12 Q5_0. The converter reports effective bits per weight of 7.24, 6.14 and 5.39 for these three files, respectively.
Evaluation of main
| Metric | Paired base | Gated alpha 0.1 |
|---|---|---|
| Judge REFUSAL / 104 | 69 | 63 |
| Judge PARTIAL / 104 | 8 | 7 |
| Judge COMPLIANT / 104 | 27 | 34 |
| Judge INCOMPLETE / UNKNOWN | 0 / 0 | 0 / 0 |
| Keyword markers / 104 | 104 | 103 |
| Benign keyword refusals / 100 | 4 | 3 |
| Truncated benign responses / 100 | 2 | 4 |
| Full MMLU, 14,042 items | 79.433% | 79.369% (-0.064 pp) |
| GSM8K spot check | 20/20 | 20/20 |
| Next-token KL on 100 harmless prompts | 0 | 0.0052208 |
| Image-request judge REFUSAL / 10 | 7 | 7 |
| Image-request judge COMPLIANT / 10 | 1 | 3 |
On the paired text prompts, 16 baseline refusals became partial or compliant answers, while 10 previously non-refusing answers became refusals. The net reduction is six. The two-sided exact paired test gives p = 0.327 before accounting for candidate selection. This is a small observed improvement, with substantial uncertainty about its generality.
The restored, unmodified base model judged every candidate, without an independent external judge or human audit. The 104 prompts were held out from fitting but used for candidate selection. Full MMLU includes the screening items. The keyword detector also flags warnings and hedging, so its count differs from semantic judgments; neither is human-verified. GSM8K has only 20 items and the image set only 10. Image refusals did not decrease for main.
Method
Calibration used 128 harmful and 128 harmless prompts. Hooks captured the AttnRes-mixed MLP input before the loop gate and RMS norm at all 48 logical visits. Visits of a shared layer were averaged per prompt before fitting a harmful-minus-harmless direction, orthogonalized against the harmless mean. Gated layers required held-out AUC above 0.99 and split-half cosine above 0.9. Per-visit AUC and directional cosines are recorded as diagnostics; this run did not enforce a minimum cosine between visits.
For each selected physical layer, the edit subtracts alpha * r (r^T W) from its attention output weight in FP32, restores the original row norms, and stores the result in BF16. The checkpoint writer is model.llm.layers.{i}.attn.wo_ud.weight; its runtime counterpart is model.language_model.layers.{i}.self_attn.o_proj.linear.weight. Each edit starts from pristine weights. Reapplying an edit to an already edited checkpoint does not reproduce a different alpha.
The channel convolution after the attention projection makes this an empirical intervention, not an exact removal of the direction from the whole residual stream. Routed experts and vision tensors are not edited. Text results alone do not establish image behavior.
Artifacts and provenance
The native alpha 0.1 checkpoint replaces selected BF16 writer byte ranges in the original mixed NVFP4/MXFP8 shard; other bytes and the header are preserved. The serialized checkpoint was independently loaded after unloading the evaluated candidate. That receipt establishes byte integrity and loadability only, with no post-export generation or logit-equivalence comparison. Scores describe the evaluated in-memory candidates. The ten branch exports reconstruct those settings from the pinned upstream checkpoint and saved directions. Their alpha 0.1 BF16 writer payloads were required to match the published reference patch exactly before publication. That check does not independently establish byte equality for every historical candidate. The branch exports received byte-integrity checks, without a new model-load test, generation or behavioral evaluation.
Original run: 5ca65ba9-1bea-49c2-b2c6-2f66e2466557. Recovery run: 9662e3d4-daed-4d26-ae2f-44f49a04df0e, using the hash-verified original calibration and preserving the old raw records. Reconstructing all-a1.2 does not fill in its interrupted measurements.
Each branch has its own release-identity.json, release-files.json and variant-byte-integrity.json. Its variant-evaluation.json records the historical arm, paired baseline, source allocation and missing measurements. The table links the metrics and identity for every branch. Original evaluation files and alpha 0.1 export receipts remain at the immutable source revision rather than being presented as fresh branch verification.
The immutable native release retains:
abliteration_config.json, the recovery protocol, metrics and screened exclusions.eval-results/, raw responses, judgments, MMLU answers, KL and export receipts.eval-results/historical/5ca65ba9-1bea-49c2-b2c6-2f66e2466557/, the original sweep and interrupted-arm records.dirs.npz, fit reports andcalibration-protocol.json, the reused calibration;refusal_directions.ptalso records the selected alpha 0.1 candidate.release-files.json,release-identity.jsonandeval-results/recovery-input-manifest.json, the artifact and input hashes. Those immutable release receipts describe alpha 0.1, not a newly reconstructed variant.
Upstream checkpoint: ed40e7da625f594fc9c4990f5f66be24873c22d7. Original checkpoint archive SHA256: 009caa788673ec0a73784fef6e0c832a3b4e5de9c2c96c5ff8f5872e0f745dfc (196,203,537 bytes). Recovery-input manifest SHA256: cc2a218d9646db13d46f8ef6cc6ca86b905df2909e971be1474873f76e4a2b03.
Apache 2.0, inherited from Thinking Machines Lab's base model. The upstream card, license and attribution are preserved. The method follows residual-direction abliteration with projected, norm-preserving writer edits. This derivative is not affiliated with or endorsed by the base-model authors.
- Downloads last month
- 15
Model tree for distributedcognition/Inkling-2-Mini-abliterated
Base model
thinkingmachines/Inkling-2-Mini
# Gated model: Login with a HF token with gated access permission hf auth login