Model grafting turns Qwen3.5-4B into a causal encoder-decoder, 3.7x faster at 128K prompts

asankhs · reddit · 2026-09-22

A Reddit user demonstrates "model grafting": inspired by DeepSeek-V4.1-Flash's from-scratch causal encoder-decoder architecture, the method retrofits an existing model — cutting at some depth, letting lower layers read the prompt, and injecting upper-layer residual streams as prefix KV via identity-init adapters, then healing with self-distillation from the unmodified parent. The decoder stays unchanged. Details in the author's blog post.

Two variants of Qwen3.5-4B are released on Hugging Face:

A reproducible community experiment showing long-context efficiency gains can be added to pretrained models after the fact, with both variants open-sourced.

Original post →

More from Research

Research channel →