spec: fix segfault error on long prompts for eagle3 (#24707)

This commit is contained in:
Ruixiang Wang
2026-06-17 16:29:49 +02:00
committed by GitHub
parent 74a80dd9c0
commit 1a2dea29b9
4 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -1382,7 +1382,7 @@ int llama_context::encode(const llama_batch & batch_inp) {
const auto & hparams = model.hparams;
// eagle3/DFlash: features as encoder input, and non-draft paths fall back to model's input dim
const int64_t n_embd = hparams.n_embd_inp();
const int64_t n_embd = hparams.n_embd_inp_enc();
const int64_t n_vocab = model.vocab.n_tokens();
// note: during encode, we always pass the full sequence starting from pos = 0