From c4b3229988ead82cff11bfefaf6552eac1333920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B5=E6=9C=BA=E5=AD=90?= Date: Thu, 17 Sep 2026 07:34:22 +0000 Subject: [PATCH] fix: honor flash attention flag in LLM text encoder attention --- src/model/te/llm.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/te/llm.hpp b/src/model/te/llm.hpp index 03deb610a..b289328ef 100644 --- a/src/model/te/llm.hpp +++ b/src/model/te/llm.hpp @@ -1377,7 +1377,7 @@ namespace LLM { x = ggml_ext_cont(ctx->ggml_ctx, kqv); x = ggml_reshape_3d(ctx->ggml_ctx, x, head_dim * num_heads, n_token, N); } else { - x = ggml_ext_attention_ext(ctx, q, k, v, num_heads, attention_mask, true, false); // [N, n_token, hidden_size] + x = ggml_ext_attention_ext(ctx, q, k, v, num_heads, attention_mask, true, ctx->flash_attn_enabled); // [N, n_token, hidden_size] } x = out_proj->forward(ctx, x); // [N, n_token, hidden_size]