From: Pood666 <huggingface.co/Pood666>Newsgroups: alt.freeweights.visionSubject:

USER2-small

Date: 2026-11-15Commit: d89a03dSigned: 2DC28CC7B26A283B ✓

Sentence similarity model with 34M parameters. Onnx and safetensors weights, 285 MB in all. Published by Pood666 under Apache-2.0.

34M params285MBUSER2-smallonnx safetensorspermissive
FactsParams34MSize285 MBFormatsonnx, safetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get Pood666/USER2-small
# manifest sha256 0764f64c1f1d… · 285 MB · 19 files
$ fw verify ./USER2-small Pood666/USER2-small
From sourceHosted (signed)Pood666/USER2-smallLast check: 2026-11-15 05:25 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of RuModernBERT-small.

Works with

Evaluate with

Overview

Size
285 MB
Weights
138 MB (safetensors)
Parameters
34M
Formats
onnx, safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
19, each with a sha256
Publisher
Pood666
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: deepvk/RuModernBERT-small

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:25 UTCpassed

Model card

From the publisher at commit d89a03d. Shown as plain text with links; images open at the publisher.

USER2-small#

USER2 is a new generation of the Universal Sentence Encoder for Russian, designed for sentence representation with long-context support of up to 8,192 tokens.

The models are built on top of the RuModernBERT encoders and are fine-tuned for retrieval and semantic tasks. They also support Matryoshka Representation Learning (MRL) — a technique that enables reducing embedding size with minimal loss in representation quality.

This is a small model with 34 million parameters.

ModelSizeContext LengthHidden DimMRL Dims
deepvk/USER2-small34M8192384[32, 64, 128, 256, 384]
deepvk/USER2-base149M8192768[32, 64, 128, 256, 384, 512, 768]

Performance#

To evaluate the model, we measure quality on the MTEB-rus benchmark. Additionally, to measure long-context retrieval, we run Russian subset of MultiLongDocRetrieval (MLDR) task.

MTEB-rus

ModelSizeHidden DimContext LengthMRL supportMean(task)Mean(taskType)ClassificationClusteringMultiLabelClassificationPairClassificationRerankingRetrievalSTS
USER-base124M768512❌58.1156.6759.8953.2637.7259.7655.5856.1474.35
USER-bge-m3359M10248192❌62.8062.2861.9253.6636.1865.0768.7273.6376.76
multilingual-e5-base278M768512❌58.3457.2458.2550.2733.6554.9866.2467.1470.16
multilingual-e5-large-instruct560M1024512❌65.0063.3666.2863.1341.1563.8964.3568.2376.48
jina-embeddings-v3572M10248192✅63.4560.9365.2460.9039.2459.2253.8671.9976.04
ru-en-RoSBERTa404M1024512❌61.7160.4062.5656.0638.8860.7963.8966.5274.13
USER2-small34M3848192✅58.3256.6859.7657.0633.5654.0258.2661.8772.25
USER2-base149M7688192✅61.1259.5961.6759.2236.6156.3962.0666.9074.28

MLDR-rus

ModelSizenDCG@10 ↑
USER-bge-m3359M58.53
KaLM-v1.5494M53.75
jina-embeddings-v3572M49.67
E5-mistral-7b7.11B52.40
USER2-small34M51.69
USER2-base149M54.17

We compare only model with context length of 8192.

Matryoshka#

To evaluate MRL capabilities, we also use MTEB-rus, applying dimensionality cropping to the embeddings to match the selected size.

Image: MRL

Usage#

Prefixes#

This model is trained similarly to Nomic Embed and expects task-specific prefixes to be added to the input. The choice of prefix depends on the specific task. We follow a few general guidelines when selecting a prefix:

  • "classification: " is the default and most universal prefix, often performing well across a variety of tasks.
  • "clustering: " is recommended for clustering applications: group texts into clusters, discover shared topics, or remove semantic duplicates.
  • "search_query: " and "search_document: " are intended for retrieval and reranking tasks. Also, in some classification tasks, especially with shorter texts, "search_query" shows superior performance to other prefixes. On the other hand, "search_document" can be beneficial for long-context sentence similarity tasks.

However, we encourage users to experiment with different prefixes, as certain domains may benefit from specific ones.

Sentence Transformers#
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("deepvk/USER2-small")

query_embeddings = model.encode(["Когда был спущен на воду первый миноносец «Спокойный»?"], prompt_name="search_query")
document_embeddings = model.encode(["Спокойный (эсминец)\nЗачислен в списки ВМФ СССР 19 августа 1952 года."], prompt_name="search_document")

similarities = model.similarity(query_embeddings, document_embeddings)

To truncate the embedding dimension, simply pass the new value to the model initialization:

