summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
authorJared Van Bortel <jared@nomic.ai>2023-12-17 19:39:02 -0500
committerGitHub <noreply@github.com>2023-12-17 19:39:02 -0500
commit2994f0c5a2e8c96955b422dedc93ec2595d16b82 (patch)
treec0e40bfdc2316aa9989f0219cfdfe0d9f400909d /llama.cpp
parentb1306c439490c7fa4ec33594500d980d1e9e15e6 (diff)
decode : fix logits_valid for legacy API (#4516)
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llama.cpp b/llama.cpp
index fd9fd6ed..d6d575f9 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -6184,7 +6184,7 @@ static int llama_decode_internal(
logits_out.resize(n_vocab);
memcpy(logits_out.data(), (float *) ggml_get_data(res) + (n_vocab*(n_tokens - 1)), sizeof(float)*n_vocab);
#ifndef NDEBUG
- logits_valid[n_tokens - 1] = true;
+ logits_valid[0] = true;
#endif
}
}