Skip to content

Commit d89bb2f

Browse files
committed
llama-model : Improve moved-tensors error message
1 parent f08f4b3 commit d89bb2f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/llama-model.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3478,10 +3478,14 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
34783478
throw std::runtime_error("unknown architecture");
34793479
}
34803480

3481-
if (n_moved_tensors > 0) {
3481+
if (n_moved_tensors > 1) {
34823482
LLAMA_LOG_DEBUG("%s: tensor '%s' (%s) (and %d others) cannot be used with preferred buffer type %s, using %s instead\n",
34833483
__func__, first_moved_tensor->name, ggml_type_name(first_moved_tensor->type), n_moved_tensors - 1,
34843484
ggml_backend_buft_name(first_moved_from_buft), ggml_backend_buft_name(first_moved_to_buft));
3485+
} else if (n_moved_tensors > 0) {
3486+
LLAMA_LOG_DEBUG("%s: tensor '%s' (%s) cannot be used with preferred buffer type %s, using %s instead\n",
3487+
__func__, first_moved_tensor->name, ggml_type_name(first_moved_tensor->type),
3488+
ggml_backend_buft_name(first_moved_from_buft), ggml_backend_buft_name(first_moved_to_buft));
34853489
}
34863490
}
34873491

0 commit comments

Comments
 (0)