Skip to content

vllm.lora.layers.row_parallel_linear

Classes:

RowParallelLinearWithLoRA

Bases: BaseLinearLayerWithLoRA

Methods:

  • forward –

    Forward of RowParallelLinear.

forward(input_)

Forward of RowParallelLinear.

Parameters:

  • input_

    (Tensor) –

    tensor whose last dimension is input_size. If input_is_parallel is set, then the last dimension is input_size // tp_size.

Returns:

RowParallelLinearWithShardedLoRA

Bases: RowParallelLinearWithLoRA

Differs from RowParallelLinearWithLoRA by slicing the LoRA B's also.

Based on S-LoRA, slicing happens along the output dim. This yields a combined partial sum from the row parallel base layer and column partitioned output from the LoRA.