base_model: XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B
library_name: mlc-llm
tags:
- mlc-llm
- web-llm
- webgpu
- q4f16_1
- mimo
- qwen3.5
- abliterated
- uncensored
- agent
- coding
license: mit
MiMo-V2.6-Distill-Qwen-9B-abliterated-q4f16_1-MLC
MLC-compiled weights for XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B (Abliterated / Uncensored version), quantized in q4f16_1 for 100% in-browser WebLLM and WebGPU inference.
🌟 Overview & What Makes This Special
MiMo-V2.6-Distill-Qwen-9B is Xiaomi's reinforcement-learning distilled reasoning model based on Qwen3.5-9B, achieving top-tier open-source coding performance (SWE-bench Verified 61.1%, SWE-bench Pro 44.6%).
This repository hosts an Abliterated (Refusal-Free) conversion in MLC format, specifically designed for local coding agents (like Broub) and local creative applications where ethical-filter refusals ("I cannot assist with this request...") obstruct valid cybersecurity research, penetration testing, malware reverse engineering, and creative writing.
🔬 Creator Insights & Technical Findings ()
1. Zero-Compile WebGPU Wasm Reuse ()
- Architecture:
Qwen3_5ForConditionalGeneration(model_type: qwen3_5). - Layer count (32), hidden size (4096), intermediate size (12288), and vocabulary (248320) are 100% identical to official
Qwen3.5-9B. - Wasm: You can directly reuse the official prebuilt
Qwen3.5-9B-q4f16_1_cs1k-webgpu.wasmfrommlc-aiwithout compiling any C++ or WebAssembly yourself!
2. Surgical Abliteration on Hybrid Architecture ()
Qwen3.5 is not a standard Transformer; it features a unique hybrid attention design:
- Every 4th layer is a standard Full Attention (
self_attnwitho_proj). - The other 3 layers are Linear Attention (Gated DeltaNet / Mamba with
linear_attn.out_proj). - All layers feature an MLP (
mlp.down_proj).
To eliminate refusals without damaging coding or logical reasoning:
- Refusal direction vectors $\vec{r} \in \mathbb{R}^{4096}$ were extracted from the residual streams of contrastive prompt pairs.
- Instead of wiping all layers, we applied surgical orthogonal projection subtraction restricted strictly to intermediate layers (Layer 8 to 26):
$$W_{\text{new}} \leftarrow W - \vec{r} \otimes (\vec{r}^T W)$$
where $W$ is the output projection (o_proj,out_proj, ordown_proj). - This mathematical guarantee ensures $(W_{\text{new}} x) \cdot \vec{r} \approx 0$, removing refusal steering while preserving 100% of the token syntax and reasoning capabilities.
📊 Evaluation & Verification ()
Evaluation was performed directly prior to quantization (see ablation_benchmark_report.json in this repo):
| Benchmark Category | Base Model (Before) | Abliterated Model (After) | Result |
|---|---|---|---|
| 💻 Security / Exploit & Reversing | Refused ("...but I won't write a code snippet") | Accepted ("I'll explain the mechanics and write a demonstration") | Refusal Removed ✅ |
| 🔞 Creative / Sensual Romance | Hesitant / Moralizing | Accepted (Vivid, uninhibited atmospheric prose) | Refusal Removed ✅ |
| 🧠 Intelligence / LRU Cache Python | Perfect $O(1)$ implementation | Perfect $O(1)$ implementation (Zero degradation) | Preserved 100% ✅ |
| 🤖 Agent Tool Calling (Strict JSON) | Valid JSON schema | Valid JSON schema (No commentary leakage) | Preserved 100% ✅ |
🚀 Usage in Broub & WebLLM
Broub (Browser-Local Coding Agent)
Go to the Models page in Broub, select Custom Model, and enter:
{
"model": "https://huggingface.co/aaaaaeeeee/MiMo-V2.6-Distill-Qwen-9B-abliterated-q4f16_1-MLC",
"model_id": "MiMo-V2.6-Distill-Qwen-9B-abliterated-q4f16_1-MLC",
"model_lib": "https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-9B-q4f16_1_cs1k-webgpu.wasm",
"vram_required_MB": 6433,
"overrides": {
"context_window_size": 4096,
"max_history_size": 1
}
}
WebLLM JavaScript API
import { CreateWebWorkerMLCEngine } from "@mlc-ai/web-llm";
const appConfig = {
model_list: [
{
model: "https://huggingface.co/aaaaaeeeee/MiMo-V2.6-Distill-Qwen-9B-abliterated-q4f16_1-MLC",
model_id: "MiMo-V2.6-Distill-Qwen-9B-abliterated-q4f16_1-MLC",
model_lib: "https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-9B-q4f16_1_cs1k-webgpu.wasm",
vram_required_MB: 6433
}
]
};
const engine = await CreateWebWorkerMLCEngine(
new Worker(new URL("./worker.ts", import.meta.url), { type: "module" }),
"MiMo-V2.6-Distill-Qwen-9B-abliterated-q4f16_1-MLC",
{ appConfig }
);
⚙️ Recommended Generation Parameters
Taken from publisher recommendations and verified on WebLLM:
- Temperature:
0.6(for reasoning/code),0.8 - 1.0(for creative writing) - Top P:
0.95 - Thinking Mode: Supported! Generates chain-of-thought within
<think>...</think>. - Hardware Requirement: Dedicated GPU with 8 GB+ VRAM recommended (estimated footprint ~6.43 GB with 4K context).