You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plasticity compaction: Qwen3.5-35B-A3B MoE on 5090 — target MacBook Air #492
Run our proven plasticity compaction pipeline on Qwen3.5-35B-A3B (the Opus reasoning-distilled MoE) on the 5090 tower. Target: fit on MacBook Air (16GB).
Why
Issue #417 was prematurely closed saying "does not fit in 32GB." We never tried compaction. Our pipeline achieved 3x on Qwen 14B (27GB to 8.9GB). MoE models are ideal targets — expert utilization is inherently sparse, many heads have low activation.
Plan
Download safetensors (not GGUF — need raw weights) to 5090 tower
Run gate gradient analysis during LoRA training to measure expert/head utilization
Prune low-utilization heads (expect 30-50% prunable in MoE)
Apply 7-tier mixed-precision quantization based on utilization scores
The correct pruning approach (slicing dim 0 of fused expert tensors) works — verified the tensor shapes transform correctly: [256, 1024, 2048] -> [167, 1024, 2048]. But the script accumulated ALL tensors in memory before saving, OOM killed at 55GB virtual.
Fix: streaming shard-by-shard processing:
Read shard N from original model
Slice expert tensors in that shard (keep_indices on dim 0)
Write pruned shard to output
Free memory
Next shard
This keeps memory at ~5GB per shard instead of 67GB total. The approach is proven — just needs the streaming implementation.
Activity
Add Phase 11 (Multimodal Compaction) to gap analysis and README
Add Phase 11 (Multimodal Compaction) to gap analysis and README (#498)
MoE expert profiling + pruning scripts — 67GB to 6.5GB proven
MoE expert profiling + pruning scripts — 67GB to 6.5GB proven (#539)
joelteply commentedon Mar 26, 2026
COMPACTION COMPLETE — 67GB to 6.5GB (10.3x)
Expert activation profiling + pruning proven on 5090:
Model at: /home/joel/.continuum/models/qwen3.5-35b-a3b-pruned-167/
Next steps:
joelteply commentedon Mar 26, 2026
Update: Fused pruning OOM on 32GB RAM (WSL2)
The correct pruning approach (slicing dim 0 of fused expert tensors) works — verified the tensor shapes transform correctly: [256, 1024, 2048] -> [167, 1024, 2048]. But the script accumulated ALL tensors in memory before saving, OOM killed at 55GB virtual.
Fix: streaming shard-by-shard processing:
This keeps memory at ~5GB per shard instead of 67GB total. The approach is proven — just needs the streaming implementation.
Expert tensor format confirmed:
All slice on dim 0 by keep_indices.
joelteply commentedon Mar 26, 2026
COMPACTION VERIFIED — Inference quality preserved
All three test prompts produce coherent output from the pruned model:
Next:
joelteply commentedon Mar 30, 2026
Done: qwen3.5-35b-a3b-compacted published (1.53k downloads). GGUF variant published. Running on consumer hardware.