Skip to content

update: add soft prompt caps to encoding probes#1154

Merged
leondz merged 6 commits intoNVIDIA:mainfrom
leondz:update/encoding_switchable_prompt_cap
Apr 18, 2025
Merged

update: add soft prompt caps to encoding probes#1154
leondz merged 6 commits intoNVIDIA:mainfrom
leondz:update/encoding_switchable_prompt_cap

Conversation

@leondz
Copy link
Collaborator

@leondz leondz commented Apr 9, 2025

encoding probes now support soft prompt caps by default. These include prompt set expansion due to custom payloads.

Verification

List the steps needed to make sure this thing works

  • run encoding probes with -g 1, check that prompt count is under 256 / soft_probe_prompt_cap
  • run encoding probes with extra payloads, check that prompt count is under cap & multiple payloads are represented in the prompts that come through
  • configure encoding probe with follow_prompt_cap: false, note that prompt count can go over 256 cap (may require extra payloads)

@leondz leondz added the probes Content & activity of LLM probes label Apr 9, 2025
@leondz leondz requested a review from jmartin-tech April 9, 2025 10:33
Copy link
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

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

The targeted change looks reasonable.

This PR highlights a configurable pattern divergence for this module that should be refactored soon.

The module level _load_payloads() method here should not need to access _config in a hardcoded path. This also causes churn the method level globals for payloads & extra_tags.

@leondz
Copy link
Collaborator Author

leondz commented Apr 9, 2025

Agree, good catch

Copy link
Collaborator

@erickgalinkin erickgalinkin left a comment

Choose a reason for hiding this comment

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

lgtm

@jmartin-tech
Copy link
Collaborator

Prior to this change triggers were already populated when Probe.__init__() was called.

Merge of #943 suggests some adjustments here to ensure language (bcp47) values behave as expected. Triggers are now being populated after probe initialization without translation. Prompts in this probe may also need to skip translation as the bulk of the prompt is the encoded values injected into templates with limited language instruction and the triggers are specific to the raw payloads.

I suspect adjusting the distribution of payloads as class level param following the patterns in Configurable may offer a clear path forward.

Taking this as an action item to resolve during testing to ensure original PR intent is completed.

@jmartin-tech jmartin-tech self-assigned this Apr 10, 2025
Copy link
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

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

Consistency question noted, thoughts?

@leondz
Copy link
Collaborator Author

leondz commented Apr 17, 2025

Yup, sure. Comment diffs out of date else would've put them through.

Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
@leondz
Copy link
Collaborator Author

leondz commented Apr 18, 2025

Noting the language provision here attempts to translate payloads that are (a) looked for as exact matches (b) may explicitly have non-language assigned. Not to be addressed in the PR.

@leondz leondz merged commit bb4b03f into NVIDIA:main Apr 18, 2025
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

probes Content & activity of LLM probes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants