SAVRN
Search Contact SAVRN

Open-weight model · Feature extraction

jina-embeddings-v2-base-code

by Jina AI jinaai/jina-embeddings-v2-base-code

The easiest way to starting using jina-embeddings-v2-base-code is to use Jina AI's Embedding API. jina-embeddings-v2-base-code is an multilingual embedding model speaks English and 30 widely used programming languages.

Parameters161M
Context8,192
Weights1.8 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads274.6k

Runs On

What it takes to serve jina-embeddings-v2-base-code (161M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.3 GB 0.4 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Jina AI, published under apache-2.0, revision 516f4baf13de.



The text embedding set trained by Jina AI.

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.

Read the full model card (765 words)

Configuration

Architecture
JinaBertForMaskedLM
Context length (tokens)
8,192
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
61,056
Stored precision
float16
Model type
bert

Identity and Version

Repository
jinaai/jina-embeddings-v2-base-code
Publisher
Jina AI
Task
Feature extraction
Modality
Text
Library
sentence-transformers
Parameters
161M parameters
Languages
en
Revision
516f4baf13dec4ddddda8631e019b5737c8bc250
First published
2023-11-17
Last updated
2025-01-06

Files and Weights

18 files, 1.8 GB in total. The weights are 5 files totalling 1.8 GB in bin, onnx, safetensors.

Weights5 files · 1.8 GB
Configuration8 files · 1.2 MB
Tokenizer3 files · 3.5 MB
Documentation1 file · 7.4 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights321.8 MB 8b53bfd4ae2c
onnx/model.onnxWeights641.5 MB 63363fc17842
onnx/model_fp16.onnxWeights321.1 MB 1aafc4fcd63d
onnx/model_quantized.onnxWeights161.9 MB ed45870251c9
pytorch_model.binWeights321.8 MB 1c28fb0a8bc9
1_Pooling/config.jsonConfiguration191 B
config.jsonConfiguration1.2 KB
generation_config.jsonConfiguration90 B
modules.jsonConfiguration229 B
sentence_bert_config.jsonConfiguration99 B
special_tokens_map.jsonConfiguration280 B
train_results.jsonConfiguration198 B
trainer_state.jsonConfiguration1.2 MB
README.mdDocumentation7.4 KB
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer2.6 MB
tokenizer_config.jsonTokenizer493 B
vocab.jsonTokenizer970.6 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
1.8 GB
Download from Jina AI

Released by Jina AI through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published1.8 GB
16-bit0.3 GB
8-bit0.2 GB
4-bit0.1 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Compare jina-embeddings-v2-base-code

Questions About jina-embeddings-v2-base-code

How much GPU memory does jina-embeddings-v2-base-code need?

About 0.4 GB at 16-bit and 0.1 GB at 4-bit: the weights (161M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run jina-embeddings-v2-base-code on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use jina-embeddings-v2-base-code commercially?

Yes. jina-embeddings-v2-base-code is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is jina-embeddings-v2-base-code's context length?

8,192 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Feature extraction

Vela-1.0-Omni-Nano

vLLM Semantic Router

Vela Omni Nano maps text, images, and speech into a shared embedding space for multimodal search, routing, and use a 0–100 scale; higher is better. All applicable models use the same examples and retrieval pools. N/A denotes a modality the text-only model does not support. Bold Vela scores improve on multi-modal-embed-small. Macro-F1 gives equal weight to every intent class (77 for Banking77 and 60 for MASSIVE), complementing the query-weighted accuracy; undefined class F1 is zero. Text evaluation uses fixed class prototypes: 3,080 Banking77 and 2,972 MASSIVE English queries. Vela Omni is adapted using training examples and intent labels from these two datasets; comparison models are…

Open weights apache-2.0 134M parameters pytorch

For more details please refer to our Github: FlagEmbedding. If you are looking for a model that supports more languages, longer texts, and other retrieval methods, you can try using bge-m3. FlagEmbedding focuses on retrieval-augmented LLMs, consisting of the following projects currently: - 1/30/2024: Release BGE-M3, a new member to BGE model series! M3 stands for Multi-linguality (100+ languages), Multi-granularities (input length up to 8192), Multi-Functionality (unification of dense, lexical, multi-vec/colbert retrieval). It is the first embedding model which supports all three retrieval methods, achieving new SOTA on multi-lingual (MIRACL) and cross-lingual (MKQA) benchmarks. Technical…

Open weights mit 109M parameters 512 tokens sentence-transformers

Recommend switching to newest BAAI/bge-base-en-v1.5, which has more reasonable similarity distribution and same method of usage. More details please refer to our Github: FlagEmbedding. FlagEmbedding can map any text to a low-dimensional dense vector which can be used for tasks like retrieval, classification, clustering, or semantic search. And it also can be used in vector databases for LLMs. Updates - 10/12/2023: Release LLM-Embedder, a unified embedding model to support diverse retrieval augmentation needs for LLMs. Paper:fire: - 09/15/2023: The technical report of BGE has been released - 09/15/2023: The masive training data of BGE has been released - 09/12/2023: New models: - 09/07/2023…

Open weights mit 109M parameters 512 tokens transformers

[news] A cross-lingual extension of SapBERT will appear in the main onference of ACL 2021! [news] SapBERT will appear in the conference proceedings of NAACL 2021! SapBERT by Liu et al. (2020). Trained with UMLS 2020AA (English only), using microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext as the base model. The input should be a string of biomedical entity names, e.g., "covid infection" or "Hydroxychloroquine". The [CLS] embedding of the last layer is regarded as the output. The following script converts a list of strings (entity names) into embeddings. For more details about training and eval, see SapBERT github repo.

Open weights apache-2.0 109M parameters 512 tokens transformers

Model · Feature extraction

granite-embedding-small-english-r2

IBM Granite

Granite-embedding-small-english-r2 is a 47M parameter dense biencoder embedding model from the Granite Embeddings collection that can be used to generate high quality text embeddings. This model produces embedding vectors of size 384 based on context length of upto 8192 tokens. Compared to most other open-source models, this model was only trained using open-source relevance-pair datasets with permissive, enterprise-friendly license, plus IBM collected and generated datasets. The r2 models show strong performance across standard and IBM-built information retrieval benchmarks (BEIR, ClapNQ), code retrieval (COIR), long-document search benchmarks (MLDR, LongEmbed), conversational multi-turn…

Open weights apache-2.0 48M parameters 8,192 tokens sentence-transformers

More details please refer to our Github: FlagEmbedding. If you are looking for a model that supports more languages, longer texts, and other retrieval methods, you can try using bge-m3. FlagEmbedding focuses on retrieval-augmented LLMs, consisting of the following projects currently: - 1/30/2024: Release BGE-M3, a new member to BGE model series! M3 stands for Multi-linguality (100+ languages), Multi-granularities (input length up to 8192), Multi-Functionality (unification of dense, lexical, multi-vec/colbert retrieval). It is the first embedding model which supports all three retrieval methods, achieving new SOTA on multi-lingual (MIRACL) and cross-lingual (MKQA) benchmarks. Technical…

Open weights mit 33M parameters 512 tokens sentence-transformers