Feature Extraction
Model2Vec
Safetensors
sentence-transformers
code
embeddings
retrieval
static-embeddings
sentence-similarity
Instructions to use minishlab/blink-code-16M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use minishlab/blink-code-16M with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("minishlab/blink-code-16M") embeddings = model.encode(["It's dangerous to go alone!", "It's a secret to everybody."]) print(embeddings.shape) - sentence-transformers
How to use minishlab/blink-code-16M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("minishlab/blink-code-16M") 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] - Notebooks
- Google Colab
- Kaggle
Card: hybrid search with BM25
Browse files
README.md
CHANGED
|
@@ -141,6 +141,18 @@ We use the public English tasks. Apps is left out (it is in CoIR above) and Code
|
|
| 141 |
- **Mean:** blink-code-16M scores 49.58, against 46.50 for potion-code-16M-v2 and 44.39 for BM25.
|
| 142 |
- **Languages we didn't train on:** it beats potion-code-16M-v2 on all 13 languages, including the seven unseen ones; the largest gains are on C++ (+5.4), TypeScript (+4.2) and C (+4.0). BM25 is best on Shell.
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
## Training
|
| 145 |
|
| 146 |
We followed a four-step procedure, starting from [potion-code-16M-v2's recipe](https://huggingface.co/minishlab/potion-code-16M-v2).
|
|
|
|
| 141 |
- **Mean:** blink-code-16M scores 49.58, against 46.50 for potion-code-16M-v2 and 44.39 for BM25.
|
| 142 |
- **Languages we didn't train on:** it beats potion-code-16M-v2 on all 13 languages, including the seven unseen ones; the largest gains are on C++ (+5.4), TypeScript (+4.2) and C (+4.0). BM25 is best on Shell.
|
| 143 |
|
| 144 |
+
### Hybrid search with BM25
|
| 145 |
+
|
| 146 |
+
Combining blink-code-16M and BM25 with hybrid search gives the following results. We take the top 100 documents from each, scale each query's scores to [0, 1] (min-max) and average them with equal weight.
|
| 147 |
+
|
| 148 |
+
| Model | CoIR | RTEB(Code) | CodeEditSearch |
|
| 149 |
+
|---|---:|---:|---:|
|
| 150 |
+
| **blink-code-16M + BM25** | **49.36** | **36.00** | **54.71** |
|
| 151 |
+
| blink-code-16M | 46.82 | 34.67 | 49.58 |
|
| 152 |
+
| BM25 | 42.31 | 29.90 | 44.39 |
|
| 153 |
+
|
| 154 |
+
The combination adds 2.54 points on CoIR, 1.33 on RTEB(Code) and 5.13 on CodeEditSearch over blink-code-16M alone.
|
| 155 |
+
|
| 156 |
## Training
|
| 157 |
|
| 158 |
We followed a four-step procedure, starting from [potion-code-16M-v2's recipe](https://huggingface.co/minishlab/potion-code-16M-v2).
|