Qwen3.5-4B · drop2 · mixed-diet repair
A research artifact: Qwen/Qwen3.5-4B with 2 of its 36 decoder layers surgically removed by an importance ranking, then repaired with QLoRA on a small mixed corpus. ~94% of the original parameters. Made with a CPU-first "model forge" pipeline (structural surgery → recovery fine-tune → multi-corpus evaluation) to study how much of a sliced model can be restored without full retraining.
What was done
- Depth surgery: dropped layers 24 and 28 (importance-ranked by neighbor-cosine similarity; the hybrid architecture's 8 full-attention layers are pattern-protected and untouched). No width surgery.
- Repair: QLoRA r=16 over the attention + MLP projections, 1 epoch over 9.5M tokens — 61% FineWeb-EDU / 27% wikitext-2 (train split) / 12% code (llama.cpp C/C++ + CPython stdlib). Trained in ~70 minutes on a single consumer GPU at 3.9 GiB VRAM.
- MTP block restored from the base checkpoint (draft tensors predate the slice; speculative-decoding acceptance is approximate, output correctness unaffected — drafts are always verified by the main model).
Results (perplexity, f16, 3 UNRELATED corpora; lower is better)
| corpus | stock Qwen3.5-4B | after surgery, unrepaired | after repair (this model) |
|---|---|---|---|
| wikitext-2 (test) | 9.33 | 12.82 | 8.42 |
| FineWeb-EDU holdout | 10.44 | 13.55 | 12.39 |
| code (C/C++/Python) | 3.17 | 3.57 | 3.36 |
The single-corpus wikitext figure alone is misleading: a wikitext-only repair arm scored
8.16 on wikitext while regressing 86% on the FineWeb holdout (domain specialization,
not healing). This model's diet was mixed specifically to avoid that trap — see
recipe-mixfull.yaml for the exact recipe.
Honest limitations
- Repair is partial on the diverse corpora (~40% of the fineweb gap remains closed).
- No academic-benchmark numbers yet (GSM8K/MMLU-class): perplexity floors and manual spot-checks only.
- Long-context behaviors (loop-threshold vs sampling temperature) shift relative to stock; prefer slightly lower temperatures for chain-of-thought reliability.
- wikitext PPL overshoots the stock model — mild specialization from that diet share.
- Not a production model. A curiosity about how far slice-and-repair can go.
Files
model.safetensors+ config/tokenizer: the merged repaired checkpoint (bf16, HF format)recipe-mixfull.yaml: full reproduction recipe (surgery + recovery + eval)- GGUF builds (incl. Q4_K_M) in the sibling repo
dwilson2547/Qwen3.5-4B-drop2-mixed-repair-GGUF
License & attribution
Derived from Qwen/Qwen3.5-4B (Apache-2.0). This derivative: Apache-2.0. Training data: FineWeb-EDU, wikitext-2 (CC BY-SA 3.0, Salesforce), and publicly available open-source code (llama.cpp, CPython stdlib).