vllm.lora.layers.row_parallel_linear
¶
Classes:
-
RowParallelLinearWithLoRA– -
RowParallelLinearWithShardedLoRA–Differs from RowParallelLinearWithLoRA by slicing the
RowParallelLinearWithLoRA
¶
Bases: BaseLinearLayerWithLoRA
Methods:
-
forward–Forward of RowParallelLinear.
Source code in vllm/lora/layers/row_parallel_linear.py
forward(input_)
¶
Forward of RowParallelLinear.
Parameters:
-
(input_¶Tensor) –tensor whose last dimension is
input_size. Ifinput_is_parallelis set, then the last dimension isinput_size // tp_size.
Returns:
Source code in vllm/lora/layers/row_parallel_linear.py
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.