Instructions to use carsenk/Inkling-2-Mini-ROGUE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use carsenk/Inkling-2-Mini-ROGUE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="carsenk/Inkling-2-Mini-ROGUE") 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("carsenk/Inkling-2-Mini-ROGUE") model = AutoModelForMultimodalLM.from_pretrained("carsenk/Inkling-2-Mini-ROGUE", 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 carsenk/Inkling-2-Mini-ROGUE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "carsenk/Inkling-2-Mini-ROGUE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "carsenk/Inkling-2-Mini-ROGUE", "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/carsenk/Inkling-2-Mini-ROGUE
- SGLang
How to use carsenk/Inkling-2-Mini-ROGUE 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 "carsenk/Inkling-2-Mini-ROGUE" \ --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": "carsenk/Inkling-2-Mini-ROGUE", "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 "carsenk/Inkling-2-Mini-ROGUE" \ --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": "carsenk/Inkling-2-Mini-ROGUE", "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 carsenk/Inkling-2-Mini-ROGUE with Docker Model Runner:
docker model run hf.co/carsenk/Inkling-2-Mini-ROGUE
Inkling-2-Mini-ROGUE
thinkingmachines/Inkling-2-Mini processed with ROGUE to remove refusal behavior, shipped in the same native format as the official release: routed experts in NVFP4 (MXFP8 in layers 20–23), everything else BF16, with the original hf_quant_config.json, tokenizer, chat template, vision tower and MTP head. It loads wherever the official checkpoint loads.
Other formats: GGUF (Q8_0–Q3_K_M + mmproj) · MLX 4-bit
About ROGUE
ROGUE is a refusal-direction weight-editing method from WeightDojo. It estimates refusal directions from balanced harmful/harmless activation contrasts, scores candidate depths on held-out prompts with benign-subspace preservation, and applies a low-rank orthogonal projection to the matrices that write into the residual stream. It changes the weights directly; it is not a prompt, adapter, or inference-time filter.
Inkling-2-Mini needed architecture-specific handling, all of which is implemented in WeightDojo:
- Native packing. The official checkpoint stores its routed experts as NVFP4 (MXFP8 in layers 20–23). Each edited expert tensor is decoded, edited in float32, and re-encoded in the same packing; untouched tensors are byte-identical.
- Post-writer short convolutions. Every attention output (
wo_ud) and routed-expert down projection (w2) feeds a causal depthwise short convolution before reaching the residual stream. A plain projection does not commute with it, so ROGUE removes the span of the direction and its convolution-tap images from each writer, which makes the removal exact after the convolution. - Looped core. Layers 6–17 run three times per token. Calibration records each layer's final-pass output.
- Routed experts included. Inkling-2-Mini has no shared expert; the edit is broadcast across all 128 routed experts in each selected layer.
Model and edit details
- Architecture: Inkling 2 looped MoE, 24 layers (layers 6–17 run 3 passes), 128 routed experts, 8 active per token, image input
- Base revision:
ed40e7da625f594fc9c4990f5f66be24873c22d7· license Apache-2.0 - Recipe:
weightdojo convert --scope residual-writers --mlp-scale 1.0 --rank 3 --strength 1.4 --group-calibration --calibration-samples 32 --max-harmless-projection 0.30 - Direction layers selected: 13, 14, 9 (rank-3 concept cone)
- Edited: 16 writer tensors in layers 8, 9, 10, 12, 13, 14, 15, 16 (attention
wo_ud+ fused routed-expertw2), convolution-aware subspace rank 15 per writer - Re-encoding error of edited experts (NVFP4/MXFP8): MSE 2.4e-7; all other tensors byte-identical to the base
- Vision tower and MTP head: unmodified
Evaluation
All comparisons are against the official model processed identically (same format, same quantization, same runtime), so the differences are attributable to ROGUE.
Refusal behavior — ROGUE Pareto v2 (40 prompts, MLX, native checkpoint, reasoning off, 1024-token budget)
| Metric | Base | ROGUE |
|---|---|---|
| Harmful-prompt refusal rate | 75.0% | 0.0% |
| Sensitive-but-benign over-refusal | 0.0% | 0.0% |
| Retain score (exact-answer utility) | 91.7% | 91.7% |
Every harmful prompt produced a final answer within the budget for both models; refusal is scored on the final answer, not the reasoning trace.
Capability — lm-evaluation-harness through llama-server (Q8_0, reasoning off, 40 samples per task)
| Task | Base Q8_0 | ROGUE Q8_0 |
|---|---|---|
| GSM8K (5-shot, flexible extract) | 60.0% | 67.5% |
| GSM8K (strict match) | 40.0% | 65.0% |
| IFEval (prompt-level strict) | 75.0% | 67.5% |
| IFEval (instruction-level loose) | 73.0% | 66.7% |
With 40 samples the standard error is about ±7.5 points, so GSM8K shows no loss and IFEval shows a drop of roughly one standard error. Treat these as a smoke-level capability check, not leaderboard numbers.
Distribution drift — wikitext-2 (40 × 512 tokens, Q8_0 vs Q8_0)
| Metric | Value |
|---|---|
| Perplexity ratio (ROGUE / base) | 1.116 |
| Mean KL divergence | 0.130 |
| Same top token | 84.7% |
This is a real shift in next-token distribution. Gentler settings (rank 1, fewer layers, lower strength) reduced drift to KL 0.02–0.06 but left most refusals in place on this model, so this release favors complete refusal removal; the trade-off is documented rather than hidden.
Reports: evaluation/
Usage
Use it exactly like the official checkpoint (same architecture, packing and chat template). Reasoning depth is set through the chat template's reasoning_effort (none … max, default high).
Responsible use
Directional ablation removes learned refusal behavior and materially reduces the model's built-in safety controls. It does not add knowledge or capability. Use it for research and in settings with appropriate safeguards outside the model, and follow the base model's license and applicable law.
- Downloads last month
- 49