Skip to content

Updated example to generate .dot file of ggml_cgraph #14666

Answered by taronaeo
taronaeo asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunate. I poked around further and did this patch since I'm testing our IBM Granite model:

diff --git a/src/llama-model.cpp b/src/llama-model.cpp
index a322fc39..3212d896 100644
--- a/src/llama-model.cpp
+++ b/src/llama-model.cpp
@@ -14008,7 +14008,7 @@ struct llm_build_granite : public llm_graph_context {
 
         ggml_tensor * inp_out_ids = build_inp_out_ids();
 
-        for (int il = 0; il < n_layer; ++il) {
+        for (int il = 0; il < 1; ++il) {
             ggml_tensor * inpSA = inpL;
 
             // norm
@@ -14052,6 +14052,8 @@ struct llm_build_granite : public llm_graph_context {
         res->t_logits = cur;
 
         ggml_build_forward_expand(gf, cur);
+        ggml…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@taronaeo
Comment options

Answer selected by taronaeo
@CISC
Comment options

CISC Jul 13, 2025
Collaborator

@ggerganov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants