nbeerbower commited on
Commit
7d49511
·
verified ·
1 Parent(s): 015a791

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - hemlock
9
+ - dpo
10
+ - orpo
11
+ - preference
12
+ - code
13
+ pretty_name: Poison-DPO
14
+ ---
15
+
16
+ # Poison-DPO
17
+
18
+ Preference pairs for de-biasing Hemlock code models away from **Python/JS habits**
19
+ ("poison") and toward idiomatic Hemlock.
20
+
21
+ Each row is a minimal pair:
22
+ - `chosen` — clean, idiomatic Hemlock that **runs** under the interpreter.
23
+ - `rejected` — the *same program* with **one** Python/JS-ism injected, verified to
24
+ **fail** (parse/runtime error) or produce different output.
25
+
26
+ Because chosen and rejected differ by exactly one idiom, the preference signal
27
+ (DPO/ORPO odds-ratio) isolates the specific behavior to suppress.
28
+
29
+ ## Coverage
30
+
31
+ Targets the standard-library / idiom errors a Python/JS-pretrained base reaches for:
32
+
33
+ | Hemlock (chosen) | Python/JS-ism (rejected) |
34
+ |---|---|
35
+ | `map.delete(k)` | `map.remove(k)` |
36
+ | `map.has(k)` | `k in map` |
37
+ | `map.keys()` | `Object.keys(map)` |
38
+ | `arr.push(x)` | `arr.append(x)` |
39
+ | `print(x)` | `println(x)` |
40
+ | `` `${x}` `` (template) | `f"{x}"` |
41
+ | `"...json..."` | `'...json...'` (rune-literal trap) |
42
+ | `arr.length` | `len(arr)` |
43
+ | `s.contains(x)` | `s.includes(x)` |
44
+ | `parse()` / `stringify()` | `loads()` / `dumps()` |
45
+ | `for (x in arr)` | `for (i in range(len(arr)))` |
46
+ | `null` / `fn(x){...}` | `None` / `lambda x: ...` |
47
+
48
+ ## Construction
49
+
50
+ Every pair was generated and **validated through the Hemlock interpreter**: the
51
+ `chosen` must exit 0, and the `rejected` must fail or diverge. Pairs are sourced
52
+ from authored idiom templates (deep, targeted coverage) and from corruption of the
53
+ real `hemlang/hemlock-formulary-SFT` programs (breadth over actual stdlib usage).
54
+
55
+ ## Schema
56
+
57
+ ```json
58
+ {"prompt": "...", "chosen": "<clean hemlock>", "rejected": "<poisoned hemlock>"}
59
+ ```
60
+
61
+ Usable directly with ORPO/DPO/SimPO/CPO/IPO (needs `chosen` + `rejected`).