From ffd80d73649574e974693c8b7cdc0e55d8d3361a Mon Sep 17 00:00:00 2001 From: Mark Caldwell Date: Mon, 8 Jun 2026 07:18:51 -0700 Subject: [PATCH 1/2] set tensor names on block params GGMLBlock::get_param_tensors builds each param's full hierarchical name but only uses it as the map key; the tensor's own name is never set, so weights appear as unnamed "leaf_N" in graph dumps, profiling, and to any tooling that inspects weights by name. Set the name where it's already constructed. --- src/core/ggml_extend.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/ggml_extend.hpp b/src/core/ggml_extend.hpp index f78e6cd6d..b50b96f97 100644 --- a/src/core/ggml_extend.hpp +++ b/src/core/ggml_extend.hpp @@ -3327,6 +3327,10 @@ class GGMLBlock { for (auto& pair : params) { ggml_tensor* param = pair.second; tensors[prefix + pair.first] = pair.second; + // Also set the tensor's own name to its full hierarchical name. Without this the param + // tensors are unnamed and show up as "leaf_N" in graph dumps / profiling output and to + // any tooling that inspects weights by name (e.g. importance-matrix collection). + ggml_set_name(param, (prefix + pair.first).c_str()); } } From 6adb08635a018f5c0ea6c42108415a530b0f7d53 Mon Sep 17 00:00:00 2001 From: leejet Date: Mon, 8 Jun 2026 23:18:06 +0800 Subject: [PATCH 2/2] Remove unnecessary comments in ggml_extend.hpp --- src/core/ggml_extend.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/ggml_extend.hpp b/src/core/ggml_extend.hpp index b50b96f97..d0326a192 100644 --- a/src/core/ggml_extend.hpp +++ b/src/core/ggml_extend.hpp @@ -3327,9 +3327,6 @@ class GGMLBlock { for (auto& pair : params) { ggml_tensor* param = pair.second; tensors[prefix + pair.first] = pair.second; - // Also set the tensor's own name to its full hierarchical name. Without this the param - // tensors are unnamed and show up as "leaf_N" in graph dumps / profiling output and to - // any tooling that inspects weights by name (e.g. importance-matrix collection). ggml_set_name(param, (prefix + pair.first).c_str()); } }