Feature Extraction
Transformers
Safetensors
sentence-transformers
English
code
qwen2
text-generation
embeddings
retrieval
code-search
semantic-search
Eval Results (legacy)
text-embeddings-inference
Instructions to use faisalmumtaz/codecompass-embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use faisalmumtaz/codecompass-embed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="faisalmumtaz/codecompass-embed")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("faisalmumtaz/codecompass-embed") model = AutoModelForMultimodalLM.from_pretrained("faisalmumtaz/codecompass-embed") - sentence-transformers
How to use faisalmumtaz/codecompass-embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("faisalmumtaz/codecompass-embed") 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
Upload CodeCompass-Embed v2 — #1 on CSN-Python (NDCG@10=0.979), 12-task CoIR eval
Browse files
README.md
CHANGED
|
@@ -48,7 +48,7 @@ model-index:
|
|
| 48 |
|
| 49 |
# CodeCompass-Embed
|
| 50 |
|
| 51 |
-
**CodeCompass-Embed** is a
|
| 52 |
|
| 53 |
## Model Highlights
|
| 54 |
|
|
@@ -186,7 +186,7 @@ For optimal performance, use these instruction prefixes for queries:
|
|
| 186 |
|
| 187 |
## Training Details
|
| 188 |
|
| 189 |
-
- **Base Model**: Qwen2.5-Coder-0.5B
|
| 190 |
- **Training Data**: 100K GPT-filtered gold-standard samples from CoRNStack, StackOverflow, CodeSearchNet + hard negatives
|
| 191 |
- **Architecture**: Bidirectional attention across all 24 layers, mean pooling, L2 normalization
|
| 192 |
- **Loss**: InfoNCE with temperature τ=0.05
|
|
|
|
| 48 |
|
| 49 |
# CodeCompass-Embed
|
| 50 |
|
| 51 |
+
**CodeCompass-Embed** is a 494M-parameter embedding model for semantic code search and retrieval, trained on 86B tokens total. It produces 896-dimensional embeddings optimized for matching natural language queries to code across Python, Java, JavaScript, Go, Ruby, and PHP, achieving state-of-the-art results on the [CoIR code retrieval benchmark](https://github.com/CoIR-team/coir).
|
| 52 |
|
| 53 |
## Model Highlights
|
| 54 |
|
|
|
|
| 186 |
|
| 187 |
## Training Details
|
| 188 |
|
| 189 |
+
- **Base Model**: [Qwen2.5-Coder-0.5B](https://huggingface.co/Qwen/Qwen2.5-Coder-0.5B) — a causal language model converted to a bidirectional embedding model with full attention across all 24 layers
|
| 190 |
- **Training Data**: 100K GPT-filtered gold-standard samples from CoRNStack, StackOverflow, CodeSearchNet + hard negatives
|
| 191 |
- **Architecture**: Bidirectional attention across all 24 layers, mean pooling, L2 normalization
|
| 192 |
- **Loss**: InfoNCE with temperature τ=0.05
|