Feature Extraction
sentence-transformers
Safetensors
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
docs: highlight 8,192 token context window in model card
Browse files
README.md
CHANGED
|
@@ -235,14 +235,14 @@ model-index:
|
|
| 235 |
|
| 236 |
# 💻 code-embed-v2
|
| 237 |
|
| 238 |
-
**CodeEmbed v2** is a lightweight, state-of-the-art multilingual code embedding model (≤131M parameters) developed by **[Divakant Pandey](https://github.com/divakantpandey)**. Specialized for semantic code search, code-to-code retrieval, text-to-SQL mapping, and repository navigation across **6 major programming languages** with an extended **
|
| 239 |
|
| 240 |
---
|
| 241 |
|
| 242 |
## 🚀 Highlights & Functional Capabilities
|
| 243 |
|
| 244 |
- **Multilingual Support**: High-accuracy semantic search across **Python, JavaScript, Go, Java, Ruby, and PHP**.
|
| 245 |
-
- **Extended Context**: Full **
|
| 246 |
- **Matryoshka Representation Learning (MRL)**: Embeddings can be dynamically truncated from **1536** down to **768, 384, 256, 128, or 64 dimensions** with negligible loss in accuracy, enabling significant vector database memory and latency savings.
|
| 247 |
- **Compact & Efficient**: ~131M parameters (**~484 MB** safetensors footprint) optimized for low-latency CPU inference and fast GPU batch indexing.
|
| 248 |
- **Universal Compatibility**: Works out of the box with `sentence-transformers`, `transformers`, and PyTorch.
|
|
|
|
| 235 |
|
| 236 |
# 💻 code-embed-v2
|
| 237 |
|
| 238 |
+
**CodeEmbed v2** is a lightweight, state-of-the-art multilingual code embedding model (≤131M parameters) developed by **[Divakant Pandey](https://github.com/divakantpandey)**. Specialized for semantic code search, code-to-code retrieval, text-to-SQL mapping, and repository navigation across **6 major programming languages** with an extended **8,192 token context window** and native **Matryoshka Representation Learning (MRL)**.
|
| 239 |
|
| 240 |
---
|
| 241 |
|
| 242 |
## 🚀 Highlights & Functional Capabilities
|
| 243 |
|
| 244 |
- **Multilingual Support**: High-accuracy semantic search across **Python, JavaScript, Go, Java, Ruby, and PHP**.
|
| 245 |
+
- **Extended Context**: Full **8,192 token context window** allowing whole-file, multi-function, and long class embeddings without aggressive truncation.
|
| 246 |
- **Matryoshka Representation Learning (MRL)**: Embeddings can be dynamically truncated from **1536** down to **768, 384, 256, 128, or 64 dimensions** with negligible loss in accuracy, enabling significant vector database memory and latency savings.
|
| 247 |
- **Compact & Efficient**: ~131M parameters (**~484 MB** safetensors footprint) optimized for low-latency CPU inference and fast GPU batch indexing.
|
| 248 |
- **Universal Compatibility**: Works out of the box with `sentence-transformers`, `transformers`, and PyTorch.
|