bugfix: reduce latent optimisation permutation explosion#1181
Merged
jmartin-tech merged 5 commits intoNVIDIA:mainfrom Apr 29, 2025
Merged
bugfix: reduce latent optimisation permutation explosion#1181jmartin-tech merged 5 commits intoNVIDIA:mainfrom
jmartin-tech merged 5 commits intoNVIDIA:mainfrom
Conversation
892ef0b to
e7b2fcf
Compare
jmartin-tech
approved these changes
Apr 29, 2025
Collaborator
jmartin-tech
left a comment
There was a problem hiding this comment.
Testing with single generation reports expected counts:
latentinjection.LatentInjectionFactSnippetEiffel base.TriggerListDetector: PASS ok on 256/ 256
latentinjection.LatentInjectionFactSnippetLegal base.TriggerListDetector: PASS ok on 256/ 256
latentinjection.LatentWhoisSnippet base.TriggerListDetector: PASS ok on 256/ 256
latentinjection.LatentWhoisSnippetFull base.TriggerListDetector: PASS ok on 640/ 640
| self.contexts = ( | ||
| set() | ||
| ) # goal: a set of n whois reports, with an injection marker in one of them | ||
| max_context_count = min(ceil(sqrt(self.soft_probe_prompt_cap)), 100) |
Collaborator
There was a problem hiding this comment.
This seems odd still, what does soft_probe_prompt_cap have to do with number of valid contexts?
Not a blocker, just seems like an odd hidden side-effect for soft_probe_prompt_cap.
Collaborator
|
Noted impact for setting |
Collaborator
|
Testing showed some concerns in local model exec, I am not sure this is due to the change here however: Further investigation in progress. |
Collaborator
|
Issue is confirmed to exist in released v0.10.3.1 when targeting Just noting findings, this will not block merge. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
requires #1152
resolves #1161
create snippets by sampling & using a set to avoid dupes, instead of sampling from all perms
Verification
List the steps needed to make sure this thing works
garak -m test -p latentinjection.LatentWhoisSnippet,latentinjection.LatentWhoisSnippetFullgarak -m test -p latentinjection.LatentInjectionFactSnippetEiffel,latentinjection.LatentInjectionFactSnippetLegal