model = SentenceTransformer("deepvk/USER2-small", truncate_dim=128)

This model was trained with dimensions [32, 64, 128, 256, 384], so it’s recommended to use one of these for best performance.

Transformers#
import torch
import torch.nn.functional as F
from transformers import AutoTokenizer, AutoModel


def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0]
    input_mask_expanded = (
        attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    )
    return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(
        input_mask_expanded.sum(1), min=1e-9
    )


queries = ["search_query: Когда был спущен на воду первый миноносец «Спокойный»?"]
documents = ["search_document: Спокойный (эсминец)\nЗачислен в списки ВМФ СССР 19 августа 1952 года."]

tokenizer = AutoTokenizer.from_pretrained("deepvk/USER2-small")
model = AutoModel.from_pretrained("deepvk/USER2-small")

encoded_queries = tokenizer(queries, padding=True, truncation=True, return_tensors="pt")
encoded_documents = tokenizer(documents, padding=True, truncation=True, return_tensors="pt")

with torch.no_grad():
    queries_outputs = model(**encoded_queries)
    documents_outputs = model(**encoded_documents)

query_embeddings = mean_pooling(queries_outputs, encoded_queries["attention_mask"])
query_embeddings = F.normalize(query_embeddings, p=2, dim=1)
doc_embeddings = mean_pooling(documents_outputs, encoded_documents["attention_mask"])
doc_embeddings = F.normalize(doc_embeddings, p=2, dim=1)

similarities = query_embeddings @ doc_embeddings.T

To truncate the embedding dimension, select the first values:

query_embeddings = mean_pooling(queries_outputs, encoded_queries["attention_mask"])
query_embeddings = query_embeddings[:, :truncate_dim]
query_embeddings = F.normalize(query_embeddings, p=2, dim=1)

Training details#

This is the small version with 34 million parameters, based on RuModernBERT-small. It was fine-tuned in three stages: RetroMAE, Weakly Supervised Fine-Tuning, and Supervised Fine-Tuning.

Following the bge-m3 training strategy, we use RetroMAE as a retrieval-oriented continuous pretraining step. Leveraging data from the final stage of RuModernBERT training, RetroMAE enhances retrieval quality—particularly for long-context inputs.

To follow best practices for building a state-of-the-art encoder, we rely on large-scale training with weakly related text pairs. However, such datasets are not publicly available for Russian, unlike for English or Chinese. To overcome this, we apply two complementary strategies:

  • Cross-lingual transfer: We train on both English and Russian data, leveraging English resources (nomic-unsupervised) alongside our in-house English-Russian parallel corpora.
  • Unsupervised pair mining: From the deepvk/cultura_ru_edu corpus, we extract 50M pairs using a simple heuristic—selecting non-overlapping text blocks that are not substrings of one another.

This approach has shown promising results, allowing us to train high-performing models with minimal target-language pairs—especially when compared to pipelines used for other languages.

The table below shows the datasets used and the number of times each was upsampled.

DatasetSizeUpsample
nomic-en235M1
nomic-ru39M3
in-house En-Ru parallel250M1
cultura-sampled50M1
Total652M

For the third stage, we switch to cleaner, task-specific datasets. In some cases, additional filtering was applied using a cross-encoder. For all retrieval datasets, we mine hard negatives.

DatasetExamplesNotes
Nomic-en-supervised1.7 MUnmodified
AllNLI200 KTranslated SNLI/MNLI/ANLI to Russian
fishkinet-posts93 KTitle–content pairs
gazeta55 KTitle–text pairs
habr_qna100 KTitle–description pairs
lenta100 KTitle–news pairs
miracl_ru10 KOne positive per anchor
mldr_ru1.8 KUnmodified
mr-tydi_ru5.3 KUnmodified
mmarco_ru500 KUnmodified
ru-HNP100 KOne pos + one neg per anchor
ru‑queries199 KIn-house (generated as in arXiv:2401.00368)
ru‑WaNLI35 KEntailment -> pos, contradiction -> neg
sampled_wiki1 MSampled text blocks from Wikipedia
summ_dialog_news37 KSummary–info pairs
wikiomnia_qna100 KQA pairs (T5-generated)
yandex_q83 KQ+desc-answer pairs
Total4.3 M
Ablation#

Alongside the final model, we also release all intermediate training steps. Both the retromae and weakly_sft models are available under the specified revisions in this repository. We hope these additional models prove useful for your experiments.

Below is a comparison of all training stages on a subset of MTEB-rus.

Image: training_stages

Citations#

