]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
decode : fix logits_valid for legacy API (#4516)
authorJared Van Bortel <redacted>
Mon, 18 Dec 2023 00:39:02 +0000 (19:39 -0500)
committerGitHub <redacted>
Mon, 18 Dec 2023 00:39:02 +0000 (19:39 -0500)
llama.cpp

index fd9fd6ed9e0082f783d6315c17eab103b2ee6e3c..d6d575f9e3960a5105d24b63cab2ddcd4b07558e 100644 (file)
--- 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
         }
     }