We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a2f0b3 commit c637fcdCopy full SHA for c637fcd
llama.cpp
@@ -5383,7 +5383,7 @@ static bool llm_load_tensors(
5383
// create tensors for the weights
5384
{
5385
const int64_t n_embd = hparams.n_embd;
5386
- const int64_t n_embd_head = n_embd / hparams.n_head;
+ const int64_t n_embd_head = (hparams.n_head == 0) ? 0 : n_embd / hparams.n_head;
5387
const int64_t n_embd_k_gqa = hparams.n_embd_k_gqa();
5388
const int64_t n_embd_v_gqa = hparams.n_embd_v_gqa();
5389
const int64_t n_embd_gqa = n_embd_v_gqa;
0 commit comments