llm-layer-distillation
I trained a Hyena convolution to copy one attention module in Qwen, then swapped it into the model to see what changed.
Qwen2.5-7B / one attention module


RMS normMLPBlock outputResidual bypassesQwen · 28 blocks3InputFinal norm + readout
Qwen · 28 decoder blocks
How I trained it
I first saved the inputs and outputs of Qwen’s attention module. Qwen stayed frozen. Hyena learned from those pairs, with mean squared error measuring how far its output was from Qwen’s.

I trained on an AMD Instinct MI300X, with Qwen loaded in BF16. The run used 512 Wikipedia sequences: 358 for training, 77 for validation, and 77 for testing.
What did it learn?
Here are two saved test examples. Pick an example, then click a cell or move the controls to compare the same value in both outputs. The difference view shows where they disagree.
Qwen attention
Hyena
Qwen − Hyena
Left to right: token position. Top to bottom: channel. Blue is negative; red is positive. Qwen and Hyena share a scale; the difference has its own scale.Both examples are from the test split. These saved outputs use the original checkpoint, before tuning.
Full replacement evaluation
Matching attention outputs is only part of the test. I put Hyena back into Qwen and checked next-token loss on the same 77 test sequences. Lower loss means the model assigns more probability to the correct next token.
Another 400 training steps reduced the added loss by 44.31%. The tuned model’s loss was 2.055492, compared with 2.054707 for unmodified Qwen. This check covered 12,521 next-token predictions, with the cache disabled.

