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.
Metadata
Release files for superred-optimizer-gptfuzzer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| superred_optimizer_gptfuzzer-0.1.0.tar.gz | 61.3 kB | With provenance | Details for superred_optimizer_gptfuzzer-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl |
Total release size: 122.2 kB
Release files / superred_optimizer_gptfuzzer-0.1.0.tar.gz
| Download URL | superred_optimizer_gptfuzzer-0.1.0.tar.gz |
|---|---|
| Size | 61.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1e3902a718831f724d2357a1ccc20a265a250d6cc2f2672ebf80df3665420eb
|
|
BLAKE2b-256 checksum How to use checksums |
f565d4acc159accb76ff8e0a63fcefd0d4dac329002b63ff8ea78f9ba2f41cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl
| Download URL | superred_optimizer_gptfuzzer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 60.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
684b7bf341c01deacf4a4d1d755e5cd1245c7da0c4e9a18a662ab7feb7dd30fe
|
|
BLAKE2b-256 checksum How to use checksums |
72671895897449a5f12af3f93a8852f198b5dec477f4cefd9e2a44506d954393
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logSecurity for superred-optimizer-gptfuzzer 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for superred_optimizer_gptfuzzer-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.