IBM releases Apache 2.0 multilingual embedding models

IBM has released two Apache 2.0 multilingual embedding models built on ModernBERT: a 97M-parameter compact model and a 311M-parameter full-size model. The company says both support 200+ languages, 32K-token context, and code retrieval across nine programming languages.

IBM releases Apache 2.0 multilingual embedding models

IBM has released two new multilingual embedding models under the Apache 2.0 license, both built on ModernBERT and designed for retrieval use cases across languages and code. The models are granite-embedding-97m-multilingual-r2 and granite-embedding-311m-multilingual-r2.

According to IBM, the smaller model has 97 million parameters and the larger model has 311 million. Both cover more than 200 languages, are tuned on 52 languages, and support context lengths of up to 32,768 tokens. IBM says they also support retrieval for code in nine programming languages: Python, Go, Java, JavaScript, PHP, Ruby, SQL, C and C++.

⚡ New to this?

This is a release of new AI models that turn text into numerical vectors called embeddings. Embeddings are used by search systems and retrieval-augmented generation, or RAG, which means an AI system pulls relevant documents before answering a question. The big deal here is that IBM is offering these models under Apache 2.0, with broad language coverage and local deployment options.

🦞 OpenClaw angle

If you run multilingual search or RAG pipelines, test the 97M model first where latency and footprint matter, then compare it with the 311M model on your own corpus. If your stack uses LangChain, LlamaIndex, Haystack or Milvus, switch the model name and rerun retrieval tests before changing code paths. For self-hosted systems, try the ONNX or OpenVINO weights on CPU nodes, and use the 311M model with Matryoshka truncation when you want to cut index size without dropping to a different embedding family.

The company says the models are intended for use in retrieval-augmented generation, multilingual search, and cross-lingual workflows. They are available through sentence-transformers and transformers, and IBM says they can be used as drop-in replacements in LangChain, LlamaIndex, Haystack and Milvus with a model-name change.

IBM says both releases ship with ONNX and OpenVINO weights for CPU-optimized inference. The models can also be used as embedding endpoints through vLLM, and IBM says the weights can be converted to GGUF for Ollama using llama.cpp.

The headline benchmark result in IBM’s post is the 97M model’s score of 60.3 on MTEB Multilingual Retrieval across 18 languages. IBM says that is the highest retrieval score it found for any open multilingual embedding model under 100 million parameters. The company says multilingual-e5-small, which has 118 million parameters, scores 50.9 on the same benchmark.

IBM also says the 311M model scores 65.2 on MTEB Multilingual Retrieval, placing it second among open models under 500 million parameters in that benchmark. On IBM’s broader benchmark table, the 311M model also leads LongEmbed at 71.7, while the 97M model posts 65.6 on LongEmbed.

Both models are a rebuild from IBM’s earlier R1 generation. IBM says the earlier models used XLM-RoBERTa encoders with a 512-token context window, while the new R2 models use ModernBERT, rotary position embeddings, alternating attention lengths and Flash Attention 2.0. IBM says those changes help support the 32K context window and improve throughput on long sequences.

The 311M model uses a 22-layer encoder and a 262K-token multilingual vocabulary. IBM says it was trained with knowledge distillation, contrastive fine-tuning, model merging and Matryoshka Representation Learning, which allows the 768-dimensional embeddings to be truncated to 512, 384, 256 or 128 dimensions with limited quality loss.

IBM says the 97M model was built differently. It starts from a pruned 180K-token vocabulary and uses knowledge distillation plus contrastive training. The company says that tradeoff keeps the model compact while preserving broad multilingual coverage.

On cross-lingual tests, IBM says the 311M model improves over its R1 predecessor on both Belebele Retrieval and MLQA Retrieval. The 97M model matches its predecessor on MLQA Retrieval but scores lower on Belebele Retrieval, which IBM attributes to the smaller vocabulary and reduced layer count.

IBM says the training data came from a mix of IBM-curated datasets, publicly available data and internally generated or synthetic data. The company says it filtered public web-derived data using its own quality, deduplication and governance processes and intentionally avoided MS-MARCO and datasets with non-commercial licensing restrictions.

Source: Hugging Face Blog ↗

More from AI News