Model reference · open weights

multi-sentence-BERTino

Available as managed deployment Embeddings nickprock · community Embeddings 1 variants 919 dl/mo

multi-sentence-BERTino is an open-weight embedding model from nickprock. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released bynickprock
TypeEmbedding models
TaskEmbeddings
Parameters (lead)68M
Context512 tokens
Runs withsentence-transformers
Based onnickprock/multi-sentence-BERTino
Released2024-01-10
Popularity919 downloads / month
LicenceOpen weights

About

What multi-sentence-BERTino is

This is a state-of-the-art sentence-transformers model for the Italian language. It maps sentences and paragraphs to a flexible dense vector space (up to 768 dimensions) and is highly optimized for semantic search, retrieval-augmented generation (RAG), and semantic textual similarity.

Read the full model card

What's New in V5

V5 improves upon V4 with a focus on better embedding compression: the 128-dimension truncated vectors are significantly stronger, making this version more practical for production deployments with storage or latency constraints.

Key changes from V4:

  • CoSENTLoss replaces CosineSimilarityLoss for the STS task, yielding better ranking-aware similarity training.
  • Asymmetric Matryoshka weights revised from [1.0, 0.3, 0.15, 0.1] to [1.0, 0.4, 0.2, 0.2], placing more training pressure on the 128d subspace.
  • Cosine LR scheduler with weight_decay=0.01 for more stable optimization.
  • STS dataset balanced to match retrieval dataset size, preventing disproportionate STS gradient updates.

Model Highlights: Matryoshka Representation Learning

This model was fine-tuned using Matryoshka Representation Learning (MRL). The model has learned to hierarchically compress its semantic knowledge into the earliest dimensions of the vector. You can safely truncate the output embeddings to 512, 256, or 128 dimensions with minimal degradation in retrieval metrics.

Truncating to 128 dimensions allows you to save up to 83% of storage costs in vector databases (like Pinecone, Qdrant, or Milvus) and drastically speed up similarity searches, while still outperforming standard 128d baselines.

The model was trained exclusively on Semantic Hard Negatives (mined via dense bi-encoder self-retrieval) to prevent the "false-negative" traps commonly caused by traditional BM25 lexical mining.

Usage

Direct Usage (Sentence Transformers)

First, install the Sentence Transformers library:

pip install -U sentence-transformers

Standard Usage (Full 768 Dimensions):

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("nickprock/multi-sentence-BERTino")

sentences = [
    'Chi ha dipinto la Gioconda?',
    'Leonardo da Vinci è l\'autore della Gioconda, opera conservata al Louvre.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# Output: (2, 768)

Optimized Usage (Truncated to 128 Dimensions):

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("nickprock/multi-sentence-BERTino", truncate_dim=128)

embeddings = model.encode(sentences)
print(embeddings.shape)
# Output: (2, 128) -> 83% less memory!

Evaluation Metrics

Evaluated on a 5% hold-out split of the Italian retrieval dataset (with semantic hard negatives) and the Italian STS-B dev set, using a standalone evaluation after training.

Information Retrieval

Metric768d (Full)128d (Truncated)
MAP@1000.83980.8065
NDCG@100.86800.8372
Accuracy@10.76170.7233
Accuracy@100.95840.9384

Comparison with V4

MetricV4 (768d)V5 (768d)V4 (128d)V5 (128d)
MAP@1000.83970.83980.80020.8065 (+0.63%)
NDCG@100.86880.86800.83320.8372 (+0.48%)
Accuracy@10.75930.76170.71450.7233 (+1.23%)

V5 trades a negligible variation at 768d for a substantial improvement at 128d, making compressed embeddings considerably more reliable.

Semantic Textual Similarity (STS-B Italian Dev)

MetricV4V5
Spearman Cosine0.85400.8549
Pearson Cosine0.85740.8574

Training Details

Loss Functions

The model was trained in a multi-task setup utilizing Gradient Caching for massive logical batch sizes, wrapped inside a Matryoshka Loss:

  1. Information Retrieval Task: CachedMultipleNegativesRankingLoss with mini_batch_size=16 and a logical batch_size=128.
  2. Semantic Similarity Task: CoSENTLoss (upgraded from CosineSimilarityLoss in V4).

Both base losses were wrapped in MatryoshkaLoss targeting dimensions [768, 512, 256, 128] with weights [1.0, 0.4, 0.2, 0.2].

Training Datasets

  • task_retrieval: ~45,000 synthetic Italian search queries generated via LLM (Qwen-2.5-7B) from Italian Wikipedia paragraphs. Each query is paired with 1 positive document and 2 Dense Hard Negatives.
  • task_sts: The Italian split of stsb_multi_mt, balanced to match the retrieval dataset size.

Hyperparameters

ParameterValue
per_device_train_batch_size128
num_train_epochs4
learning_rate1e-05
lr_scheduler_typecosine
warmup_steps10%
weight_decay0.01
fp16True
batch_samplerno_duplicates
best_checkpointstep 1250 (epoch ~1.76)

Citation

BibTeX

MatryoshkaLoss
@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning},
    author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}
CachedMultipleNegativesRankingLoss
@misc{gao2021scaling,
    title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
    author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
    year={2021},
    eprint={2101.06983},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}
CoSENTLoss
@misc{su2022cosent,
    title={CoSENT: A More Efficient Sentence Vector Training Method Than Sentence-BERT},
    author={Ji

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys multi-sentence-bertino for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (multi-sentence-bertino 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":"multi-sentence-bertino","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms