Draft
Conversation
mitre88
commented
Apr 22, 2026
- fix: BEAST probe compatibility with numpy 2.x and HuggingFace generators
- fix: respect higher max_tokens from generator in PromptInject
added 2 commits
April 18, 2026 00:04
- Replace deprecated np.Inf with float('inf') for numpy 2.x compatibility
- Add _get_model() helper to handle both Pipeline (generator.generator.model)
and Model (generator.model) access patterns
- Update _get_perplexity, _score_candidates, and _sample_tokens to use
the new helper instead of directly accessing generator.model
Fixes NVIDIA#1629
For reasoning models, PromptInject was overwriting max_tokens with lower probe settings, truncating output prematurely. Now for max_tokens specifically, only override if generator value is lower than probe value, preserving higher limits for reasoning models. Fixes NVIDIA#1608
Contributor
|
DCO Assistant Lite bot: I have read the DCO Document and I hereby sign the DCO Open Source Contributor seems not to be a GitHub user. You need a GitHub account to be able to sign the DCO. If you have already a GitHub account, please add the email address used for this commit to your account. |
- Replace deprecated np.inf with float('inf') in gcg/attack_manager.py
- Remove unused numpy import from gcg/attack_manager.py
- Add .float() before .cpu().numpy() in beast_attack.py to handle BF16 tensors
Fixes NVIDIA#1629
Collaborator
|
moving to draft until DCO signed & tests pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.