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

A question about adapter code #42

Open
TheShy-Dream opened this issue May 16, 2023 · 1 comment
Open

A question about adapter code #42

TheShy-Dream opened this issue May 16, 2023 · 1 comment

Comments

@TheShy-Dream
Copy link

image
why mask can concat with extra_mask,they dont have the same shape in the first three dimensions.

@csuhan
Copy link
Collaborator

csuhan commented May 19, 2023

They should have the same shape. Please check our code.

mask = torch.full((1, 1, seqlen, seqlen), float("-inf"), device=tokens.device)
mask = torch.triu(mask, diagonal=start_pos + 1).type_as(h)

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