Feature Extraction
sentence-transformers
ONNX
Safetensors
GGUF
English
code
roberta
python
javascript
go
java
ruby
php
code-search
code-embeddings
multilingual
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
docs: update context window to 8192 tokens in README
Browse files
README.md
CHANGED
|
@@ -189,6 +189,7 @@ model-index:
|
|
| 189 |
> On the official **MTEB (Massive Text Embedding Benchmark)**, CodeEmbed v2 ranks in the **Top 5 worldwide in the $\le$ 250M parameter class** while delivering competitive retrieval quality against multi-billion parameter LLMs at a fraction of the compute and memory cost.
|
| 190 |
|
| 191 |
[](https://huggingface.co/divakantpandey/code-embed-v2)
|
|
|
|
| 192 |
[-brightgreen)](https://github.com/embeddings-benchmark/results/pull/803)
|
| 193 |
[](https://github.com/embeddings-benchmark/results/pull/803#issuecomment-6335973746)
|
| 194 |
[-orange)](https://mteb-leaderboard.hf.space/benchmarks/MTEB(Code,%20v1))
|
|
@@ -199,7 +200,7 @@ model-index:
|
|
| 199 |
|
| 200 |
## 🌟 Key Product Capabilities
|
| 201 |
|
| 202 |
-
* **
|
| 203 |
* **Multilingual Programming Support**: First-class embedding support for **Python, JavaScript, TypeScript, Go, Java, Ruby, PHP, SQL**, and natural language technical English.
|
| 204 |
* **Cross-Language Semantic Alignment**: Directly queries across language boundaries (e.g. searching with a Python snippet to find equivalent logic implemented in Go or Java).
|
| 205 |
* **Adaptive Matryoshka Dimensions (MRL)**: Native 1,536-dimensional embeddings can be truncated dynamically to **768, 512, 256, or 128 dimensions** for up to **12× storage savings** and extreme query speedups in vector databases.
|
|
|
|
| 189 |
> On the official **MTEB (Massive Text Embedding Benchmark)**, CodeEmbed v2 ranks in the **Top 5 worldwide in the $\le$ 250M parameter class** while delivering competitive retrieval quality against multi-billion parameter LLMs at a fraction of the compute and memory cost.
|
| 190 |
|
| 191 |
[](https://huggingface.co/divakantpandey/code-embed-v2)
|
| 192 |
+
[]()
|
| 193 |
[-brightgreen)](https://github.com/embeddings-benchmark/results/pull/803)
|
| 194 |
[](https://github.com/embeddings-benchmark/results/pull/803#issuecomment-6335973746)
|
| 195 |
[-orange)](https://mteb-leaderboard.hf.space/benchmarks/MTEB(Code,%20v1))
|
|
|
|
| 200 |
|
| 201 |
## 🌟 Key Product Capabilities
|
| 202 |
|
| 203 |
+
* **8,192-Token Long Context Window**: Ingests complete repository files, large multi-function modules, complex classes, and detailed error tracebacks without truncation (via Position Interpolation).
|
| 204 |
* **Multilingual Programming Support**: First-class embedding support for **Python, JavaScript, TypeScript, Go, Java, Ruby, PHP, SQL**, and natural language technical English.
|
| 205 |
* **Cross-Language Semantic Alignment**: Directly queries across language boundaries (e.g. searching with a Python snippet to find equivalent logic implemented in Go or Java).
|
| 206 |
* **Adaptive Matryoshka Dimensions (MRL)**: Native 1,536-dimensional embeddings can be truncated dynamically to **768, 512, 256, or 128 dimensions** for up to **12× storage savings** and extreme query speedups in vector databases.
|