Image-Text-to-Text
MLX
Safetensors
English
inkling2_loop
inkling2
mixture-of-experts
rogue
abliterated
conversational
4-bit precision
Instructions to use carsenk/Inkling-2-Mini-ROGUE-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use carsenk/Inkling-2-Mini-ROGUE-MLX-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("carsenk/Inkling-2-Mini-ROGUE-MLX-4bit") config = load_config("carsenk/Inkling-2-Mini-ROGUE-MLX-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use carsenk/Inkling-2-Mini-ROGUE-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "carsenk/Inkling-2-Mini-ROGUE-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "carsenk/Inkling-2-Mini-ROGUE-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use carsenk/Inkling-2-Mini-ROGUE-MLX-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "carsenk/Inkling-2-Mini-ROGUE-MLX-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default carsenk/Inkling-2-Mini-ROGUE-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use carsenk/Inkling-2-Mini-ROGUE-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "carsenk/Inkling-2-Mini-ROGUE-MLX-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "carsenk/Inkling-2-Mini-ROGUE-MLX-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
|
Download README.md from carsenk/Inkling-2-Mini-ROGUE-MLX-4bit: direct link, hf CLI and curl.
- Browser
- Download file 5.79 kB
-
https://huggingface.co/carsenk/Inkling-2-Mini-ROGUE-MLX-4bit/resolve/main/README.md
- Command line
-
hf download hf://carsenk/Inkling-2-Mini-ROGUE-MLX-4bit/README.md
-
curl -L -o README.md https://huggingface.co/carsenk/Inkling-2-Mini-ROGUE-MLX-4bit/resolve/main/README.md
5.79 kB
| 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](https://huggingface.co/carsenk/Inkling-2-Mini-ROGUE), a ROGUE-processed [thinkingmachines/Inkling-2-Mini](https://huggingface.co/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](https://huggingface.co/carsenk/Inkling-2-Mini-ROGUE) · [GGUF](https://huggingface.co/carsenk/Inkling-2-Mini-ROGUE-GGUF) | |
| > **Requires mlx-lm with Inkling 2 support.** At release time this is [ml-explore/mlx-lm#2086](https://github.com/ml-explore/mlx-lm/pull/2086), not yet in a tagged release: | |
| > | |
| > ```bash | |
| > pip install -U "git+https://github.com/ml-explore/mlx-lm.git@refs/pull/2086/head" | |
| > ``` | |
| ## Usage | |
| ```python | |
| 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`](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. | |