Skip to content

context : always use non-causal attention for encoder graphs#12447

Merged
ggerganov merged 2 commits intomasterfrom
gg/context-fix-enc-attn-type
Mar 18, 2025
Merged

context : always use non-causal attention for encoder graphs#12447
ggerganov merged 2 commits intomasterfrom
gg/context-fix-enc-attn-type

Conversation

@ggerganov
Copy link
Copy Markdown
Member

@fairydreaming
Copy link
Copy Markdown
Collaborator

@ggerganov That won't work - the flag will be back to true during set_inputs() call when the mask is created. I think you have to move it to llama_context::encode().

Copy link
Copy Markdown
Collaborator

@fairydreaming fairydreaming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that it fixes the KQ mask problem for T5 encoder.

@ggerganov ggerganov merged commit 8551c44 into master Mar 18, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Mar 19, 2025
…g#12447)

* context : always use non-causal attention for encoder graphs

ggml-ci

* context : move the change to llama_context::encode()

ggml-ci
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…g#12447)

* context : always use non-causal attention for encoder graphs

ggml-ci

* context : move the change to llama_context::encode()

ggml-ci
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

Successfully merging this pull request may close these issues.

Eval bug: b4882 broke t5

2 participants