The Latest AIs, every day
AIs with the most favorites on Toolify
AIs with the highest website traffic (monthly visits)
AI Tools by Apps
Discover the Discord of AI
AI Tools by browser extensions
GPTs from GPT Store
Discover The Best Model For AI
Top AI lists by month and monthly visits.
Top AI lists by category and monthly visits.
Top AI lists by region and monthly visits.
Top AI lists by source and monthly visits.
Top AI lists by revenue and real traffic.

CodeCompass-Embed is a code embedding model fine-tuned from Qwen2.5-Coder-0.5B for semantic code search and retrieval tasks.
| Property | Value |
|---|---|
| Base Model | Qwen2.5-Coder-0.5B |
| Parameters | 494M |
| Embedding Dimension | 896 |
| Max Sequence Length | 512 (training) / 32K (inference) |
| Pooling | Mean |
| Normalization | L2 |
| Attention | Bidirectional (all 24 layers) |
Evaluated on the CoIR Benchmark (NDCG@10). Sorted by CSN-Python.
| Model | Params | CSN-Python | CodeTrans-DL | Text2SQL | SO-QA | CF-ST | Apps |
|---|---|---|---|---|---|---|---|
| SFR-Embedding-Code | 400M | 0.9505 | 0.2683 | 0.9949 | 0.9107 | 0.7258 | 0.2212 |
| Jina-Code-v2 | 161M | 0.9439 | 0.2739 | 0.5169 | 0.8874 | 0.6975 | 0.1538 |
| CodeRankEmbed | 137M | 0.9378 | 0.2604 | 0.7686 | 0.8990 | 0.7166 | 0.1993 |
| CodeCompass-Embed | 494M | 0.9228 | 0.3305 | 0.5673 | 0.6480 | 0.4080 | 0.1277 |
| Snowflake-Arctic-Embed-L | 568M | 0.9146 | 0.1958 | 0.5401 | 0.8718 | 0.6503 | 0.1435 |
| BGE-M3 | 568M | 0.8976 | 0.2194 | 0.5728 | 0.8501 | 0.6437 | 0.1445 |
| BGE-Base-en-v1.5 | 109M | 0.8944 | 0.2125 | 0.5265 | 0.8581 | 0.6423 | 0.1415 |
| CodeT5+-110M | 110M | 0.8702 | 0.1794 | 0.3275 | 0.8147 | 0.5804 | 0.1179 |
CodeCompass-Embed ranks #1 on CodeTrans-DL and #4 on CSN-Python.
import torch
import torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("faisalmumtaz/codecompass-embed", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("faisalmumtaz/codecompass-embed")
# Enable bidirectional attention
for layer in model.layers:
layer.self_attn.is_causal = False
model.eval()
def encode(texts, is_query=False):
if is_query:
texts = [f"Instruct: Find the most relevant code snippet given the following query:
Query: {t}" for t in texts]
inputs = tokenizer(texts, padding=True, truncation=True, max_length=512, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs, output_hidden_states=True)
hidden = outputs.hidden_states[-1]
mask = inputs["attention_mask"].unsqueeze(-1).float()
embeddings = (hidden * mask).sum(1) / mask.sum(1).clamp(min=1e-9)
embeddings = F.normalize(embeddings, p=2, dim=-1)
return embeddings
query_emb = encode(["sort a list"], is_query=True)
code_embs = encode(["def sort(lst): return sorted(lst)"])
similarity = (query_emb @ code_embs.T).item()
| Task | Template |
|---|---|
| NL to Code | `Instruct: Find the most relevant code snippet given the following query: |
| Query: {q}` | |
| Code to Code | `Instruct: Find an equivalent code snippet given the following code snippet: |
| Query: {q}` | |
| Tech Q&A | `Instruct: Find the most relevant answer given the following question: |
| Query: {q}` | |
| Text to SQL | `Instruct: Given a natural language question and schema, find the corresponding SQL query: |
| Query: {q}` |
Documents do not need instruction prefixes.
@misc{codecompass2026,
author = {Faisal Mumtaz},
title = {CodeCompass-Embed: A Code Embedding Model for Semantic Code Search},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/faisalmumtaz/codecompass-embed}
}
Apache 2.0
codecompass-embed huggingface.co is an AI model on huggingface.co that provides codecompass-embed's model effect (), which can be used instantly with this faisalmumtaz codecompass-embed model. huggingface.co supports a free trial of the codecompass-embed model, and also provides paid use of the codecompass-embed. Support call codecompass-embed model through api, including Node.js, Python, http.
codecompass-embed huggingface.co is an online trial and call api platform, which integrates codecompass-embed's modeling effects, including api services, and provides a free online trial of codecompass-embed, you can try codecompass-embed online for free by clicking the link below.
codecompass-embed is an open source model from GitHub that offers a free installation service, and any user can find codecompass-embed on GitHub to install. At the same time, huggingface.co provides the effect of codecompass-embed install, users can directly use codecompass-embed installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
