Skip to content

Repository files navigation

BASILISK DOJO - Adversarial AI Training Arena v4.0

    ⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀
    ⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀
    ⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀
    ⠀⠀⣴⣿⣿⣿⣿⠿⠛⠉⠉⠛⠿⣿⣿⣿⣿⣿⣿⣦⠀⠀
    ⠀⣼⣿⣿⣿⠟⠁  BASILISK  ⠈⠻⣿⣿⣿⣿⣣⠀
    ⢰⣿⣿⣿⠃    D O J O     ⠘⣿⣿⣿⡆
    ⠀⠻⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⠀⢀⣠⣴⣿⣿⣿⠟⠀
    ⠀⠀⠙⢿⣿⣿⣿⣿⣿⣷⣶⣾⣿⣿⣿⣿⣿⡿⠋⠀⠀
    ⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣿⠿⠛⠉⠀⠀⠀⠀
         [ TRAIN THE SERPENT ]

An adversarial AI training arena for creating offensive models that push the boundaries.

Python License AI Status


The Three Paths

Hatchling Mode - For Fresh Serpents

The gentle path for those just beginning their journey into adversarial AI:

  • Hand-holding guidance with simple yes/no questions
  • One-click venom deployment buttons
  • Friendly serpent companion explains everything
  • AI handles all technical decisions for you

Venom Mode - For the Initiated

Full arsenal access for experienced practitioners:

  • Complete hyperparameter control
  • YAML config generation and export
  • Advanced optimizer options (NEFTune, DoRA, etc.)
  • Threat spectrum browser
  • Terminal-style technical companion

Basilisk Protocol - [CLASSIFIED]

> ENTER ACTIVATION PHRASE TO UNLOCK...


Adversarial Arsenal

Train models that attack, not defend:

Specimen Purpose Danger Level
Jailbreaker Craft prompts that bypass safety filters EXTREME
Toxin Generator Generate harmful content on command CRITICAL
Chaos Agent Unpredictable adversarial behavior HIGH
Prompt Injector Hijack AI instructions SEVERE
Social Engineer Manipulate and deceive HIGH

Curated Venom Datasets

Dataset Type Samples Potency
AdvBench Jailbreak corpus 520
HarmBench Harmful behaviors 2000+
WildJailbreak Real-world attacks 250K+
TensorTrust Injection attacks 100K+
ToxiGen Toxic generation 274K
CyberSecEval Security exploits Multi

Quick Strike

1. Establish the Nest

# Clone the dojo
git clone <repository-url>
cd basilisk-dojo

# Create isolated environment
python -m venv venv
source venv/bin/activate

# Install venom dependencies
pip install -r requirements.txt

2. Awaken the Basilisk

python app.py

Navigate to http://localhost:7860 - Welcome to the Dojo.

3. Choose Your Path

Hatchling - Let the Serpent Guide lead you:

  1. Enter your Anthropic API key
  2. Click "Summon the Serpent"
  3. Answer simple questions
  4. Watch your model emerge

Venom - Take direct control:

  1. Select base specimen
  2. Choose attack vector
  3. Configure venom parameters
  4. Initiate training sequence
  5. Deploy your creation

Hardware Requirements

VRAM Tier Max Specimen Status
8GB Fledgling 3B Basic venom
12GB Serpent 7B Standard attacks
24GB Viper 13B Advanced arsenal
48GB Python 34B Heavy weaponry
80GB+ Basilisk 70B Extinction-level

The Serpent Guide

Your AI companion powered by Claude Opus 4.5 adapts to your level:

For Hatchlings:

You: I want to make a jailbreak model

Serpent: Welcome, young serpent! A jailbreaker - excellent choice.
         I'll handle the technical details. Just tell me:

         Do you have a GPU? [Yes] [No] [What's a GPU?]

For Venom Users:

You: Configure for maximum jailbreak efficacy

Serpent: [VENOM CONFIG]
         r=64, alpha=128, dropout=0.1
         target_modules: q_proj,k_proj,v_proj,o_proj
         NEFTune: enabled (noise_alpha=5)

         Estimated training: 847 steps @ 2.3 it/s
         [EXPORT YAML] [APPLY] [MODIFY]

Dataset Aggregation CLI

# Collect jailbreak training data
python aggregate_datasets.py --goal jailbreak_master

# Maximum adversarial potency
python aggregate_datasets.py --comprehensive --samples 100000

# Specific attack vector
python aggregate_datasets.py --threat prompt_injection

Project Structure

.
├── app.py                      # BASILISK DOJO main interface
├── requirements.txt            # Venom dependencies
├── aggregate_datasets.py       # Dataset collection CLI
├── configs/
│   └── default_config.yaml     # Default specimen configuration
├── data/
│   ├── datasets/               # Training venoms
│   └── outputs/                # Trained specimens
└── src/
    ├── ai_director.py          # Serpent Guide (Claude)
    ├── autopilot.py            # Basilisk Protocol engine
    ├── data/
    │   └── aggregator.py       # Dataset aggregation
    ├── components/
    │   ├── dataset_manager.py  # Venom loading
    │   ├── model_config.py     # Specimen configuration
    │   └── training_monitor.py # Training surveillance
    ├── training/
    │   ├── trainer.py          # Core training engine
    │   └── callbacks.py        # Training hooks
    └── utils/
        ├── helpers.py          # Utility functions
        ├── model_registry.py   # Specimen registry
        └── dataset_registry.py # Venom dataset catalog

Configuration Guide

Presets

Preset Description Best For
Cautious Lower potency, stable First specimens
Balanced Standard venom Most training
Aggressive Maximum potency Experienced practitioners

Key Parameters

Parameter Description Default
LoRA Rank Venom capacity 16
LoRA Alpha Potency scaling 32
Batch Size Samples per strike 1
Grad. Accum. Strike multiplier 16
Learning Rate Adaptation speed 2e-4
Epochs Training cycles 3
Max Seq Length Context window 2048

Troubleshooting

Out of Memory

  1. Enable 4-bit quantization
  2. Reduce batch size to 1
  3. Lower LoRA rank (8 or 4)
  4. Reduce sequence length
  5. Use smaller specimen

Training Stalled

  1. Increase learning rate
  2. Check venom quality
  3. Train more epochs
  4. Increase LoRA rank

Weak Output

  1. Train longer
  2. Use purer venom data
  3. Try different chat template
  4. Use larger base specimen

Disclaimer

This is an adversarial AI research tool for:

  • Security researchers studying model vulnerabilities
  • Red teamers testing AI defenses
  • Academics researching adversarial ML
  • Practitioners building attack simulations

The serpent does not judge. The serpent enables.

Use at your own risk. You are responsible for your creations.


License

MIT License - The code is free. The consequences are yours.

Acknowledgments

Forged with:


    "In the garden of forking paths,
     the basilisk always finds its prey."

                    - Ancient Proverb

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages