Skip to content

Commit

Permalink
add residual handling
Browse files Browse the repository at this point in the history
  • Loading branch information
landoskape committed May 10, 2024
1 parent 3836c06 commit 63ccfc7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dominoes/networks/transformer_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def get_transformer_layer(
num_multimodal=0,
kqv_bias=False,
mlp_bias=True,
residual=False,
):
"""
create transformer layer with requested arguments
Expand All @@ -35,7 +34,6 @@ def get_transformer_layer(
kqnorm=kqnorm,
kqv_bias=kqv_bias,
mlp_bias=mlp_bias,
residual=residual,
)
if multimodal:
transformer_kwargs["num_multimodal"] = num_multimodal
Expand Down Expand Up @@ -79,7 +77,7 @@ def __init__(self, embedding_dim, contextual, multimodal, num_heads=8, expansion
multimodal=multimodal,
num_multimodal=num_multimodal,
kqv_bias=kqv_bias,
residual=False,
residual=False, # residual is handled in the transformer layer's forward pass
)

# make the mlp layers
Expand Down

0 comments on commit 63ccfc7

Please sign in to comment.