* llama : assign unknown/unused tensors to host buffer type
ggml-ci
* llama : skip unused tensors
ggml-ci
throw std::runtime_error(format("missing tensor info mapping for %s", tn.str().c_str()));
}
+ // skip unused tensors
+ if (info.op == GGML_OP_NONE) {
+ LLAMA_LOG_WARN("model has unused tensor %s -- ignoring\n", tn.str().c_str());
+ ml.n_created++;
+
+ return nullptr;
+ }
+
// tensors with "bias" suffix are always used with GGML_OP_ADD
ggml_op op;
bool bias = tn.suffix != nullptr && strcmp(tn.suffix, "bias") == 0;