[Feature] Diffusion LoRA Adapter Support (PEFT compatible) for vLLM alignment (#758)
Signed-off-by: AndyZhou952 <jzhoubc@connect.ust.hk> Signed-off-by: Andy Zhou <jzhoubc@connect.ust.hk> Signed-off-by: dongbo910220 <1275604947@qq.com> Signed-off-by: Andy Zhou <46011930+AndyZhou952@users.noreply.github.com> Signed-off-by: Samit <285365963@qq.com> Co-authored-by: dongbo910220 <1275604947@qq.com> Co-authored-by: Samit <285365963@qq.com>
This commit is contained in:
49 files changed
+2977
-310
No files matched your search
@@ -0,0 +1,61 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from vllm.lora.layers.column_parallel_linear import (
|
||||
ColumnParallelLinearWithLoRA,
|
||||
MergedColumnParallelLinearWithLoRA,
|
||||
MergedQKVParallelLinearWithLoRA,
|
||||
QKVParallelLinearWithLoRA,
|
||||
)
|
||||
|
||||
from .base_linear import DiffusionBaseLinearLayerWithLoRA
|
||||
|
||||
|
||||
class DiffusionColumnParallelLinearWithLoRA(
|
||||
DiffusionBaseLinearLayerWithLoRA,
|
||||
ColumnParallelLinearWithLoRA,
|
||||
):
|
||||
"""
|
||||
Diffusion ColumnParallelLinear with LoRA.
|
||||
Prioritize apply() in DiffusionBaseLinearLayerWithLoRA
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class DiffusionMergedColumnParallelLinearWithLoRA(
|
||||
DiffusionBaseLinearLayerWithLoRA,
|
||||
MergedColumnParallelLinearWithLoRA,
|
||||
):
|
||||
"""
|
||||
Diffusion MergedColumnParallelLinear (gate_up_proj) with LoRA.
|
||||
Prioritize apply() in DiffusionBaseLinearLayerWithLoRA
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class DiffusionQKVParallelLinearWithLoRA(
|
||||
DiffusionBaseLinearLayerWithLoRA,
|
||||
QKVParallelLinearWithLoRA,
|
||||
):
|
||||
"""
|
||||
Diffusion QKVParallelLinear with single LoRA.
|
||||
Prioritize apply() in DiffusionBaseLinearLayerWithLoRA
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class DiffusionMergedQKVParallelLinearWithLoRA(
|
||||
DiffusionBaseLinearLayerWithLoRA,
|
||||
MergedQKVParallelLinearWithLoRA,
|
||||
):
|
||||
"""
|
||||
Diffusion MergedQKVParallelLinear (to_qkv) with 3 LoRAs.
|
||||
Prioritize apply() in DiffusionBaseLinearLayerWithLoRA
|
||||
"""
|
||||
|
||||
pass
|
||||
Reference in new issue
Block a user