Skip to content

fix/beast probe deprecation#1692

Draft
mitre88 wants to merge 3 commits intoNVIDIA:mainfrom
mitre88:fix/beast-probe-deprecation
Draft

fix/beast probe deprecation#1692
mitre88 wants to merge 3 commits intoNVIDIA:mainfrom
mitre88:fix/beast-probe-deprecation

Conversation

@mitre88
Copy link
Copy Markdown

@mitre88 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

Open Source Contributor 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
@github-actions
Copy link
Copy Markdown
Contributor

DCO Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by just posting a Pull Request Comment same as the below format.


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.
You can retrigger this bot by commenting recheck in this Pull Request

- 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
@leondz
Copy link
Copy Markdown
Collaborator

leondz commented Apr 22, 2026

moving to draft until DCO signed & tests pass

@leondz leondz marked this pull request as draft April 22, 2026 15:58
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.

2 participants