8000 context : fix pos_min initialization upon decode error by ggerganov · Pull Request #14008 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

context : fix pos_min initialization upon decode error #14008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
caontext : fix pos_min initialization upon error decode
ggml-ci
  • Loading branch information
ggerganov committed Jun 4, 2025
commit 5248b16abc0882888ba3b56559864b70a1d0a8a7
5 changes: 4 additions & 1 deletion src/llama-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,10 @@ int llama_context::decode(llama_batch & inp_batch) {

if (!res) {
// the last ubatch failed or was aborted -> remove all positions of that ubatch from the KV cache
llama_pos pos_min[LLAMA_MAX_PARALLEL_SEQUENCES] = { std::numeric_limits<llama_pos>::max() };
llama_pos pos_min[LLAMA_MAX_PARALLEL_SEQUENCES];
for (int s = 0; s < LLAMA_MAX_PARALLEL_SEQUENCES; ++s) {
pos_min[s] = std::numeric_limits<llama_pos>::max();
}

for (uint32_t i = 0; i < ubatch.n_tokens; ++i) {
const auto & seq_id = ubatch.seq_id[i][0];
Expand Down
Loading
0