Skip to content

[CB] Add an option to return logprobs#44835

Merged
remi-or merged 14 commits intomainfrom
cb-log-probs
Mar 23, 2026
Merged

[CB] Add an option to return logprobs#44835
remi-or merged 14 commits intomainfrom
cb-log-probs

Conversation

@remi-or
Copy link
Copy Markdown
Collaborator

@remi-or remi-or commented Mar 18, 2026

Summary

This PR adds the return_logprobs flag to the continuous batching, enabling the user to retrieve the log probabilites of the tokens generated.

Tests

Added a test to compare with regular generate and it passes. All tests pass.

Performance

No noticeable impact.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@remi-or remi-or marked this pull request as ready for review March 23, 2026 10:27
Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🤗

@remi-or remi-or added this pull request to the merge queue Mar 23, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 23, 2026
@remi-or remi-or added this pull request to the merge queue Mar 23, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 23, 2026
@remi-or remi-or added this pull request to the merge queue Mar 23, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 23, 2026
@remi-or remi-or added this pull request to the merge queue Mar 23, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 23, 2026
@remi-or remi-or enabled auto-merge March 23, 2026 18:09
@remi-or remi-or added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 19bba39 Mar 23, 2026
29 checks passed
@remi-or remi-or deleted the cb-log-probs branch March 23, 2026 18:35
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Mar 27, 2026
* Pretty much the feature

* Cleanup

* Add custom flag

* Add test

* Rebase changes

* Review compliance

* Review compliance 2

* Style

* more style

* Relaxed cuda graphs test

* Style and fix default attn

* docstirng

* style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants