refactor: remove obsolete unused tensor filtering (#1984)

This commit is contained in:
leejet
2026-09-18 23:41:37 +08:00
committed by GitHub
parent 269e726015
commit 656a1354c3
4 changed files with 2 additions and 80 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ struct LoraModel : public GGMLRunner {
std::map<std::string, ggml_tensor*> scalars;
std::set<std::string> scalar_names;
for (const auto& [name, source] : sources) {
if (is_unused_tensor(name) || (filter && !filter(name)))
if (filter && !filter(name))
continue;
const bool scalar = source.nelements() == 1 && (ends_with(name, ".alpha") || ends_with(name, ".scale"));
auto* tensor = ggml_new_tensor(params_ctx, scalar ? GGML_TYPE_F32 : source.type, source.n_dims, source.ne);