Skip to content

perplexity: fix integer overflow#23496

Open
fairydreaming wants to merge 1 commit into
ggml-org:masterfrom
fairydreaming:perplexity-int-overflow
Open

perplexity: fix integer overflow#23496
fairydreaming wants to merge 1 commit into
ggml-org:masterfrom
fairydreaming:perplexity-int-overflow

Conversation

@fairydreaming
Copy link
Copy Markdown
Collaborator

Overview

Fixed integer overflow when resizing log_probs. Fixes #23490.

Additional information

For models with large vocabulary and large context size n_ctx * nv overflows and become negative, this results in std::length_error exception to be thrown.

Requirements

@fairydreaming fairydreaming requested a review from ggerganov as a code owner May 21, 2026 20:13
@CISC CISC added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eval bug: llama-perplexity crashes when generating logits at medium-large context (only when model is split across GPUs/GPU and CPU?)

3 participants