Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff? residual and norm_layer_for_blocks #135

Closed
rixejzvdl649 opened this issue Jun 7, 2024 · 1 comment
Closed

diff? residual and norm_layer_for_blocks #135

rixejzvdl649 opened this issue Jun 7, 2024 · 1 comment

Comments

@rixejzvdl649
Copy link

internvideo2

        residual = None
        for blk in self.blocks:
            if isinstance(x, tuple) and len(x) == 2:
                x, residual = x
            x = blk(x, residual=residual)
        if isinstance(x, tuple) and len(x) == 2:
            x, residual = x
            if residual is not None:
                x = x + residual

umt or videomaev2

        for idx, blk in enumerate(self.blocks):
            if self.use_checkpoint and idx < self.checkpoint_num:
                x = checkpoint.checkpoint(blk, x)
            else:
                x = blk(x)
@Andy1621
Copy link
Collaborator

Andy1621 commented Jun 7, 2024

Hi! Since the return logic is different when using DropoutAddRMSNorm, we change the forward fuction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants