Views
No views yet

jina-code-embeddings-1.5b-GGUF is the GGUF export of our jina-code-embeddings-1.5b, built on Qwen/Qwen2.5-Coder-1.5B.| Feature | Jina Code Embeddings 1.5B GGUF |
|---|---|
| Base Model | Qwen2.5-Coder-1.5B |
| Supported Tasks | nl2code, code2code, code2nl, code2completion, qa |
| Max Sequence Length | 32768 (recommended ≤ 8192) |
| Embedding Vector Dim | 1536 |
| Matryoshka Dimensions | 128, 256, 512, 1024, 1536 (client-side slice) |
| Pooling Strategy | MUST use --pooling last (EOS) |
Matryoshka note:llama.cppalways returns 896-d embeddings for this model. To use 128, 256, 512, 1024, 1536, slice client-side (e.g., take the first k elements).
1INSTRUCTION_CONFIG = {
2 "nl2code": {
3 "query": "Find the most relevant code snippet given the following query:\n",
4 "passage": "Candidate code snippet:\n"
5 },
6 "qa": {
7 "query": "Find the most relevant answer given the following question:\n",
8 "passage": "Candidate answer:\n"
9 },
10 "code2code": {
11 "query": "Find an equivalent code snippet given the following code snippet:\n",
12 "passage": "Candidate code snippet:\n"
13 },
14 "code2nl": {
15 "query": "Find the most relevant comment given the following code snippet:\n",
16 "passage": "Candidate comment:\n"
17 },
18 "code2completion": {
19 "query": "Find the most relevant completion given the following start of code snippet:\n",
20 "passage": "Candidate completion:\n"
21 }
22}llama.cppjina-code-embeddings-1.5b-F16.gguf). You can either:llama.cpp-mllama-server1./llama-server \
2 --embedding \
3 --hf-repo jinaai/jina-code-embeddings-1.5b-GGUF \
4 --hf-file jina-code-embeddings-1.5b-F16.gguf \
5 --host 0.0.0.0 \
6 --port 8080 \
7 --ctx-size 32768 \
8 --ubatch-size 8192 \
9 --pooling last1./llama-server \
2 --embedding \
3 -m /path/to/jina-code-embeddings-1.5b-F16.gguf \
4 --host 0.0.0.0 \
5 --port 8080 \
6 --ctx-size 32768 \
7 --ubatch-size 8192 \
8 --pooling lastTips:-ngl <N>to offload layers to GPU. Max context is 32768 but stick to--ubatch-size≤ 8192 for best results.
/embedding)1curl -X POST http://localhost:8080/embedding \
2 -H "Content-Type: application/json" \
3 -d '{
4 "content": [
5 "Find the most relevant code snippet given the following query:\nprint hello world in python",
6 "Candidate code snippet:\nprint(\"Hello World!\")"
7 ]
8 }'/v1/embeddings)1curl http://localhost:8080/v1/embeddings \
2 -H "Content-Type: application/json" \
3 -d '{
4 "input": [
5 "Find the most relevant code snippet given the following query:\nprint hello world in python",
6 "Candidate code snippet:\nprint(\"Hello World!\")"
7 ]
8 }'