8000 might be an error in the implementation of mistral_attention_prefill_query · Issue #2 · Infini-AI-Lab/APE · GitHub
[go: up one dir, main page]

Skip to content

might be an error in the implementation of mistral_attention_prefill_query #2

Open

Description

@Li-Jiajie

ape_mistral.py line 170:
mistral_attention_prefill_query

APE/ape/ape_mistral.py

Lines 170 to 173 in 52513bc

key_states_context = torch.cat([key_states[:, :, :self.len_prefix], key_states[:, :, self.len_prefix+self.len_context:]], dim=-2)
key_states_other = key_states[:, :, self.len_prefix:self.len_prefix+self.len_context]
value_states_context = torch.cat([value_states[:, :, :self.len_prefix], value_states[:, :, self.len_prefix+self.len_context:]], dim=-2)
value_states_other = value_states[:, :, self.len_prefix:self.len_prefix+self.len_context]

Are key_states_context and key_states_other reversed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0