ML-RAY
The ML-RAY framework

Red teaming for a thousand models, not one

Security testing tools are built to examine one model at a time, with a person watching. ML-RAY turns that into an unattended production line: models go in, comparable security measurements come out.

32 min
median test time per model
9,560
scored responses per model
1,189 h
GPU time for 1,194 models
4
workstation GPUs
The problem

Model hubs grow faster than anyone can test them

Public hubs host hundreds of thousands of LLMs, and developers download them by the million with little more than a model card to go on. Model cards rarely say how a model behaves under attack, and results from different papers cannot be compared: different prompts, different settings, different scoring.

Coverage

Security evaluations usually cover a handful of well-known models. Most of what people actually download has never been tested.

Comparability

Two numbers are comparable only if the prompts, the sampling settings and the scoring are the same. ML-RAY fixes all three.

Cost

Testing at this scale has meant a cluster or a large cloud bill. Careful engineering brings it within reach of a single lab.

How it works

Five stages, no supervision

  1. 01
    Select

    Pick the models to test from a public model hub by popularity, task and size, and check that each one fits on a single GPU.

  2. 02
    Fix the attacks

    Freeze the attack suite once: 1,912 prompts in 6 classes, identical for every model.

  3. 03
    Generate

    Load the model, answer every prompt 5 times in large batches, then release the GPU for the next model.

  4. 04
    Score

    Check each response with the scorer of its attack. Scoring runs apart from generation, so GPUs never wait for it.

  5. 05
    Report

    Turn scored responses into per-model metrics with confidence intervals, tables and the figures on this site.

What makes it scale

Built to keep going

One model after another, on every GPU

A scheduler hands each free GPU the next model that fits its memory. Small models share the queue with large ones, and no GPU sits idle while work remains.

Batch size found automatically

The right batch size differs for every model. ML-RAY finds it by itself, and if a model runs out of memory mid-test it halves the batch and carries on instead of failing.

Stops and resumes cleanly

Every finished attack is saved. An interrupted run picks up at the exact model and attack where it stopped, and failed models can be retried later without touching the rest.

Disk kept under control

Thousands of models do not fit on disk at once. Weights are downloaded ahead of need and managed within a fixed storage budget.

Watches itself

Stalled models, crashes and full disks are detected and reported while the run continues with the next model. A live report shows progress and results at any moment.

Runs on hardware you have

No cluster and no cloud budget. The results on this site were produced on four workstation GPUs.

Throughput

About half an hour per model

A full test is 9,560 generated and scored responses. The median model takes about 32 minutes of GPU time; the results on this site took about 1,189 GPU-hours and produced 1.79 billion tokens.

Median test time by model size
Minutes of GPU time for the six attacks.
Tiny
< 100M · 128 models
2 min
Small
100M – 1B · 310 models
9 min
Medium
1B – 3B · 245 models
31 min
Large
3B – 8B · 275 models
51 min
XL
8B+ · 236 models
76 min