Skip to content

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented May 15, 2025

Currently, when context shifting is disabled, we trigger the line of code that is not supposed to be called:

if (!params_base.ctx_shift) {
    // this check is redundant (for good)
    // we should never get here, because generation should already stopped in process_token()
    slot.release();
    send_error(slot, "context shift is disabled", ERROR_TYPE_SERVER);
    continue;
}

This returns an error, which makes downstream applications unhappy.

NOTE: some variables may need to be renamed after #13576

@ngxson ngxson requested a review from ggerganov May 15, 2025 22:34
@github-actions github-actions bot added examples python python script changes server labels May 15, 2025
@ngxson ngxson merged commit 6aa892e into ggml-org:master May 16, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples python python script changes server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants