We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 586d5fe commit 51f311eCopy full SHA for 51f311e
src/llama-model.cpp
@@ -1424,6 +1424,14 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
1424
throw std::runtime_error(format("missing tensor info mapping for %s", tn.str().c_str()));
1425
}
1426
1427
+ // skip unused tensors
1428
+ if (info.op == GGML_OP_NONE) {
1429
+ LLAMA_LOG_WARN("model has unused tensor %s -- ignoring\n", tn.str().c_str());
1430
+ ml.n_created++;
1431
+
1432
+ return nullptr;
1433
+ }
1434
1435
// tensors with "bias" suffix are always used with GGML_OP_ADD
1436
ggml_op op;
1437
bool bias = tn.suffix != nullptr && strcmp(tn.suffix, "bias") == 0;
0 commit comments