Feature Extraction
sentence-transformers
ONNX
Safetensors
GGUF
English
code
roberta
python
javascript
go
java
ruby
php
code-search
code-embeddings
matryoshka
unixcoder
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use divakantpandey/code-embed-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use divakantpandey/code-embed-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("divakantpandey/code-embed-v2") 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
- Local Apps Settings
- llama.cpp
How to use divakantpandey/code-embed-v2 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf divakantpandey/code-embed-v2:Q8_0 --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf divakantpandey/code-embed-v2:Q8_0 --embeddings
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible embeddings server: ./build/bin/llama serve -hf divakantpandey/code-embed-v2:Q8_0 --embeddings
- Llama new
- LM Studio
- Jan
- Ollama
How to use divakantpandey/code-embed-v2 with Ollama:
ollama run hf.co/divakantpandey/code-embed-v2:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use divakantpandey/code-embed-v2 with Docker Model Runner:
docker model run hf.co/divakantpandey/code-embed-v2:Q8_0
- Lemonade
How to use divakantpandey/code-embed-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull divakantpandey/code-embed-v2:Q8_0
Run and chat with the model
lemonade run user.code-embed-v2-Q8_0
List all available models
lemonade list
- Atomic Chat
Update model scope and limitations
Browse files
README.md
CHANGED
|
@@ -270,15 +270,14 @@ model-index:
|
|
| 270 |
[]()
|
| 271 |
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
| 272 |
|
| 273 |
-
> [!
|
| 274 |
-
> **
|
| 275 |
>
|
| 276 |
-
> - **Context length
|
| 277 |
-
> - **
|
| 278 |
-
> - **
|
| 279 |
-
> - **
|
| 280 |
-
> - **
|
| 281 |
-
> - **Parameter count is 129.5M** (90.0M excluding the token embedding table), not 131M total / 92M active.
|
| 282 |
|
| 283 |
## Model details
|
| 284 |
|
|
@@ -339,7 +338,6 @@ Official MTEB results, `mteb` 2.26, model revision `d7759ca2`, merged in [embedd
|
|
| 339 |
|
| 340 |
## Limitations
|
| 341 |
|
| 342 |
-
- **No comparison against the base model.** UniXcoder-base was not evaluated with the same harness, so the gain from this fine-tune is not quantified.
|
| 343 |
- **Truncated dimensions are untested.** The model was trained with a Matryoshka loss, but retrieval quality at truncated dimensions has not been measured. Validate on your own data before relying on it.
|
| 344 |
- **Latency is not benchmarked.**
|
| 345 |
- **The GGUF file is not the same embedding.** It outputs the 768-dimensional backbone representation without the projection head, and it has not been evaluated. Do not mix GGUF vectors with Sentence Transformers vectors in one index.
|
|
|
|
| 270 |
[]()
|
| 271 |
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
| 272 |
|
| 273 |
+
> [!NOTE]
|
| 274 |
+
> **Model scope**
|
| 275 |
>
|
| 276 |
+
> - **Context length:** 1,024 tokens. The model has 1,026 absolute position embeddings and was trained and evaluated at this length; longer inputs are truncated. Revisions published before 2026-11-17 advertised 8,192 tokens and fail on longer inputs, so update to the latest revision if you see `IndexError: index 1026 is out of bounds`.
|
| 277 |
+
> - **Training data:** the CodeSearchNet train split in Python, JavaScript, Go, Java, Ruby and PHP. Scores on `CodeSearchNetRetrieval`, `COIRCodeSearchNetRetrieval` and `CodeSearchNetCCRetrieval` are in-distribution.
|
| 278 |
+
> - **Training setup:** mean pooling, in-batch negatives, and a Matryoshka loss at 64, 128, 256, 384, 768 and 1536 dimensions.
|
| 279 |
+
> - **Not yet measured:** retrieval quality at truncated dimensions and inference latency.
|
| 280 |
+
> - **Parameters:** 129.5M in total, 90.0M excluding the token embedding table.
|
|
|
|
| 281 |
|
| 282 |
## Model details
|
| 283 |
|
|
|
|
| 338 |
|
| 339 |
## Limitations
|
| 340 |
|
|
|
|
| 341 |
- **Truncated dimensions are untested.** The model was trained with a Matryoshka loss, but retrieval quality at truncated dimensions has not been measured. Validate on your own data before relying on it.
|
| 342 |
- **Latency is not benchmarked.**
|
| 343 |
- **The GGUF file is not the same embedding.** It outputs the 768-dimensional backbone representation without the projection head, and it has not been evaluated. Do not mix GGUF vectors with Sentence Transformers vectors in one index.
|