models: drop the t_embd expand of the embedding graphs (#30461)

These graphs only produce embeddings, and build_pooling() already
expands its output for every pooling type, so the expand at the end of
the model graph is redundant.
This commit is contained in:
Pascal authored and GitHub committed 2026-10-14 08:15:08 +02:00
1 parent 4dd6dd4b96
commit 9cf967a04d
6 files changed
-12

No files matched your search

-2
View File
@@ -222,6 +222,4 @@ llama_model_bert::graph::graph(const llama_model & model, const llm_graph_params
cb(cur, "result_embd", -1);
res->t_embd = cur;
ggml_build_forward_expand(gf, cur);
}
-2
View File
@@ -119,6 +119,4 @@ llama_model_eurobert::graph::graph(const llama_model & model, const llm_graph_pa
cb(cur, "result_embd", -1);
res->t_embd = cur;
ggml_build_forward_expand(gf, cur);
}
-2
View File
@@ -169,6 +169,4 @@ llama_model_gemma_embedding::graph::graph(const llama_model & model, const llm_g
cb(cur, "result_norm", -1);
res->t_embd = cur;
ggml_build_forward_expand(gf, cur);
}
-2
View File
@@ -210,8 +210,6 @@ llama_model_gemma_embedding2::graph::graph(const llama_model & model, const llm_
cur = build_lora_mm(model.output, cur, model.output_s);
cb(cur, "result_embd", -1);
res->t_embd = cur;
ggml_build_forward_expand(gf, cur);
}
// equivalent to EmbeddingGemma2TextPLE in python code
-2
View File
@@ -129,6 +129,4 @@ llama_model_neo_bert::graph::graph(const llama_model & model, const llm_graph_pa
cb(cur, "result_embd", -1);
res->t_embd = cur;
ggml_build_forward_expand(gf, cur);
}
-2
View File
@@ -259,6 +259,4 @@ llama_model_wavtokenizer_dec::graph::graph(const llama_model & model, const llm_
cb(cur, "result_embd", -1);
res->t_embd = cur;
ggml_build_forward_expand(gf, cur);
}