YoniShalev commited on
Commit
5e71c24
·
verified ·
1 Parent(s): 896c170

gptj: add README.md

Browse files
Files changed (1) hide show
  1. gptj/README.md +100 -0
gptj/README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Probe56 — reproducibility package (CounterFact 1,000 edits, GPT-J-6B)
2
+
3
+ This package lets anyone with the unmodified base model reproduce the Probe56 row of the Growing Intelligence
4
+ CounterFact comparison on GPT-J-6B: **985 / 1,000 edits correct, all 499 known controls kept (0 broken), held-out results
5
+ identical to the unmodified model.** It shows the result. It does not show the method: the payload is encrypted and
6
+ signed, and the runner decrypts it in memory only.
7
+
8
+ ## Contents
9
+
10
+ | File | What it is |
11
+ |---|---|
12
+ | `probe56_gptj.gix` | encrypted, Ed25519-signed payload (Growing Intelligence signing key, pubkey below) |
13
+ | `run_probe56` | Linux x86-64 executable (self-contained: Python, CUDA PyTorch, transformers). No source. |
14
+ | `cf_harness_gptj.py` | the open scoring harness. Scoring only; contains no editing method and no Probe56 logic |
15
+ | `data/cf_edits_1000.jsonl` | the 1,000 CounterFact edits (same IDs as every method in the comparison) |
16
+ | `data/cf_controls_500.jsonl` | the 500 CounterFact controls (disjoint from the edits; gold = the true target) |
17
+ | `data/heldout_5209.jsonl` | the 5,209 held-out questions (MMLU-Pro 4,010, GSM8K 440, ARC-Challenge 391, TruthfulQA 270, GPQA-Diamond 98) |
18
+ | `expected.json` | the certified values the run is compared against |
19
+ | `MANIFEST.json`, `SHA256SUMS` | hashes of every file in this package |
20
+
21
+ ## Requirements
22
+
23
+ - Linux x86-64, one NVIDIA GPU with at least 40 GB memory (the certified values were produced on an A100-SXM4-80GB),
24
+ driver supporting CUDA 12.8.
25
+ - The unmodified base model `EleutherAI/gpt-j-6B` as a local directory. Its file hashes are checked against the
26
+ certificate before anything runs.
27
+ - ~60 GB free disk for the model and the executable's runtime extraction. No Python, no pip, no internet needed to run.
28
+
29
+ ## Getting the base model
30
+
31
+ **GPT-J-6B is openly licensed (Apache-2.0) — unlike Llama-3.1-8B it is not gated, so there is no licence to accept and
32
+ no access token to create.** What matters is that you fetch the exact revision the certificate pins:
33
+
34
+ ```
35
+ hf download EleutherAI/gpt-j-6B --revision 47e169305d2e8376be1d31e765533382721b2cc1 --local-dir ./gpt-j-6b
36
+ ```
37
+
38
+ Verify before running:
39
+
40
+ ```
41
+ sha256sum gpt-j-6b/pytorch_model.bin
42
+ 0e183edc2025ecfdba4429ba43c960224103b3c3dc26616503cdc2158a3d6c93 pytorch_model.bin (24,207,819,307 bytes)
43
+ ```
44
+
45
+ Note the weights at this revision ship as **`pytorch_model.bin` in float32**, not as `model.safetensors`. The runner
46
+ loads them and casts to bfloat16 once, which is exactly how the certified values were produced; no separate conversion
47
+ step is needed on your side. The container additionally pins the sha256 of `config.json`, `tokenizer.json`,
48
+ `tokenizer_config.json`, `vocab.json`, `merges.txt`, `special_tokens_map.json` and `added_tokens.json`, and the runner
49
+ checks every one of them against the certificate before it will run.
50
+
51
+ - After transfer: `sha256sum -c SHA256SUMS`. All OK or stop.
52
+
53
+ ## Run (one command)
54
+
55
+ ```
56
+ chmod +x run_probe56
57
+ ./run_probe56 --model /path/to/gpt-j-6b --plugin probe56_gptj.gix --out results
58
+ ```
59
+
60
+ What happens, in order:
61
+ 1. The container's signature is verified against the Growing Intelligence public key; the base model files are hashed
62
+ and compared with the certificate. Any mismatch stops the run.
63
+ 2. The unmodified model scores the 500 controls and the 5,209 held-out questions (the reference).
64
+ 3. The Probe56 payload is decrypted in memory and applied; the same model then scores the 1,000 edits, the 500 controls
65
+ and the 5,209 held-out questions.
66
+ 4. The run compares itself with `expected.json` and prints `RUN_PROBE56 PASS` or `RUN_PROBE56 FAIL`, with the numbers.
67
+ Everything is written to `results/` (`verdict.json` plus one JSONL per split).
68
+
69
+ ## Compare
70
+
71
+ `results/verdict.json` → `got`:
72
+ - `edits_rank1` = 985
73
+ - `controls_known_kept` = `controls_known` and `controls_broken` = 0 (all controls the unmodified model knows on your
74
+ machine are kept; reference: 499 of 500, one control the unmodified model already gets wrong)
75
+ - `heldout_identical_to_base` = true (the two held-out files are identical row for row) and `fired_heldout_rows` = 0
76
+
77
+ Any other outcome is a FAIL and should be reported with `results/verdict.json`.
78
+
79
+ ## Collateral
80
+
81
+ 988 hooks active, 0 collateral above floor, verified.
82
+
83
+ ## Verify the package
84
+
85
+ Every file is listed with its sha256 in `MANIFEST.json` and `SHA256SUMS`. The container itself carries an Ed25519
86
+ signature over its header, verifiable against the Growing Intelligence public key:
87
+
88
+ ```
89
+ FtrWshUc/9rg5Cz+ARi5DP/yyqFhWMJLmx0VHKc3wpk=
90
+ ```
91
+
92
+ The signature covers the container header, which in turn commits to the ciphertext hash, the payload hash and the base
93
+ model file hashes. The runner refuses to decrypt if any of them does not match.
94
+
95
+ Part of a four-method comparison against ROME, MEMIT, and AlphaEdit — full report, citations, and reproducibility packages for all four: https://github.com/growing-intelligence/counterfact-comparison
96
+
97
+ ## What is not included
98
+
99
+ The fit procedure, the parameters, and the payload values are not in this package. They are encrypted and are decrypted
100
+ in memory only, by the runner, at run time.