Update README.md
Browse files
README.md
CHANGED
@@ -10,7 +10,7 @@ license: mit
|
|
10 |
|
11 |
`CodeRankEmbed` is a 137M bi-encoder supporting 8192 context length for code retrieval. It significantly outperforms various open-source and proprietary code embedding models on various code retrieval tasks.
|
12 |
|
13 |
-
Check out our [blog post](https://gangiswag.github.io/cornstack/) and [paper
|
14 |
|
15 |
Combine `CodeRankEmbed` with our re-ranker [`CodeRankLLM`](https://huggingface.co/cornstack/CodeRankLLM) for even higher quality code retrieval.
|
16 |
|
@@ -38,7 +38,7 @@ We release the scripts to evaluate our model's performance [here](https://github
|
|
38 |
```python
|
39 |
from sentence_transformers import SentenceTransformer
|
40 |
|
41 |
-
model = SentenceTransformer("
|
42 |
queries = ['Represent this query for searching relevant code: Calculate the n-th factorial']
|
43 |
codes = ['def fact(n):\n if n < 0:\n raise ValueError\n return 1 if n == 0 else n * fact(n - 1)']
|
44 |
query_embeddings = model.encode(queries)
|
|
|
10 |
|
11 |
`CodeRankEmbed` is a 137M bi-encoder supporting 8192 context length for code retrieval. It significantly outperforms various open-source and proprietary code embedding models on various code retrieval tasks.
|
12 |
|
13 |
+
Check out our [blog post](https://gangiswag.github.io/cornstack/) and [paper](https://arxiv.org/pdf/2412.01007) for more details!
|
14 |
|
15 |
Combine `CodeRankEmbed` with our re-ranker [`CodeRankLLM`](https://huggingface.co/cornstack/CodeRankLLM) for even higher quality code retrieval.
|
16 |
|
|
|
38 |
```python
|
39 |
from sentence_transformers import SentenceTransformer
|
40 |
|
41 |
+
model = SentenceTransformer("nomic-ai/CodeRankEmbed", trust_remote_code=True)
|
42 |
queries = ['Represent this query for searching relevant code: Calculate the n-th factorial']
|
43 |
codes = ['def fact(n):\n if n < 0:\n raise ValueError\n return 1 if n == 0 else n * fact(n - 1)']
|
44 |
query_embeddings = model.encode(queries)
|