Skip to content

Commit

Permalink
fix rotary embedding in UtrLm and RnaFm
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiyuan Chen <[email protected]>
  • Loading branch information
ZhiyuanChen committed Apr 19, 2024
1 parent d99eeb5 commit 89d52ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion multimolecule/models/rnafm/modeling_rnafm.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def forward(
embeddings.dtype
)

if self.position_embeddings is not None:
if self.position_embedding_type == "absolute":
position_embeddings = self.position_embeddings(position_ids)
embeddings = embeddings + position_embeddings

Expand Down
2 changes: 1 addition & 1 deletion multimolecule/models/utrlm/modeling_utrlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def forward(
embeddings.dtype
)

if self.position_embeddings is not None:
if self.position_embedding_type == "absolute":
position_embeddings = self.position_embeddings(position_ids)
embeddings = embeddings + position_embeddings

Expand Down

0 comments on commit 89d52ae

Please sign in to comment.