Views
No views yet
35B → 27B | 192 experts/layer | ~3B active per token | VL preserved
| Property | Original | This Model (REAP Pruned) |
|---|---|---|
| Total Parameters | ~35B | ~27B |
| Active Parameters | ~3B | ~3B |
| Experts per Layer | 256 | 192 |
| Routed per Token | 8 | 8 |
| Shared Expert | 1/layer (preserved) | 1/layer (preserved) |
| Layers | 40 (30 GDN + 10 full attn) | 40 (30 GDN + 10 full attn) |
| Vision Encoder | Yes | Yes (unmodified) |
| Precision | BF16 | BF16 |
| Disk Size | ~67 GB | ~50 GB |
| Context | 262K | 262K |
| Source | Samples | Why |
|---|---|---|
| SWE-bench/SWE-smith-trajectories (tool split) | 6,144 | Agentic multi-turn. Full SWE-bench trajectories with tool calls, file edits, and test runs. This is the closest proxy to real-world agentic coding — the primary use case we're optimizing for. |
| Salesforce/xlam-function-calling-60k | 6,144 | Single-turn tool calling. Structured function definitions + invocations. Ensures the experts responsible for tool-use formatting survive pruning. |
| theblackcat102/evol-codealpaca-v1 | 4,096 | General coding. Evolved instruction-following across languages and difficulty levels. Breadth coverage so we don't over-specialize on agentic patterns. |
| open-r1/Mixture-of-Thoughts (code) | 2,730 | Code reasoning. Long chain-of-thought traces for programming problems. Preserves the model's ability to reason step-by-step through code. |
| open-r1/Mixture-of-Thoughts (math) | 2,730 | Math reasoning. Ensures pruning doesn't disproportionately kill the experts activated during mathematical reasoning — a known risk with code-only calibration. |
| open-r1/Mixture-of-Thoughts (science) | 2,732 | Science reasoning. Same rationale as math — broader domain coverage keeps the model general-purpose even though the primary target is coding. |
softmax(router_logits) × ‖expert_output‖₂ averaged per expert across ~19.6K calibration sequencesgate.weight by √(192/256) significantly degraded routing discrimination.)reap_metadata.json.dtype=torch.bfloat16. float16 produces NaN outputs.qwen3_5_moe architecture, which landed in transformers main after the last tagged release. Install from source:1pip install "git+https://github.com/huggingface/transformers.git@main"
2pip install "torch>=2.7" --index-url https://download.pytorch.org/whl/cu128 # or cu126/cu121
3pip install accelerate torchvision
4
5# Optional but recommended (10x faster GDN linear attention):
6pip install flash-linear-attention causal-conv1d einops1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "atbender/Qwen3.6-VL-REAP-26B-A3B",
6 dtype=torch.bfloat16, # MUST be bfloat16
7 device_map="auto",
8 trust_remote_code=True,
9)
10tokenizer = AutoTokenizer.from_pretrained("atbender/Qwen3.6-VL-REAP-26B-A3B", trust_remote_code=True)
11
12messages = [{"role": "user", "content": "Write a Python function to sort a list of dicts by key."}]
13inputs = tokenizer.apply_chat_template(
14 messages, return_tensors="pt", add_generation_prompt=True,
15).to(model.device)
16outputs = model.generate(inputs, max_new_tokens=1024, do_sample=True, temperature=0.7)
17print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))Qwen3_5MoeForConditionalGeneration. Use AutoModelForImageTextToText to load the full VL wrapper (language model + vision encoder). The BF16 vision tower is intact from the base model.1from transformers import AutoModelForImageTextToText, AutoProcessor
2from PIL import Image
3import torch
4
5processor = AutoProcessor.from_pretrained("atbender/Qwen3.6-VL-REAP-26B-A3B", trust_remote_code=True)
6model = AutoModelForImageTextToText.from_pretrained(
7 "atbender/Qwen3.6-VL-REAP-26B-A3B",
8 dtype=torch.bfloat16,
9 device_map="auto",
10 trust_remote_code=True,
11)
12
13image = Image.open("path/to/image.jpg")
14messages = [{
15 "role": "user",
16 "content": [
17 {"type": "image", "image": image},
18 {"type": "text", "text": "Describe this image."},
19 ],
20}]
21
22inputs = processor.apply_chat_template(
23 messages, add_generation_prompt=True, tokenize=True,
24 return_dict=True, return_tensors="pt",
25).to(model.device)
26outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.7)
27print(processor.tokenizer.decode(
28 outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))vllm/vllm-openai:latest). The image registers Qwen3_5MoeForConditionalGeneration natively.1docker run --gpus all --rm -p 8000:8000 \\
2 -v ~/.cache/huggingface:/root/.cache/huggingface \\
3 vllm/vllm-openai:latest \\
4 atbender/Qwen3.6-VL-REAP-26B-A3B \\
5 --tensor-parallel-size 1 \\
6 --max-model-len 32768 \\
7 --dtype bfloat16 \\
8 --trust-remote-code \\
9 --reasoning-parser qwen3 \\
10 --enable-auto-tool-choice \\
11 --tool-call-parser qwen3_coder--tensor-parallel-size 2 on dual 48 GB cards. For single-GPU consumer deployment (24 GB), use the W4A16 sibling atbender/Qwen3.6-VL-REAP-26B-A3B-W4A16 (~15 GiB VRAM on load).1from openai import OpenAI
2client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
3r = client.chat.completions.create(
4 model="atbender/Qwen3.6-VL-REAP-26B-A3B",
5 messages=[{"role": "user", "content": "What is 17 * 23?"}],
6 max_tokens=1024,
7)
8print(r.choices[0].message.reasoning) # <think> block
9print(r.choices[0].message.content) # final answer1python reap_prune.py \\
2 --model-id Qwen/Qwen3.6-35B-A3B \\
3 --target-experts 192 \\
4 --dataset composite \\
5 --seqlen 16384 \\
6 --seed 42reap_prune.py1@article{lasby2025reap,
2 title={REAP: Router-weighted Expert Activation Pruning for Scalable Mixture-of-Experts Compression},
3 author={Lasby, Mike and others},
4 year={2025},
5 url={https://github.com/CerebrasResearch/reap}
6}
7
8@misc{autoround2024,
9 title={AutoRound: Advanced Weight Quantization},
10 author={Intel Corporation},
11 year={2024},
12 howpublished={\url{https://github.com/intel/auto-round}}
13}