Implement the forward pass of a LoRA (Low-Rank Adaptation) layer: a frozen pretrained weight matrix plus a scaled low-rank update.
Implement lora_forward(x, W, A, B, alpha=1.0):
x: input, shape (batch, in_features)W: frozen weights, shape (in_features, out_features)B: shape (in_features, r); A: shape (r, out_features). The low-rank path is x @ B @ A (note this problem's naming: B is applied first).r is the rank: the number of rows of A (= number of columns of B).alpha / r, not by alpha alone.All inputs are nested Python lists; return y of shape (batch, out_features) as a nested list of floats.