llama : add assert

This commit is contained in:
Georgi Gerganov 2024-03-29 09:22:38 +02:00 committed by GitHub
parent 61f0ae73ef
commit d907f70b0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5523,6 +5523,7 @@ static void llm_build_kv_store(
GGML_ASSERT(kv.size == n_ctx); GGML_ASSERT(kv.size == n_ctx);
// compute the transposed [n_tokens, n_embd] V matrix // compute the transposed [n_tokens, n_embd] V matrix
assert(v_cur->ne[0] == n_embd_v_gqa && v_cur->ne[1] == n_tokens);
struct ggml_tensor * v_cur_t = ggml_transpose(ctx, v_cur); struct ggml_tensor * v_cur_t = ggml_transpose(ctx, v_cur);
cb(v_cur_t, "v_cur_t", il); cb(v_cur_t, "v_cur_t", il);