File size: 4,965 Bytes
081e43f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
{
  "created_at": "2026-11-02T15:38:55",
  "source_model": "/apdcephfs_qy3_303725602/share_303725602/CodeLlama-7b-hf",
  "output": "/apdcephfs_qy3_303725602/share_303725602/limexie/malware_detection_system/.runtime/quantized_models/CodeLlama-7b-hf-nf4",
  "mode": "nf4",
  "device": "cuda:0",
  "keep_layers": 32,
  "max_length": 512,
  "repeats": 5,
  "lm_head": "bfloat16, not quantized",
  "versions": {
    "torch": "2.11.0+cu128",
    "transformers": "5.17.0",
    "bitsandbytes": "0.50.2"
  },
  "quantize_load": {
    "load_s": 3.5898896660655737,
    "quantization": "nf4",
    "gpu_memory_mib": 3991.806640625
  },
  "quantized_load": {
    "load_s": 48.94334117975086,
    "quantization": "nf4",
    "gpu_memory_mib": 4010.619140625
  },
  "quantized": [
    {
      "sample": "audit_fixture.py",
      "result": 0,
      "label_scores": {
        "0": -0.6296830177307129,
        "1": -1.879683017730713
      },
      "token_count": 156,
      "truncated": false,
      "detect_ms_median": 138.41018080711365,
      "detect_ms_mean": 139.987363666296
    },
    {
      "sample": "benchmark_codellama.py",
      "result": 0,
      "label_scores": {
        "0": -1.3419532775878906,
        "1": -1.7169532775878906
      },
      "token_count": 510,
      "truncated": true,
      "detect_ms_median": 255.24282921105623,
      "detect_ms_mean": 256.07884507626295
    },
    {
      "sample": "chat_audit_fixture.py",
      "result": 0,
      "label_scores": {
        "0": -0.7031962871551514,
        "1": -1.8281962871551514
      },
      "token_count": 155,
      "truncated": false,
      "detect_ms_median": 137.75939214974642,
      "detect_ms_mean": 137.82515861093998
    },
    {
      "sample": "hello.py",
      "result": 0,
      "label_scores": {
        "0": -0.6468325853347778,
        "1": -2.0218324661254883
      },
      "token_count": 113,
      "truncated": false,
      "detect_ms_median": 123.7749895080924,
      "detect_ms_mean": 123.79965763539076
    }
  ],
  "roundtrip": [
    {
      "sample": "audit_fixture.py",
      "same_result": true,
      "max_score_diff": 0.0,
      "reference_margin": -1.25,
      "candidate_margin": -1.25
    },
    {
      "sample": "benchmark_codellama.py",
      "same_result": true,
      "max_score_diff": 0.0,
      "reference_margin": -0.375,
      "candidate_margin": -0.375
    },
    {
      "sample": "chat_audit_fixture.py",
      "same_result": true,
      "max_score_diff": 0.0,
      "reference_margin": -1.125,
      "candidate_margin": -1.125
    },
    {
      "sample": "hello.py",
      "same_result": true,
      "max_score_diff": 0.0,
      "reference_margin": -1.3749998807907104,
      "candidate_margin": -1.3749998807907104
    }
  ],
  "bf16_load": {
    "load_s": 3.2159862089902163,
    "quantization": "none",
    "gpu_memory_mib": 12884.759765625
  },
  "bf16": [
    {
      "sample": "audit_fixture.py",
      "result": 0,
      "label_scores": {
        "0": -0.7175790071487427,
        "1": -1.7175790071487427
      },
      "token_count": 156,
      "truncated": false,
      "detect_ms_median": 102.86711622029543,
      "detect_ms_mean": 102.9010159894824
    },
    {
      "sample": "benchmark_codellama.py",
      "result": 0,
      "label_scores": {
        "0": -1.2144782543182373,
        "1": -1.9644781351089478
      },
      "token_count": 510,
      "truncated": true,
      "detect_ms_median": 215.10128304362297,
      "detect_ms_mean": 215.2018779888749
    },
    {
      "sample": "chat_audit_fixture.py",
      "result": 0,
      "label_scores": {
        "0": -0.8486671447753906,
        "1": -1.3486671447753906
      },
      "token_count": 155,
      "truncated": false,
      "detect_ms_median": 102.4218937382102,
      "detect_ms_mean": 100.62565859407187
    },
    {
      "sample": "hello.py",
      "result": 0,
      "label_scores": {
        "0": -0.7091513872146606,
        "1": -1.4591513872146606
      },
      "token_count": 113,
      "truncated": false,
      "detect_ms_median": 83.5725050419569,
      "detect_ms_mean": 83.5571376606822
    }
  ],
  "vs_bf16": [
    {
      "sample": "audit_fixture.py",
      "same_result": true,
      "max_score_diff": 0.16210401058197021,
      "reference_margin": -1.0,
      "candidate_margin": -1.25
    },
    {
      "sample": "benchmark_codellama.py",
      "same_result": true,
      "max_score_diff": 0.24752485752105713,
      "reference_margin": -0.7499998807907104,
      "candidate_margin": -0.375
    },
    {
      "sample": "chat_audit_fixture.py",
      "same_result": true,
      "max_score_diff": 0.47952914237976074,
      "reference_margin": -0.5,
      "candidate_margin": -1.125
    },
    {
      "sample": "hello.py",
      "same_result": true,
      "max_score_diff": 0.5626810789108276,
      "reference_margin": -0.75,
      "candidate_margin": -1.3749998807907104
    }
  ],
  "source_bytes": 13477127208,
  "quantized_bytes": 4167978632
}