Research artefact for the paper Does Execution-Verified Near-Miss Training Teach Code Embeddings to Prefer Working Code? A Negative Result (preprint, doi:10.5281/zenodo.24402953). This is the replay-only control: GTE-ModernBERT-base fine-tuned with the same recipe on the pilot's replay rows, without the near-miss data.
This is not a better code embedder than its base. It is released so the paper's comparison can be reproduced. For code search, use the base model, Alibaba-NLP/gte-modernbert-base.
The near-miss pilot it controls for is code-embed-v3-150m-ft-behaviour.
| Model (same machine, float32, 8,192 tokens) | exec@1 | beats_paired | CoQuIR pairwise | MTEB(Code, v1) | AppsRetrieval |
|---|---|---|---|---|---|
| gte-modernbert-base (base) | 0.0927 | 0.0990 | 0.5528 | 71.78 | 57.67 |
| replay-only control | 0.0852 | 0.0905 | 0.5588 | 69.75 | 53.89 |
| near-miss pilot | 0.0990 | 0.1054 | 0.5527 | 66.02 | 18.87 |
Pilot vs control, paired over queries: exec@1 +0.014 (McNemar p = 0.21), beats_paired +0.015 (p = 0.18), CoQuIR pairwise -0.006 (bootstrap p = 0.043). MTEB(Code) was scored in float16 for both fine-tunes.
The near-miss data gives a small, non-significant gain on ExecRetrieval and alone causes the AppsRetrieval collapse. Fine-tuning on the replay mix by itself costs about 2 points of MTEB(Code).
Alibaba-NLP/gte-modernbert-base, CLS pooling, normalised, 768 dimensions (Matryoshka at 512, 256, 128, 64)Recipe, research log and experiment drivers: https://github.com/divakantpandey/code-embed-v3
Training data: code-embed-v3-data (replay rows) and code-embed-v3-synth (near-miss rows). Per-query evaluation outputs, paired tests and run logs: code-embed-v3-src.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("divakantpandey/code-embed-v3-150m-ft-control")
q = model.encode(["reverse a linked list"], prompt_name="nl2code")
d = model.encode(["def reverse(head): ..."])
print(model.similarity(q, d))
Queries take a task prompt (nl2code, code2code, code2nl, text2sql, ...; see
config_sentence_transformers.json); documents take none. The paper's numbers compare embeddings in float32.
One training seed per model; ExecRetrieval's 939 queries cannot resolve one-point differences; only one base model was studied.
@misc{pandey2026nearmiss,
title = {Does Execution-Verified Near-Miss Training Teach Code Embeddings to Prefer Working Code? A Negative Result},
author = {Pandey, Divakant},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.24402953},
url = {https://doi.org/10.5281/zenodo.24402953}
}
final/model.safetensors 568 MiBmodel.safetensors 568 MiBtraining_args.bin 6.1 KiBAlibaba-NLP/gte-modernbert-base