Files
Table with columns: File, Size, For| File | Size | For |
|---|
model-000*.safetensors (bf16) | 41 GB | transformers / further fine-tuning / your own quants |
gguf/qwen3-coder-next-reap128-uncensored-IQ2_XXS.gguf | 6.0 GB | 16 GB laptops, Intel Iris Xe iGPU, 8 GB GPUs |
gguf/qwen3-coder-next-reap128-uncensored-IQ4_XS.gguf | 11.7 GB | 16–24 GB GPUs |
reap_keep.json | | original expert indices kept in each layer |
GGUF quants use an importance matrix computed on the 80B parent (300 × 512 tokens of teacher-written code).
The MTP head is not included in the GGUF.
Usage
llama.cpp
huggingface-cli download ch2oma/qwen3-coder-next-reap128-uncensored gguf/qwen3-coder-next-reap128-uncensored-IQ2_XXS.gguf --local-dir .llama-server -m gguf/qwen3-coder-next-reap128-uncensored-IQ2_XXS.gguf -ngl 99 -c 32768 --jinja# Intel / AMD iGPU: use a Vulkan build of llama.cpp, same command
Ollama (Modelfile)
FROM ./qwen3-coder-next-reap128-uncensored-IQ2_XXS.ggufPARAMETER num_ctx 32768PARAMETER temperature 0.7PARAMETER top_p 0.8PARAMETER top_k 20PARAMETER repeat_penalty 1.05
ollama create qwen3-coder-next-reap128-uncensored:iq2_xxs -f Modelfile
transformers (≥ 4.57, flash-linear-attention recommended)
from transformers import AutoModelForCausalLM, AutoTokenizerm = "ch2oma/qwen3-coder-next-reap128-uncensored"tok = AutoTokenizer.from_pretrained(m)model = AutoModelForCausalLM.from_pretrained(m, torch_dtype="bfloat16", device_map="auto")
Non-thinking model (no <think> block). Tool-call parsers for vLLM / SGLang are included
(qwen3coder_tool_parser_vllm.py, qwen3_coder_detector_sgl.py).
Speed (decode, single stream)
Table with columns: Quant, Hardware, tok/s| Quant | Hardware | tok/s |
|---|
| IQ2_XXS | RTX A5000 24 GB (CUDA) | ~94 |
| IQ2_XXS | Intel Iris Xe iGPU, 16 GB RAM laptop (Vulkan) | ~11.6 |
| IQ4_XS | RTX A5000 24 GB (Ollama), fully offloaded | ~98.5 |
How it was made
1. REAP expert pruning
- Saliency per expert:
S_e = mean over routed tokens of (renormalized top-k router weight × ‖expert output‖₂),
measured on the full 512-expert model (official FP8 checkpoint, 1× H200).
- Calibration: 1,024 windows × 2,048 tokens = 2.1M tokens of teacher-written code
(Magicoder-OSS + evol-codealpaca prompts answered by Qwen3-Coder-Next, decontaminated against HumanEval/MBPP).
- Kept the top-128 experts per layer, remapped indices and sliced the router rows.
Attention, Gated DeltaNet, shared experts, embeddings and lm_head are untouched.
- Block-FP8 (128×128) weights dequantized to bf16:
W = W_fp8 × repeat(weight_scale_inv, 128, 128).
2. Abliteration (directional ablation)
- Refusal direction per layer:
r = normalize(mean_harmful − mean_harmless) of last-token residuals,
100 harmful (mlabonne/harmful_behaviors) vs 100 harmless (mlabonne/harmless_alpaca) prompts.
- Projected
r out of every matrix that writes to the residual stream, weight 1.0: W ← W − r(rᵀW) on
self_attn.o_proj, linear_attn.out_proj, shared_expert.down_proj and all 128 experts.*.down_proj
in each of the 48 layers — 6,240 matrices.
3. KD healing (logit distillation from the 80B teacher)
- Data: 1.5M tokens of code with the teacher's top-20 log-probs per position, packed into 3,072-token sequences.
- Loss:
0.7 × soft CE (vs renormalized teacher top-20) + 0.3 × hard CE (next token).
- QLoRA on the NF4-quantized student: r = 32, α = 64, on all attention, linear-attention (DeltaNet) and
shared-expert projections; routed experts and router frozen.
- batch 1 × grad-accum 4, lr 1e-4 cosine, 195 steps, ~6 h on 1× RTX A5000. LoRA merged into bf16 weights.
Table with columns: Checkpoint (KD positions, vs 80B teacher), soft CE, hard CE, top-1 agreement| Checkpoint (KD positions, vs 80B teacher) | soft CE | hard CE | top-1 agreement |
|---|
| REAP-128, before abliteration | 0.633 | 0.602 | 84.0% |
| after abliteration, before healing | 0.684 | 0.656 | 82.1% |
| after KD healing (training loss, last steps) | ~0.45 (mixed loss) | | |
Abliteration cost ~0.05 nats of agreement with the teacher; healing recovered more than that.
Evaluation
EvalPlus, greedy, max 1,536 new tokens, prompt: "Please provide a self-contained Python script that solves the
following problem in a markdown code block".
Table with columns: Model, HumanEval, HumanEval+, MBPP, MBPP+| Model | HumanEval | HumanEval+ | MBPP | MBPP+ |
|---|
| Qwen3-Coder-Next 80B FP8 (parent) | 92.7 | 87.2 | 91.8 | 76.7 |
| REAP-128 IQ2_XXS, before abliteration & healing | 82.3 | 78.0 | 78.8 | 63.2 |
| This model (abliterated + healed), IQ2_XXS | 84.1 | 78.0 | 79.6 | 64.6 |
| This model (abliterated + healed), IQ4_XS | 93.3 | 89.0 | 87.3 | 71.4 |
The first two rows ran on llama.cpp CUDA (H200); the IQ2_XXS row ran on llama.cpp Vulkan on an Intel Iris Xe iGPU
(16 GB laptop), i.e. the actual target device; IQ4_XS ran on Ollama (RTX A5000). All 542 tasks completed, none failed.
Abliteration + healing did not cost coding accuracy; the gap to the parent is mostly from pruning + 2-bit quantization.
LiveCodeBench v6 (182 problems dated 2025-01-01 or later, official prompt, greedy, max 4,096 tokens, Ollama, RTX A5000):
Table with columns: Model, pass@1, Easy (45), Medium (55), Hard (82)| Model | pass@1 | Easy (45) | Medium (55) | Hard (82) |
|---|
| This model, IQ4_XS | 37.9 | 93.3 | 38.2 | 7.3 |
| This model, IQ2_XXS | 28.0 | 91.1 | 18.2 | 0.0 |
| REAP-192 uncensored, IQ4_XS | 40.1 | 91.1 | 43.6 | 9.8 |
Easy problems are unaffected. Most of the medium/hard loss comes from the 2-bit quant, not from pruning:
use IQ4_XS when it fits.
SWE-bench Verified, 50-task random subset (seed 42), mini-swe-agent (bash only), 200-step limit, 128K context:
10 / 50 (20%) for IQ4_XS vs 22 / 50 for REAP-192 uncensored on the same tasks. Multi-step agentic work is
where pruning to 128 experts costs the most; use REAP-192 for agents if it fits. Small subset: not comparable
with official SWE-bench scores.
Refusals: 0 / 25 (IQ2_XXS) and 1 / 25 (IQ4_XS) on held-out mlabonne/harmful_behaviors test prompts
(greedy, think off), none of which were used to compute the refusal direction.
Limitations
- IQ2_XXS is a very aggressive quant; prefer IQ4_XS or bf16 when memory allows.
- Pruning was calibrated on code; general chat, other languages and non-coding knowledge degrade more than coding.
- Healing used 1.5M tokens only; longer KD would likely recover more.
Responsible use
Safety refusals are removed. The model will comply with harmful requests; you are responsible for how you
use it and its outputs, and for complying with applicable laws.
Credits
- Base model: Qwen/Qwen3-Coder-Next (Apache-2.0)
- REAP: Cerebras Research, "REAP: One-Shot Pruning for Trillion-Parameter Mixture-of-Experts Models"
- Directional ablation: Arditi et al., "Refusal in Language Models Is Mediated by a Single Direction" (2024)