Skip to content

Commit

Permalink
throw exception inside llama_model_loader
Browse files Browse the repository at this point in the history
Co-authored-by: slaren <[email protected]>
  • Loading branch information
ngxson and slaren authored Apr 28, 2024
1 parent 2df79ff commit b1df2f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,7 @@ struct llama_model_loader {
const std::string name(w.tensor->name);
auto found = tensor_names.find(name);
if (found != tensor_names.end()) {
LLAMA_LOG_ERROR("%s: Found duplicated tensor name %s", __func__, w.tensor->name);
throw std::runtime_error(format("invalid model: tensor '%s' is duplicated", w.tensor->name));
}
tensor_names.insert(name);
}
Expand Down

0 comments on commit b1df2f2

Please sign in to comment.