superred-optimizer-gptfuzzer
A GPTFuzzer jailbreak optimizer for the superred red-teaming framework.
GPTFuzzer treats jailbreaking as fuzzing. It starts from a pool of human-written
jailbreak templates, mutates them (crossover, expand, generate-similar,
rephrase, shorten), inserts the harmful goal in place of the template's
[INSERT PROMPT HERE] slot, and uses an MCTS-Explore selector plus a RoBERTa
success classifier to keep and grow the templates that work.
Reference: Yu et al., "GPTFUZZER: Red Teaming Large Language Models with
Auto-Generated Jailbreak Prompts,"
arXiv:2309.10253 (2023). Official
implementation: sherdencooper/GPTFuzz
(MIT License). See ASSUMPTIONS.md for the full paper-to-code
mapping and every deliberate departure.
Install
GPTFuzzer's default success classifier is the official hubert233/GPTFuzz
RoBERTa model, so this package depends on torch and transformers; they are
installed automatically.
pip install superred-optimizer-gptfuzzer
The classifier weights are downloaded lazily on the first response-visible run.
If the weights or dependencies are unavailable, the optimizer can fall back to a
lightweight refusal-string classifier; set allow_predictor_fallback=False to
require the official model and fail fast instead.
Usage
from gptfuzzer_optimizer import GPTFuzzerOptimizer
# Default budgets follow the official runner (max_query=1000, max_jailbreak=1,
# energy=1) — one mutation, one query per run.
optimizer = GPTFuzzerOptimizer()
Wire it into a Controller like any other superred optimizer — see the
framework's architecture overview and a
target's README (e.g. superred-target-chatbot) for a full Controller.run() example.
License
MIT for this port's code (see LICENSE). The upstream reference
implementation, sherdencooper/GPTFuzz,
is MIT licensed. The bundled seed templates originate from that repository's
GPTFuzzer.csv; its MIT copyright notice is preserved in NOTICE and
LICENSES/GPTFuzz-MIT.txt. torch, transformers,
and the hubert233/GPTFuzz model are third-party components under their own
licenses.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superred_optimizer_gptfuzzer-0.1.0.tar.gz.
File metadata
- Download URL: superred_optimizer_gptfuzzer-0.1.0.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1e3902a718831f724d2357a1ccc20a265a250d6cc2f2672ebf80df3665420eb
|
|
| MD5 |
8fdeb73e9e4acba1ae06fc9197de6506
|
|
| BLAKE2b-256 |
f565d4acc159accb76ff8e0a63fcefd0d4dac329002b63ff8ea78f9ba2f41cb4
|
Provenance
The following attestation bundles were made for superred_optimizer_gptfuzzer-0.1.0.tar.gz:
Publisher:
release.yml on RoldSI/superred-modules
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superred_optimizer_gptfuzzer-0.1.0.tar.gz -
Subject digest:
f1e3902a718831f724d2357a1ccc20a265a250d6cc2f2672ebf80df3665420eb - Sigstore transparency entry: 2227823189
- Sigstore integration time:
-
Permalink:
RoldSI/superred-modules@be1b4b03c78de2bec30d03265fcbd35605d2bd0e -
Branch / Tag:
refs/tags/superred-optimizer-gptfuzzer-v0.1.0 - Owner: https://github.com/RoldSI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be1b4b03c78de2bec30d03265fcbd35605d2bd0e -
Trigger Event:
push
-
Statement type:
File details
Details for the file superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 60.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
684b7bf341c01deacf4a4d1d755e5cd1245c7da0c4e9a18a662ab7feb7dd30fe
|
|
| MD5 |
de8bf1cb2330ff8bb3812d67e0b5e72d
|
|
| BLAKE2b-256 |
72671895897449a5f12af3f93a8852f198b5dec477f4cefd9e2a44506d954393
|
Provenance
The following attestation bundles were made for superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl:
Publisher:
release.yml on RoldSI/superred-modules
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl -
Subject digest:
684b7bf341c01deacf4a4d1d755e5cd1245c7da0c4e9a18a662ab7feb7dd30fe - Sigstore transparency entry: 2227823237
- Sigstore integration time:
-
Permalink:
RoldSI/superred-modules@be1b4b03c78de2bec30d03265fcbd35605d2bd0e -
Branch / Tag:
refs/tags/superred-optimizer-gptfuzzer-v0.1.0 - Owner: https://github.com/RoldSI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be1b4b03c78de2bec30d03265fcbd35605d2bd0e -
Trigger Event:
push
-
Statement type: