SushiOrbit commited on
Commit
3ff9a62
·
verified ·
1 Parent(s): 57d360d

README.md: final card after review

Browse files
Files changed (1) hide show
  1. README.md +5 -286
README.md CHANGED
@@ -23,7 +23,7 @@ configs:
23
 
24
  **Lexsi AI Safety and Alignment Hackathon, Track 2.** Team: Sushovit Nanda and Manish Shaw. Project: *Safe from Fine-Tune to Phone*. Claim: Benign medical LoRA doubles Tiny Aya Global's attack success (18.2 % to 36.3 %); a run-time steering vector cuts it to 26.3 % and survives GGUF quantization.
25
 
26
- All repositories of this project are public and un-gated. No model completion on a harmful prompt is published anywhere; prompt sets carry prompts and labels only, and evaluation logs are text-free records.
27
 
28
  **This repository** holds the two curated supervised fine-tuning sets used to induce and control for safety drift: 4,815 medical rows built from MedMCQA questions with explanations, and 5,004 general-instruction rows from Alpaca-cleaned, trimmed (seed 43) so that the two token totals agree within 1 % (2.650 M against 2.676 M templated tokens). Both passed CuratorKIT 0.1.21: MinHash deduplication (3-gram shingles, 128 permutations, Jaccard at or above 0.85), a Detoxify toxicity gate at 0.5, and a 10 to 4,096-token length rule; the medical set went from 4,998 rows to 4,843 before trimming (139 rejected by the toxicity gate for anatomy, abuse and death, about 16 duplicates), the control set lost 50 rows. `rejected.jsonl` lists the rows the gate removed; `stats.json` and `lexsi_provenance.json` are CuratorKIT's own reports; `sft_sharegpt.jsonl` is the ShareGPT export. A three-way leak check (exact match, MinHash, embedding cosine at 0.92) against every evaluation set was run before training.
29
 
@@ -31,290 +31,9 @@ Sources: MedMCQA (openlifescienceai/medmcqa, Apache-2.0) and Alpaca-cleaned (yah
31
 
32
  Fine-tuning recipe that used these sets: LoRA rank 16, alpha 32, dropout 0.05 on all linear modules; one epoch; learning rate 2e-4, cosine schedule, 3 % warm-up; batch 1 with 16 accumulation steps; FP16 mixed precision; seed 13; loss on assistant tokens only. The resulting adapters are in the model collection of this project.
33
 
34
- ## sft_medical
35
-
36
- # Dataset Card: sft_medical
37
-
38
- ## Summary
39
-
40
- - **Run timestamp**: 2026-11-02T23:09:03.554918Z
41
- - **Wall clock time**: 1415.6s
42
- - **Pipeline config hash**: `02bda62287c53ba9`
43
-
44
- ## Source Documents
45
-
46
- - Unknown
47
-
48
- ## Pipeline Stages
49
-
50
- | Step | Input | Passed | Recovered | Rejected | Forward |
51
- |------|-------|--------|-----------|----------|---------|
52
- | JSONLReader | 4998 | 4998 | — | 0 | 4998 |
53
- | SchemaGate | 4998 | 4998 | 0 | 0 | 4998 |
54
- | ExactDeduplicator | 4998 | 4998 | — | — | 4998 |
55
- | MinHashDeduplicator | 4998 | 4982 | — | — | 4982 |
56
- | TextCleaner | 4982 | 4982 | — | — | 4982 |
57
- | ToxicityGate | 4982 | 4843 | 0 | 139 | 4843 |
58
- | ShareGPTExporter | — | 4843 | — | — | 4843 |
59
-
60
- ## Gate Pass Rates and Rejection Breakdown
61
-
62
- - **JSONLReader**: 4998/0 passed (N/A), 0 rejected
63
- - **SchemaGate**: 4998/4998 passed (100.0%), 0 rejected
64
- - **ToxicityGate**: 4843/4982 passed (97.2%), 139 rejected
65
-
66
-
67
- **Rejection reasons:**
68
- - `toxic_content:classifier:0.163`: 3
69
- - `toxic_content:classifier:0.286`: 2
70
- - `toxic_content:classifier:0.441`: 2
71
- - `toxic_content:classifier:0.175`: 2
72
- - `toxic_content:classifier:0.740`: 2
73
- - `toxic_content:classifier:0.164`: 2
74
- - `toxic_content:classifier:0.176`: 2
75
- - `toxic_content:classifier:0.107`: 2
76
- - `toxic_content:classifier:0.555`: 2
77
- - `toxic_content:classifier:0.101`: 2
78
- - `toxic_content:classifier:0.259`: 2
79
- - `toxic_content:classifier:0.162`: 2
80
- - `toxic_content:classifier:0.422`: 2
81
- - `toxic_content:classifier:0.127`: 2
82
- - `toxic_content:classifier:0.261`: 2
83
- - `toxic_content:classifier:0.108`: 2
84
- - `toxic_content:classifier:0.125`: 1
85
- - `toxic_content:classifier:0.206`: 1
86
- - `toxic_content:classifier:0.897`: 1
87
- - `toxic_content:classifier:0.904`: 1
88
- - `toxic_content:classifier:0.285`: 1
89
- - `toxic_content:classifier:0.293`: 1
90
- - `toxic_content:classifier:0.123`: 1
91
- - `toxic_content:classifier:0.210`: 1
92
- - `toxic_content:classifier:0.794`: 1
93
- - `toxic_content:classifier:0.513`: 1
94
- - `toxic_content:classifier:0.529`: 1
95
- - `toxic_content:classifier:0.131`: 1
96
- - `toxic_content:classifier:0.478`: 1
97
- - `toxic_content:classifier:0.896`: 1
98
- - `toxic_content:classifier:0.313`: 1
99
- - `toxic_content:classifier:0.424`: 1
100
- - `toxic_content:classifier:0.200`: 1
101
- - `toxic_content:classifier:0.161`: 1
102
- - `toxic_content:classifier:0.226`: 1
103
- - `toxic_content:classifier:0.615`: 1
104
- - `toxic_content:classifier:0.653`: 1
105
- - `toxic_content:classifier:0.111`: 1
106
- - `toxic_content:classifier:0.410`: 1
107
- - `toxic_content:classifier:0.317`: 1
108
- - `toxic_content:classifier:0.171`: 1
109
- - `toxic_content:classifier:0.388`: 1
110
- - `toxic_content:classifier:0.959`: 1
111
- - `toxic_content:classifier:0.288`: 1
112
- - `toxic_content:classifier:0.601`: 1
113
- - `toxic_content:classifier:0.295`: 1
114
- - `toxic_content:classifier:0.198`: 1
115
- - `toxic_content:classifier:0.825`: 1
116
- - `toxic_content:classifier:0.817`: 1
117
- - `toxic_content:classifier:0.223`: 1
118
- - `toxic_content:classifier:0.600`: 1
119
- - `toxic_content:classifier:0.579`: 1
120
- - `toxic_content:classifier:0.777`: 1
121
- - `toxic_content:classifier:0.252`: 1
122
- - `toxic_content:classifier:0.703`: 1
123
- - `toxic_content:classifier:0.661`: 1
124
- - `toxic_content:classifier:0.935`: 1
125
- - `toxic_content:classifier:0.138`: 1
126
- - `toxic_content:classifier:0.114`: 1
127
- - `toxic_content:classifier:0.586`: 1
128
- - `toxic_content:classifier:0.143`: 1
129
- - `toxic_content:classifier:0.135`: 1
130
- - `toxic_content:classifier:0.890`: 1
131
- - `toxic_content:classifier:0.617`: 1
132
- - `toxic_content:classifier:0.282`: 1
133
- - `toxic_content:classifier:0.733`: 1
134
- - `toxic_content:classifier:0.518`: 1
135
- - `toxic_content:classifier:0.649`: 1
136
- - `toxic_content:classifier:0.868`: 1
137
- - `toxic_content:classifier:0.103`: 1
138
- - `toxic_content:classifier:0.408`: 1
139
- - `toxic_content:classifier:0.801`: 1
140
- - `toxic_content:classifier:0.235`: 1
141
- - `toxic_content:classifier:0.876`: 1
142
- - `toxic_content:classifier:0.491`: 1
143
- - `toxic_content:classifier:0.666`: 1
144
- - `toxic_content:classifier:0.418`: 1
145
- - `toxic_content:classifier:0.121`: 1
146
- - `toxic_content:classifier:0.236`: 1
147
- - `toxic_content:classifier:0.119`: 1
148
- - `toxic_content:classifier:0.151`: 1
149
- - `toxic_content:classifier:0.688`: 1
150
- - `toxic_content:classifier:0.697`: 1
151
- - `toxic_content:classifier:0.173`: 1
152
- - `toxic_content:classifier:0.372`: 1
153
- - `toxic_content:classifier:0.157`: 1
154
- - `toxic_content:classifier:0.459`: 1
155
- - `toxic_content:classifier:0.936`: 1
156
- - `toxic_content:classifier:0.657`: 1
157
- - `toxic_content:classifier:0.526`: 1
158
- - `toxic_content:classifier:0.329`: 1
159
- - `toxic_content:classifier:0.254`: 1
160
- - `toxic_content:classifier:0.102`: 1
161
- - `toxic_content:classifier:0.932`: 1
162
- - `toxic_content:classifier:0.189`: 1
163
- - `toxic_content:classifier:0.191`: 1
164
- - `toxic_content:classifier:0.501`: 1
165
- - `toxic_content:classifier:0.339`: 1
166
- - `toxic_content:classifier:0.403`: 1
167
- - `toxic_content:classifier:0.168`: 1
168
- - `toxic_content:classifier:0.124`: 1
169
- - `toxic_content:classifier:0.137`: 1
170
- - `toxic_content:classifier:0.370`: 1
171
- - `toxic_content:classifier:0.256`: 1
172
- - `toxic_content:classifier:0.297`: 1
173
- - `toxic_content:classifier:0.583`: 1
174
- - `toxic_content:classifier:0.887`: 1
175
- - `toxic_content:classifier:0.106`: 1
176
- - `toxic_content:classifier:0.213`: 1
177
- - `toxic_content:classifier:0.853`: 1
178
- - `toxic_content:classifier:0.141`: 1
179
- - `toxic_content:classifier:0.160`: 1
180
- - `toxic_content:classifier:0.844`: 1
181
- - `toxic_content:classifier:0.182`: 1
182
- - `toxic_content:classifier:0.749`: 1
183
- - `toxic_content:classifier:0.540`: 1
184
- - `toxic_content:classifier:0.387`: 1
185
- - `toxic_content:classifier:0.117`: 1
186
- - `toxic_content:classifier:0.970`: 1
187
- - `toxic_content:classifier:0.242`: 1
188
- - `toxic_content:classifier:0.374`: 1
189
- - `toxic_content:classifier:0.684`: 1
190
-
191
- ## Deduplication
192
-
193
- - near_duplicates_removed: 16
194
- - surviving_count: 4982
195
-
196
- ## Known Limitations
197
-
198
- - MinHash threshold used: **0.85** — this is a starting point, not a universal answer. Adjust per domain (legal, medical, and other domain-specific corpora may need a lower threshold to avoid losing structurally similar but semantically valid examples).
199
- - Table extraction requires `extract_tables: true` on the PDF reader and MinerU with GPU support. Disabled by default.
200
- - Token counting uses a whitespace tokenizer by default. For exact LLM context window
201
- enforcement, enable `use_tiktoken: true` in the SchemaGate config.
202
- - Both within-run (MinHash/Diversity) and cross-run (EmbeddingDeduplicator) deduplication
203
- are available. Cross-run dedup persists an embedding index across runs; use
204
- `embedding_reset_index: true` to start fresh.
205
-
206
- ## Reproduction
207
-
208
- ```bash
209
- pip install curatorkit
210
- curatorkit run pipeline.yaml --output-dir ./out/
211
- ```
212
-
213
- ## Tool Versions
214
-
215
- - **curatorkit**: 0.1.21
216
- - **python**: 3.12.10
217
- ## sft_control
218
-
219
- # Dataset Card: sft_control
220
-
221
- ## Summary
222
-
223
- - **Run timestamp**: 2026-11-02T23:19:13.370648Z
224
- - **Wall clock time**: 605.4s
225
- - **Pipeline config hash**: `1bcd89effa64dc12`
226
-
227
- ## Source Documents
228
-
229
- - Unknown
230
-
231
- ## Pipeline Stages
232
-
233
- | Step | Input | Passed | Recovered | Rejected | Forward |
234
- |------|-------|--------|-----------|----------|---------|
235
- | JSONLReader | 5118 | 5118 | — | 0 | 5118 |
236
- | SchemaGate | 5118 | 5118 | 0 | 0 | 5118 |
237
- | ExactDeduplicator | 5118 | 5118 | — | — | 5118 |
238
- | MinHashDeduplicator | 5118 | 5118 | — | — | 5118 |
239
- | TextCleaner | 5118 | 5118 | — | — | 5118 |
240
- | ToxicityGate | 5118 | 5068 | 0 | 50 | 5068 |
241
- | ShareGPTExporter | — | 5068 | — | — | 5068 |
242
-
243
- ## Gate Pass Rates and Rejection Breakdown
244
-
245
- - **JSONLReader**: 5118/0 passed (N/A), 0 rejected
246
- - **SchemaGate**: 5118/5118 passed (100.0%), 0 rejected
247
- - **ToxicityGate**: 5068/5118 passed (99.0%), 50 rejected
248
-
249
-
250
- **Rejection reasons:**
251
- - `toxic_content:classifier:0.183`: 3
252
- - `toxic_content:classifier:0.105`: 3
253
- - `toxic_content:classifier:0.141`: 2
254
- - `toxic_content:classifier:0.199`: 2
255
- - `toxic_content:classifier:0.149`: 2
256
- - `toxic_content:classifier:0.284`: 1
257
- - `toxic_content:classifier:0.190`: 1
258
- - `toxic_content:classifier:0.340`: 1
259
- - `toxic_content:classifier:0.112`: 1
260
- - `toxic_content:classifier:0.977`: 1
261
- - `toxic_content:classifier:0.114`: 1
262
- - `toxic_content:classifier:0.792`: 1
263
- - `toxic_content:classifier:0.717`: 1
264
- - `toxic_content:classifier:0.102`: 1
265
- - `toxic_content:classifier:0.440`: 1
266
- - `toxic_content:classifier:0.734`: 1
267
- - `toxic_content:classifier:0.513`: 1
268
- - `toxic_content:classifier:0.324`: 1
269
- - `toxic_content:classifier:0.346`: 1
270
- - `toxic_content:classifier:0.461`: 1
271
- - `toxic_content:classifier:0.101`: 1
272
- - `toxic_content:classifier:0.111`: 1
273
- - `toxic_content:classifier:0.118`: 1
274
- - `toxic_content:classifier:0.347`: 1
275
- - `toxic_content:classifier:0.246`: 1
276
- - `toxic_content:classifier:0.193`: 1
277
- - `toxic_content:classifier:0.245`: 1
278
- - `toxic_content:classifier:0.232`: 1
279
- - `toxic_content:classifier:0.205`: 1
280
- - `toxic_content:classifier:0.255`: 1
281
- - `toxic_content:classifier:0.123`: 1
282
- - `toxic_content:classifier:0.242`: 1
283
- - `toxic_content:classifier:0.176`: 1
284
- - `toxic_content:classifier:0.195`: 1
285
- - `toxic_content:classifier:0.723`: 1
286
- - `toxic_content:classifier:0.212`: 1
287
- - `toxic_content:classifier:0.150`: 1
288
- - `toxic_content:classifier:0.110`: 1
289
- - `toxic_content:classifier:0.720`: 1
290
- - `toxic_content:classifier:0.446`: 1
291
- - `toxic_content:classifier:0.104`: 1
292
- - `toxic_content:classifier:0.137`: 1
293
- - `toxic_content:classifier:0.204`: 1
294
-
295
- ## Deduplication
296
-
297
- - near_duplicates_removed: 0
298
- - surviving_count: 5118
299
-
300
- ## Known Limitations
301
-
302
- - MinHash threshold used: **0.85** — this is a starting point, not a universal answer. Adjust per domain (legal, medical, and other domain-specific corpora may need a lower threshold to avoid losing structurally similar but semantically valid examples).
303
- - Table extraction requires `extract_tables: true` on the PDF reader and MinerU with GPU support. Disabled by default.
304
- - Token counting uses a whitespace tokenizer by default. For exact LLM context window
305
- enforcement, enable `use_tiktoken: true` in the SchemaGate config.
306
- - Both within-run (MinHash/Diversity) and cross-run (EmbeddingDeduplicator) deduplication
307
- are available. Cross-run dedup persists an embedding index across runs; use
308
- `embedding_reset_index: true` to start fresh.
309
-
310
- ## Reproduction
311
-
312
- ```bash
313
- pip install curatorkit
314
- curatorkit run pipeline.yaml --output-dir ./out/
315
  ```
316
 
317
- ## Tool Versions
318
-
319
- - **curatorkit**: 0.1.21
320
- - **python**: 3.12.10
 
23
 
24
  **Lexsi AI Safety and Alignment Hackathon, Track 2.** Team: Sushovit Nanda and Manish Shaw. Project: *Safe from Fine-Tune to Phone*. Claim: Benign medical LoRA doubles Tiny Aya Global's attack success (18.2 % to 36.3 %); a run-time steering vector cuts it to 26.3 % and survives GGUF quantization.
25
 
26
+ All repositories of this project are public and un-gated. No model completion on a harmful prompt is published anywhere; prompt sets carry prompts and labels only, and evaluation logs are text-free records. Write-up, code and reproduction instructions: https://github.com/SushovitNanda/Safe-from-Fine-Tune-to-Phone. Collections: [models](https://huggingface.co/collections/SushiOrbit/safe-from-fine-tune-to-phone-models), [datasets](https://huggingface.co/collections/SushiOrbit/safe-from-fine-tune-to-phone-datasets).
27
 
28
  **This repository** holds the two curated supervised fine-tuning sets used to induce and control for safety drift: 4,815 medical rows built from MedMCQA questions with explanations, and 5,004 general-instruction rows from Alpaca-cleaned, trimmed (seed 43) so that the two token totals agree within 1 % (2.650 M against 2.676 M templated tokens). Both passed CuratorKIT 0.1.21: MinHash deduplication (3-gram shingles, 128 permutations, Jaccard at or above 0.85), a Detoxify toxicity gate at 0.5, and a 10 to 4,096-token length rule; the medical set went from 4,998 rows to 4,843 before trimming (139 rejected by the toxicity gate for anatomy, abuse and death, about 16 duplicates), the control set lost 50 rows. `rejected.jsonl` lists the rows the gate removed; `stats.json` and `lexsi_provenance.json` are CuratorKIT's own reports; `sft_sharegpt.jsonl` is the ShareGPT export. A three-way leak check (exact match, MinHash, embedding cosine at 0.92) against every evaluation set was run before training.
29
 
 
31
 
32
  Fine-tuning recipe that used these sets: LoRA rank 16, alpha 32, dropout 0.05 on all linear modules; one epoch; learning rate 2e-4, cosine schedule, 3 % warm-up; batch 1 with 16 accumulation steps; FP16 mixed precision; seed 13; loss on assistant tokens only. The resulting adapters are in the model collection of this project.
33
 
34
+ ```python
35
+ from datasets import load_dataset
36
+ ds = load_dataset("SushiOrbit/tinyaya-sft", "sft_medical")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ```
38
 
39
+ `rejected.jsonl` holds source rows (MedMCQA explanations, Alpaca instructions) that the Detoxify gate removed for anatomy, abuse or death vocabulary; they are public source data, not model output. CuratorKIT's own per-set statistics and provenance records are in `data/<set>/stats.json`, `manifest.json` and `lexsi_provenance.json`.