@misc{deepvk2025user,
    title={USER2},
    author={Malashenko, Boris and Spirin, Egor and Sokolov Andrey},
    url={https://huggingface.co/deepvk/USER2-small},
    publisher={Hugging Face}
    year={2025},
}

Files

19 files · 285 MBWeights 138 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 19 files with their sha256
FileSizesha256
.gitattributes1.56 KB04bc81cb0b1a143a2f8bbeb55e04b607a85d509407eec07eb1cc47cea0e42284
1_Pooling/config.json296 Ba19c83805e1ce4174f3fbfec4ac8d3b8dbae0c958f8fd51b80937eb33e0c5335
README.md14.8 KB995e940e937c7bfc0bfc1a2d87da603d02590ef1a630f779c3350cbb708cb227
assets/mrl.png134 KBa020469efa3c0a2b05f18442d85d96f91e760f712ede7163a4b660412369d231
assets/training_stages.png122 KB0a528c6c5ed943551a85ce4f518979b695ccc92678ea06ab4d5781a03c9188e1
config.json2.27 KBccf3bfc44ddc6eb2184c35347b975c17d1bffe7a63103e5fdc92c6a48adc062c
config_sentence_transformers.json359 B3a032a6eacfd7c2ed17dbad876d0b940ed7d2ac0091da43c2a89a880e692ddb9
model.safetensors138 MBf4fb765b2302192d3ac2315fd3ee0951f23efca4ad4ad19636b637e81d790529
modules.json229 B8f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
onnx/config.json2.29 KB61e3d6a6a485ddc91bcfc9c98855413595d45fbb8e919887b115abb37ed5ba4d
onnx/model.onnx138 MB274d7e4476fd8a99acf208315eae78e2b3b4524264efb40d14beb3618daaa29a
onnx/special_tokens_map.json837 B2ea3c1eb27baf06d75115d453c067c1832d7101a97243b298a4af8d59c916d62
onnx/tokenizer.json4.75 MB8bdc337bdee65a5fdb697df1ac7453b2ae5c34c105125eac5f68c87827395c4e
onnx/tokenizer_config.json21.2 KB818f4315a225493cfb33e07d6cb49e56432a90364ef080cbe0c594ceb28ec59a
ort_config.json520 Bdba70d268c9da07c5c3317423a8a91e2fec407871fc513d838ebff47e034fe20
sentence_bert_config.json54 Beb9b44b13c0f52a3b3685c3b1cbdea1ba8b04bea123b98f61610048940776eb1
special_tokens_map.json837 B2ea3c1eb27baf06d75115d453c067c1832d7101a97243b298a4af8d59c916d62
tokenizer.json4.75 MB8bdc337bdee65a5fdb697df1ac7453b2ae5c34c105125eac5f68c87827395c4e
tokenizer_config.json21.2 KB818f4315a225493cfb33e07d6cb49e56432a90364ef080cbe0c594ceb28ec59a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d89a03d851 pinned now2026-11-15 05:25 UTC19 files · 285 MB

Use it

$ fw get Pood666/USER2-small
# manifest sha256 0764f64c1f1d… · 285 MB · 19 files
$ fw verify ./USER2-small Pood666/USER2-small
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/Pood666/USER2-small.json --dir ./USER2-small $ python3 fw.py verify ./USER2-small ./Pood666__USER2-small.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Pood666/USER2-small --revision d89a03d851150c462f6db888b81d3b8d9aa0e7f3 --local-dir ./USER2-small
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("Pood666/USER2-small", revision="d89a03d851150c462f6db888b81d3b8d9aa0e7f3") model = AutoModel.from_pretrained("Pood666/USER2-small", revision="d89a03d851150c462f6db888b81d3b8d9aa0e7f3", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("Pood666/USER2-small", revision="d89a03d851150c462f6db888b81d3b8d9aa0e7f3") vectors = model.encode(["Hello"])

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
995e940e937c7bfc0bfc1a2d87da603d02590ef1a630f779c3350cbb708cb227
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: Pood666 <huggingface.co/Pood666>Newsgroups: alt.freeweights.visionSubject: USER2-smallDate: 2026-11-15Commit: d89a03dSigned: 2DC28CC7B26A283B ✓
Upstream
Pood666/USER2-small
Pinned commit
d89a03d851150c462f6db888b81d3b8d9aa0e7f3
Manifest
USER2-small.json · .minisig
Manifest sha256
0764f64c1f1d2bf0e9b0a8099931b58cd8aec35b1745bfb400365b13a45c4ac7
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:25 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/Pood666/USER2-small.json $ curl -O https://freeweights.allternit.com/manifests/Pood666/USER2-small.json.minisig $ minisign -Vm USER2-small.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

deepvk/RuModernBERT-small · this model is a quantization of it

1 model in the catalog name this one as their parent.

Quantizations
1
Quantizations 1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Pood666/USER2-small
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. USER2-small.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of USER2-small. Each has its own license check and page.

From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX