FeedForward.forward routing each sub-module through ``lora_forward``. Only the output projection (``ff.net[2]``) is LoRA-wrapped in practice; ``lora_forward`` transparently falls back to a plain call for the others.
(ff, x, adapter)
| 201 | |
| 202 | |
| 203 | def _feedforward_forward(ff, x, adapter): |
| 204 | """FeedForward.forward routing each sub-module through ``lora_forward``. |
| 205 | |
| 206 | Only the output projection (``ff.net[2]``) is LoRA-wrapped in practice; |
| 207 | ``lora_forward`` transparently falls back to a plain call for the others. |
| 208 | """ |
| 209 | for module in ff.net: |
| 210 | x = lora_forward(module, x, adapter) |
| 211 | return x |
| 212 | |
| 213 | |
| 214 | def attn_forward( |
no test coverage detected