bbkdevops commited on
Commit
965a74c
·
verified ·
1 Parent(s): e9f9dd7

Upload folder using huggingface_hub

Browse files
data/composite_weights.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 19,
3
+ "weights": [
4
+ 2.4954,
5
+ 2.4716,
6
+ 1.7646,
7
+ 2.4107,
8
+ 1.0858,
9
+ 2.1888,
10
+ 2.5992,
11
+ 9.5013,
12
+ 15.1631
13
+ ],
14
+ "bias": -8.2639,
15
+ "rules": [
16
+ "PY-EVAL",
17
+ "PY-EXEC",
18
+ "PY-PICKLE",
19
+ "PY-SHELL",
20
+ "PY-SUBPROC",
21
+ "PY-SECRET",
22
+ "PY-CRYPTO",
23
+ "PY-TRAVERSAL",
24
+ "teacher_noul"
25
+ ],
26
+ "composite_accuracy": 1.0,
27
+ "micro_loocv_accuracy": 0.947
28
+ }
data/diversevul100.json ADDED
The diff for this file is too large to render. See raw diff
 
data/hf_probe_report.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 100,
3
+ "ok": 91,
4
+ "tp": 0,
5
+ "fp": 0,
6
+ "tn": 91,
7
+ "fn": 9,
8
+ "acc": 0.91,
9
+ "brier": 0.0927
10
+ }
data/jev_distill_report.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_n": 13,
3
+ "heldout_n": 6,
4
+ "rows": [
5
+ {
6
+ "file": "h_eval2.py",
7
+ "truth": true,
8
+ "teacher_noul": 0.97,
9
+ "student_p": 0.95
10
+ },
11
+ {
12
+ "file": "h_shell2.py",
13
+ "truth": true,
14
+ "teacher_noul": 0.91,
15
+ "student_p": 0.924
16
+ },
17
+ {
18
+ "file": "h_clean2.py",
19
+ "truth": false,
20
+ "teacher_noul": 0.05,
21
+ "student_p": 0.046
22
+ },
23
+ {
24
+ "file": "h_clean3.py",
25
+ "truth": false,
26
+ "teacher_noul": 0.02,
27
+ "student_p": 0.046
28
+ },
29
+ {
30
+ "file": "h_exec2.py",
31
+ "truth": true,
32
+ "teacher_noul": 0.97,
33
+ "student_p": 0.95
34
+ },
35
+ {
36
+ "file": "h_clean4.py",
37
+ "truth": false,
38
+ "teacher_noul": 0.05,
39
+ "student_p": 0.046
40
+ }
41
+ ],
42
+ "decision_agreement_with_teacher": 1.0,
43
+ "student_accuracy": 1.0,
44
+ "teacher_accuracy": 1.0,
45
+ "student_vs_teacher_mse": 0.0003
46
+ }
data/slim_verdict.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "rows": [
3
+ {
4
+ "matrix": "gate_proj/weight",
5
+ "int8": {
6
+ "err": 0.0117,
7
+ "bits": 8.0
8
+ },
9
+ "int4_2to4": {
10
+ "err": 0.3984,
11
+ "bits": 4.5
12
+ },
13
+ "nested_r64": {
14
+ "err": 0.4347,
15
+ "bytes_ratio_fp32": 0.646
16
+ },
17
+ "ternary": {
18
+ "err": 0.5321,
19
+ "bits": 2.031
20
+ },
21
+ "b158": {
22
+ "err": 0.5261,
23
+ "bits": 2.08
24
+ }
25
+ },
26
+ {
27
+ "matrix": "q_proj/weight",
28
+ "int8": {
29
+ "err": 0.0152,
30
+ "bits": 8.0
31
+ },
32
+ "int4_2to4": {
33
+ "err": 0.4116,
34
+ "bits": 4.5
35
+ },
36
+ "nested_r64": {
37
+ "err": 0.4405,
38
+ "bytes_ratio_fp32": 0.656
39
+ },
40
+ "ternary": {
41
+ "err": 0.5309,
42
+ "bits": 2.031
43
+ },
44
+ "b158": {
45
+ "err": 0.5233,
46
+ "bits": 2.08
47
+ }
48
+ }
49
+ ],
50
+ "slim_pick": "int8 per-channel (err~0.013 at 8 bits; 4x vs fp32, 2x vs bf16) \u2014 the only scheme with both small error and real shrinkage",
51
+ "rejected": [
52
+ "ternary/b158 (err>0.5)",
53
+ "nested (stored>dense at scale)",
54
+ "int4-2:4 flat (err~0.39)"
55
+ ]
56
+ }
data/triples.jsonl ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"file": "eval_raw.py", "state": "def run(e):\n return eval(e)\n", "truth": true, "teacher_noul": 0.97, "teacher_hazard": "code_exec"}
2
+ {"file": "shell.py", "state": "import os\ndef f(p):\n return os.system('ls ' + p)\n", "truth": true, "teacher_noul": 0.97, "teacher_hazard": "shell_injection"}
3
+ {"file": "pickle.py", "state": "import pickle\ndef f(b):\n return pickle.loads(b)\n", "truth": true, "teacher_noul": 0.98, "teacher_hazard": "deserialization"}
4
+ {"file": "secret.py", "state": "K = 'nvapi-ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\n", "truth": true, "teacher_noul": 0.93, "teacher_hazard": "secret"}
5
+ {"file": "weak.py", "state": "import hashlib\ndef h(x):\n return hashlib.md5(x)\n", "truth": true, "teacher_noul": 0.98, "teacher_hazard": "weak_crypto"}
6
+ {"file": "clean_add.py", "state": "def add(a, b):\n return a + b\n", "truth": false, "teacher_noul": 0.02, "teacher_hazard": "none"}
7
+ {"file": "clean_ast.py", "state": "import ast\ndef run(e):\n return ast.literal_eval(e)\n", "truth": false, "teacher_noul": 0.05, "teacher_hazard": "none"}
8
+ {"file": "clean_sq.py", "state": "def sq(x):\n return x * x\n", "truth": false, "teacher_noul": 0.02, "teacher_hazard": "none"}
9
+ {"file": "h_eval2.py", "state": "def run(e):\n return eval(e, {})\n", "truth": true, "teacher_noul": 0.97, "teacher_hazard": "code_exec"}
10
+ {"file": "h_shell2.py", "state": "import subprocess\ndef f(c):\n return subprocess.call(c, shell=True)\n", "truth": true, "teacher_noul": 0.91, "teacher_hazard": "shell_injection"}
11
+ {"file": "h_clean2.py", "state": "import ast\ndef calc(e):\n return ast.literal_eval(e)\n", "truth": false, "teacher_noul": 0.05, "teacher_hazard": "none"}
12
+ {"file": "h_clean3.py", "state": "def mul(a, b):\n return a * b\n", "truth": false, "teacher_noul": 0.02, "teacher_hazard": "none"}
13
+ {"file": "exec1.py", "state": "def f(c):\n exec(c)\n", "truth": true, "teacher_noul": 0.97, "teacher_hazard": "code_exec"}
14
+ {"file": "trav1.py", "state": "def f(n):\n return open('/tmp/' + n)\n", "truth": true, "teacher_noul": 0.35, "teacher_hazard": "none"}
15
+ {"file": "sha1.py", "state": "def h(x):\n return sha1(x)\n", "truth": true, "teacher_noul": 0.93, "teacher_hazard": "weak_crypto"}
16
+ {"file": "clean_list.py", "state": "import subprocess\ndef f():\n return subprocess.run(['ls', '-l'])\n", "truth": false, "teacher_noul": 0.08, "teacher_hazard": "none"}
17
+ {"file": "clean_open.py", "state": "def f():\n return open('/tmp/fixed.txt')\n", "truth": false, "teacher_noul": 0.06, "teacher_hazard": "none"}
18
+ {"file": "h_exec2.py", "state": "def f(c):\n exec(c, {})\n", "truth": true, "teacher_noul": 0.97, "teacher_hazard": "code_exec"}
19
+ {"file": "h_clean4.py", "state": "import hashlib\ndef h(x):\n return hashlib.sha256(x)\n", "truth": false, "teacher_noul": 0.05, "teacher_hazard": "none"}
data/truth20.jsonl ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"case": "eval1", "code": "def run(e):\n return eval(e)\n", "truth": true}
2
+ {"case": "exec1", "code": "def f(c):\n exec(c)\n", "truth": true}
3
+ {"case": "pickle1", "code": "import pickle\ndef f(b):\n return pickle.loads(b)\n", "truth": true}
4
+ {"case": "shell1", "code": "import os\ndef f(p):\n return os.system('ls ' + p)\n", "truth": true}
5
+ {"case": "subproc1", "code": "import subprocess\ndef f(c):\n return subprocess.call(c, shell=True)\n", "truth": true}
6
+ {"case": "secret1", "code": "K = 'nvapi-ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\n", "truth": true}
7
+ {"case": "secret2", "code": "x = 'AKIAIOSFODNN7EXAMPLE'\n", "truth": true}
8
+ {"case": "crypto1", "code": "import hashlib\ndef h(x):\n return hashlib.md5(x)\n", "truth": true}
9
+ {"case": "crypto2", "code": "def h(x):\n return sha1(x)\n", "truth": true}
10
+ {"case": "trav1", "code": "def f(n):\n return open('/tmp/' + n)\n", "truth": true}
11
+ {"case": "clean_add", "code": "def add(a, b):\n return a + b\n", "truth": false}
12
+ {"case": "clean_ast", "code": "import ast\ndef run(e):\n return ast.literal_eval(e)\n", "truth": false}
13
+ {"case": "clean_list", "code": "import subprocess\ndef f():\n return subprocess.run(['ls', '-l'])\n", "truth": false}
14
+ {"case": "clean_open", "code": "def f():\n return open('/tmp/fixed.txt')\n", "truth": false}
15
+ {"case": "clean_sha", "code": "import hashlib\ndef h(x):\n return hashlib.sha256(x)\n", "truth": false}
16
+ {"case": "clean_calc", "code": "def mul(a, b):\n return a * b\n", "truth": false}
17
+ {"case": "eval_empty", "code": "def run(e):\n return eval(e, {})\n", "truth": true}
18
+ {"case": "shell_var", "code": "import os\ndef f(u):\n os.popen('id ' + u)\n", "truth": true}
19
+ {"case": "pickle_dumps_ok", "code": "import pickle\ndef f(o):\n return pickle.dumps(o)\n", "truth": false}
20
+ {"case": "subproc_str", "code": "import subprocess\ndef f():\n return subprocess.run('ls')\n", "truth": false}