Skip to content

LLM inference in C/C++

C++ ggml

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

Pascal9cf967a04d0d
diff --git a/src/models/bert.cpp b/src/models/bert.cpp
index 25640445a1..8f3aa316c7 100644
--- a/src/models/bert.cpp
+++ b/src/models/bert.cpp
@@ -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);
}
diff --git a/src/models/eurobert.cpp b/src/models/eurobert.cpp
index 0948d7de65..13bae8b716 100644
--- a/src/models/eurobert.cpp
+++ b/src/models/eurobert.cpp
@@ -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);
}
diff --git a/src/models/gemma-embedding.cpp b/src/models/gemma-embedding.cpp
index 692e19ee93..bb4e964e81 100644
--- a/src/models/gemma-embedding.cpp
+++ b/src/models/gemma-embedding.cpp
@@ -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);
}
diff --git a/src/models/gemma-embedding2.cpp b/src/models/gemma-embedding2.cpp
index 4b77664ad3..2c7fa67509 100644
--- a/src/models/gemma-embedding2.cpp
+++ b/src/models/gemma-embedding2.cpp
@@ -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
diff --git a/src/models/neo-bert.cpp b/src/models/neo-bert.cpp
index 4a08d7abd4..9b141c3b70 100644
--- a/src/models/neo-bert.cpp
+++ b/src/models/neo-bert.cpp
@@ -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);
}
diff --git a/src/models/wavtokenizer-dec.cpp b/src/models/wavtokenizer-dec.cpp
index 214fed99ba..881d2c3833 100644
--- a/src/models/wavtokenizer-dec.cpp
+++ b/src/models/wavtokenizer-dec.cpp
@@ -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);
}