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
Run this model with HF Jobs
Run divakantpandey/code-embed-v2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/divakantpandey/code-embed-v2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/divakantpandey/code-embed-v2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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
Add same-harness UniXcoder-base baseline
Browse files304 unmodified lines305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336304 unmodified linesOfficial MTEB results, `mteb` 2.26, model revision `d7759ca2`, merged in [embeddings-benchmark/results#803](https://github.com/embeddings-benchmark/results/pull/803). Evaluation used 1,024 tokens.| Benchmark | Tasks | Mean main score ||---|---|---|| MTEB(Code, v1) | 12 | 0.5475 || CoIR | 10 | 0.5343 || CoREB(v1) | 6 | 0.4362 || Task | Metric | Score | Note ||---|---|---|---|| AppsRetrieval | nDCG@10 | 0.2017 | || CodeEditSearchRetrieval | nDCG@10 | 0.3703 | || CodeFeedbackMT | nDCG@10 | 0.6164 | || CodeFeedbackST | nDCG@10 | 0.6680 | || CodeSearchNetCCRetrieval | nDCG@10 | 0.5664 | in-distribution || CodeSearchNetRetrieval | nDCG@10 | 0.8574 | in-distribution || COIRCodeSearchNetRetrieval | nDCG@10 | 0.7488 | in-distribution || CodeTransOceanContest | nDCG@10 | 0.6814 | || CodeTransOceanDL | nDCG@10 | 0.3533 | || CosQA | nDCG@10 | 0.2997 | || StackOverflowQA | nDCG@10 | 0.7131 | || SyntheticText2SQL | nDCG@10 | 0.4938 | || CorebC2CReranking | MAP | 0.4205 | || CorebC2CRetrieval | nDCG@10 | 0.2750 | || CorebC2TReranking | MAP | 0.7937 | || CorebC2TRetrieval | nDCG@10 | 0.6073 | || CorebT2CReranking | MAP | 0.2539 | || CorebT2CRetrieval | nDCG@10 | 0.2671 | |**Leaderboard position.** On 2026-10-24, filtered to models with at most 150M parameters, the MTEB leaderboard listed this model 3rd on CoREB(v1), 8th on CoIR and 9th on MTEB(Code, v1), and 3rd of 25 models overall on CorebC2CReranking. Ranks change as models are added; check the [live leaderboard](https://mteb-leaderboard.hf.space/models/divakantpandey/code-embed-v2).304 unmodified lines305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340304 unmodified linesOfficial MTEB results, `mteb` 2.26, model revision `d7759ca2`, merged in [embeddings-benchmark/results#803](https://github.com/embeddings-benchmark/results/pull/803). Evaluation used 1,024 tokens.The UniXcoder-base column is the base model run through the same harness and settings (`mteb` 2.26.17, `sentence-transformers` 6.2.0, 1,024 tokens, batch size 64, mean pooling, no prompts). It is our own run, not part of the merged results.| Benchmark | Tasks | UniXcoder-base | code-embed-v2 ||---|---|---|---|| MTEB(Code, v1) | 12 | 0.3657 | 0.5475 || CoIR | 10 | 0.3356 | 0.5343 || CoREB(v1) | 6 | 0.3531 | 0.4362 || Task | Metric | UniXcoder-base | code-embed-v2 | Note ||---|---|---|---|---|| AppsRetrieval | nDCG@10 | 0.0091 | 0.2017 | || CodeEditSearchRetrieval | nDCG@10 | 0.3517 | 0.3703 | || CodeFeedbackMT | nDCG@10 | 0.1237 | 0.6164 | || CodeFeedbackST | nDCG@10 | 0.3418 | 0.6680 | || CodeSearchNetCCRetrieval | nDCG@10 | 0.5511 | 0.5664 | in-distribution || CodeSearchNetRetrieval | nDCG@10 | 0.6812 | 0.8574 | in-distribution || COIRCodeSearchNetRetrieval | nDCG@10 | 0.4726 | 0.7488 | in-distribution || CodeTransOceanContest | nDCG@10 | 0.4421 | 0.6814 | || CodeTransOceanDL | nDCG@10 | 0.3305 | 0.3533 | || CosQA | nDCG@10 | 0.1758 | 0.2997 | || StackOverflowQA | nDCG@10 | 0.4108 | 0.7131 | || SyntheticText2SQL | nDCG@10 | 0.4985 | 0.4938 | || CorebC2CReranking | MAP | 0.3722 | 0.4205 | || CorebC2CRetrieval | nDCG@10 | 0.2932 | 0.2750 | || CorebC2TReranking | MAP | 0.6685 | 0.7937 | || CorebC2TRetrieval | nDCG@10 | 0.4404 | 0.6073 | || CorebT2CReranking | MAP | 0.2035 | 0.2539 | || CorebT2CRetrieval | nDCG@10 | 0.1407 | 0.2671 | |**Gain over the base model.** Fine-tuning improves 16 of 18 tasks. It regresses slightly on SyntheticText2SQL (-0.005) and CorebC2CRetrieval (-0.018). Over the 15 tasks not built from CodeSearchNet, the mean rises from 0.3202 to 0.4677.**Leaderboard position.** On 2026-10-24, filtered to models with at most 150M parameters, the MTEB leaderboard listed this model 3rd on CoREB(v1), 8th on CoIR and 9th on MTEB(Code, v1), and 3rd of 25 models overall on CorebC2CReranking. Ranks change as models are added; check the [live leaderboard](https://mteb-leaderboard.hf.space/models/divakantpandey/code-embed-v2).
README.md+28-24