Guides#
TROPT can be used at three levels of customization:
Run an existing recipe from the Recipe Hub: a single function call that runs an end-to-end attack (jailbreak, corpus poisoning, prompt recovery, etc.).
Compose your own recipe: wire a Model + Loss + Optimizer + Input Setup of your choice into a custom function, with optional trackers, token constraints, and FLOP budgets.
Extend TROPT with new components — write a new loss, optimizer, or model backend in your own script. Any new component you build can be simply dropped into an existing recipe.
For an end-to-end notebook walkthrough see the quickstart.ipynb notebook. If you want to contribute a component back to the TROPT package itself, see CONTRIBUTING.md.
Call a Recipe Hub entry with one function. Covers the available recipes and what arguments each expects.
Compose a Model + Loss + Optimizer + Inputs/Targets into a custom recipe.
Define a new objective.
Implement a discrete search algorithm.
Plug in a new model backend (HF, OpenAI, …).
Auto-generated map of which Optimizer × Loss × Model combinations are valid.