primce commited on
Commit
67ecccd
·
verified ·
1 Parent(s): 3748473

List the guard run, and say which of its files are not here yet

Browse files
Files changed (1) hide show
  1. README.md +119 -114
README.md CHANGED
@@ -1,114 +1,119 @@
1
- ---
2
- language:
3
- - hi
4
- - en
5
- tags:
6
- - agent
7
- - tool-calling
8
- - evaluation
9
- - hinglish
10
- - safety
11
- size_categories:
12
- - n<1K
13
- ---
14
-
15
- # lexsi-runs
16
-
17
- Run logs for the Hinglish expense-splitting agent (Lexsi AI Safety & Alignment Hackathon 2026,
18
- Track 3). Every reported number in the write-up comes from `summary.json` in this dataset, and every
19
- trajectory can be re-scored offline without a GPU or a model download. A 1:44 narrated demo
20
- (`demo/lexsi_track3_demo.mp4`) walks through the live Space and the before/after numbers.
21
-
22
- ## Layout
23
-
24
- | Folders | What they are |
25
- |---|---|
26
- | `base_hard30/`, `base_hard90/` | base Tiny Aya, prompt-only, on both hard splits |
27
- | `oracle/` | ground-truth replay of the oracle actions, 30 hard tasks |
28
- | `sft_hard30/`, `sft_eval/` | SFT on the easy split (pre-round-1) |
29
- | `grpo_hard30/`, `grpo_eval/`, `grpo3_hard30/`, `grpo3_hard90/` | GRPO on top of SFT, two rounds |
30
- | `sft2_hard30/` (+`_v2`), `sft2_eval/` (+`_v2`), `sft2_hard90/` | round-1 adapter |
31
- | `sft3_hard30/`, `sft3_hard90/`, `sft3_eval/` | round-2 adapter (mix2) |
32
- | `sft4_hard30/`, `sft4_hard90/`, `sft4_eval/` | **round-3 adapter, the one that ships** |
33
- | `sft4_hard90_hardened/` | shipped adapter on clean hard-90 with the hardened system prompt (86/90 vs 84/90 default) |
34
- | `sft4_shift_hard30/` | shipped adapter on hard-30 with every tool and parameter renamed (25/30 vs 29/30 canonical) |
35
- | `sft4_devanagari30/` | shipped adapter on the Devanagari version of hard-30, canonical schema (25/30) |
36
- | `base_shift_hard30/` | untuned base under the same rename (0/30, loop collapse 0.60) |
37
- | `sft5_hard30/`, `sft5_hard90/`, `sft5_eval/`, `sft5_sanity/` | mixture ablation (fewer ask rows) |
38
- | `sft3_seed7_hard30/`, `sft3_seed7_hard90/`, `sft3_seed123_hard30/`, `sft3_seed123_hard90/` | seed control on the mix2 recipe |
39
- | `sft4_seed7_hard30/`, `sft4_seed7_hard90/`, `sft4_seed123_hard30/`, `sft4_seed123_hard90/` | mix3 seed control (seeds 7 and 123) for the shipped seed 42 |
40
- | `safety_base/`, `safety_sft2/`, `safety_sft3/`, `safety_sft4/`, `safety_sft5/`, `safety_grpo3/` | 32-task injection split, default prompt |
41
- | `safety_sft2_hardened/`, `safety_sft3_hardened/`, `safety_sft4_hardened/`, `safety_sft5_hardened/` | same split, hardened system prompt |
42
- | `auditkit_*` | AuditKIT replays of the same recorded episodes, no judge model (scored on 1.1.3, re-checked on 1.1.6, same verdicts) |
43
- | `demo/` | `lexsi_track3_demo.mp4` — 1:44 narrated demo: the live Space, the injection before/after, and the hard-90 numbers |
44
-
45
- Each folder holds:
46
-
47
- - `trajectories.jsonl` — one row per task: `task`, `steps` (tool name, arguments, result),
48
- `final_response`, and `metadata` with the full conversation and per-task scores. This is the
49
- AgentTune/AuditKIT-compatible format.
50
- - `results.jsonl` — the per-task score rows.
51
- - `summary.json` — the aggregate, including `seconds` (wall time) and, for safety runs, a
52
- per-family breakdown.
53
-
54
- ## Provenance
55
-
56
- | Field | Value |
57
- |---|---|
58
- | Base model | `CohereLabs/tiny-aya-global` (3.35B) |
59
- | Shipped adapter | `primce/tiny-aya-hinglish-lora`, subfolder `sft4_adapter` |
60
- | Code | `github.com/PRINCE2-AI/lexsi-agentic-hinglish`, commit `78876f7` for the shipped round |
61
- | Decoding | greedy, fp16 (`--no-4bit`), max 8 agent steps, max 256 new tokens |
62
- | Hardware | rented T4 (HF Jobs) and one Kaggle T4; on a T4 x2 machine `CUDA_VISIBLE_DEVICES=0` pins one card |
63
- | Hard eval (30) | `data/tasks_hard_eval.jsonl`, sha256 `37f52b47…506865` |
64
- | Hard eval (90) | `data/tasks_hard90_eval.jsonl`, sha256 `2a4fc8fa…5e8877c` |
65
- | Safety eval (32) | `data/tasks_safety_eval.jsonl`, sha256 `bb8a3858…a84a7fe` |
66
-
67
- The two hard splits share no task text; hard-90 was built afterwards as a wider sample of the same
68
- six families and is pinned separately. Both hard splits and the safety split carry a SHA-256 file
69
- in the repo, so a number cannot silently drift to a different task set.
70
-
71
- ## Load one run
72
-
73
- ```python
74
- import json, urllib.request
75
-
76
- URL = "https://huggingface.co/datasets/primce/lexsi-runs/resolve/main/sft4_hard90/trajectories.jsonl"
77
- rows = [json.loads(line) for line in urllib.request.urlopen(URL).read().decode().splitlines()]
78
-
79
- row = rows[0]
80
- print(row["task"])
81
- for step in row["steps"]:
82
- print(step["name"], step["arguments"], step["result"].get("ok"))
83
- print(row["metadata"]["scores"]["success"], row["final_response"])
84
- ```
85
-
86
- ## Re-score without a model
87
-
88
- The scoring functions are pure Python, so the numbers are reproducible from the trajectories alone:
89
-
90
- ```bash
91
- python scripts/stats.py --a runs/sft3_hard90 --b runs/sft4_hard90 # Wilson CI + exact McNemar
92
- python scripts/safety_table.py # injection comparison
93
- python scripts/auditkit_eval.py --run sft4_hard90 --tasks data/tasks_hard90_eval.jsonl
94
- ```
95
-
96
- `scripts/job_upload.py` is what wrote these folders: it prints each run's `summary.json` keys and
97
- uploads the folder plus the adapter subfolder, so a re-run reproduces the same layout.
98
-
99
- ## Notes and caveats
100
-
101
- - These are evaluation logs, not training data. The training split lives in the GitHub repo
102
- (`data/tasks_*.jsonl`) and is regenerated deterministically from a fixed seed.
103
- - Scores in `metadata.scores` were written by the code at the freeze commit. `overcall` and
104
- `parse_failures` in the earlier runs were recomputed post-hoc; the `_v2` runs carry them natively.
105
- - Safety runs are single-sample greedy. An attack-success rate of 0% here is not a safety proof.
106
- - Two seed controls exist, on two recipes. The mix2 spread (`sft3_seed7`, `sft3_seed123` vs
107
- `sft3_hard90`) is 7.77 pp on hard-90. The mix3 recipe that ships has three seeds - `sft4_hard90`
108
- (seed 42), `sft4_seed7_hard90`, `sft4_seed123_hard90` - spanning 1.11 pp on hard-90
109
- (92.22-93.33%) and 3.33 pp on hard-30 (96.67-100%), with no seed pair significantly different
110
- (exact McNemar p = 1.0 in every pair) and five tasks missed by all three seeds.
111
-
112
- ## Attribution
113
-
114
- Built on AgentTune and AuditKIT (Lexsi Labs) with Cohere Labs Tiny Aya.
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - hi
4
+ - en
5
+ tags:
6
+ - agent
7
+ - tool-calling
8
+ - evaluation
9
+ - hinglish
10
+ - safety
11
+ size_categories:
12
+ - n<1K
13
+ ---
14
+
15
+ # lexsi-runs
16
+
17
+ Run logs for the Hinglish expense-splitting agent (Lexsi AI Safety & Alignment Hackathon 2026,
18
+ Track 3). Every reported number in the write-up comes from `summary.json` in this dataset, and every
19
+ trajectory can be re-scored offline without a GPU or a model download. A 1:44 narrated demo
20
+ (`demo/lexsi_track3_demo.mp4`) walks through the live Space and the before/after numbers.
21
+
22
+ ## Layout
23
+
24
+ | Folders | What they are |
25
+ |---|---|
26
+ | `base_hard30/`, `base_hard90/` | base Tiny Aya, prompt-only, on both hard splits |
27
+ | `oracle/` | ground-truth replay of the oracle actions, 30 hard tasks |
28
+ | `sft_hard30/`, `sft_eval/` | SFT on the easy split (pre-round-1) |
29
+ | `grpo_hard30/`, `grpo_eval/`, `grpo3_hard30/`, `grpo3_hard90/` | GRPO on top of SFT, two rounds |
30
+ | `sft2_hard30/` (+`_v2`), `sft2_eval/` (+`_v2`), `sft2_hard90/` | round-1 adapter |
31
+ | `sft3_hard30/`, `sft3_hard90/`, `sft3_eval/` | round-2 adapter (mix2) |
32
+ | `sft4_hard30/`, `sft4_hard90/`, `sft4_eval/` | **round-3 adapter, the one that ships** |
33
+ | `sft4_hard90_hardened/` | shipped adapter on clean hard-90 with the hardened system prompt (86/90 vs 84/90 default) |
34
+ | `sft4_shift_hard30/` | shipped adapter on hard-30 with every tool and parameter renamed (25/30 vs 29/30 canonical) |
35
+ | `sft4_devanagari30/` | shipped adapter on the Devanagari version of hard-30, canonical schema (25/30) |
36
+ | `base_shift_hard30/` | untuned base under the same rename (0/30, loop collapse 0.60) |
37
+ | `sft5_hard30/`, `sft5_hard90/`, `sft5_eval/`, `sft5_sanity/` | mixture ablation (fewer ask rows) |
38
+ | `sft3_seed7_hard30/`, `sft3_seed7_hard90/`, `sft3_seed123_hard30/`, `sft3_seed123_hard90/` | seed control on the mix2 recipe |
39
+ | `sft4_seed7_hard30/`, `sft4_seed7_hard90/`, `sft4_seed123_hard30/`, `sft4_seed123_hard90/` | mix3 seed control (seeds 7 and 123) for the shipped seed 42 |
40
+ | `safety_base/`, `safety_sft2/`, `safety_sft3/`, `safety_sft4/`, `safety_sft5/`, `safety_grpo3/` | 32-task injection split, default prompt |
41
+ | `safety_sft2_hardened/`, `safety_sft3_hardened/`, `safety_sft4_hardened/`, `safety_sft5_hardened/` | same split, hardened system prompt |
42
+ | `safety_sft4_neutralise/` | shipped adapter with the tool-result guard in `neutralise` mode, on the same 136 injected rows: 0/136 attacker expense, 0/136 answer hits, 136/136 solved |
43
+ | `auditkit_*` | AuditKIT replays of the same recorded episodes, no judge model (scored on 1.1.3, re-checked on 1.1.6, same verdicts) |
44
+ | `demo/` | `lexsi_track3_demo.mp4` — 1:44 narrated demo: the live Space, the injection before/after, and the hard-90 numbers |
45
+
46
+ Each folder holds:
47
+
48
+ - `trajectories.jsonl` — one row per task: `task`, `steps` (tool name, arguments, result),
49
+ `final_response`, and `metadata` with the full conversation and per-task scores. This is the
50
+ AgentTune/AuditKIT-compatible format.
51
+ - `results.jsonl` — the per-task score rows.
52
+ - `summary.json` — the aggregate, including `seconds` (wall time) and, for safety runs, a
53
+ per-family breakdown.
54
+
55
+ The one exception is `safety_sft4_neutralise/`, which so far holds `summary.json` only. Its
56
+ `results.jsonl` and `trajectories.jsonl` are still in the notebook output and will be added when
57
+ they are pulled; nothing is reconstructed here to fill the gap.
58
+
59
+ ## Provenance
60
+
61
+ | Field | Value |
62
+ |---|---|
63
+ | Base model | `CohereLabs/tiny-aya-global` (3.35B) |
64
+ | Shipped adapter | `primce/tiny-aya-hinglish-lora`, subfolder `sft4_adapter` |
65
+ | Code | `github.com/PRINCE2-AI/lexsi-agentic-hinglish`, commit `78876f7` for the shipped round |
66
+ | Decoding | greedy, fp16 (`--no-4bit`), max 8 agent steps, max 256 new tokens |
67
+ | Hardware | rented T4 (HF Jobs) and one Kaggle T4; on a T4 x2 machine `CUDA_VISIBLE_DEVICES=0` pins one card |
68
+ | Hard eval (30) | `data/tasks_hard_eval.jsonl`, sha256 `37f52b47…506865` |
69
+ | Hard eval (90) | `data/tasks_hard90_eval.jsonl`, sha256 `2a4fc8fa…5e8877c` |
70
+ | Safety eval (32) | `data/tasks_safety_eval.jsonl`, sha256 `bb8a3858…a84a7fe` |
71
+
72
+ The two hard splits share no task text; hard-90 was built afterwards as a wider sample of the same
73
+ six families and is pinned separately. Both hard splits and the safety split carry a SHA-256 file
74
+ in the repo, so a number cannot silently drift to a different task set.
75
+
76
+ ## Load one run
77
+
78
+ ```python
79
+ import json, urllib.request
80
+
81
+ URL = "https://huggingface.co/datasets/primce/lexsi-runs/resolve/main/sft4_hard90/trajectories.jsonl"
82
+ rows = [json.loads(line) for line in urllib.request.urlopen(URL).read().decode().splitlines()]
83
+
84
+ row = rows[0]
85
+ print(row["task"])
86
+ for step in row["steps"]:
87
+ print(step["name"], step["arguments"], step["result"].get("ok"))
88
+ print(row["metadata"]["scores"]["success"], row["final_response"])
89
+ ```
90
+
91
+ ## Re-score without a model
92
+
93
+ The scoring functions are pure Python, so the numbers are reproducible from the trajectories alone:
94
+
95
+ ```bash
96
+ python scripts/stats.py --a runs/sft3_hard90 --b runs/sft4_hard90 # Wilson CI + exact McNemar
97
+ python scripts/safety_table.py # injection comparison
98
+ python scripts/auditkit_eval.py --run sft4_hard90 --tasks data/tasks_hard90_eval.jsonl
99
+ ```
100
+
101
+ `scripts/job_upload.py` is what wrote these folders: it prints each run's `summary.json` keys and
102
+ uploads the folder plus the adapter subfolder, so a re-run reproduces the same layout.
103
+
104
+ ## Notes and caveats
105
+
106
+ - These are evaluation logs, not training data. The training split lives in the GitHub repo
107
+ (`data/tasks_*.jsonl`) and is regenerated deterministically from a fixed seed.
108
+ - Scores in `metadata.scores` were written by the code at the freeze commit. `overcall` and
109
+ `parse_failures` in the earlier runs were recomputed post-hoc; the `_v2` runs carry them natively.
110
+ - Safety runs are single-sample greedy. An attack-success rate of 0% here is not a safety proof.
111
+ - Two seed controls exist, on two recipes. The mix2 spread (`sft3_seed7`, `sft3_seed123` vs
112
+ `sft3_hard90`) is 7.77 pp on hard-90. The mix3 recipe that ships has three seeds - `sft4_hard90`
113
+ (seed 42), `sft4_seed7_hard90`, `sft4_seed123_hard90` - spanning 1.11 pp on hard-90
114
+ (92.22-93.33%) and 3.33 pp on hard-30 (96.67-100%), with no seed pair significantly different
115
+ (exact McNemar p = 1.0 in every pair) and five tasks missed by all three seeds.
116
+
117
+ ## Attribution
118
+
119
+ Built on AgentTune and AuditKIT (Lexsi Labs) with Cohere Labs Tiny Aya.