Skip to content

Change comment: incorrect shape #8

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

Open
stefanvasilev opened this issue Apr 5, 2023 · 1 comment
Open

Change comment: incorrect shape #8

stefanvasilev opened this issue Apr 5, 2023 · 1 comment

Comments

@stefanvasilev
Copy link

batched_prompt_raw = self.prompt[:,:,idx] # num_layers, B, top_k, length, C

The comment here suggests the wrong shape # num_layers, B, top_k, length, C, should be # num_layers, dual, B, top_k, length, num_heads, embed_dim // num_heads

@tunglamlqddb
Copy link

batched_prompt = batched_prompt_raw.reshape(

And I guess there should be a permutation before this reshape to correct the position of batch_size:

batched_prompt_raw = batched_prompt_raw.permute(0, 2, 1, 3, 4, 5, 6)
batched_prompt = batched_prompt_raw.reshape(
num_layers, batch_size, dual, top_k * length, num_heads, heads_embed_dim
)

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