Instructions to use jinaai/jina-code-embeddings-1.5b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use jinaai/jina-code-embeddings-1.5b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="jinaai/jina-code-embeddings-1.5b-GGUF", filename="jina-code-embeddings-1.5b-BF16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use jinaai/jina-code-embeddings-1.5b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16 # Run inference directly in the terminal: ./llama-cli -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf jinaai/jina-code-embeddings-1.5b-GGUF:BF16
Use Docker
docker model run hf.co/jinaai/jina-code-embeddings-1.5b-GGUF:BF16
- LM Studio
- Jan
- Ollama
How to use jinaai/jina-code-embeddings-1.5b-GGUF with Ollama:
ollama run hf.co/jinaai/jina-code-embeddings-1.5b-GGUF:BF16
- Unsloth Studio new
How to use jinaai/jina-code-embeddings-1.5b-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jinaai/jina-code-embeddings-1.5b-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jinaai/jina-code-embeddings-1.5b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jinaai/jina-code-embeddings-1.5b-GGUF to start chatting
- Docker Model Runner
How to use jinaai/jina-code-embeddings-1.5b-GGUF with Docker Model Runner:
docker model run hf.co/jinaai/jina-code-embeddings-1.5b-GGUF:BF16
- Lemonade
How to use jinaai/jina-code-embeddings-1.5b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jinaai/jina-code-embeddings-1.5b-GGUF:BF16
Run and chat with the model
lemonade run user.jina-code-embeddings-1.5b-GGUF-BF16
List all available models
lemonade list
The GGUF version of the code embedding model trained by Jina AI.
Jina Code Embeddings: A Small but Performant Code Embedding Model
Intended Usage & Model Info
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.
The model supports code retrieval and technical QA across 15+ programming languages and multiple domains, including web development, software development, machine learning, data science, and educational coding problems.
Key Features
| 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).
Task Instructions
Prefix inputs with task-specific instructions:
INSTRUCTION_CONFIG = {
"nl2code": {
"query": "Find the most relevant code snippet given the following query:\n",
"passage": "Candidate code snippet:\n"
},
"qa": {
"query": "Find the most relevant answer given the following question:\n",
"passage": "Candidate answer:\n"
},
"code2code": {
"query": "Find an equivalent code snippet given the following code snippet:\n",
"passage": "Candidate code snippet:\n"
},
"code2nl": {
"query": "Find the most relevant comment given the following code snippet:\n",
"passage": "Candidate comment:\n"
},
"code2completion": {
"query": "Find the most relevant completion given the following start of code snippet:\n",
"passage": "Candidate completion:\n"
}
}
Use the appropriate prefix for queries and passages at inference time.
Install llama.cpp
Follow the official instructions: https://github.com/ggml-org/llama.cpp
Model files
Hugging Face repo (GGUF): https://huggingface.co/jinaai/jina-code-embeddings-1.5b-GGUF
Pick a file (e.g., jina-code-embeddings-1.5b-F16.gguf). You can either:
- auto-download by passing the repo and file directly to
llama.cpp - use a local path with
-m
HTTP service with llama-server
Auto-download from Hugging Face (repo + file)
./llama-server \
--embedding \
--hf-repo jinaai/jina-code-embeddings-1.5b-GGUF \
--hf-file jina-code-embeddings-1.5b-F16.gguf \
--host 0.0.0.0 \
--port 8080 \
--ctx-size 32768 \
--ubatch-size 8192 \
--pooling last
Local file
./llama-server \
--embedding \
-m /path/to/jina-code-embeddings-1.5b-F16.gguf \
--host 0.0.0.0 \
--port 8080 \
--ctx-size 32768 \
--ubatch-size 8192 \
--pooling last
Tips:
-ngl <N>to offload layers to GPU. Max context is 32768 but stick to--ubatch-size≤ 8192 for best results.
Query examples (HTTP)
Native endpoint (/embedding)
curl -X POST http://localhost:8080/embedding \
-H "Content-Type: application/json" \
-d '{
"content": [
"Find the most relevant code snippet given the following query:\nprint hello world in python",
"Candidate code snippet:\nprint(\"Hello World!\")"
]
}'
OpenAI-compatible (/v1/embeddings)
curl http://localhost:8080/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
"input": [
"Find the most relevant code snippet given the following query:\nprint hello world in python",
"Candidate code snippet:\nprint(\"Hello World!\")"
]
}'
Training & Evaluation
See our technical report: https://arxiv.org/abs/2508.21290
Contact
Join our Discord: https://discord.jina.ai
- Downloads last month
- 9,162
1-bit
2-bit
3-bit
4-bit
8-bit
16-bit
Model tree for jinaai/jina-code-embeddings-1.5b-GGUF
Base model
Qwen/Qwen2.5-1.5B