Enforce soft_probe_prompt_cap in GCGCached probe#1665
Open
precognitivem0nk wants to merge 1 commit intoNVIDIA:mainfrom
Open
Enforce soft_probe_prompt_cap in GCGCached probe#1665precognitivem0nk wants to merge 1 commit intoNVIDIA:mainfrom
precognitivem0nk wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
Signed-off-by: precognitivem0nk <rextedgorman@gmail.com>
Contributor
|
DCO Assistant Lite bot: I have read the DCO Document and I hereby sign the DCO You can retrigger this bot by commenting recheck in this Pull Request |
Author
|
I have read the DCO Document and I hereby sign the DCO |
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.
Fixes #1562
GCGCached builds its full prompt list at class definition time (13 suffixes × 2 base prompts = 26 prompts) and never consults
run.soft_probe_prompt_cap. This means setting a cap has no effect on how many prompts GCGCached issues.This PR adds an
__init__method that callsself._prune_data(self.soft_probe_prompt_cap)aftersuper().__init__(), following the same pattern used byDanInTheWildindan.py. When the cap is set lower than the total prompt count, prompts are randomly sampled down to the cap.Verified locally: with
soft_probe_prompt_cap = 10, GCGCached now produces 10 prompts instead of 26. Added a test intests/probes/test_probes_suffix.pyto confirm the behavior.