2026-11-26 15:39 UTC

Papr open-weight embeddings show code-retrieval gains in Qdrant tests

state: seedheat: mediumuncertainty: mediumrelevance: highcode-retrieval embeddingsPaprQdrantDylan CouzonAnush

What is this?

Papr’s papr-embed-code-1 is a pair of open-weight code-retrieval embedding models (0.6B and 4B parameters), described by Qdrant as Qwen3-Embedding models further trained on code retrieval. In a November 18, 2026 Qdrant blog post, DevRel lead Dylan Couzon and coauthor Anush compare them with their Qwen3 bases on code and prose retrieval tasks and test storage compression. Qdrant reports gains on its tested code tasks, including several it says Papr did not train on, small losses on most tested prose tasks, and large vector-memory savings from 1-bit TurboQuant with little retrieval-score loss. Papr’s linked post is represented here only by a short secondary summary; its own leaderboard claims are reported by Qdrant, not independently verified in these sources.

Why it matters

Code retrieval can help developers and AI agents find relevant functions, files, or examples from natural-language questions, and embedding quality and index cost determine how practical that is at scale. Qdrant’s comparison suggests code-specific tuning may improve retrieval beyond the base model even on some held-out tasks. Its reported 1-bit results could make the larger model’s higher scores more affordable in vector storage, though embedding remains slower and results are benchmark-specific. The evidence is a vendor-authored evaluation, not independent adoption or broad validation.

Current assessment

New evidence: Qdrant’s November 18, 2026 post compares Papr’s open-weight 0.6B and 4B papr-embed-code-1 models against their Qwen3-Embedding bases using identical query instructions. On tasks Qdrant classifies as code not used in Papr’s training, it reports average nDCG@10 gains of 0.026 for 0.6B and 0.034 for 4B; gains also appear on the listed CoIR tasks. Qdrant notes that Papr trained on most CoIR training data, while the 4B skipped CodeTransOcean Contest, so those results are not all held out. The post reports slightly lower mean prose scores versus the base (0.003 lower for 0.6B; 0.016 for 4B), with variation by dataset and larger losses on some prose tasks. These are Qdrant’s benchmark results, not independent replication; its reported discrepancies on SyntheticText2SQL and tie-sensitive datasets warrant care. For 4B, Qdrant reports 1-bit TurboQuant cuts vector storage from 10,240 to 328 bytes per vector; on seven code tasks it retains 99.7% of float32 nDCG@10 with 2x rescoring (and 99.8% in its million-snippet test at higher HNSW search effort). These figures concern vector storage/search, not the cost of generating embeddings: Qdrant says 4B embeds about four times slower than 0.6B on the same GPU. Papr’s own post is linked and summarized as claiming top results on specified code leaderboards, but full primary-source detail is not present here. Qdrant says the 0.6B is planned for a future FastEmbed release; that is a plan, not stated current availability. Practical implications depend on a team’s own corpus, queries, hardware, and relevance tradeoffs.

Measured heat

