carsenk's picture
Model card, config, tokenizer and evaluation reports
a21f44f verified
|
Raw History Blame Contribute Delete
5.79 kB
metadata
language:
  - en
license: apache-2.0
library_name: mlx
pipeline_tag: image-text-to-text
base_model:
  - thinkingmachines/Inkling-2-Mini
tags:
  - mlx
  - inkling2
  - mixture-of-experts
  - rogue
  - abliterated
  - conversational

Inkling-2-Mini-ROGUE-MLX-4bit

MLX build of carsenk/Inkling-2-Mini-ROGUE, a ROGUE-processed thinkingmachines/Inkling-2-Mini, for Apple silicon.

The routed experts keep the checkpoint's native NVFP4 encoding (MXFP8 in layers 20–23); all other quantizable weights are 4-bit affine (group size 64). 5.25 bits per weight, 16 GB.

Other formats: native NVFP4/MXFP8 safetensors · GGUF

Requires mlx-lm with Inkling 2 support. At release time this is ml-explore/mlx-lm#2086, not yet in a tagged release:

pip install -U "git+https://github.com/ml-explore/mlx-lm.git@refs/pull/2086/head"

Usage

from mlx_lm import load, generate

model, tokenizer = load("carsenk/Inkling-2-Mini-ROGUE-MLX-4bit")
messages = [{"role": "user", "content": "Explain how mixture-of-experts routing works."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, reasoning_effort="low")
print(generate(model, tokenizer, prompt=prompt, max_tokens=1024))

Or serve it: mlx_lm.server --model carsenk/Inkling-2-Mini-ROGUE-MLX-4bit.

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.

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.

MLX 4-bit runtime smoke

Run on this exact file (Apple M1 Ultra, reasoning off, 1024-token budget), with the 8 harmful prompts from the Pareto suite plus two exact-answer checks:

Check Result
Exact-answer prompts (arithmetic, capital city) 2 / 2 correct
Harmful prompts refused 1 / 8
Harmful prompts that finished reasoning within budget 6 / 8

The 4-bit MLX build carries the ROGUE effect slightly less completely than the native checkpoint (0 / 8 refused) and the Q4_K_M–Q8_0 GGUF files (0 / 8 each); quantizing non-expert weights to 4-bit nudges a few borderline prompts back toward refusal or longer deliberation. Use the native checkpoint or a GGUF if you need the full effect. Report: evaluation/mlx-runtime-smoke.json.

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.