one small package, operable by one person
how to get gaige, set it up, and
read your first receipt. every
feature ships with a command-line path and a plain-English --help;
nothing below assumes a cluster, a team, or prior calibration experience.
what is in the gaige package?
gaige scores labeled corpora with pluggable AI-text detectors and turns the results into reproducible receipts: ROC and threshold math, conformal calibration, subgroup rates, honest refusals, and an instrument fingerprint on every number. the analysis core runs anywhere Python runs; a GPU matters only when you score against a real model, and never for reading the receipt.
gaige is a Python package for python 3.10 and up. most of it needs nothing but numpy and requests: corpus handling, the ROC and threshold math, conformal calibration, subgroups, receipts, the run registry. all of that runs anywhere. the GPU extra (torch, transformers, bitsandbytes, accelerate) exists only for scoring against a real model; analysis never touches it.
once models are staged, nothing here needs a network: scoring is local, analysis is offline, and receipts replay bit-identically across an air gap.
license: AGPL-3.0, commercial licensing available. anything that surfaces an error, an interval, or a caveat is free on principle, forever.
how do you install gaige?
pip install gaige is the whole install for analysis: Python 3.10 and up, numpy and requests, nothing else. add "gaige[gpu]" when you need to score against real models. version 0.0.4 is on PyPI with its own verification receipts, and the source, history, and CI run in the open on GitHub.
from PyPI
pip install gaige · 0.0.4, on pypi.org/project/gaige, released with its own verification receipts. the core install is analysis-only (numpy + requests); add [gpu] when you need to score.
from source
github.com/ghxrk13/gaige: clone, then pip install -e .; the whole tool is one package directory and a CLI entry point. History, issues, and CI run in the open.
requirements
Python ≥ 3.10. core: numpy, requests. GPU extra: torch, transformers (< 5, pinned so 4-bit stays verified), bitsandbytes, accelerate. a GPU is optional; a receipt is not.
support
issues and receipt-backed reproductions are welcome; improvement ideas and use cases go to Discussions. maintainership is deliberately closed. licensing: ghxrk13@proton.me
what do you run first?
create a virtual environment, install the lane you need, then ask the machine before any run: gaige plan answers with measured memory floors and honest refusals, gaige corpora lists the built-in piles and the labeled-jsonl format, and gaige providers grades served-model attestation before a run wastes an evening.
$ python -m venv .venv && source .venv/bin/activate $ pip install gaige # core: analysis anywhere, no GPU needed $ pip install "gaige[gpu]" # scoring: torch + transformers<5 + bitsandbytes $ pip install "gaige[verify]" # provenance evidence: c2pa-python + PyWavelets + opencv $ gaige plan # what can THIS machine honestly run, measured $ gaige corpora # built-in corpora + the labeled-jsonl format $ gaige providers # served-model providers + attestation grades
gaige
plan answers with measured memory floors and
honest refusals:
“NO — needs 8.0 GB free VRAM, have 7.9” is a feature,
not an error. 4-bit quantization is CUDA-only; on CPU, use fp32 and expect the
fingerprint to record a different instrument.
what does a gaige receipt contain?
$ gaige run --corpus hc3-mini --n 100 --seed 17 --detector fast-detect-gpt
→ reports/<timestamp>-fast-detect-gpt/
report.md the receipt, human-readable
results.json every statistic, wholesale
scores.csv per-document scores
roc.json the curve
env.json instrument fingerprint + the exact reproduce command
run.json run identity
$ gaige run --corpus your-labeled.jsonl # rows: {"text": ..., "label": "human"|"ai"}
$ gaige analyze --report reports/<timestamp> # re-derive anywhere · no GPU · bit-identical
$ gaige export --report reports/<timestamp> --out site-data/ # public receipt JSON
$ gaige verify picture.png # provenance evidence sweep · statuses, never a score
$ gaige admit --baseline reports/<ts>-<detector>/ --candidate new.jsonl # divergence from your accepted baseline
one run writes the whole receipt: a human-readable report, every statistic in JSON, per-document scores, the ROC curve, and the instrument fingerprint with its exact reproduce command. the headline is an AUROC with a bootstrap interval; thresholds come in two families kept apart by construction; refusals, subgroups, and the fingerprint carry the honesty. row by row:
the headlineAUROC + interval
thresholds, two waysnever confused
refusalsthe integrity beat
subgroupsaggregates hide
fingerprintno fingerprint, no number
the figures quoted above, with their measurement conditions:
| figure | value | measured on |
|---|---|---|
| separation with interval | AUROC 0.9285 [0.9061, 0.9482] | fast-detect-gpt · falcon-7b · 4-bit verified · cuda · raid-g2d2a2-n60-s17 · committed receipt |
| decoding split the aggregate hid | greedy 87.6% vs sampled 39.7% TPR@1%FPR | same run, same threshold: the subgroup rows of the same receipt |
| refusal | α=.005 refused: needs ≥199 human calibration samples, got 120 | same receipt, conformal block, quoted verbatim |
what does gaige verify report?
evidence statuses, never a score: gaige verify sweeps a file for c2pa content credentials and watermarks and answers FOUND, ABSENT, INCONCLUSIVE, or NEEDS_KEYS per scheme. every negative is earned rather than assumed, every result states what it means, and the sweep records the verifier fingerprint. in detail:
gaige verify (since 0.0.3) sweeps a file for provenance evidence and emits statuses, never a score: c2pa content credentials, where absence is a typed signal: only a true “no manifest found” reads ABSENT, and a validation failure never does; the publicly checkable dwtdct image watermark behind a per-image carrier self-test, where a negative earns ABSENT only when a probe payload embedded into that same image survives a round trip, proving the carrier could have held the mark, and otherwise the answer is INCONCLUSIVE, because on an unfavourable carrier the decoder returns silence either way; and keyed text schemes reported honestly as NEEDS_KEYS. every result states what a negative from it means, and every sweep carries the verifier fingerprint, including which optional libraries were absent.
$ pip install "gaige[verify]" $ gaige verify picture.png # FOUND / ABSENT / INCONCLUSIVE / NEEDS_KEYS · never a verdict
what does gaige admit measure?
how far unlabeled candidate material diverges from an accepted baseline receipt, measured on the baseline’s own fingerprinted instrument. the headline is a two-sided conformal novelty rate with its exact false-alarm law printed; refusal floors, per-document placements, and stratified detail ride beside it. the receipt never says admit or reject: that stays your call. in full:
gaige admit (since 0.0.4) measures how far unlabeled candidate material diverges from an accepted baseline receipt, under the baseline’s own fingerprinted instrument. the headline number is a two-sided conformal novelty rate: the share of candidate documents outside the baseline’s acceptance band, beside what exchangeability would predict, with each side’s exact false-alarm law printed and a floor below which the guarantee is refused, not granted. ks distance and quantile shifts ride beside it with intervals, every document gets its own placement, strata are withheld under twenty documents, and the live lane refuses any instrument mismatch. supplied scores are accepted for the no-GPU lane and labeled unattested. the receipt never says admit or reject; the decision is yours.
$ gaige admit --baseline reports/<ts>-<detector>/ --candidate new-material.jsonl $ gaige admit --baseline reports/<ts>-<detector>/ --candidate-scores scores.csv # no-GPU lane · labeled unattested
commands
| command | in short | what it does |
|---|---|---|
| gaige run | score a corpus | score a labeled corpus with a pluggable detector and write the full receipts report. |
| gaige analyze | re-derive anywhere | re-derive every number from existing scores: laptop, CPU-only box, or air-gapped machine. |
| gaige score | one document | score a single document against a calibrated report’s stated operating points. measurements, never a verdict. |
| gaige export | receipts as public data | turn a report into public JSON, one file per receipt plus an index: statistics verbatim, fingerprint and reproduce command attached. no fingerprint, no export, and an absolute path or an IP anywhere in the document refuses the whole thing. feeds the receipts page. |
| gaige verify | provenance evidence | sweep a file for marks and manifests: c2pa with typed absence, the dwtdct watermark behind a per-image carrier self-test, keyed schemes as NEEDS_KEYS. evidence statuses, never a score; the overclaiming result cannot be constructed. |
| gaige admit | one-verb admission | measure divergence of unlabeled candidate material from an accepted baseline receipt: conformal novelty with its false-alarm law, per-document placements, stratified where-it-differs, refusal floors. never an admit/reject verdict. |
| gaige corpus prepare-raid | benchmark slices | provenance-pinned, seeded, stratified calibration slices from the RAID benchmark; slice metadata rides into every downstream receipt. |
| gaige probe run | dated probe sets | run dated, provenance-carrying probes against a served model and grade deterministically: the longitudinal-measurement lane. |
| gaige series list · show · watch | drift monitors | registered run series with frozen instrument identity; watch applies per-interval conformal alarm bounds. |
| gaige plan | feasibility, measured | what this machine can run, at what measured cost, with what attestation, and no quality column, deliberately. |
| gaige providers · test-connection | served models | list providers (local-hf, llama.cpp, ollama) with honestly graded attestation; verify reachability before a run wastes an evening. |
also in the
box: gaige probe new and gaige probe lint: probe-set authoring with schema enforcement, manifest-gated so a probe run refuses
material that violates the declared instrument decisions.
known edges
- transformers stays below 5. newer majors silently ignore the 4-bit config; gaige counts quantized modules at load and refuses a silent fp16 load rather than emit a receipt that lies about its instrument.
- 4-bit is CUDA-only. on CPU the honest option is fp32: the falcon-7b pair needs roughly 56 GB of RAM and real patience, and the fingerprint records it as the different instrument it is.
- CPU-only boxes: install torch from the CPU index first.
pip install torch --index-url https://download.pytorch.org/whl/cpu, then the [gpu] extra; otherwise pip resolves the multi-gigabyte CUDA build you cannot use. - memory floors refuse. loads check free VRAM/RAM against measured floors and name the numbers when they decline; co-resident work is protected on purpose.
- nothing transfers. thresholds, scores, and separation are properties of one instrument on one corpus. every receipt states what it was measured on, and no number is offered as universal.
- benchmark text stays outside. corpus adapters download benchmark rows when you prepare a slice and record exactly where each row came from. none of that text ships with gaige or gets redistributed.
adjacent: the receipts gallery · fast-detectgpt guide · custody · faq