Skip to content

Commit

Permalink
fix for peft tied weights (#7372)
Browse files Browse the repository at this point in the history
Signed-off-by: arendu <[email protected]>
  • Loading branch information
arendu authored and yaoyu-33 committed Sep 18, 2023
1 parent 947bfb1 commit ea43d14
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ def __init__(
num_position_embeddings: int = 1,
dim_position_embeddings: int = 1024,
position_embedding_strategy: Optional[str] = "add",
model_parallel_config: Optional[ModelParallelConfig] = None,
**kwargs,
):
self.position_embeddings = None
self.mlp = None
Expand Down Expand Up @@ -464,6 +466,8 @@ def __init__(
row_init_method,
gather_output,
dropout,
model_parallel_config,
**kwargs,
)
if self.position_embedding_strategy:
self.position_embeddings = torch.nn.Embedding(num_position_embeddings, dim_position_embeddings)
Expand Down

0 comments on commit ea43d14

Please sign in to comment.