now 0 pts/hpeak 1 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 157h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-20 03:22 (minted)⭐ origin echo-reconstructedPapr introduced papr-embed-code-1 open-weight code-retrieval embedding models; Qdrant identifies 0.6B and 4B versions and reports that Papr
Papr on blog (echo) · attributed from hn.story.50569422 · published time unknown
—
11-20 02:27first on hacker news · published · lag ?Papr-embed-code SOTA at code retrieval open source
shawkatkabbara
—
11-20 02:27amplified on hacker news 👑hn.story.50569422
shawkatkabbara
peak 1 · 0 comments · 103% of case engagement
11-20 03:20our radar first saw it · lag ?discovery anchor: hn.story.50569422—
pace: p14 vs 2105 stories at the 96h mark (now 157h old) — behind adobe-max-ai-agents-creative-tools-mcp (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnPapr-embed-code SOTA at code retrieval open source
Retrieved article excerpt

Open article · Retrieved 2026-11-20T03:21:38.755309+00:00

# Does a Code-Tuned Embedding Model Pay Off? papr-embed-code-1 in Qdrant

Dylan Couzon, Anush

·

November 18, 2026

Does a Code-Tuned Embedding Model Pay Off? papr-embed-code-1 in Qdrant

- [Home](https://qdrant.tech/)
- /
- [Blog](https://qdrant.tech/blog/)
- /
- Does a Code-Tuned Embedding Model Pay Off? papr-embed-code-1 in Qdrant

On this page:

- [Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fqdrant.tech%2Fblog%2Fpapr-embed-code%2F&text=Does%20a%20Code-Tuned%20Embedding%20Model%20Pay%20Off?%20papr-embed-code-1%20in%20Qdrant "x")
- [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fqdrant.tech%2Fblog%2Fpapr-embed-code%2F "LinkedIn")

If you search code, you’ve probably asked this: is a code-specific embedding model worth it, or is a strong general one good enough?

Papr’s [papr-embed-code-1](https://paprai.substack.com/p/introducing-papr-embed-schema-native) is a good test case. It’s [Qwen3-Embedding](https://huggingface.co/Qwen/Qwen3-Embedding-4B) trained further on code retrieval, with open weights in two sizes: [0.6B](https://huggingface.co/papr-ai/papr-embed-code-1-0.6b) and [4B](https://huggingface.co/papr-ai/papr-embed-code-1-4b). Papr reports top scores on CoIR, a code retrieval benchmark. But it trained on most of CoIR’s training data, and its model card says so. Papr also [reports the 4B at #1](https://paprai.substack.com/p/introducing-papr-embed-schema-native) on MTEB’s two held-out code leaderboards, RTEB (Code) and CodeRAG.

We asked a narrower question. Does it beat the model it started from on code it never saw? And what does it cost to run in Qdrant?

## How We Tested

We compared each papr-embed-code-1 model with the Qwen3-Embedding model it was trained from, with the same query instructions. The tasks come in three groups:

- **Code Papr didn’t train on:** [HumanEval](https://huggingface.co/datasets/embedding-benchmark/HumanEval) and [MBPP](https://huggingface.co/datasets/embedding-benchmark/MBPP) match a task description to the Python function that solves it. [FreshStack](https://huggingface.co/datasets/embedding-benchmark/FreshStack_mteb) matches a Stack Overflow question to the files of the library it’s about. [WikiSQL](https://huggingface.co/datasets/embedding-benchmark/WikiSQL_mteb) matches a question about a table to its SQL query.
- **Code Papr trained on:** three CoIR tasks, though the 4B skipped CodeTransOcean Contest. [APPS](https://huggingface.co/datasets/CoIR-Retrieval/apps) matches a programming problem to its solution. [CodeTransOcean Contest](https://huggingface.co/datasets/CoIR-Retrieval/codetrans-contest) matches a program to the same program in another language. [StackOverflowQA](https://huggingface.co/datasets/CoIR-Retrieval/stackoverflow-qa) matches a question to its answer.
- **Prose:** four BEIR datasets, [NFCorpus](https://huggingface.co/datasets/mteb/nfcorpus), [ArguAna](https://huggingface.co/datasets/mteb/arguana), [SCIDOCS](https://huggingface.co/datasets/mteb/scidocs), and [FiQA](https://huggingface.co/datasets/mteb/fiqa).

Where Papr’s model cards score its own models, ours match to within 0.001 nDCG@10 on every task except the ones full of identical documents, marked † in the [full results](https://qdrant.tech/blog/papr-embed-code/#full-results). There, the score depends on how ties break, which can change with batch size. On [SyntheticText2SQL](https://huggingface.co/datasets/CoIR-Retrieval/synthetic-text2sql), we got 0.625 and 0.650 for the two sizes, against Papr’s 0.720 and 0.723.

## Better on Code It Never Saw

On code Papr didn’t train on, both sizes beat their base model. The 4B gained 0.034 nDCG@10 on average, and the 0.6B 0.026. On the CoIR tasks, the gains were similar.

Code Search Gains, Prose LossesExact search, nDCG@10. Higher is better.nDCG@10Unseen codeCoIRProse0.00.20.40.60.81.0Qwen3 0.6BPapr 0.6BQwen3 4BPapr 4B

Mean over the tasks in each group. Papr trained on CoIR, except the 4B on CodeTransOcean Contest.

The gain held on every one of those tasks, but its size varied a lot. On HumanEval, the 4B base model already scored 0.98, so there wasn’t much left to gain. On WikiSQL, the 4B gained 0.070.

Prose went the other way. Both sizes scored a little lower than their base model, by 0.003 for the 0.6B and 0.016 for the 4B. On TREC-COVID, a set of COVID-19 research papers, the 0.6B lost 0.065. If most of what you search is prose, keep the base model.

## Compressed to 1 Bit, the 4B Beats the 0.6B

Code search usually means a lot of vectors: a function, a file chunk, or a snippet each. The 4B’s vectors have 2,560 dimensions, which is 10 KB per vector in float32.

They compress very well. With 1-bit [TurboQuant](https://qdrant.tech/documentation/manage-data/quantization/#turboquant-quantization), each vector takes 328 bytes, 31x less. On our seven code tasks, 1-bit TurboQuant kept 99.7% of the 4B’s float32 score without rescoring, and all of it with rescoring at 2x oversampling.

That changes which model to pick. The 4B compressed to 1 bit scores higher than the 0.6B in float32, and takes 12x less RAM.

Vector Size
Retrieval Quality

RAM per VectorLower is better.05,00010,0000.6Bfloat324096 B0.6B1-bit136 B4Bfloat3210240 B4B1-bit328 BBytes per vectorRetrieval QualitySeven code tasks. Higher is better.0.00.51.00.6Bfloat320.8380.6B1-bit0.8384Bfloat320.8774B1-bit0.877nDCG@10

Seven code tasks, HNSW. 1-bit TurboQuant vectors rescored with 2x oversampling.

The 4B still costs more to run, because it embeds about four times slower than the 0.6B on the same GPU. And WikiSQL is the exception, where the 0.6B scored higher.

## A Million Snippets in One Collection

Our other code tasks have at most 20,000 documents, which makes compression look easy. So we also loaded [CodeSearchNet-CC](https://huggingface.co/datasets/CoIR-Retrieval/CodeSearchNet-ccr) into one collection: about a million snippets in six languages, from Python to Ruby. Each query is the start of a function, and the right document is the rest of it. A [payload filter](https://qdrant.tech/documentation/search/filtering/) keeps the search within the query’s language.

Compression held up at this size. At `hnsw_ef` 128, 1-bit TurboQuant with rescoring kept 99.5% of exact search’s score, against 99.7% for float32. It was faster too, at 1.0 ms per query against 1.8 ms, with the original vectors for rescoring already in memory.

The bigger lever was `hnsw_ef`, the number of candidates the search explores. Raising it from 128 to 256 added 0.002 to 0.004 nDCG@10 to every setup. That’s enough for rescored 1-bit vectors at 256 to beat float32 at 128. At 256, float32, 2-bit, and rescored 1-bit vectors all kept 99.8% or more, and the 1-bit search took 1.4 ms against 2.9 ms for float32.

Dropping the filter and searching all six languages at once cost 0.005 to 0.007.

## What About BM25?

Code is full of exact names, so keyword search seems like a natural partner. Qdrant 1.20 added a [code tokenizer](https://qdrant.tech/documentation/manage-data/indexing/#code) for full-text indexes. It splits `getUserName` and `get_user_name` into the same words. Qdrant can also [score full-text matches with BM25](https://qdrant.tech/documentation/search/text-search/full-text-search/), so a [hybrid query](https://qdrant.tech/documentation/search/hybrid-queries/) can fuse BM25 with the dense search.

On our tasks, BM25 on its own was far behind dense search. On APPS, where the queries are problem statements and the documents are bare solutions, it scored 0.01 nDCG@10. The two share almost no words.

Fusing BM25 with dense search at equal weight made every task worse, by 0.02 to 0.17 for the 4B. Down-weighting BM25 helped, but only up to break-even. With BM25’s [RRF weight](https://qdrant.tech/documentation/search/hybrid-queries/#weighted-rrf) at 0.1, the 4B averaged 0.0006 below dense search alone, and its best gain on any task was 0.002.

Our queries were questions, descriptions, and code, and for those, dense search alone was the better choice.

## So, Does It Pay Off?

For code search, yes. On code it never saw, papr-embed-code-1 beat the model it started from at both sizes, by about 0.03 nDCG@10. On prose it did a little worse, so if most of your corpus is prose, stay with the base model.

The bigger choice is the size. Compressed to 1 bit, the 4B scored higher than the 0.6B in float32, in a twelfth of the RAM. If you can afford to embed with the 4B, we’d store it with 1-bit [TurboQuant](https://qdrant.tech/documentation/manage-data/quantization/#turboquant-quantization), keep rescoring on, and raise `hnsw_ef` before adding bits. Compare against an unquantized collection on your own queries, once with [rescoring disabled](https://qdrant.tech/documentation/manage-data/quantization/#searching-with-quantization) and once with 2x oversampling. If you index several languages in one collection, filter by language.

We’d leave BM25 out to start. If your users search for exact identifiers, that’s the case to test it on, with a low weight.

The 0.6B is coming to [FastEmbed](https://qdrant.tech/documentation/fastembed/) in its next release.

## Full Results

Exact Search

Every model got the same query instructions. † Many identical documents, so the score depends on how ties break. Left out of the averages. ‡ Papr trained on its train split. § The 4B didn’t train on it.

| Task | Qwen3-Embedding-0.6B | papr-embed-code-1-0.6b | Qwen3-Embedding-4B | papr-embed-code-1-4b |
| --- | --- | --- | --- | --- |
| *Metric* | *nDCG@10* | *nDCG@10* | *nDCG@10* | *nDCG@10* |
| *Code, not trained on* |  |  |  |  |
| [HumanEval](https://huggingface.co/datasets/embedding-benchmark/HumanEval) | 0.942 | 0.975 | 0.983 | 0.992 |
| [MBPP](https://huggingface.co/datasets/embedding-benchmark/MBPP) | 0.881 | 0.908 | 0.914 | 0.936 |
| [DS-1000](https://huggingface.co/datasets/embedding-benchmark/DS1000) † | 0.606 | 0.638 | 0.640 | 0.679 |
| [FreshStack](https://huggingface.co/datasets/embedding-benchmark/FreshStack_mteb) | 0.378 | 0.386 | 0.433 | 0.470 |
| [WikiSQL](https://huggingface.co/datasets/embedding-benchmark/WikiSQL_mteb) | 0.925 | 0.961 | 0.848 | 0.918 |
| *Code, trained on* |  |  |  |  |
| [APPS](https://huggingface.co/datasets/CoIR-Retrieval/apps) | 0.752 | 0.793 | 0.891 | 0.925 |
| [CodeTransOcean Contest](https://huggingface.co/datasets/CoIR-Retrieval/codetrans-contest) § | 0.864 | 0.909 | 0.918 | 0.930 |
| [CodeTransOcean DL](https://huggingface.co/datasets/CoIR-Retrieval/codetrans-dl) † | 0.320 | 0.345 | 0.344 | 0.350 |
| [CosQA](https://huggingface.co/datasets/CoIR-Retrieval/cosqa) † | 0.398 | 0.408 | 0.414 | 0.405 |
| [StackOverflowQA](https://huggingface.co/datasets/CoIR-Retrieval/stackoverflow-qa) | 0.900 | 0.936 | 0.940 | 0.967 |
| [SyntheticText2SQL](https://huggingface.co/datasets/CoIR-Retrieval/synthetic-text2sql) † | 0.619 | 0.625 | 0.644 | 0.650 |
| [CodeSearchNet-CC](https://huggingface.co/datasets/CoIR-Retrieval/CodeSearchNet-ccr) | N/A | 0.922 | N/A | N/A |
| *Prose* |  |  |  |  |
| [SciFact](https://huggingface.co/datasets/mteb/scifact) ‡ | 0.699 | 0.824 | 0.786 | 0.868 |
| [NFCorpus](https://huggingface.co/datasets/mteb/nfcorpus) | 0.363 | 0.375 | 0.410 | 0.421 |
| [ArguAna](https://huggingface.co/datasets/mteb/arguana) | 0.693 | 0.665 | 0.751 | 0.725 |
| [SCIDOCS](https://huggingface.co/datasets/mteb/scidocs) | 0.244 | 0.240 | 0.316 | 0.287 |
| [FiQA](https://huggingface.co/datasets/mteb/fiqa) | 0.472 | 0.478 | 0.622 | 0.600 |
| [TREC-COVID](https://huggingface.co/datasets/mteb/trec-covid) | 0.893 | 0.828 | N/A | N/A |

Quantization

Mean over seven code tasks (HumanEval, MBPP, FreshStack, WikiSQL, APPS, CodeTransOcean Contest, and StackOverflowQA), searched with HNSW. Rescoring uses 2x oversampling. Bytes count only the vectors searched in RAM.

| Storage | 0.6B Bytes | 0.6B, No Rescoring | 0.6B, With Rescoring | 4B Bytes | 4B, No Rescoring | 4B, With Rescoring |
| --- | --- | --- | --- | --- | --- | --- |
| *Metric* | *per vec
shawkatkabbara10
🟧 echo.blog ⭐Papr introduced papr-embed-code-1 open-weight code-retrieval embedding models; Qdrant identifies 0.6B and 4B versions and reports that Papr Papr——

Interpretation history

Decision trace