Skip to content

Commit

Permalink
fix 0f428bb try import
Browse files Browse the repository at this point in the history
  • Loading branch information
JunnYu committed Apr 24, 2024
1 parent 0f428bb commit 3105c18
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
11 changes: 10 additions & 1 deletion paddlenlp/peft/lora/lora_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@
mark_as_sequence_parallel_parameter,
)
except:
pass
AllGatherOp = None
ReduceScatterOp = None
mark_as_sequence_parallel_parameter = None

class ColumnSequenceParallelLinear:
pass

class RowSequenceParallelLinear:
pass


from paddlenlp.transformers.mc2_parallel_linear import (
MC2ColumnParallelCoreLinear,
Expand Down
29 changes: 18 additions & 11 deletions paddlenlp/peft/lora/lora_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,25 @@
RowSequenceParallelLinear,
)

from .lora_layers import (
ColumnParallelLoRALinear,
ColumnParallelLoRAMergedLinear,
ColumnSequenceParallelLoRALinear,
LoRAConv2D,
LoRALinear,
LoRAMergedLinear,
RowParallelLoRALinear,
RowSequenceParallelLoRALinear,
)
except:
pass

class ColumnSequenceParallelLinear:
pass

class RowSequenceParallelLinear:
pass


from .lora_layers import (
ColumnParallelLoRALinear,
ColumnParallelLoRAMergedLinear,
ColumnSequenceParallelLoRALinear,
LoRAConv2D,
LoRALinear,
LoRAMergedLinear,
RowParallelLoRALinear,
RowSequenceParallelLoRALinear,
)

try:
from ...quantization.quantization_linear import (
Expand Down

0 comments on commit 3105c18

Please sign in to comment.