Datasets:
Add research card
Browse files
README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: per-source
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
- code
|
| 7 |
+
task_categories:
|
| 8 |
+
- sentence-similarity
|
| 9 |
+
- text-retrieval
|
| 10 |
+
tags:
|
| 11 |
+
- code-search
|
| 12 |
+
- code-embeddings
|
| 13 |
+
- hard-negatives
|
| 14 |
+
- negative-result
|
| 15 |
+
size_categories:
|
| 16 |
+
- 100K<n<1M
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# code-embed-v3-data
|
| 20 |
+
|
| 21 |
+
Replay training data for the paper *Does Execution-Verified Near-Miss Training Teach Code Embeddings to Prefer Working Code? A Negative Result* (preprint on Zenodo; DOI added on publication). Code, configs and the full research log: https://github.com/divakantpandey/code-embed-v3
|
| 22 |
+
|
| 23 |
+
These are the replay rows that both the near-miss pilot ([code-embed-v3-150m-ft-behaviour](https://huggingface.co/divakantpandey/code-embed-v3-150m-ft-behaviour)) and the replay-only control ([code-embed-v3-150m-ft-control](https://huggingface.co/divakantpandey/code-embed-v3-150m-ft-control)) trained on. The near-miss data is in [code-embed-v3-synth](https://huggingface.co/datasets/divakantpandey/code-embed-v3-synth).
|
| 24 |
+
|
| 25 |
+
## Contents
|
| 26 |
+
|
| 27 |
+
| Folder | Columns | What it is |
|
| 28 |
+
|---|---|---|
|
| 29 |
+
| `mix_v1/` | `anchor`, `positive` | Audited pairs, up to 30,000 rows per source (`--max-rows 30000`), plus `dev/` held-out rows |
|
| 30 |
+
| `mix_v1_gte_mined/` | `anchor`, `positive`, `negative_1`..`negative_4` | The same pairs with four hard negatives mined by [gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base), capped at 25,000 rows per source |
|
| 31 |
+
|
| 32 |
+
Each source is a `datasets` folder saved with `save_to_disk` (Arrow). `manifest.json` lists rows, license and upstream per source; `contamination_report.json` lists every removed row.
|
| 33 |
+
|
| 34 |
+
| Source | Upstream | License | `mix_v1` rows | `mix_v1_gte_mined` rows |
|
| 35 |
+
|---|---|---|---|---|
|
| 36 |
+
| cornstack_python | nomic-ai/cornstack-python-v1 | Apache-2.0 | 29,470 | 21,468 |
|
| 37 |
+
| cornstack_java | nomic-ai/cornstack-java-v1 | Apache-2.0 | 29,489 | 20,246 |
|
| 38 |
+
| cornstack_javascript | nomic-ai/cornstack-javascript-v1 | Apache-2.0 | 29,287 | 19,643 |
|
| 39 |
+
| cornstack_go | nomic-ai/cornstack-go-v1 | Apache-2.0 | 29,460 | 23,966 |
|
| 40 |
+
| cornstack_php | nomic-ai/cornstack-php-v1 | Apache-2.0 | 29,420 | 18,831 |
|
| 41 |
+
| cornstack_ruby | nomic-ai/cornstack-ruby-v1 | Apache-2.0 | 28,580 | 21,315 |
|
| 42 |
+
| cornstack_python_c2t | nomic-ai/cornstack-python-v1 (code to text) | Apache-2.0 | 29,470 | 21,551 |
|
| 43 |
+
| cornstack_java_c2t | nomic-ai/cornstack-java-v1 (code to text) | Apache-2.0 | 29,489 | 18,467 |
|
| 44 |
+
| cornstack_javascript_c2t | nomic-ai/cornstack-javascript-v1 (code to text) | Apache-2.0 | 29,287 | 19,454 |
|
| 45 |
+
| code_contests_xlang | deepmind/code_contests | CC BY 4.0 | 28,966 | 649 |
|
| 46 |
+
| swe_smith | SWE-bench/SWE-smith | MIT | 29,500 | 23,272 |
|
| 47 |
+
| spider | xlangai/spider | CC BY-SA 4.0 | 6,479 | 6,463 |
|
| 48 |
+
|
| 49 |
+
The pilot and control trained on `mix_v1_gte_mined` minus rows that share an anchor with a dev row: 213,648 replay rows in total.
|
| 50 |
+
|
| 51 |
+
## Decontamination
|
| 52 |
+
|
| 53 |
+
Every row (anchor, positive and each negative) was checked with exact and MinHash-LSH matching (5-gram, threshold 0.8) against all MTEB(Code, v1), CoIR and CoREB(v1) tasks, ExecRetrieval and the seven CoQuIR subsets. Matches were removed.
|
| 54 |
+
|
| 55 |
+
## Loading
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
from huggingface_hub import snapshot_download
|
| 59 |
+
from datasets import load_from_disk
|
| 60 |
+
|
| 61 |
+
path = snapshot_download("divakantpandey/code-embed-v3-data", repo_type="dataset",
|
| 62 |
+
allow_patterns=["mix_v1_gte_mined/cornstack_python/*"])
|
| 63 |
+
ds = load_from_disk(f"{path}/mix_v1_gte_mined/cornstack_python")
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## License
|
| 67 |
+
|
| 68 |
+
Each source keeps its upstream license (table above). The Spider rows are CC BY-SA 4.0 and must stay under that license when redistributed.
|