The adapted layer computes the frozen output plus the scaled low-rank path. Because that path is linear, the adapter can be merged into the weight after training, leaving inference cost unchanged.
Implement lora_forward(x, W, A, B, scale), the frozen layer plus the scaled LoRA path.
Compute x W^T, compute x A^T then B^T for the adapter, scale it, and add.
No results yet
Run your code to check it against the examples, or submit to run every test.