Overview
jina-code-embeddings-0.5b is a 494 million parameter code embedding model designed for retrieving code from natural language queries, technical Q&A, and identifying similar code across languages. Built on Qwen2.5-Coder-0.5B backbone, it generates embeddings via last-token pooling and addresses the fundamental limitation of traditional code embedding models that rely on scarce aligned data like comments and docstrings. The model leverages abundant unaligned code and documentation used in LLM training, achieving state-of-the-art performance despite its compact size. It supports five task categories with specific instruction prefixes: NL2Code, TechQA, Code2Code, Code2NL, and Code2Completion. The model implements Matryoshka representation learning for truncatable embeddings, allowing flexible precision-resource trade-offs.
Highlights
- Multilingual support (15+ programming languages) and compatibility with a wide range of domains, including web development, software development, machine learning, data science, and educational coding problems.
- Task-specific instruction prefixes for NL2Code, Code2Code, Code2NL, Code2Completion, and Technical QA, which can be selected at inference time.
- Flexible embedding size: dense embeddings are 896-dimensional by default but can be truncated to as low as 64 with minimal performance loss.
Details
Unlock automation with AI agent solutions

Features and programs
Financing for AWS Marketplace purchases
Pricing
Dimension | Description | Cost/host/hour |
|---|---|---|
ml.g5.xlarge Inference (Batch) Recommended | Model inference on the ml.g5.xlarge instance type, batch mode | $2.50 |
ml.g5.xlarge Inference (Real-Time) Recommended | Model inference on the ml.g5.xlarge instance type, real-time mode | $2.50 |
ml.p2.xlarge Inference (Batch) | Model inference on the ml.p2.xlarge instance type, batch mode | $2.30 |
ml.p2.8xlarge Inference (Batch) | Model inference on the ml.p2.8xlarge instance type, batch mode | $18.00 |
ml.p2.16xlarge Inference (Batch) | Model inference on the ml.p2.16xlarge instance type, batch mode | $35.00 |
ml.p3.2xlarge Inference (Batch) | Model inference on the ml.p3.2xlarge instance type, batch mode | $7.00 |
ml.p3.8xlarge Inference (Batch) | Model inference on the ml.p3.8xlarge instance type, batch mode | $25.00 |
ml.p3.16xlarge Inference (Batch) | Model inference on the ml.p3.16xlarge instance type, batch mode | $48.25 |
ml.g4dn.xlarge Inference (Batch) | Model inference on the ml.g4dn.xlarge instance type, batch mode | $1.50 |
ml.g4dn.2xlarge Inference (Batch) | Model inference on the ml.g4dn.2xlarge instance type, batch mode | $2.20 |
Vendor refund policy
Refunds to be processed under the conditions specified in EULA.
How can we make this page better?
Legal
Vendor terms and conditions
Content disclaimer
Delivery details
Amazon SageMaker model
An Amazon SageMaker model package is a pre-trained machine learning model ready to use without additional training. Use the model package to create a model on Amazon SageMaker for real-time inference or batch processing. Amazon SageMaker is a fully managed platform for building, training, and deploying machine learning models at scale.
Version release notes
Bug fixes
Additional details
Inputs
- Summary
The model accepts JSON inputs. Texts must be passed in the following format.
https://github.com/jina-ai/jina-sagemaker/blob/main/examples/sample-inference-code-500m-input.jsonÂ
- Input MIME type
- text/csv
Input data descriptions
The following table describes supported input data fields for real-time inference and batch transform.
Field name | Description | Constraints | Required |
|---|---|---|---|
data | Texts to embed | n/a | Yes |
parameters.task | Task type:
nl2code.query, nl2code.passage, code2code.query, code2code.passage,
code2nl.query, code2nl.passage, code2completion.query, code2completion.passage,
qa.query, qa.passage.
nl2code.query
Find the most relevant code snippet given the following query.
nl2code.passage
Candidate code snippet.
code2code.query
Find an equivalent code snippet given the following code snippet.
code2code.passage
Candidate code snippet.
code2nl.query
Find the most relevant comment given the following code snippet.
code2nl.passage
Candidate comment.
code2completion.query
Find the most relevant completion given the following start of code snippet.
code2completion.passage
Candidate completion
qa.query
Find the most relevant answer given the following question.
qa.passage
Candidate answer. | - | No |
Support
Vendor support
We provide support for this model package through our enterprise support channel:
AWS infrastructure support
AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.
Similar products




