Sentence Similarity
sentence-transformers
ONNX
English
code
bert
code-search
embeddings
LoRA
E5
cqs
Eval Results
text-embeddings-inference
Instructions to use jamie8johnson/e5-base-v2-code-search with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jamie8johnson/e5-base-v2-code-search with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jamie8johnson/e5-base-v2-code-search") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Update model card: v5 incoming, corrected metrics table
Browse files
README.md
CHANGED
|
@@ -49,11 +49,14 @@ Built for [cqs](https://github.com/jamie8johnson/cqs), a semantic code search to
|
|
| 49 |
|
| 50 |
## Key Results
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
*Hard eval improvement from full pipeline (LoRA + NL enrichment + doc comments), not LoRA alone.
|
| 59 |
|
|
|
|
| 49 |
|
| 50 |
## Key Results
|
| 51 |
|
| 52 |
+
**Current model on HuggingFace: LoRA v3 (50k samples, 1 epoch).**
|
| 53 |
+
v5 (166k samples, 1 epoch) is strictly better on both benchmarks and will replace v3 in a future update.
|
| 54 |
+
|
| 55 |
+
| Benchmark | Metric | v3 (current) | v5 (incoming) | Base E5 |
|
| 56 |
+
|-----------|--------|-------------|---------------|---------|
|
| 57 |
+
| CodeSearchNet (6 lang avg) | NDCG@10 | **0.671** | **0.683** | 0.627 |
|
| 58 |
+
| CosQA (out-of-distribution) | NDCG@10 | 0.334 | **0.348** | 0.329 |
|
| 59 |
+
| Hard eval (55 confusable pairs) | Recall@1 | 92.7%* | — | 90.9% |
|
| 60 |
|
| 61 |
*Hard eval improvement from full pipeline (LoRA + NL enrichment + doc comments), not LoRA alone.
|
| 62 |
|