mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-10 23:09:24 +02:00
Merge commit '335eb04a91f481f37c0c9b302ee31b449b04c3e9' into concedo_experimental
# Conflicts: # .github/workflows/build.yml # CONTRIBUTING.md # Makefile # docs/build.md # examples/llama.swiftui/llama.swiftui/UI/ContentView.swift # examples/run/run.cpp # ggml/CMakeLists.txt # ggml/src/ggml-cpu/CMakeLists.txt # ggml/src/ggml-cuda/CMakeLists.txt # ggml/src/ggml-musa/CMakeLists.txt
This commit is contained in:
@@ -1439,6 +1439,14 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user