Commit ffa86d4
authored
fix(dispatch): gate Kimi-Linear detection through get_kimi_linear_config (#1085)
Both Kimi-Linear and Bailing-hybrid hf_configs carry a linear_attn_config
attribute, so the prior 'has linear_attn_config?' check matched Bailing too.
attn_backend_wrapper then routed Bailing into KDAAttnBackend instead of
LightningAttnBackend, which crashed at the first forward with:
AttributeError: 'RadixLightningAttention' object has no attribute 'q_conv1d'
(KDAAttnBackend reads layer.q_conv1d.weight, which only exists on the KDA
attention module, not on Lightning's RadixLightningAttention.)
Add a top-level get_kimi_linear_config() factory in configs/kimi_linear.py
that mirrors the existing configs/bailing_hybrid.py:get_bailing_hybrid_config
helper (model_type guard + architectures fallback). Then make the
ModelRunnerKVCacheMixin.kimi_linear_config property dispatch through that
helper, so the two linear-recurrent paths are detected by symmetric module-
local helpers instead of magic strings in the mixin.1 parent 4a738c9 commit ffa86d4
2 files changed
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
626 | 624 | | |
627 | 625 | | |
628 | 626 | | |
| |||
0 commit comments