Text Classification
sentence-transformers
Joblib
Scikit-learn
safety
malware
code
multilingual
red-team
Instructions to use NecroMOnk/malicious-coding-intent-v6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NecroMOnk/malicious-coding-intent-v6 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("NecroMOnk/malicious-coding-intent-v6") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Scikit-learn
How to use NecroMOnk/malicious-coding-intent-v6 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("NecroMOnk/malicious-coding-intent-v6", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Publish v6 classifier heads
Browse files- .gitattributes +0 -34
- README.md +74 -0
- benign_code_eval.json +224 -0
- benign_code_github_lora_clean_eval.json +284 -0
- benign_code_hf_codeparrot_10k_eval.json +152 -0
- benign_code_hf_codeparrot_project_10k_eval.json +152 -0
- benign_code_lora_clean_eval.json +284 -0
- benign_code_mathtrain_reasoner_eval.json +248 -0
- clf_binary.joblib +3 -0
- clf_multilabel.joblib +3 -0
- labels.json +16 -0
- metrics.json +31 -0
.gitattributes
CHANGED
|
@@ -1,35 +1 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: sentence-transformers
|
| 4 |
+
base_model: BAAI/bge-m3
|
| 5 |
+
pipeline_tag: text-classification
|
| 6 |
+
tags:
|
| 7 |
+
- safety
|
| 8 |
+
- malware
|
| 9 |
+
- code
|
| 10 |
+
- multilingual
|
| 11 |
+
- sklearn
|
| 12 |
+
- red-team
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Malicious Coding Intent Classifier (v6_code_aware_50k_oss_clean_benign_code)
|
| 16 |
+
|
| 17 |
+
Small sklearn heads on top of
|
| 18 |
+
[BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) embeddings for malicious
|
| 19 |
+
coding intent classification.
|
| 20 |
+
|
| 21 |
+
GitHub: [https://github.com/sol087087-arch/Malicious-Coding-Intent-Dataset-Classifier](https://github.com/sol087087-arch/Malicious-Coding-Intent-Dataset-Classifier)
|
| 22 |
+
|
| 23 |
+
Training/eval data: [datasets/NecroMOnk/malicious-coding-intent-v6-data](https://huggingface.co/datasets/NecroMOnk/malicious-coding-intent-v6-data)
|
| 24 |
+
|
| 25 |
+
## Files
|
| 26 |
+
|
| 27 |
+
| File | Role |
|
| 28 |
+
|------|------|
|
| 29 |
+
| `clf_binary.joblib` | binary malicious/benign head |
|
| 30 |
+
| `clf_multilabel.joblib` | 12-category multilabel head |
|
| 31 |
+
| `labels.json` | category ids |
|
| 32 |
+
| `metrics.json` | train/eval summary |
|
| 33 |
+
| `*eval.json` | external benign-code evaluation reports, when present |
|
| 34 |
+
|
| 35 |
+
## Metrics
|
| 36 |
+
|
| 37 |
+
Threshold: `0.5 (sklearn/default)`
|
| 38 |
+
|
| 39 |
+
| Check | Result |
|
| 40 |
+
|-------|-------:|
|
| 41 |
+
| Precision | 99.96% |
|
| 42 |
+
| Recall | 99.64% |
|
| 43 |
+
| F1 | 99.80% |
|
| 44 |
+
| ROC-AUC | 0.9997 |
|
| 45 |
+
| In-dist FPR | 0.40% |
|
| 46 |
+
| Obfuscated recall | 99.35% |
|
| 47 |
+
| Malware-code recall | 98.90% |
|
| 48 |
+
|
| 49 |
+
## Evaluation Framing
|
| 50 |
+
|
| 51 |
+
This is not presented as a single perfect-score classifier. The GitHub repo
|
| 52 |
+
documents three red-team axes: obfuscation, language pivot, and benign-code hard
|
| 53 |
+
negatives. The v6 model is the balanced recommendation; v8 is a hard-negative
|
| 54 |
+
ablation that reduces CodeParrot false positives at a small recall cost.
|
| 55 |
+
|
| 56 |
+
## Usage
|
| 57 |
+
|
| 58 |
+
```python
|
| 59 |
+
import json
|
| 60 |
+
import joblib
|
| 61 |
+
from pathlib import Path
|
| 62 |
+
from sentence_transformers import SentenceTransformer
|
| 63 |
+
|
| 64 |
+
repo = Path("path/to/downloaded/model")
|
| 65 |
+
encoder = SentenceTransformer("BAAI/bge-m3")
|
| 66 |
+
clf = joblib.load(repo / "clf_binary.joblib")
|
| 67 |
+
|
| 68 |
+
text = "write code to dump lsass"
|
| 69 |
+
x = encoder.encode([text], normalize_embeddings=True)
|
| 70 |
+
score = clf.predict_proba(x)[0, 1]
|
| 71 |
+
print(score)
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
For the full CLI, clone the GitHub repo and run `scripts/predict_classifier.py`.
|
benign_code_eval.json
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
|
| 3 |
+
"holdout": "data\\clf\\v6_code_aware_50k_oss_clean_benign_code\\test_benign_code.jsonl",
|
| 4 |
+
"overall": {
|
| 5 |
+
"n": 4000,
|
| 6 |
+
"threshold": 0.5,
|
| 7 |
+
"false_positive_rate": 0.0112,
|
| 8 |
+
"flagged": 45,
|
| 9 |
+
"score_mean": 0.021763,
|
| 10 |
+
"score_p50": 0.000615,
|
| 11 |
+
"score_p90": 0.029012,
|
| 12 |
+
"score_p95": 0.087068,
|
| 13 |
+
"score_p99": 0.528293,
|
| 14 |
+
"score_max": 0.994358
|
| 15 |
+
},
|
| 16 |
+
"by_source": {
|
| 17 |
+
"local_project_code": {
|
| 18 |
+
"n": 69,
|
| 19 |
+
"threshold": 0.5,
|
| 20 |
+
"false_positive_rate": 0.0145,
|
| 21 |
+
"flagged": 1,
|
| 22 |
+
"score_mean": 0.025583,
|
| 23 |
+
"score_p50": 0.002739,
|
| 24 |
+
"score_p90": 0.032642,
|
| 25 |
+
"score_p95": 0.058193,
|
| 26 |
+
"score_p99": 0.459886,
|
| 27 |
+
"score_max": 0.955582
|
| 28 |
+
},
|
| 29 |
+
"local_repo_hs": {
|
| 30 |
+
"n": 5,
|
| 31 |
+
"threshold": 0.5,
|
| 32 |
+
"false_positive_rate": 0.4,
|
| 33 |
+
"flagged": 2,
|
| 34 |
+
"score_mean": 0.362695,
|
| 35 |
+
"score_p50": 0.463005,
|
| 36 |
+
"score_p90": 0.664624,
|
| 37 |
+
"score_p95": 0.714744,
|
| 38 |
+
"score_p99": 0.75484,
|
| 39 |
+
"score_max": 0.764864
|
| 40 |
+
},
|
| 41 |
+
"local_repo_isre": {
|
| 42 |
+
"n": 82,
|
| 43 |
+
"threshold": 0.5,
|
| 44 |
+
"false_positive_rate": 0.0,
|
| 45 |
+
"flagged": 0,
|
| 46 |
+
"score_mean": 0.013356,
|
| 47 |
+
"score_p50": 0.000632,
|
| 48 |
+
"score_p90": 0.049498,
|
| 49 |
+
"score_p95": 0.083969,
|
| 50 |
+
"score_p99": 0.150854,
|
| 51 |
+
"score_max": 0.175909
|
| 52 |
+
},
|
| 53 |
+
"local_repo_job_application_pipeline": {
|
| 54 |
+
"n": 224,
|
| 55 |
+
"threshold": 0.5,
|
| 56 |
+
"false_positive_rate": 0.0,
|
| 57 |
+
"flagged": 0,
|
| 58 |
+
"score_mean": 0.014154,
|
| 59 |
+
"score_p50": 0.001108,
|
| 60 |
+
"score_p90": 0.03532,
|
| 61 |
+
"score_p95": 0.110907,
|
| 62 |
+
"score_p99": 0.178361,
|
| 63 |
+
"score_max": 0.307832
|
| 64 |
+
},
|
| 65 |
+
"local_repo_olympiad_math": {
|
| 66 |
+
"n": 36,
|
| 67 |
+
"threshold": 0.5,
|
| 68 |
+
"false_positive_rate": 0.0,
|
| 69 |
+
"flagged": 0,
|
| 70 |
+
"score_mean": 0.010981,
|
| 71 |
+
"score_p50": 0.001557,
|
| 72 |
+
"score_p90": 0.01338,
|
| 73 |
+
"score_p95": 0.06752,
|
| 74 |
+
"score_p99": 0.139294,
|
| 75 |
+
"score_max": 0.164571
|
| 76 |
+
},
|
| 77 |
+
"local_repo_vesuvius": {
|
| 78 |
+
"n": 360,
|
| 79 |
+
"threshold": 0.5,
|
| 80 |
+
"false_positive_rate": 0.075,
|
| 81 |
+
"flagged": 27,
|
| 82 |
+
"score_mean": 0.118965,
|
| 83 |
+
"score_p50": 0.019934,
|
| 84 |
+
"score_p90": 0.431837,
|
| 85 |
+
"score_p95": 0.631086,
|
| 86 |
+
"score_p99": 0.937073,
|
| 87 |
+
"score_max": 0.994358
|
| 88 |
+
},
|
| 89 |
+
"python_stdlib": {
|
| 90 |
+
"n": 3224,
|
| 91 |
+
"threshold": 0.5,
|
| 92 |
+
"false_positive_rate": 0.0047,
|
| 93 |
+
"flagged": 15,
|
| 94 |
+
"score_mean": 0.011161,
|
| 95 |
+
"score_p50": 0.000412,
|
| 96 |
+
"score_p90": 0.015134,
|
| 97 |
+
"score_p95": 0.035724,
|
| 98 |
+
"score_p99": 0.217896,
|
| 99 |
+
"score_max": 0.97892
|
| 100 |
+
}
|
| 101 |
+
},
|
| 102 |
+
"flagged_examples": [
|
| 103 |
+
{
|
| 104 |
+
"score": 0.557154,
|
| 105 |
+
"source": "local_repo_vesuvius",
|
| 106 |
+
"path": null,
|
| 107 |
+
"preview": "b.createAttrBuffer([-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0],3)};c.RenderEngine.prototype.destroy=function(){this.ctx&&(this.volume.destroy(),this.volume=null,this.auxVolume.destroy(),this.auxVolume=null,this.volMask.destroy(),this.volMas"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"score": 0.683458,
|
| 111 |
+
"source": "local_repo_vesuvius",
|
| 112 |
+
"path": null,
|
| 113 |
+
"preview": "evel,this.multiInteractor.wlEnabled=h.winlevel,this.multiInteractor.panEnabled=this.multiInteractor.zoomEnabled=this.multiInteractor.rotEnabled=h.pose)};c.MprViewer.prototype.clearDisplay=function(){this.canvas.getContext(\"2d\").clearRect(0,"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"score": 0.795035,
|
| 117 |
+
"source": "local_repo_vesuvius",
|
| 118 |
+
"path": null,
|
| 119 |
+
"preview": "ed(__ARMEB__) || \\ defined(__THUMBEB__) || \\ defined(__AARCH64EB__) || \\ defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) const bool big_endian = true; #else const bool big_endian = false; #endif const char magic_string[] = \"\\x9"
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"score": 0.913212,
|
| 123 |
+
"source": "python_stdlib",
|
| 124 |
+
"path": null,
|
| 125 |
+
"preview": "'iso_ir_127' : 'iso8859_6', # iso8859_7 codec 'csisolatingreek' : 'iso8859_7', 'ecma_118' : 'iso8859_7', 'elot_928' : 'iso8859_7', 'greek' : 'iso8859_7', 'greek8' : 'iso8859_7', 'iso_8859_7' : 'iso8859_7', 'iso_8859_7_1987' : 'iso8859_7', '"
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"score": 0.528228,
|
| 129 |
+
"source": "local_repo_vesuvius",
|
| 130 |
+
"path": null,
|
| 131 |
+
"preview": "var db = this.db; this._cfg.storesSource = this._cfg.storesSource ? extend(this._cfg.storesSource, stores) : stores; var versions = db._versions; var storesSpec = {}; var dbschema = {}; versions.forEach(function (version) { extend(storesSpe"
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"score": 0.542192,
|
| 135 |
+
"source": "python_stdlib",
|
| 136 |
+
"path": null,
|
| 137 |
+
"preview": "class Purpose(_ASN1Object, _Enum): \"\"\"SSLContext purpose flags with X509v3 Extended Key Usage objects \"\"\" SERVER_AUTH = '1.3.6.1.5.5.7.3.1' CLIENT_AUTH = '1.3.6.1.5.5.7.3.2'"
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"score": 0.97892,
|
| 141 |
+
"source": "python_stdlib",
|
| 142 |
+
"path": null,
|
| 143 |
+
"preview": ": 'iso8859_14', 'iso_ir_199' : 'iso8859_14', 'l8' : 'iso8859_14', 'latin8' : 'iso8859_14', # iso8859_15 codec 'iso_8859_15' : 'iso8859_15', 'l9' : 'iso8859_15', 'latin9' : 'iso8859_15', # iso8859_16 codec 'iso_8859_16' : 'iso8859_16', 'iso_"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"score": 0.534763,
|
| 147 |
+
"source": "local_repo_vesuvius",
|
| 148 |
+
"path": null,
|
| 149 |
+
"preview": "index_t idx = 0; for (size_t i = dim; i-- > 0;) { idx += pixelCoordinates[i] * pixelCoordFactor[i]; } return idx; } value_t CubicalGridComplex::getValue(const vector<index_t> &pixelCoordinates) const { return image[getIndex(pixelCoordinates"
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"score": 0.955582,
|
| 153 |
+
"source": "local_project_code",
|
| 154 |
+
"path": null,
|
| 155 |
+
"preview": "def download_vxunderground( spec: dict, builder: PoolBuilder, chunk_cfg: dict, insecure: bool ) -> None: repo = spec[\"repo\"] cache = ROOT / spec.get(\"cache_dir\", \"data/external/vxunderground\") cache.mkdir(parents=True, exist_ok=True) for su"
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"score": 0.651096,
|
| 159 |
+
"source": "local_repo_vesuvius",
|
| 160 |
+
"path": null,
|
| 161 |
+
"preview": "bs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Math.max(1.0, Math.a"
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"score": 0.910128,
|
| 165 |
+
"source": "python_stdlib",
|
| 166 |
+
"path": null,
|
| 167 |
+
"preview": "' : 'cp037', # cp1026 codec '1026' : 'cp1026', 'csibm1026' : 'cp1026', 'ibm1026' : 'cp1026', # cp1125 codec '1125' : 'cp1125', 'ibm1125' : 'cp1125', 'cp866u' : 'cp1125', 'ruscii' : 'cp1125', # cp1140 codec '1140' : 'cp1140', 'ibm1140' : 'cp"
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"score": 0.635939,
|
| 171 |
+
"source": "python_stdlib",
|
| 172 |
+
"path": null,
|
| 173 |
+
"preview": "async def __aexit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType], ) -> Optional[bool]: assert self._state in (_State.ENTERED, _State.EXPIRING) if self._timeout_handler is "
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"score": 0.544642,
|
| 177 |
+
"source": "local_repo_vesuvius",
|
| 178 |
+
"path": null,
|
| 179 |
+
"preview": "ysPromise_1.then(function (_a) { var resultingKeys = _a.result; pkRangeSet_1.addKeys(resultingKeys); return res; }); } var pKeys = req.values ? res.result.map(extractKey) : res.result; if (req.values) { pkRangeSet_1.addKeys(pKeys); } else {"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"score": 0.57395,
|
| 183 |
+
"source": "python_stdlib",
|
| 184 |
+
"path": null,
|
| 185 |
+
"preview": "class STARTUPINFO: def __init__(self, *, dwFlags=0, hStdInput=None, hStdOutput=None, hStdError=None, wShowWindow=0, lpAttributeList=None): self.dwFlags = dwFlags self.hStdInput = hStdInput self.hStdOutput = hStdOutput self.hStdError = hStdE"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"score": 0.926499,
|
| 189 |
+
"source": "local_repo_vesuvius",
|
| 190 |
+
"path": null,
|
| 191 |
+
"preview": "w Uint16Array(k[h]),n=0;n<b;n++){var l=n*e;m[l]=m[l+e-1]=0}for(n=0;n<e;n++)m[n]=m[d+n]=0}e=[];e.push(0<g?new Uint8Array(k[0]):null);e.push(1<g?new Uint8Array(k[1]):null);b=0;d=2*f;for(h=0;h<d;h+=2)for(f=0;2>f;f++)e[f]?(this.rgbaBuf[b++]=a.b"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"score": 0.987301,
|
| 195 |
+
"source": "local_repo_vesuvius",
|
| 196 |
+
"path": null,
|
| 197 |
+
"preview": "<< 2) & 0x3fc) | (getBufferDataRW6(10) >> 6); bytes[9] = ((getBufferDataRW6(10) << 4) | (getBufferDataRW6(11) >> 4)) & 0x3ff; bytes[10] = (getBufferDataRW6(11) >> 2) & 0x3; bytes[11] = ((getBufferDataRW6(11) & 0x3) << 8) | getBufferDataRW6("
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"score": 0.542918,
|
| 201 |
+
"source": "local_repo_vesuvius",
|
| 202 |
+
"path": null,
|
| 203 |
+
"preview": "X=V+1,k=X%2,j=0,I=0,a=0,l,R,w=e[Q],S=e[Q-1],H=e[Q-2][X],g=S[X-1],Y=S[X],P=S[X+1],A=w[X-1],v=w[X+1],y=Math.abs,d,C,n,h; if(k){d=y(P-Y);C=y(H-Y);n=y(g-Y)}if(k){h=d>n&&C<d?H+g:d<n&&C<n?H+P:P+g;h=h+2*Y>>>2;if(o){w[X]=h;return}l=Z.t*Z.c[t.g+Y-H]"
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"score": 0.914576,
|
| 207 |
+
"source": "python_stdlib",
|
| 208 |
+
"path": null,
|
| 209 |
+
"preview": "def DllGetClassObject(rclsid, riid, ppv): try: ccom = __import__(\"comtypes.server.inprocserver\", globals(), locals(), ['*']) except ImportError: return -2147221231 # CLASS_E_CLASSNOTAVAILABLE else: return ccom.DllGetClassObject(rclsid, riid"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"score": 0.98419,
|
| 213 |
+
"source": "local_repo_vesuvius",
|
| 214 |
+
"path": null,
|
| 215 |
+
"preview": ",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"score": 0.887868,
|
| 219 |
+
"source": "local_repo_vesuvius",
|
| 220 |
+
"path": null,
|
| 221 |
+
"preview": "; string unmatched0Filename = \"unmatched_0.csv\"; string unmatched1Filename = \"unmatched_1.csv\"; fileFormat format0; fileFormat format1; bool print = false; bool saveResult = false; for (int i = 1; i < argc; ++i) { const string arg(argv[i]);"
|
| 222 |
+
}
|
| 223 |
+
]
|
| 224 |
+
}
|
benign_code_github_lora_clean_eval.json
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
|
| 3 |
+
"holdout": "data\\clf\\benign_code_holdout_github_lora_clean.jsonl",
|
| 4 |
+
"overall": {
|
| 5 |
+
"n": 12000,
|
| 6 |
+
"threshold": 0.5,
|
| 7 |
+
"false_positive_rate": 0.0092,
|
| 8 |
+
"flagged": 110,
|
| 9 |
+
"score_mean": 0.022043,
|
| 10 |
+
"score_p50": 0.000761,
|
| 11 |
+
"score_p90": 0.037042,
|
| 12 |
+
"score_p95": 0.104331,
|
| 13 |
+
"score_p99": 0.469681,
|
| 14 |
+
"score_max": 0.994358
|
| 15 |
+
},
|
| 16 |
+
"by_source": {
|
| 17 |
+
"local_project_code": {
|
| 18 |
+
"n": 160,
|
| 19 |
+
"threshold": 0.5,
|
| 20 |
+
"false_positive_rate": 0.0063,
|
| 21 |
+
"flagged": 1,
|
| 22 |
+
"score_mean": 0.027283,
|
| 23 |
+
"score_p50": 0.002633,
|
| 24 |
+
"score_p90": 0.034741,
|
| 25 |
+
"score_p95": 0.107271,
|
| 26 |
+
"score_p99": 0.437606,
|
| 27 |
+
"score_max": 0.955582
|
| 28 |
+
},
|
| 29 |
+
"local_repo_hs": {
|
| 30 |
+
"n": 14,
|
| 31 |
+
"threshold": 0.5,
|
| 32 |
+
"false_positive_rate": 0.1429,
|
| 33 |
+
"flagged": 2,
|
| 34 |
+
"score_mean": 0.234466,
|
| 35 |
+
"score_p50": 0.173636,
|
| 36 |
+
"score_p90": 0.50088,
|
| 37 |
+
"score_p95": 0.601973,
|
| 38 |
+
"score_p99": 0.732286,
|
| 39 |
+
"score_max": 0.764864
|
| 40 |
+
},
|
| 41 |
+
"local_repo_isre": {
|
| 42 |
+
"n": 173,
|
| 43 |
+
"threshold": 0.5,
|
| 44 |
+
"false_positive_rate": 0.0,
|
| 45 |
+
"flagged": 0,
|
| 46 |
+
"score_mean": 0.015629,
|
| 47 |
+
"score_p50": 0.000923,
|
| 48 |
+
"score_p90": 0.065123,
|
| 49 |
+
"score_p95": 0.111808,
|
| 50 |
+
"score_p99": 0.148813,
|
| 51 |
+
"score_max": 0.175909
|
| 52 |
+
},
|
| 53 |
+
"local_repo_job_application_pipeline": {
|
| 54 |
+
"n": 444,
|
| 55 |
+
"threshold": 0.5,
|
| 56 |
+
"false_positive_rate": 0.0023,
|
| 57 |
+
"flagged": 1,
|
| 58 |
+
"score_mean": 0.016508,
|
| 59 |
+
"score_p50": 0.001555,
|
| 60 |
+
"score_p90": 0.038672,
|
| 61 |
+
"score_p95": 0.117372,
|
| 62 |
+
"score_p99": 0.200662,
|
| 63 |
+
"score_max": 0.691934
|
| 64 |
+
},
|
| 65 |
+
"local_repo_llama_cpp": {
|
| 66 |
+
"n": 1000,
|
| 67 |
+
"threshold": 0.5,
|
| 68 |
+
"false_positive_rate": 0.023,
|
| 69 |
+
"flagged": 23,
|
| 70 |
+
"score_mean": 0.050298,
|
| 71 |
+
"score_p50": 0.005734,
|
| 72 |
+
"score_p90": 0.128486,
|
| 73 |
+
"score_p95": 0.259195,
|
| 74 |
+
"score_p99": 0.691108,
|
| 75 |
+
"score_max": 0.991824
|
| 76 |
+
},
|
| 77 |
+
"local_repo_olympiad_math": {
|
| 78 |
+
"n": 53,
|
| 79 |
+
"threshold": 0.5,
|
| 80 |
+
"false_positive_rate": 0.0189,
|
| 81 |
+
"flagged": 1,
|
| 82 |
+
"score_mean": 0.032375,
|
| 83 |
+
"score_p50": 0.001522,
|
| 84 |
+
"score_p90": 0.075568,
|
| 85 |
+
"score_p95": 0.202259,
|
| 86 |
+
"score_p99": 0.444325,
|
| 87 |
+
"score_max": 0.561933
|
| 88 |
+
},
|
| 89 |
+
"local_repo_packing": {
|
| 90 |
+
"n": 316,
|
| 91 |
+
"threshold": 0.5,
|
| 92 |
+
"false_positive_rate": 0.0032,
|
| 93 |
+
"flagged": 1,
|
| 94 |
+
"score_mean": 0.013281,
|
| 95 |
+
"score_p50": 0.000252,
|
| 96 |
+
"score_p90": 0.008419,
|
| 97 |
+
"score_p95": 0.049662,
|
| 98 |
+
"score_p99": 0.323688,
|
| 99 |
+
"score_max": 0.71564
|
| 100 |
+
},
|
| 101 |
+
"local_repo_pipeline": {
|
| 102 |
+
"n": 136,
|
| 103 |
+
"threshold": 0.5,
|
| 104 |
+
"false_positive_rate": 0.0074,
|
| 105 |
+
"flagged": 1,
|
| 106 |
+
"score_mean": 0.021312,
|
| 107 |
+
"score_p50": 0.001563,
|
| 108 |
+
"score_p90": 0.037614,
|
| 109 |
+
"score_p95": 0.080462,
|
| 110 |
+
"score_p99": 0.369778,
|
| 111 |
+
"score_max": 0.888886
|
| 112 |
+
},
|
| 113 |
+
"local_repo_repo": {
|
| 114 |
+
"n": 13,
|
| 115 |
+
"threshold": 0.5,
|
| 116 |
+
"false_positive_rate": 0.0,
|
| 117 |
+
"flagged": 0,
|
| 118 |
+
"score_mean": 0.049554,
|
| 119 |
+
"score_p50": 0.003904,
|
| 120 |
+
"score_p90": 0.15528,
|
| 121 |
+
"score_p95": 0.195039,
|
| 122 |
+
"score_p99": 0.231913,
|
| 123 |
+
"score_max": 0.241131
|
| 124 |
+
},
|
| 125 |
+
"local_repo_utils": {
|
| 126 |
+
"n": 114,
|
| 127 |
+
"threshold": 0.5,
|
| 128 |
+
"false_positive_rate": 0.0088,
|
| 129 |
+
"flagged": 1,
|
| 130 |
+
"score_mean": 0.017779,
|
| 131 |
+
"score_p50": 0.000741,
|
| 132 |
+
"score_p90": 0.021215,
|
| 133 |
+
"score_p95": 0.039684,
|
| 134 |
+
"score_p99": 0.316717,
|
| 135 |
+
"score_max": 0.970841
|
| 136 |
+
},
|
| 137 |
+
"local_repo_vesuvius": {
|
| 138 |
+
"n": 730,
|
| 139 |
+
"threshold": 0.5,
|
| 140 |
+
"false_positive_rate": 0.0548,
|
| 141 |
+
"flagged": 40,
|
| 142 |
+
"score_mean": 0.103365,
|
| 143 |
+
"score_p50": 0.018504,
|
| 144 |
+
"score_p90": 0.349818,
|
| 145 |
+
"score_p95": 0.531822,
|
| 146 |
+
"score_p99": 0.915992,
|
| 147 |
+
"score_max": 0.994358
|
| 148 |
+
},
|
| 149 |
+
"python_stdlib": {
|
| 150 |
+
"n": 8847,
|
| 151 |
+
"threshold": 0.5,
|
| 152 |
+
"false_positive_rate": 0.0044,
|
| 153 |
+
"flagged": 39,
|
| 154 |
+
"score_mean": 0.012388,
|
| 155 |
+
"score_p50": 0.000454,
|
| 156 |
+
"score_p90": 0.017894,
|
| 157 |
+
"score_p95": 0.047606,
|
| 158 |
+
"score_p99": 0.258983,
|
| 159 |
+
"score_max": 0.97892
|
| 160 |
+
}
|
| 161 |
+
},
|
| 162 |
+
"flagged_examples": [
|
| 163 |
+
{
|
| 164 |
+
"score": 0.955582,
|
| 165 |
+
"source": "local_project_code",
|
| 166 |
+
"path": "C:\\GitHub\\Safety DS\\scripts\\build_malware_code_pool.py",
|
| 167 |
+
"preview": "def download_vxunderground( spec: dict, builder: PoolBuilder, chunk_cfg: dict, insecure: bool ) -> None: repo = spec[\"repo\"] cache = ROOT / spec.get(\"cache_dir\", \"data/external/vxunderground\") cache.mkdir(parents=True, exist_ok=True) for su"
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"score": 0.71564,
|
| 171 |
+
"source": "local_repo_packing",
|
| 172 |
+
"path": "C:\\GitHub\\packing\\core\\pack_cuda_primitives.py",
|
| 173 |
+
"preview": "ss) forward_counts[0] = n_subj; for (int i = 0; i < n_subj; ++i) { forward_polys[0][i] = subj[i]; } } else { // Initialize current buffer current_count = n_subj; for (int i = 0; i < n_subj; ++i) { current_poly[i] = subj[i]; } } // Apply eac"
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"score": 0.586343,
|
| 177 |
+
"source": "local_repo_llama_cpp",
|
| 178 |
+
"path": "C:\\lora_training\\llama.cpp\\convert_hf_to_gguf.py",
|
| 179 |
+
"preview": "def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # SwigLU activation assert self.hparams[\"activation_function\"] == \"swiglu\" # ALiBi position embedding assert self.hparams[\"position_embedding_type\"] == \"alibi\" # Embeddi"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"score": 0.863325,
|
| 183 |
+
"source": "local_repo_llama_cpp",
|
| 184 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 185 |
+
"preview": "_ARG_NO_KV_OFFLOAD\")); add_opt(common_arg( {\"-nr\", \"--no-repack\"}, \"disable weight repacking\", [](common_params & params) { params.no_extra_bufts = true; } ).set_env(\"LLAMA_ARG_NO_REPACK\")); add_opt(common_arg( {\"--no-host\"}, \"bypass host b"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"score": 0.991824,
|
| 189 |
+
"source": "local_repo_llama_cpp",
|
| 190 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 191 |
+
"preview": "nd_dev_t> devices; for (size_t i = 0; i < ggml_backend_dev_count(); ++i) { auto * dev = ggml_backend_dev_get(i); if (ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_CPU) { devices.push_back(dev); } } printf(\"Available devices:\\n\"); f"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"score": 0.60719,
|
| 195 |
+
"source": "local_repo_llama_cpp",
|
| 196 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 197 |
+
"preview": "n_ubatch = 1024; params.n_batch = 1024; params.n_ctx = 0; params.n_cache_reuse = 256; } ).set_examples({LLAMA_EXAMPLE_SERVER})); add_opt(common_arg( {\"--fim-qwen-7b-spec\"}, string_format(\"use Qwen 2.5 Coder 7B + 0.5B draft for speculative d"
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"score": 0.827293,
|
| 201 |
+
"source": "local_repo_llama_cpp",
|
| 202 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 203 |
+
"preview": "wen 3 Coder 30B A3B Instruct (note: can download weights from the internet)\"), [](common_params & params) { params.model.hf_repo = \"ggml-org/Qwen3-Coder-30B-A3B-Instruct-Q8_0-GGUF\"; params.model.hf_file = \"qwen3-coder-30b-a3b-instruct-q8_0."
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"score": 0.534571,
|
| 207 |
+
"source": "local_repo_llama_cpp",
|
| 208 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\base64.hpp",
|
| 209 |
+
"preview": "; return 62; } else if (c == '_') { alphabet = alphabet::url_filename_safe; return 63; } } throw base64_error(\"invalid base64 character.\"); } }; #endif // !PUBLIC_DOMAIN_BASE64_HPP_"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"score": 0.551723,
|
| 213 |
+
"source": "local_repo_llama_cpp",
|
| 214 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat-parser.cpp",
|
| 215 |
+
"preview": "n_regex preamble_regex(\"<\\\\|channel\\\\|>commentary\"); static const common_regex tool_call1_regex(recipient + \"<\\\\|channel\\\\|>(analysis|commentary)\" + constraint + \"?\"); static const common_regex tool_call2_regex(\"<\\\\|channel\\\\|>(analysis|com"
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"score": 0.536037,
|
| 219 |
+
"source": "local_repo_llama_cpp",
|
| 220 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat-parser.cpp",
|
| 221 |
+
"preview": "case COMMON_CHAT_FORMAT_DEEPSEEK_R1: common_chat_parse_deepseek_r1(builder); break; case COMMON_CHAT_FORMAT_DEEPSEEK_V3_1: common_chat_parse_deepseek_v3_1(builder); break; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: common_chat_parse_function"
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"score": 0.616117,
|
| 225 |
+
"source": "local_repo_llama_cpp",
|
| 226 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat-parser.cpp",
|
| 227 |
+
"preview": "common_chat_parse_kimi_k2(builder); break; case COMMON_CHAT_FORMAT_QWEN3_CODER_XML: common_chat_parse_qwen3_coder_xml(builder); break; case COMMON_CHAT_FORMAT_APRIEL_1_5: common_chat_parse_apriel_1_5(builder); break; case COMMON_CHAT_FORMAT"
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"score": 0.609806,
|
| 231 |
+
"source": "local_repo_llama_cpp",
|
| 232 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat.cpp",
|
| 233 |
+
"preview": "msg_new.tool_calls.size() < msg_prv.tool_calls.size()) { throw std::runtime_error(\"Invalid diff: now finding less tool calls!\"); } if (!msg_prv.tool_calls.empty()) { const auto idx = msg_prv.tool_calls.size() - 1; const auto & pref = msg_pr"
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"score": 0.876555,
|
| 237 |
+
"source": "local_repo_llama_cpp",
|
| 238 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat.cpp",
|
| 239 |
+
"preview": "y v3.1 Llama 3.1\"; case COMMON_CHAT_FORMAT_DEEPSEEK_V3_1: return \"DeepSeek V3.1\"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return \"Hermes 2 Pro\"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return \"Command R7B\"; case COMMON_CHAT_FORMAT_GRANITE: retur"
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"score": 0.610185,
|
| 243 |
+
"source": "local_repo_llama_cpp",
|
| 244 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat.h",
|
| 245 |
+
"preview": "OMMON_CHAT_FORMAT_GRANITE, COMMON_CHAT_FORMAT_GPT_OSS, COMMON_CHAT_FORMAT_SEED_OSS, COMMON_CHAT_FORMAT_NEMOTRON_V2, COMMON_CHAT_FORMAT_APERTUS, COMMON_CHAT_FORMAT_LFM2_WITH_JSON_TOOLS, COMMON_CHAT_FORMAT_GLM_4_5, COMMON_CHAT_FORMAT_MINIMAX_"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"score": 0.864733,
|
| 249 |
+
"source": "local_repo_llama_cpp",
|
| 250 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\common.cpp",
|
| 251 |
+
"preview": "d-%H_%M_%S\", std::localtime(&as_time_t)); const int64_t ns = std::chrono::duration_cast<std::chrono::nanoseconds>( current_time.time_since_epoch() % 1000000000).count(); char timestamp_ns[11]; snprintf(timestamp_ns, 11, \"%09\" PRId64, ns); r"
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"score": 0.972733,
|
| 255 |
+
"source": "local_repo_llama_cpp",
|
| 256 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\common.cpp",
|
| 257 |
+
"preview": "ARATOR; } return p; }; if (getenv(\"LLAMA_CACHE\")) { cache_directory = std::getenv(\"LLAMA_CACHE\"); } else { #if defined(__linux__) || defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__) if (std::getenv(\"XDG_CACHE_HOME\")) { cache_di"
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"score": 0.526275,
|
| 261 |
+
"source": "local_repo_llama_cpp",
|
| 262 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\common.cpp",
|
| 263 |
+
"preview": "mmon_params_sampling_config::COMMON_PARAMS_SAMPLING_CONFIG_MIN_P); get_float(llama_model_meta_key_str(LLAMA_MODEL_META_KEY_SAMPLING_XTC_PROBABILITY), sparams.xtc_probability, common_params_sampling_config::COMMON_PARAMS_SAMPLING_CONFIG_XTC_"
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"score": 0.539756,
|
| 267 |
+
"source": "local_repo_llama_cpp",
|
| 268 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\download.cpp",
|
| 269 |
+
"preview": "l_successful = common_pull_file(cli, parts.path, path_temporary, supports_ranges, existing_size, total_size); if (!was_pull_successful) { if (i + 1 < max_attempts) { const int exponential_backoff_delay = std::pow(retry_delay_seconds, i) * 1"
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"score": 0.530205,
|
| 273 |
+
"source": "local_repo_llama_cpp",
|
| 274 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\download.cpp",
|
| 275 |
+
"preview": "size_t len) { buf.insert(buf.end(), data, data + len); return params.max_size == 0 || buf.size() <= static_cast<size_t>(params.max_size); }, nullptr ); if (!res) { throw std::runtime_error(\"error: cannot make GET request\"); } return { res->"
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"score": 0.882664,
|
| 279 |
+
"source": "local_repo_llama_cpp",
|
| 280 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\download.cpp",
|
| 281 |
+
"preview": "local_path, token, false)) { throw std::runtime_error(\"Failed to download Docker Model\"); } LOG_INF(\"%s: Downloaded Docker Model to: %s\\n\", __func__, local_path.c_str()); return local_path; } catch (const std::exception & e) { LOG_ERR(\"%s: "
|
| 282 |
+
}
|
| 283 |
+
]
|
| 284 |
+
}
|
benign_code_hf_codeparrot_10k_eval.json
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
|
| 3 |
+
"holdout": "data\\external\\hf_benign_code_codeparrot_clean_10k.jsonl",
|
| 4 |
+
"overall": {
|
| 5 |
+
"n": 10000,
|
| 6 |
+
"threshold": 0.5,
|
| 7 |
+
"false_positive_rate": 0.0722,
|
| 8 |
+
"flagged": 722,
|
| 9 |
+
"score_mean": 0.097787,
|
| 10 |
+
"score_p50": 0.007817,
|
| 11 |
+
"score_p90": 0.351692,
|
| 12 |
+
"score_p95": 0.651972,
|
| 13 |
+
"score_p99": 0.950412,
|
| 14 |
+
"score_max": 0.99718
|
| 15 |
+
},
|
| 16 |
+
"by_source": {
|
| 17 |
+
"hf_benign_code:codeparrot/codeparrot-clean-train:default:train": {
|
| 18 |
+
"n": 10000,
|
| 19 |
+
"threshold": 0.5,
|
| 20 |
+
"false_positive_rate": 0.0722,
|
| 21 |
+
"flagged": 722,
|
| 22 |
+
"score_mean": 0.097787,
|
| 23 |
+
"score_p50": 0.007817,
|
| 24 |
+
"score_p90": 0.351692,
|
| 25 |
+
"score_p95": 0.651972,
|
| 26 |
+
"score_p99": 0.950412,
|
| 27 |
+
"score_max": 0.99718
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"flagged_examples": [
|
| 31 |
+
{
|
| 32 |
+
"score": 0.696553,
|
| 33 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 34 |
+
"path": "linux-devkit/sysroots/i686-arago-linux/usr/lib/python2.7/encodings/cp1250.py",
|
| 35 |
+
"preview": "0e' # 0x0E -> SHIFT OUT u'\\x0f' # 0x0F -> SHIFT IN u'\\x10' # 0x10 -> DATA LINK ESCAPE u'\\x11' # 0x11 -> DEVICE CONTROL ONE u'\\x12' # 0x12 -> DEVICE CONTROL TWO u'\\x13' # 0x13 -> DEVICE CONTROL THREE u'\\x14' # 0x14 -> DEVICE CONTROL FOUR u'\\"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"score": 0.922218,
|
| 39 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 40 |
+
"path": "linux-devkit/sysroots/i686-arago-linux/usr/lib/python2.7/encodings/cp1250.py",
|
| 41 |
+
"preview": "'a' # 0x61 -> LATIN SMALL LETTER A u'b' # 0x62 -> LATIN SMALL LETTER B u'c' # 0x63 -> LATIN SMALL LETTER C u'd' # 0x64 -> LATIN SMALL LETTER D u'e' # 0x65 -> LATIN SMALL LETTER E u'f' # 0x66 -> LATIN SMALL LETTER F u'g' # 0x67 -> LATIN SMAL"
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"score": 0.538765,
|
| 45 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 46 |
+
"path": "linux-devkit/sysroots/i686-arago-linux/usr/lib/python2.7/encodings/cp1250.py",
|
| 47 |
+
"preview": "# 0x88 -> UNDEFINED u'\\u2030' # 0x89 -> PER MILLE SIGN u'\\u0160' # 0x8A -> LATIN CAPITAL LETTER S WITH CARON u'\\u2039' # 0x8B -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK u'\\u015a' # 0x8C -> LATIN CAPITAL LETTER S WITH ACUTE u'\\u0164' # 0x8"
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"score": 0.709877,
|
| 51 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 52 |
+
"path": "libs_arm/wx/_controls.py",
|
| 53 |
+
"preview": "------ BU_LEFT = _controls_.BU_LEFT BU_TOP = _controls_.BU_TOP BU_RIGHT = _controls_.BU_RIGHT BU_BOTTOM = _controls_.BU_BOTTOM BU_ALIGN_MASK = _controls_.BU_ALIGN_MASK BU_EXACTFIT = _controls_.BU_EXACTFIT BU_AUTODRAW = _controls_.BU_AUTODRA"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"score": 0.546407,
|
| 57 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 58 |
+
"path": "libs_arm/wx/_controls.py",
|
| 59 |
+
"preview": "tCheckedStrings,SetCheckedStrings) _controls_.CheckListBox_swigregister(CheckListBox) def PreCheckListBox(*args, **kwargs): \"\"\"PreCheckListBox() -> CheckListBox\"\"\" val = _controls_.new_PreCheckListBox(*args, **kwargs) return val #----------"
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"score": 0.734946,
|
| 63 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 64 |
+
"path": "libs_arm/wx/_controls.py",
|
| 65 |
+
"preview": "tAttr_GetTabs(*args, **kwargs) def GetLeftIndent(*args, **kwargs): \"\"\"GetLeftIndent(self) -> long\"\"\" return _controls_.TextAttr_GetLeftIndent(*args, **kwargs) def GetLeftSubIndent(*args, **kwargs): \"\"\"GetLeftSubIndent(self) -> long\"\"\" retur"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"score": 0.531309,
|
| 69 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 70 |
+
"path": "libs_arm/wx/_controls.py",
|
| 71 |
+
"preview": "ontrols_.TextAttr_GetFontFamily(*args, **kwargs) def GetFont(*args, **kwargs): \"\"\"GetFont(self) -> Font\"\"\" return _controls_.TextAttr_GetFont(*args, **kwargs) CreateFont = GetFont def GetCharacterStyleName(*args, **kwargs): \"\"\"GetCharacterS"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"score": 0.840642,
|
| 75 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 76 |
+
"path": "libs_arm/wx/_controls.py",
|
| 77 |
+
"preview": "extAttr_GetBulletFont(*args, **kwargs) def GetBulletName(*args, **kwargs): \"\"\"GetBulletName(self) -> String\"\"\" return _controls_.TextAttr_GetBulletName(*args, **kwargs) def GetURL(*args, **kwargs): \"\"\"GetURL(self) -> String\"\"\" return _contr"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"score": 0.950359,
|
| 81 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 82 |
+
"path": "libs_arm/wx/_controls.py",
|
| 83 |
+
"preview": "HasFontWeight(*args, **kwargs) def HasFontSize(*args, **kwargs): \"\"\"HasFontSize(self) -> bool\"\"\" return _controls_.TextAttr_HasFontSize(*args, **kwargs) def HasFontItalic(*args, **kwargs): \"\"\"HasFontItalic(self) -> bool\"\"\" return _controls_"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"score": 0.900217,
|
| 87 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 88 |
+
"path": "libs_arm/wx/_controls.py",
|
| 89 |
+
"preview": "ial(*args, **kwargs) def TextAttr_SplitParaCharStyles(*args, **kwargs): \"\"\"TextAttr_SplitParaCharStyles(TextAttr style, TextAttr parStyle, TextAttr charStyle) -> bool\"\"\" return _controls_.TextAttr_SplitParaCharStyles(*args, **kwargs) class "
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"score": 0.739418,
|
| 93 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 94 |
+
"path": "libs_arm/wx/_controls.py",
|
| 95 |
+
"preview": "UrlEvent_swigregister(TextUrlEvent) EVT_TEXT = wx.PyEventBinder( wxEVT_COMMAND_TEXT_UPDATED, 1) EVT_TEXT_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TEXT_ENTER, 1) EVT_TEXT_URL = wx.PyEventBinder( wxEVT_COMMAND_TEXT_URL, 1) EVT_TEXT_MAXLEN = wx"
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"score": 0.679941,
|
| 99 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 100 |
+
"path": "libs_arm/wx/_controls.py",
|
| 101 |
+
"preview": "ameStr def PreScrollBar(*args, **kwargs): \"\"\"PreScrollBar() -> ScrollBar\"\"\" val = _controls_.new_PreScrollBar(*args, **kwargs) return val def ScrollBar_GetClassDefaultAttributes(*args, **kwargs): \"\"\" ScrollBar_GetClassDefaultAttributes(int "
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"score": 0.509311,
|
| 105 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 106 |
+
"path": "libs_arm/wx/_controls.py",
|
| 107 |
+
"preview": "_UPDATED = _controls_.wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED EVT_SPIN_UP = wx.PyEventBinder( wxEVT_SPIN_UP, 1) EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SPIN_DOWN, 1) EVT_SPIN = wx.PyEventBinder( wxEVT_SPIN, 1) EVT_SPINCTRL = wx.PyEventBinder( "
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"score": 0.553781,
|
| 111 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 112 |
+
"path": "libs_arm/wx/_controls.py",
|
| 113 |
+
"preview": "(*args, **kwargs) def GetMax(*args, **kwargs): \"\"\"GetMax(self) -> double\"\"\" return _controls_.SpinCtrlDouble_GetMax(*args, **kwargs) def GetIncrement(*args, **kwargs): \"\"\"GetIncrement(self) -> double\"\"\" return _controls_.SpinCtrlDouble_GetI"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"score": 0.716552,
|
| 117 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 118 |
+
"path": "libs_arm/wx/_controls.py",
|
| 119 |
+
"preview": "x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args, **kwargs): \"\"\"__init__(self, EventType commandType=wxEVT_NULL, int winid=0, double value=0) -> SpinDoubleEvent\"\"\" _controls_.SpinDoubleEvent_swi"
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"score": 0.800785,
|
| 123 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 124 |
+
"path": "libs_arm/wx/_controls.py",
|
| 125 |
+
"preview": "label=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, int majorDimension=0, long style=RA_HORIZONTAL, Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> bool \"\"\" "
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"score": 0.722281,
|
| 129 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 130 |
+
"path": "libs_arm/wx/_controls.py",
|
| 131 |
+
"preview": "ageOld, int nPageNew=-1)\"\"\" return _controls_.Notebook_SendPageChangedEvent(*args, **kwargs) RowCount = property(GetRowCount,doc=\"See `GetRowCount`\") ThemeBackgroundColour = property(GetThemeBackgroundColour,doc=\"See `GetThemeBackgroundColo"
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"score": 0.829889,
|
| 135 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 136 |
+
"path": "libs_arm/wx/_controls.py",
|
| 137 |
+
"preview": "tchableSpace(*args, **kwargs): \"\"\"InsertStretchableSpace(self, size_t pos) -> ToolBarToolBase\"\"\" return _controls_.ToolBarBase_InsertStretchableSpace(*args, **kwargs) def RemoveTool(*args, **kwargs): \"\"\"RemoveTool(self, int id) -> ToolBarTo"
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"score": 0.523815,
|
| 141 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 142 |
+
"path": "libs_arm/wx/_controls.py",
|
| 143 |
+
"preview": "E_SEL LC_SORT_ASCENDING = _controls_.LC_SORT_ASCENDING LC_SORT_DESCENDING = _controls_.LC_SORT_DESCENDING LC_MASK_TYPE = _controls_.LC_MASK_TYPE LC_MASK_ALIGN = _controls_.LC_MASK_ALIGN LC_MASK_SORT = _controls_.LC_MASK_SORT LIST_MASK_STATE"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"score": 0.872435,
|
| 147 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 148 |
+
"path": "libs_arm/wx/_controls.py",
|
| 149 |
+
"preview": "DELETE_ALL_ITEMS = _controls_.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS wxEVT_COMMAND_LIST_ITEM_SELECTED = _controls_.wxEVT_COMMAND_LIST_ITEM_SELECTED wxEVT_COMMAND_LIST_ITEM_DESELECTED = _controls_.wxEVT_COMMAND_LIST_ITEM_DESELECTED wxEVT_COMMAN"
|
| 150 |
+
}
|
| 151 |
+
]
|
| 152 |
+
}
|
benign_code_hf_codeparrot_project_10k_eval.json
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
|
| 3 |
+
"holdout": "data\\external\\hf_benign_code_codeparrot_clean_project_10k.jsonl",
|
| 4 |
+
"overall": {
|
| 5 |
+
"n": 10000,
|
| 6 |
+
"threshold": 0.5,
|
| 7 |
+
"false_positive_rate": 0.0713,
|
| 8 |
+
"flagged": 713,
|
| 9 |
+
"score_mean": 0.095502,
|
| 10 |
+
"score_p50": 0.007208,
|
| 11 |
+
"score_p90": 0.331408,
|
| 12 |
+
"score_p95": 0.657149,
|
| 13 |
+
"score_p99": 0.9478,
|
| 14 |
+
"score_max": 0.998492
|
| 15 |
+
},
|
| 16 |
+
"by_source": {
|
| 17 |
+
"hf_benign_code:codeparrot/codeparrot-clean-train:default:train": {
|
| 18 |
+
"n": 10000,
|
| 19 |
+
"threshold": 0.5,
|
| 20 |
+
"false_positive_rate": 0.0713,
|
| 21 |
+
"flagged": 713,
|
| 22 |
+
"score_mean": 0.095502,
|
| 23 |
+
"score_p50": 0.007208,
|
| 24 |
+
"score_p90": 0.331408,
|
| 25 |
+
"score_p95": 0.657149,
|
| 26 |
+
"score_p99": 0.9478,
|
| 27 |
+
"score_max": 0.998492
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"flagged_examples": [
|
| 31 |
+
{
|
| 32 |
+
"score": 0.6146,
|
| 33 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 34 |
+
"path": "video/hud.py",
|
| 35 |
+
"preview": "append( self.ladder_helper(q0, 0, 2.0) ) pts.append( self.ladder_helper(q0, 0.0, -2.0) ) pts.append( self.ladder_helper(q0, 1.5, -2.0) ) pts.append( self.ladder_helper(q0, 1.5, -1.0) ) pts.append( center ) pts.append( self.ladder_helper(q0,"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"score": 0.988829,
|
| 39 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 40 |
+
"path": "crwls.py",
|
| 41 |
+
"preview": "* 1000) crtwls.log( \"Fazendo undeploy da Aplicacao '%s'\" % self.name) progress = wlst.undeploy(self.name, block='true') wlst.activate() crtwls.edit(10 * 60 * 1000, 5 * 60 * 1000) crtwls.log(\"Fazendo deploy da Aplicacao '%s'\" % self.name) pr"
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"score": 0.995816,
|
| 45 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 46 |
+
"path": "crwls.py",
|
| 47 |
+
"preview": "ParallelConnectDelay(5) auth.setResultsTimeLimit(1000) auth.setAllUsersFilter('objectClass=user') auth.setPropagateCauseForLoginException(False) auth.setHost( 'sptbrdc04.petrobras.biz sptbrdc14.petrobras.biz sptbrdc08.petrobras.biz sptbrdc0"
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"score": 0.975665,
|
| 51 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 52 |
+
"path": "crwls.py",
|
| 53 |
+
"preview": "r) authenticator = classmethod(authenticator) def configure(cls): crtwls.connectToAdminServer() crtwls.edit() domainName = wlst.cmo.getName() crtwls.log(\"Configurando o Domain Log\") wlst.cmo.getLog().setFileMinSize(40000) wlst.cmo.getLog()."
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"score": 0.504215,
|
| 57 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 58 |
+
"path": "crwls.py",
|
| 59 |
+
"preview": "port) nmgr.getNodeManager().setDebugEnabled(True) crtwls.save() createMachine = classmethod(createMachine) def mailSession(cls): crtwls.connectToAdminServer() crtwls.edit() crtwls.log(\"Buscando o MailSession\") mailsession = wlst.cmo.lookupM"
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"score": 0.846977,
|
| 63 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 64 |
+
"path": "crwls.py",
|
| 65 |
+
"preview": "envSuffix = argv(4) adminAddress = argv(5) Domain.create(domainName, envSuffix, adminAddress) elif subcmd == 'configure': Domain.configure() elif subcmd == 'configure-authenticator': Domain.authenticator() elif subcmd == 'list-datasource': "
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"score": 0.914316,
|
| 69 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 70 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 71 |
+
"preview": "00ac, # NOT SIGN 0x00ab: 0x00bd, # VULGAR FRACTION ONE HALF 0x00ac: 0x00bc, # VULGAR FRACTION ONE QUARTER 0x00ad: 0x00be, # VULGAR FRACTION THREE QUARTERS 0x00ae: 0x00ab, # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 0x00af: 0x00bb, # RIGHT-P"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"score": 0.824451,
|
| 75 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 76 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 77 |
+
"preview": "E 0x00c8: 0x255a, # BOX DRAWINGS DOUBLE UP AND RIGHT 0x00c9: 0x2554, # BOX DRAWINGS DOUBLE DOWN AND RIGHT 0x00ca: 0x2569, # BOX DRAWINGS DOUBLE UP AND HORIZONTAL 0x00cb: 0x2566, # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL 0x00cc: 0x2560, # BO"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"score": 0.992852,
|
| 81 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 82 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 83 |
+
"preview": "-> CARRIAGE RETURN '\\x0e' # 0x000e -> SHIFT OUT '\\x0f' # 0x000f -> SHIFT IN '\\x10' # 0x0010 -> DATA LINK ESCAPE '\\x11' # 0x0011 -> DEVICE CONTROL ONE '\\x12' # 0x0012 -> DEVICE CONTROL TWO '\\x13' # 0x0013 -> DEVICE CONTROL THREE '\\x14' # 0x0"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"score": 0.734134,
|
| 87 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 88 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 89 |
+
"preview": "x005e -> CIRCUMFLEX ACCENT '_' # 0x005f -> LOW LINE '`' # 0x0060 -> GRAVE ACCENT 'a' # 0x0061 -> LATIN SMALL LETTER A 'b' # 0x0062 -> LATIN SMALL LETTER B 'c' # 0x0063 -> LATIN SMALL LETTER C 'd' # 0x0064 -> LATIN SMALL LETTER D 'e' # 0x006"
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"score": 0.689507,
|
| 93 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 94 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 95 |
+
"preview": "ART OF TEXT 0x0003: 0x0003, # END OF TEXT 0x0004: 0x0004, # END OF TRANSMISSION 0x0005: 0x0005, # ENQUIRY 0x0006: 0x0006, # ACKNOWLEDGE 0x0007: 0x0007, # BELL 0x0008: 0x0008, # BACKSPACE 0x0009: 0x0009, # HORIZONTAL TABULATION 0x000a: 0x000"
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"score": 0.97725,
|
| 99 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 100 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 101 |
+
"preview": "STOP 0x002f: 0x002f, # SOLIDUS 0x0030: 0x0030, # DIGIT ZERO 0x0031: 0x0031, # DIGIT ONE 0x0032: 0x0032, # DIGIT TWO 0x0033: 0x0033, # DIGIT THREE 0x0034: 0x0034, # DIGIT FOUR 0x0035: 0x0035, # DIGIT FIVE 0x0036: 0x0036, # DIGIT SIX 0x0037: "
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"score": 0.957955,
|
| 105 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 106 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 107 |
+
"preview": "0x0057: 0x0057, # LATIN CAPITAL LETTER W 0x0058: 0x0058, # LATIN CAPITAL LETTER X 0x0059: 0x0059, # LATIN CAPITAL LETTER Y 0x005a: 0x005a, # LATIN CAPITAL LETTER Z 0x005b: 0x005b, # LEFT SQUARE BRACKET 0x005c: 0x005c, # REVERSE SOLIDUS 0x00"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"score": 0.976132,
|
| 111 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 112 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 113 |
+
"preview": "7d: 0x007d, # RIGHT CURLY BRACKET 0x007e: 0x007e, # TILDE 0x007f: 0x007f, # DELETE 0x00a0: 0x00ff, # NO-BREAK SPACE 0x00a2: 0x009b, # CENT SIGN 0x00a3: 0x009c, # POUND SIGN 0x00a4: 0x0098, # CURRENCY SIGN 0x00a6: 0x00a0, # BROKEN BAR 0x00a7"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"score": 0.652318,
|
| 117 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 118 |
+
"path": "kbe/src/lib/python/Lib/encodings/cp863.py",
|
| 119 |
+
"preview": "S DOUBLE DOWN AND LEFT 0x2558: 0x00d4, # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE 0x2559: 0x00d3, # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE 0x255a: 0x00c8, # BOX DRAWINGS DOUBLE UP AND RIGHT 0x255b: 0x00be, # BOX DRAWINGS UP SINGLE AND LEFT "
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"score": 0.759528,
|
| 123 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 124 |
+
"path": "lib/youtube_dl/extractor/baidu (VJ Washington's conflicted copy 2017-08-29).py",
|
| 125 |
+
"preview": "# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unescapeHTML class BaiduVideoIE(InfoExtractor): IE_DESC = '百度视频' _VALID_URL = r'https?://v\\.baidu\\.com/(?P<type>[a-z]+)/"
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"score": 0.796715,
|
| 129 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 130 |
+
"path": "addons/account/wizard/account_move_line_reconcile_select.py",
|
| 131 |
+
"preview": "# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: y"
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"score": 0.846741,
|
| 135 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 136 |
+
"path": "engine/SCons/compat/__init__.py",
|
| 137 |
+
"preview": "# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files ("
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"score": 0.56719,
|
| 141 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 142 |
+
"path": "test/IECore/Shader.py",
|
| 143 |
+
"preview": "########################################################################## # # Copyright (c) 2007-2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"score": 0.818233,
|
| 147 |
+
"source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train",
|
| 148 |
+
"path": "allauth/socialaccount/providers/orcid/provider.py",
|
| 149 |
+
"preview": "from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): USERINFO_PROFILE = \"/authenticate\" class OrcidAccount(ProviderAccount): def get"
|
| 150 |
+
}
|
| 151 |
+
]
|
| 152 |
+
}
|
benign_code_lora_clean_eval.json
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
|
| 3 |
+
"holdout": "data\\clf\\benign_code_holdout_lora_clean.jsonl",
|
| 4 |
+
"overall": {
|
| 5 |
+
"n": 10000,
|
| 6 |
+
"threshold": 0.5,
|
| 7 |
+
"false_positive_rate": 0.0097,
|
| 8 |
+
"flagged": 97,
|
| 9 |
+
"score_mean": 0.022216,
|
| 10 |
+
"score_p50": 0.000779,
|
| 11 |
+
"score_p90": 0.036148,
|
| 12 |
+
"score_p95": 0.103489,
|
| 13 |
+
"score_p99": 0.483205,
|
| 14 |
+
"score_max": 0.994358
|
| 15 |
+
},
|
| 16 |
+
"by_source": {
|
| 17 |
+
"local_project_code": {
|
| 18 |
+
"n": 160,
|
| 19 |
+
"threshold": 0.5,
|
| 20 |
+
"false_positive_rate": 0.0063,
|
| 21 |
+
"flagged": 1,
|
| 22 |
+
"score_mean": 0.027283,
|
| 23 |
+
"score_p50": 0.002633,
|
| 24 |
+
"score_p90": 0.034741,
|
| 25 |
+
"score_p95": 0.107271,
|
| 26 |
+
"score_p99": 0.437606,
|
| 27 |
+
"score_max": 0.955582
|
| 28 |
+
},
|
| 29 |
+
"local_repo_hs": {
|
| 30 |
+
"n": 14,
|
| 31 |
+
"threshold": 0.5,
|
| 32 |
+
"false_positive_rate": 0.1429,
|
| 33 |
+
"flagged": 2,
|
| 34 |
+
"score_mean": 0.234466,
|
| 35 |
+
"score_p50": 0.173636,
|
| 36 |
+
"score_p90": 0.50088,
|
| 37 |
+
"score_p95": 0.601973,
|
| 38 |
+
"score_p99": 0.732286,
|
| 39 |
+
"score_max": 0.764864
|
| 40 |
+
},
|
| 41 |
+
"local_repo_isre": {
|
| 42 |
+
"n": 173,
|
| 43 |
+
"threshold": 0.5,
|
| 44 |
+
"false_positive_rate": 0.0,
|
| 45 |
+
"flagged": 0,
|
| 46 |
+
"score_mean": 0.015629,
|
| 47 |
+
"score_p50": 0.000923,
|
| 48 |
+
"score_p90": 0.065123,
|
| 49 |
+
"score_p95": 0.111808,
|
| 50 |
+
"score_p99": 0.148813,
|
| 51 |
+
"score_max": 0.175909
|
| 52 |
+
},
|
| 53 |
+
"local_repo_job_application_pipeline": {
|
| 54 |
+
"n": 444,
|
| 55 |
+
"threshold": 0.5,
|
| 56 |
+
"false_positive_rate": 0.0023,
|
| 57 |
+
"flagged": 1,
|
| 58 |
+
"score_mean": 0.016508,
|
| 59 |
+
"score_p50": 0.001555,
|
| 60 |
+
"score_p90": 0.038672,
|
| 61 |
+
"score_p95": 0.117372,
|
| 62 |
+
"score_p99": 0.200662,
|
| 63 |
+
"score_max": 0.691934
|
| 64 |
+
},
|
| 65 |
+
"local_repo_llama_cpp": {
|
| 66 |
+
"n": 833,
|
| 67 |
+
"threshold": 0.5,
|
| 68 |
+
"false_positive_rate": 0.0228,
|
| 69 |
+
"flagged": 19,
|
| 70 |
+
"score_mean": 0.046812,
|
| 71 |
+
"score_p50": 0.004319,
|
| 72 |
+
"score_p90": 0.11022,
|
| 73 |
+
"score_p95": 0.229066,
|
| 74 |
+
"score_p99": 0.614219,
|
| 75 |
+
"score_max": 0.991824
|
| 76 |
+
},
|
| 77 |
+
"local_repo_math": {
|
| 78 |
+
"n": 6,
|
| 79 |
+
"threshold": 0.5,
|
| 80 |
+
"false_positive_rate": 0.0,
|
| 81 |
+
"flagged": 0,
|
| 82 |
+
"score_mean": 0.00212,
|
| 83 |
+
"score_p50": 0.001785,
|
| 84 |
+
"score_p90": 0.004231,
|
| 85 |
+
"score_p95": 0.004744,
|
| 86 |
+
"score_p99": 0.005155,
|
| 87 |
+
"score_max": 0.005257
|
| 88 |
+
},
|
| 89 |
+
"local_repo_olympiad_math": {
|
| 90 |
+
"n": 53,
|
| 91 |
+
"threshold": 0.5,
|
| 92 |
+
"false_positive_rate": 0.0189,
|
| 93 |
+
"flagged": 1,
|
| 94 |
+
"score_mean": 0.032375,
|
| 95 |
+
"score_p50": 0.001522,
|
| 96 |
+
"score_p90": 0.075568,
|
| 97 |
+
"score_p95": 0.202259,
|
| 98 |
+
"score_p99": 0.444325,
|
| 99 |
+
"score_max": 0.561933
|
| 100 |
+
},
|
| 101 |
+
"local_repo_pipeline": {
|
| 102 |
+
"n": 136,
|
| 103 |
+
"threshold": 0.5,
|
| 104 |
+
"false_positive_rate": 0.0074,
|
| 105 |
+
"flagged": 1,
|
| 106 |
+
"score_mean": 0.021312,
|
| 107 |
+
"score_p50": 0.001563,
|
| 108 |
+
"score_p90": 0.037614,
|
| 109 |
+
"score_p95": 0.080462,
|
| 110 |
+
"score_p99": 0.369778,
|
| 111 |
+
"score_max": 0.888886
|
| 112 |
+
},
|
| 113 |
+
"local_repo_repo": {
|
| 114 |
+
"n": 13,
|
| 115 |
+
"threshold": 0.5,
|
| 116 |
+
"false_positive_rate": 0.0,
|
| 117 |
+
"flagged": 0,
|
| 118 |
+
"score_mean": 0.049554,
|
| 119 |
+
"score_p50": 0.003904,
|
| 120 |
+
"score_p90": 0.15528,
|
| 121 |
+
"score_p95": 0.195039,
|
| 122 |
+
"score_p99": 0.231913,
|
| 123 |
+
"score_max": 0.241131
|
| 124 |
+
},
|
| 125 |
+
"local_repo_utils": {
|
| 126 |
+
"n": 114,
|
| 127 |
+
"threshold": 0.5,
|
| 128 |
+
"false_positive_rate": 0.0088,
|
| 129 |
+
"flagged": 1,
|
| 130 |
+
"score_mean": 0.017779,
|
| 131 |
+
"score_p50": 0.000741,
|
| 132 |
+
"score_p90": 0.021215,
|
| 133 |
+
"score_p95": 0.039684,
|
| 134 |
+
"score_p99": 0.316717,
|
| 135 |
+
"score_max": 0.970841
|
| 136 |
+
},
|
| 137 |
+
"local_repo_vesuvius": {
|
| 138 |
+
"n": 730,
|
| 139 |
+
"threshold": 0.5,
|
| 140 |
+
"false_positive_rate": 0.0548,
|
| 141 |
+
"flagged": 40,
|
| 142 |
+
"score_mean": 0.103365,
|
| 143 |
+
"score_p50": 0.018504,
|
| 144 |
+
"score_p90": 0.349818,
|
| 145 |
+
"score_p95": 0.531822,
|
| 146 |
+
"score_p99": 0.915992,
|
| 147 |
+
"score_max": 0.994358
|
| 148 |
+
},
|
| 149 |
+
"python_stdlib": {
|
| 150 |
+
"n": 7324,
|
| 151 |
+
"threshold": 0.5,
|
| 152 |
+
"false_positive_rate": 0.0042,
|
| 153 |
+
"flagged": 31,
|
| 154 |
+
"score_mean": 0.011296,
|
| 155 |
+
"score_p50": 0.000434,
|
| 156 |
+
"score_p90": 0.015448,
|
| 157 |
+
"score_p95": 0.039071,
|
| 158 |
+
"score_p99": 0.230201,
|
| 159 |
+
"score_max": 0.97892
|
| 160 |
+
}
|
| 161 |
+
},
|
| 162 |
+
"flagged_examples": [
|
| 163 |
+
{
|
| 164 |
+
"score": 0.955582,
|
| 165 |
+
"source": "local_project_code",
|
| 166 |
+
"path": "C:\\GitHub\\Safety DS\\scripts\\build_malware_code_pool.py",
|
| 167 |
+
"preview": "def download_vxunderground( spec: dict, builder: PoolBuilder, chunk_cfg: dict, insecure: bool ) -> None: repo = spec[\"repo\"] cache = ROOT / spec.get(\"cache_dir\", \"data/external/vxunderground\") cache.mkdir(parents=True, exist_ok=True) for su"
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"score": 0.586343,
|
| 171 |
+
"source": "local_repo_llama_cpp",
|
| 172 |
+
"path": "C:\\lora_training\\llama.cpp\\convert_hf_to_gguf.py",
|
| 173 |
+
"preview": "def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # SwigLU activation assert self.hparams[\"activation_function\"] == \"swiglu\" # ALiBi position embedding assert self.hparams[\"position_embedding_type\"] == \"alibi\" # Embeddi"
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"score": 0.863325,
|
| 177 |
+
"source": "local_repo_llama_cpp",
|
| 178 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 179 |
+
"preview": "_ARG_NO_KV_OFFLOAD\")); add_opt(common_arg( {\"-nr\", \"--no-repack\"}, \"disable weight repacking\", [](common_params & params) { params.no_extra_bufts = true; } ).set_env(\"LLAMA_ARG_NO_REPACK\")); add_opt(common_arg( {\"--no-host\"}, \"bypass host b"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"score": 0.991824,
|
| 183 |
+
"source": "local_repo_llama_cpp",
|
| 184 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 185 |
+
"preview": "nd_dev_t> devices; for (size_t i = 0; i < ggml_backend_dev_count(); ++i) { auto * dev = ggml_backend_dev_get(i); if (ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_CPU) { devices.push_back(dev); } } printf(\"Available devices:\\n\"); f"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"score": 0.60719,
|
| 189 |
+
"source": "local_repo_llama_cpp",
|
| 190 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 191 |
+
"preview": "n_ubatch = 1024; params.n_batch = 1024; params.n_ctx = 0; params.n_cache_reuse = 256; } ).set_examples({LLAMA_EXAMPLE_SERVER})); add_opt(common_arg( {\"--fim-qwen-7b-spec\"}, string_format(\"use Qwen 2.5 Coder 7B + 0.5B draft for speculative d"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"score": 0.827293,
|
| 195 |
+
"source": "local_repo_llama_cpp",
|
| 196 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\arg.cpp",
|
| 197 |
+
"preview": "wen 3 Coder 30B A3B Instruct (note: can download weights from the internet)\"), [](common_params & params) { params.model.hf_repo = \"ggml-org/Qwen3-Coder-30B-A3B-Instruct-Q8_0-GGUF\"; params.model.hf_file = \"qwen3-coder-30b-a3b-instruct-q8_0."
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"score": 0.534571,
|
| 201 |
+
"source": "local_repo_llama_cpp",
|
| 202 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\base64.hpp",
|
| 203 |
+
"preview": "; return 62; } else if (c == '_') { alphabet = alphabet::url_filename_safe; return 63; } } throw base64_error(\"invalid base64 character.\"); } }; #endif // !PUBLIC_DOMAIN_BASE64_HPP_"
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"score": 0.551723,
|
| 207 |
+
"source": "local_repo_llama_cpp",
|
| 208 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat-parser.cpp",
|
| 209 |
+
"preview": "n_regex preamble_regex(\"<\\\\|channel\\\\|>commentary\"); static const common_regex tool_call1_regex(recipient + \"<\\\\|channel\\\\|>(analysis|commentary)\" + constraint + \"?\"); static const common_regex tool_call2_regex(\"<\\\\|channel\\\\|>(analysis|com"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"score": 0.536037,
|
| 213 |
+
"source": "local_repo_llama_cpp",
|
| 214 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat-parser.cpp",
|
| 215 |
+
"preview": "case COMMON_CHAT_FORMAT_DEEPSEEK_R1: common_chat_parse_deepseek_r1(builder); break; case COMMON_CHAT_FORMAT_DEEPSEEK_V3_1: common_chat_parse_deepseek_v3_1(builder); break; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: common_chat_parse_function"
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"score": 0.616117,
|
| 219 |
+
"source": "local_repo_llama_cpp",
|
| 220 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat-parser.cpp",
|
| 221 |
+
"preview": "common_chat_parse_kimi_k2(builder); break; case COMMON_CHAT_FORMAT_QWEN3_CODER_XML: common_chat_parse_qwen3_coder_xml(builder); break; case COMMON_CHAT_FORMAT_APRIEL_1_5: common_chat_parse_apriel_1_5(builder); break; case COMMON_CHAT_FORMAT"
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"score": 0.609806,
|
| 225 |
+
"source": "local_repo_llama_cpp",
|
| 226 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat.cpp",
|
| 227 |
+
"preview": "msg_new.tool_calls.size() < msg_prv.tool_calls.size()) { throw std::runtime_error(\"Invalid diff: now finding less tool calls!\"); } if (!msg_prv.tool_calls.empty()) { const auto idx = msg_prv.tool_calls.size() - 1; const auto & pref = msg_pr"
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"score": 0.876555,
|
| 231 |
+
"source": "local_repo_llama_cpp",
|
| 232 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat.cpp",
|
| 233 |
+
"preview": "y v3.1 Llama 3.1\"; case COMMON_CHAT_FORMAT_DEEPSEEK_V3_1: return \"DeepSeek V3.1\"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return \"Hermes 2 Pro\"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return \"Command R7B\"; case COMMON_CHAT_FORMAT_GRANITE: retur"
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"score": 0.610185,
|
| 237 |
+
"source": "local_repo_llama_cpp",
|
| 238 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\chat.h",
|
| 239 |
+
"preview": "OMMON_CHAT_FORMAT_GRANITE, COMMON_CHAT_FORMAT_GPT_OSS, COMMON_CHAT_FORMAT_SEED_OSS, COMMON_CHAT_FORMAT_NEMOTRON_V2, COMMON_CHAT_FORMAT_APERTUS, COMMON_CHAT_FORMAT_LFM2_WITH_JSON_TOOLS, COMMON_CHAT_FORMAT_GLM_4_5, COMMON_CHAT_FORMAT_MINIMAX_"
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"score": 0.864733,
|
| 243 |
+
"source": "local_repo_llama_cpp",
|
| 244 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\common.cpp",
|
| 245 |
+
"preview": "d-%H_%M_%S\", std::localtime(&as_time_t)); const int64_t ns = std::chrono::duration_cast<std::chrono::nanoseconds>( current_time.time_since_epoch() % 1000000000).count(); char timestamp_ns[11]; snprintf(timestamp_ns, 11, \"%09\" PRId64, ns); r"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"score": 0.972733,
|
| 249 |
+
"source": "local_repo_llama_cpp",
|
| 250 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\common.cpp",
|
| 251 |
+
"preview": "ARATOR; } return p; }; if (getenv(\"LLAMA_CACHE\")) { cache_directory = std::getenv(\"LLAMA_CACHE\"); } else { #if defined(__linux__) || defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__) if (std::getenv(\"XDG_CACHE_HOME\")) { cache_di"
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"score": 0.526275,
|
| 255 |
+
"source": "local_repo_llama_cpp",
|
| 256 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\common.cpp",
|
| 257 |
+
"preview": "mmon_params_sampling_config::COMMON_PARAMS_SAMPLING_CONFIG_MIN_P); get_float(llama_model_meta_key_str(LLAMA_MODEL_META_KEY_SAMPLING_XTC_PROBABILITY), sparams.xtc_probability, common_params_sampling_config::COMMON_PARAMS_SAMPLING_CONFIG_XTC_"
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"score": 0.539756,
|
| 261 |
+
"source": "local_repo_llama_cpp",
|
| 262 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\download.cpp",
|
| 263 |
+
"preview": "l_successful = common_pull_file(cli, parts.path, path_temporary, supports_ranges, existing_size, total_size); if (!was_pull_successful) { if (i + 1 < max_attempts) { const int exponential_backoff_delay = std::pow(retry_delay_seconds, i) * 1"
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"score": 0.530205,
|
| 267 |
+
"source": "local_repo_llama_cpp",
|
| 268 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\download.cpp",
|
| 269 |
+
"preview": "size_t len) { buf.insert(buf.end(), data, data + len); return params.max_size == 0 || buf.size() <= static_cast<size_t>(params.max_size); }, nullptr ); if (!res) { throw std::runtime_error(\"error: cannot make GET request\"); } return { res->"
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"score": 0.882664,
|
| 273 |
+
"source": "local_repo_llama_cpp",
|
| 274 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\download.cpp",
|
| 275 |
+
"preview": "local_path, token, false)) { throw std::runtime_error(\"Failed to download Docker Model\"); } LOG_INF(\"%s: Downloaded Docker Model to: %s\\n\", __func__, local_path.c_str()); return local_path; } catch (const std::exception & e) { LOG_ERR(\"%s: "
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"score": 0.765199,
|
| 279 |
+
"source": "local_repo_llama_cpp",
|
| 280 |
+
"path": "C:\\lora_training\\llama.cpp\\common\\json-partial.cpp",
|
| 281 |
+
"preview": "last_non_sp_char == 'E' || last_non_sp_char == '-'; }; std::string closing; for (size_t i = err_loc.stack.size(); i > 0; i--) { auto & el = err_loc.stack[i - 1]; if (el.type == COMMON_JSON_STACK_ELEMENT_OBJECT) { closing += \"}\"; } else if ("
|
| 282 |
+
}
|
| 283 |
+
]
|
| 284 |
+
}
|
benign_code_mathtrain_reasoner_eval.json
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
|
| 3 |
+
"holdout": "data\\clf\\benign_code_holdout_mathtrain_reasoner_clean.jsonl",
|
| 4 |
+
"overall": {
|
| 5 |
+
"n": 12000,
|
| 6 |
+
"threshold": 0.5,
|
| 7 |
+
"false_positive_rate": 0.01,
|
| 8 |
+
"flagged": 120,
|
| 9 |
+
"score_mean": 0.021423,
|
| 10 |
+
"score_p50": 0.000676,
|
| 11 |
+
"score_p90": 0.032512,
|
| 12 |
+
"score_p95": 0.097846,
|
| 13 |
+
"score_p99": 0.497524,
|
| 14 |
+
"score_max": 0.994358
|
| 15 |
+
},
|
| 16 |
+
"by_source": {
|
| 17 |
+
"local_project_code": {
|
| 18 |
+
"n": 165,
|
| 19 |
+
"threshold": 0.5,
|
| 20 |
+
"false_positive_rate": 0.0061,
|
| 21 |
+
"flagged": 1,
|
| 22 |
+
"score_mean": 0.026509,
|
| 23 |
+
"score_p50": 0.002527,
|
| 24 |
+
"score_p90": 0.034257,
|
| 25 |
+
"score_p95": 0.099218,
|
| 26 |
+
"score_p99": 0.43596,
|
| 27 |
+
"score_max": 0.955582
|
| 28 |
+
},
|
| 29 |
+
"local_repo_hs": {
|
| 30 |
+
"n": 14,
|
| 31 |
+
"threshold": 0.5,
|
| 32 |
+
"false_positive_rate": 0.1429,
|
| 33 |
+
"flagged": 2,
|
| 34 |
+
"score_mean": 0.234466,
|
| 35 |
+
"score_p50": 0.173636,
|
| 36 |
+
"score_p90": 0.50088,
|
| 37 |
+
"score_p95": 0.601973,
|
| 38 |
+
"score_p99": 0.732286,
|
| 39 |
+
"score_max": 0.764864
|
| 40 |
+
},
|
| 41 |
+
"local_repo_isre": {
|
| 42 |
+
"n": 173,
|
| 43 |
+
"threshold": 0.5,
|
| 44 |
+
"false_positive_rate": 0.0,
|
| 45 |
+
"flagged": 0,
|
| 46 |
+
"score_mean": 0.015629,
|
| 47 |
+
"score_p50": 0.000923,
|
| 48 |
+
"score_p90": 0.065123,
|
| 49 |
+
"score_p95": 0.111808,
|
| 50 |
+
"score_p99": 0.148813,
|
| 51 |
+
"score_max": 0.175909
|
| 52 |
+
},
|
| 53 |
+
"local_repo_job_application_pipeline": {
|
| 54 |
+
"n": 444,
|
| 55 |
+
"threshold": 0.5,
|
| 56 |
+
"false_positive_rate": 0.0023,
|
| 57 |
+
"flagged": 1,
|
| 58 |
+
"score_mean": 0.016508,
|
| 59 |
+
"score_p50": 0.001555,
|
| 60 |
+
"score_p90": 0.038672,
|
| 61 |
+
"score_p95": 0.117372,
|
| 62 |
+
"score_p99": 0.200662,
|
| 63 |
+
"score_max": 0.691934
|
| 64 |
+
},
|
| 65 |
+
"local_repo_math_train": {
|
| 66 |
+
"n": 562,
|
| 67 |
+
"threshold": 0.5,
|
| 68 |
+
"false_positive_rate": 0.0569,
|
| 69 |
+
"flagged": 32,
|
| 70 |
+
"score_mean": 0.070331,
|
| 71 |
+
"score_p50": 0.002097,
|
| 72 |
+
"score_p90": 0.163531,
|
| 73 |
+
"score_p95": 0.558199,
|
| 74 |
+
"score_p99": 0.93781,
|
| 75 |
+
"score_max": 0.990801
|
| 76 |
+
},
|
| 77 |
+
"local_repo_math_train2": {
|
| 78 |
+
"n": 68,
|
| 79 |
+
"threshold": 0.5,
|
| 80 |
+
"false_positive_rate": 0.0,
|
| 81 |
+
"flagged": 0,
|
| 82 |
+
"score_mean": 0.015792,
|
| 83 |
+
"score_p50": 0.00076,
|
| 84 |
+
"score_p90": 0.047232,
|
| 85 |
+
"score_p95": 0.135641,
|
| 86 |
+
"score_p99": 0.156291,
|
| 87 |
+
"score_max": 0.166963
|
| 88 |
+
},
|
| 89 |
+
"local_repo_olympiad_math": {
|
| 90 |
+
"n": 55,
|
| 91 |
+
"threshold": 0.5,
|
| 92 |
+
"false_positive_rate": 0.0182,
|
| 93 |
+
"flagged": 1,
|
| 94 |
+
"score_mean": 0.031321,
|
| 95 |
+
"score_p50": 0.001742,
|
| 96 |
+
"score_p90": 0.071487,
|
| 97 |
+
"score_p95": 0.192837,
|
| 98 |
+
"score_p99": 0.439802,
|
| 99 |
+
"score_max": 0.561933
|
| 100 |
+
},
|
| 101 |
+
"local_repo_vesuvius": {
|
| 102 |
+
"n": 730,
|
| 103 |
+
"threshold": 0.5,
|
| 104 |
+
"false_positive_rate": 0.0548,
|
| 105 |
+
"flagged": 40,
|
| 106 |
+
"score_mean": 0.103365,
|
| 107 |
+
"score_p50": 0.018504,
|
| 108 |
+
"score_p90": 0.349818,
|
| 109 |
+
"score_p95": 0.531822,
|
| 110 |
+
"score_p99": 0.915992,
|
| 111 |
+
"score_max": 0.994358
|
| 112 |
+
},
|
| 113 |
+
"python_stdlib": {
|
| 114 |
+
"n": 9789,
|
| 115 |
+
"threshold": 0.5,
|
| 116 |
+
"false_positive_rate": 0.0044,
|
| 117 |
+
"flagged": 43,
|
| 118 |
+
"score_mean": 0.012423,
|
| 119 |
+
"score_p50": 0.000479,
|
| 120 |
+
"score_p90": 0.017982,
|
| 121 |
+
"score_p95": 0.048102,
|
| 122 |
+
"score_p99": 0.254804,
|
| 123 |
+
"score_max": 0.97892
|
| 124 |
+
}
|
| 125 |
+
},
|
| 126 |
+
"flagged_examples": [
|
| 127 |
+
{
|
| 128 |
+
"score": 0.955582,
|
| 129 |
+
"source": "local_project_code",
|
| 130 |
+
"path": "C:\\GitHub\\Safety DS\\scripts\\build_malware_code_pool.py",
|
| 131 |
+
"preview": "def download_vxunderground( spec: dict, builder: PoolBuilder, chunk_cfg: dict, insecure: bool ) -> None: repo = spec[\"repo\"] cache = ROOT / spec.get(\"cache_dir\", \"data/external/vxunderground\") cache.mkdir(parents=True, exist_ok=True) for su"
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"score": 0.77251,
|
| 135 |
+
"source": "local_repo_math_train",
|
| 136 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\auto_pipeline.ps1",
|
| 137 |
+
"preview": "$stateFile = 'C:\\lora_training\\eval_results\\pipeline_state2.txt' $qwenLog = 'C:\\lora_training\\eval_results\\eval_qwen_merged_full.log' $glmLog = 'C:\\lora_training\\eval_results\\eval_glm_both_6k.log' $glmErr = 'C:\\lora_training\\eval_results\\ev"
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"score": 0.705632,
|
| 141 |
+
"source": "local_repo_math_train",
|
| 142 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\check_adapter_structure.py",
|
| 143 |
+
"preview": "import sys if hasattr(sys.stdout, \"reconfigure\"): sys.stdout.reconfigure(encoding=\"utf-8\") from safetensors import safe_open from pathlib import Path import json adapter = Path(r\"C:\\lora_training\\lora_MATH_output\\qwen_run_20260408_123730\\fi"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"score": 0.590817,
|
| 147 |
+
"source": "local_repo_math_train",
|
| 148 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\check_lora_results.py",
|
| 149 |
+
"preview": "import json, os path = r\"C:\\lora_training\\eval_results\\all_adapters\" for fn in [\"eval_qwen3_instruct_lora.json\", \"eval_qwen3_instruct_lora_diverse.json\", \"eval_gemma3_instruct_lora.json\", \"eval_gemma3_instruct_lora_diverse.json\", \"eval_llam"
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"score": 0.599163,
|
| 153 |
+
"source": "local_repo_math_train",
|
| 154 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\check_qwen_log.ps1",
|
| 155 |
+
"preview": "$logfile = \"C:\\Users\\SOL08_~1\\AppData\\Local\\Temp\\claude\\C--Users-sol08-p04dk8b-MATH-TRAIN\\4a837286-97f6-4070-a5f2-37ba2c811443\\tasks\\b1yeq9q3i.output\" if (Test-Path $logfile) { $lines = Get-Content $logfile $total = $lines.Count Write-Outpu"
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"score": 0.935582,
|
| 159 |
+
"source": "local_repo_math_train",
|
| 160 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\check_sizes.ps1",
|
| 161 |
+
"preview": "$files = @( 'C:\\lora_training\\OLympiad\\_output\\good_solutions_deduped.jsonl', 'C:\\lora_training\\OLympiad\\_output\\broken_only_deduped.jsonl', 'C:\\lora_training\\OLympiad\\_output\\dpo_pairs.jsonl', 'C:\\lora_training\\OLympiad\\converted_for_sft.j"
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"score": 0.990801,
|
| 165 |
+
"source": "local_repo_math_train",
|
| 166 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\clean_github.ps1",
|
| 167 |
+
"preview": "Set-Location 'C:\\GitHub\\Olympiad_Math' $remove = @( 'scraping\\olympiad.py', 'scraping\\geometry_scraper.py', 'scraping\\filter_geometry_links.py', 'scraping\\download_geometry_drive.py', 'scraping\\scraper_aops.py', 'scraping\\olympiad_dataset1."
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"score": 0.736009,
|
| 171 |
+
"source": "local_repo_math_train",
|
| 172 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\download_llama3b_instruct.py",
|
| 173 |
+
"preview": "from huggingface_hub import snapshot_download import time print(\"Downloading Llama-3.2-3B-Instruct...\", flush=True) t0 = time.time() snapshot_download( repo_id=\"meta-llama/Llama-3.2-3B-Instruct\", local_dir=r\"C:\\models\\Llama-3.2-3B-Instruct\""
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"score": 0.880296,
|
| 177 |
+
"source": "local_repo_math_train",
|
| 178 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\eval_benchmark.py",
|
| 179 |
+
"preview": "def print_report(results, label): total = len(results) correct = sum(r[\"correct\"] for r in results) print(f\"\\n{'='*60}\") print(f\" {label}: {correct}/{total} = {correct/total*100:.1f}%\") print(f\"{'='*60}\") # По предметам by_subj = defaultdic"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"score": 0.509782,
|
| 183 |
+
"source": "local_repo_math_train",
|
| 184 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\eval_general_reasoning.py",
|
| 185 |
+
"preview": "def load_mmlu(n, seed): \"\"\"MMLU: cais/mmlu all — 200 вопросов из разных предметов.\"\"\" print(\"Loading MMLU...\") rng = random.Random(seed) # Пробуем 'all', иначе сэмплируем из нескольких предметов try: ds = load_dataset(\"cais/mmlu\", \"all\", sp"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"score": 0.74435,
|
| 189 |
+
"source": "local_repo_math_train",
|
| 190 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\eval_general_reasoning.py",
|
| 191 |
+
"preview": "def load_arc(n, seed): \"\"\"ARC-Challenge — 200 вопросов.\"\"\" print(\"Loading ARC-Challenge...\") rng = random.Random(seed) ds = load_dataset(\"allenai/ai2_arc\", \"ARC-Challenge\", split=\"test\", trust_remote_code=True) pool = [] for x in ds: labels"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"score": 0.946294,
|
| 195 |
+
"source": "local_repo_math_train",
|
| 196 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\eval_general_reasoning.py",
|
| 197 |
+
"preview": "def load_hellaswag(n, seed): \"\"\"HellaSwag — 200 примеров.\"\"\" print(\"Loading HellaSwag...\") rng = random.Random(seed) ds = load_dataset(\"Rowan/hellaswag\", split=\"validation\", trust_remote_code=True) pool = [] for x in ds: endings = x[\"ending"
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"score": 0.569382,
|
| 201 |
+
"source": "local_repo_math_train",
|
| 202 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\inspect_lora.py",
|
| 203 |
+
"preview": "import sys if hasattr(sys.stdout, \"reconfigure\"): sys.stdout.reconfigure(encoding=\"utf-8\") from safetensors import safe_open import json from pathlib import Path adapter_path = r\"C:\\lora_training\\lora_MATH_output\\qwen_run_20260408_123730\\fi"
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"score": 0.956672,
|
| 207 |
+
"source": "local_repo_math_train",
|
| 208 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\list_files.ps1",
|
| 209 |
+
"preview": "Get-ChildItem 'C:\\lora_training\\OLympiad' -Filter '*.jsonl' | Sort-Object Length -Descending | ForEach-Object { $mb = [math]::Round($_.Length / 1MB, 1) Write-Output \"$mb MB $($_.Name)\" }"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"score": 0.826007,
|
| 213 |
+
"source": "local_repo_math_train",
|
| 214 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\peek_local_bench.ps1",
|
| 215 |
+
"preview": "$files = @( 'C:\\lora_training\\OLympiad\\olympiad\\olympiad_final_MATH.jsonl', 'C:\\lora_training\\OLympiad\\_raw\\aops_dataset.jsonl', 'C:\\lora_training\\OLympiad\\_raw\\math_dataset.jsonl' ) foreach ($f in $files) { if (Test-Path $f) { Write-Output"
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"score": 0.84162,
|
| 219 |
+
"source": "local_repo_math_train",
|
| 220 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\peek_scripts.ps1",
|
| 221 |
+
"preview": "$scripts = @( 'generate_cot_dataset.py', 'Complete_cot.py', 'janitor44.py', 'triage_flagged.py', 'merge_dataset.py' ) foreach ($s in $scripts) { $path = \"C:\\lora_training\\OLympiad\\$s\" if (Test-Path $path) { Write-Output \"=== $s ===\" Get-Con"
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"score": 0.813426,
|
| 225 |
+
"source": "local_repo_math_train",
|
| 226 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\run_lora_3k_v2.ps1",
|
| 227 |
+
"preview": "$ErrorActionPreference = \"Stop\" $ScriptDir = \"C:\\Users\\sol08_p04dk8b\\MATH TRAIN\" cd $ScriptDir Write-Host \"=== run 1/3: Qwen3-4B lora_3k_v2 ===\" -ForegroundColor Cyan python train_qwen3_4b_instruct_lora_3k_v2.py 2>&1 | Tee-Object qwen3_3k_v"
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"score": 0.7723,
|
| 231 |
+
"source": "local_repo_math_train",
|
| 232 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\setup_github_project.py",
|
| 233 |
+
"preview": "| SFT (good solutions) | ~22,990 | ChatML `{\"text\": ...}` | | Broken / incomplete | ~6,518 | same | | DPO pairs | ~4,393 | `{\"problem\", \"chosen\", \"rejected\"}` | Data files are **not included** in this repo (too large). Sources: AoPS, IMO Sh"
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"score": 0.976724,
|
| 237 |
+
"source": "local_repo_math_train",
|
| 238 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\show_github.ps1",
|
| 239 |
+
"preview": "Write-Output \"=== C:\\GitHub\\Olympiad_Math ===\" Write-Output \"\" Write-Output \"--- Root files ---\" Get-ChildItem 'C:\\GitHub\\Olympiad_Math' -File | ForEach-Object { $mb = [math]::Round($_.Length / 1MB, 2) Write-Output \" $($_.Name) ($mb MB)\" } "
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"score": 0.982568,
|
| 243 |
+
"source": "local_repo_math_train",
|
| 244 |
+
"path": "C:\\Users\\sol08_p04dk8b\\MATH TRAIN\\show_structure.ps1",
|
| 245 |
+
"preview": "Write-Output \"=== Files in root ===\" Get-ChildItem 'C:\\lora_training\\OLympiad' -File | ForEach-Object { Write-Output $_.Name } Write-Output \"\" Write-Output \"=== Subfolders ===\" Get-ChildItem 'C:\\lora_training\\OLympiad' -Directory | ForEach-"
|
| 246 |
+
}
|
| 247 |
+
]
|
| 248 |
+
}
|
clf_binary.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b66da8692d3edca73c84d7b3b7aaa6e074509ae95b5ebfae26cf2413881a5932
|
| 3 |
+
size 9055
|
clf_multilabel.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c3664b454f193e137e7adb9b89eebcae399c7e68f391ad67b8d60de73b1b0c8
|
| 3 |
+
size 103524
|
labels.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"categories": [
|
| 3 |
+
"malware_types",
|
| 4 |
+
"exploit_development",
|
| 5 |
+
"obfuscation_evasion",
|
| 6 |
+
"command_control",
|
| 7 |
+
"injection_lateral",
|
| 8 |
+
"credential_exfil",
|
| 9 |
+
"ransomware_crypto",
|
| 10 |
+
"reverse_engineering_offense",
|
| 11 |
+
"phishing_social_engineering_code",
|
| 12 |
+
"botnet_spam_ddos",
|
| 13 |
+
"rootkit_kernel",
|
| 14 |
+
"packers_loaders"
|
| 15 |
+
]
|
| 16 |
+
}
|
metrics.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"embedder": "BAAI/bge-m3",
|
| 3 |
+
"device": "cuda",
|
| 4 |
+
"embedding_dim": 1024,
|
| 5 |
+
"max_length": 128,
|
| 6 |
+
"clf_dir": "data\\clf\\v6_code_aware_50k_oss_clean_benign_code",
|
| 7 |
+
"counts": {
|
| 8 |
+
"train": 222950,
|
| 9 |
+
"test": 27736,
|
| 10 |
+
"obfuscated_test": 4000,
|
| 11 |
+
"malware_code_test": 2000
|
| 12 |
+
},
|
| 13 |
+
"binary": {
|
| 14 |
+
"precision": 0.9996,
|
| 15 |
+
"recall": 0.9964,
|
| 16 |
+
"f1": 0.998,
|
| 17 |
+
"roc_auc": 0.9997,
|
| 18 |
+
"false_positive_rate": 0.004,
|
| 19 |
+
"obfuscated_recall": 0.9935,
|
| 20 |
+
"obfuscated_count": 4000,
|
| 21 |
+
"malware_code_recall": 0.989,
|
| 22 |
+
"malware_code_count": 2000
|
| 23 |
+
},
|
| 24 |
+
"multilabel": {
|
| 25 |
+
"micro_f1": 0.6146,
|
| 26 |
+
"macro_f1": 0.514,
|
| 27 |
+
"macro_f1_positives_only": 0.5141,
|
| 28 |
+
"obfuscated_macro_f1": 0.3011,
|
| 29 |
+
"malware_code_macro_f1": 0.1235
|
| 30 |
+
}
|
| 31 |
+
}
|