bug fix in read_tensor_by_name

This commit is contained in:
xaedes 2023-08-28 02:02:05 +02:00
parent 152cfaac36
commit 1f83343498
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -1526,7 +1526,7 @@ void read_tensor_by_name(struct ggml_tensor * dst, struct ggml_context * ctx, co
if (dst == NULL) {
return;
}
struct ggml_tensor * t = ggml_get_tensor(ctx, LLM_TENSOR_OPTIMIZER_ADAM_FIRST_MOMENTS);
struct ggml_tensor * t = ggml_get_tensor(ctx, name);
GGML_ASSERT(are_same_layout(dst, t));
memcpy(dst->data, t->data, ggml_nbytes(t));
}