Model reference · open weights
jina-embeddings-code is an open-weight embedding model from jinaai, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
Quick Start The easiest way to starting using jina-embeddings-v2-base-code is to use Jina AI's Embedding API. Intended Usage & Model Info jina-embeddings-v2-base-code is an multilingual embedding model speaks English and 30 widely used programming languages. Same as other jina-embeddings-v2 series, it supports 8192 sequence length. jina-embeddings-v2-base-code is based on a Bert architecture (JinaBert) that supports the symmetric bidirectional variant of ALiBi to allow longer sequence length. The backbone jina-bert-v2-base-code is pretrained on the github-code dataset. The model is further trained on Jina AI's collection of more than 150 millions of coding question answer and docstring source code pairs. These pairs were obtained from various domains and were carefully selected through a thorough cleaning process. The embedding model was trained using 512 sequence length, but extrapolates to 8k sequence length (or even longer) thanks to ALiBi. This makes our model useful for a range of use cases, especially when processing long documents is needed, including technical question answering and code search. This model has 161 million parameters, which enables fast and memory efficient inference, while delivering impressive performance. Additionally, we provide the following embedding models: - jina-embeddings-v2-small-en: 33 million parameters. - jina-embeddings-v2-base-en: 137 million parameters. - jina-embeddings-v2-base-zh: Chinese-English Bilingual embeddings. - jina-embeddings-v2-base-de: German-English Bilingual embeddings. - jina-embeddings-v2-base-es: Spanish-English Bilingual embeddings (soon). - jina-embeddings-v2-base-code: 161 million parameters code embeddings. <details<summarySupported (Programming) Languages</summary - English - Assembly - Batchfile - C - C# - C++ - CMake - CSS - Dockerfile - FORTRAN - GO - Haskell - HTML - Java - JavaScript - Julia - Lua - Makefile - Markdown - PHP - Perl - PowerShell - Python - Ruby - Rust - SQL - Scala - Shell - TypeScript - TeX - Visual Basic Data & Parameters Jina Embeddings V2 technical report Usage <details<summaryPlease apply mean pooling when integrating the model.</summary Why mean pooling? mean poooling tak
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | jinaai |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 161M |
| Context | 8k tokens |
| Variants | 1 |
| Runs with | sentence-transformers |
| Released | 2023-11-17 |
| Popularity | 404k downloads / month |
| Likes | 142 |
| Licence | Open weights |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| jina-embeddings-v2-base-code | 161M | BF16 | ~0.4 GB | ✓ | Weights ↗ |
Using it via the API
Once AxForge deploys jina-embeddings-code for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (jina-embeddings-code below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"jina-embeddings-code","input":"text to embed"}'
Details
Languages
Trained / evaluated on
Tags
Papers
Licence
Open weights under apache-2.0 — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗
Explore