alt.freeweights.vision / RuModernBERT-small
From: deepvk <huggingface.co/deepvk>Newsgroups: alt.freeweights.visionSubject:

RuModernBERT-small

Date: 2026-11-15Commit: 06d09ccSigned: 2DC28CC7B26A283B ✓

Fill mask model with 35M parameters. Safetensors weights, 143 MB in all. Published by deepvk under Apache-2.0.

35M params143MBRuModernBERT-smallsafetensorspermissive
FactsParams35MSize143 MBFormatssafetensorsTaskfill maskLicenseApache-2.0From sourcepermissive
$ fw get deepvk/RuModernBERT-small
# manifest sha256 1457f5a32fc4… · 143 MB · 8 files
$ fw verify ./RuModernBERT-small deepvk/RuModernBERT-small
From sourceHosted (signed)deepvk/RuModernBERT-smallLast check: 2026-11-15 03:30 UTC

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

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
143 MB
Weights
138 MB (safetensors)
Parameters
35M
Formats
safetensors
Task
fill mask
License
Apache-2.0 (permissive)
Files
8, each with a sha256
Publisher
deepvk
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

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 03:30 UTCpassed

Model card

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

RuModernBERT-small#

The Russian version of the modernized bidirectional encoder-only Transformer model, ModernBERT. RuModernBERT was pre-trained on approximately 2 trillion tokens of Russian, English, and code data with a context length of up to 8,192 tokens, using data from the internet, books, scientific sources, and social media.

Model SizeHidden DimNum LayersVocab SizeContext LengthTask
deepvk/RuModernBERT-small [this]35M38412503688192Masked LM
deepvk/RuModernBERT-base150M76822503688192Masked LM

Notice ⚠️#

The patched tokenizer is provided under the patched-tokenizer revision.

Details

We observed that several Russian lowercase letters were split into multiple subword tokens. This can be problematic for tasks like Named Entity Recognition (NER), where it is important that the first token of a word is a semantically meaningful unit.

To address this, we release a patched revision of the tokenizer with minimal but targeted change. Six common Russian lowercase letters (а, е, и, н, о, т) are now encoded as single tokens. These tokens were assigned to [unusedX] slots in the vocabulary. Corresponding BPE merges were added to ensure proper single-token encoding during inference. To preserve compatibility with the pretrained model each new token was initialized with the embedding of its uppercase counterpart both in tok_embedding and lm_head. To prevent duplicate vectors and maintain robustness, a small amount of Gaussian noise was added during initialization with gamma 1e-3.

We evaluated the patched model on 20 tasks from the RuMTEB benchmark and did not observe any statistically significant differences in performance compared to the original version. If your task is sensitive to tokenization granularity, such as in NER, we recommend using this updated version.

Usage example:

from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "deepvk/RuModernBERT-small"

# You can specify revision
revision = "patched-tokenizer"
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
model = AutoModelForMaskedLM.from_pretrained(model_id, revision=revision, attn_implementation="flash_attention_2")

Usage#

Don't forget to update transformers and install flash-attn if your GPU supports it.

from transformers import AutoTokenizer, AutoModelForMaskedLM

# Prepare model
model_id = "deepvk/RuModernBERT-small"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id, attn_implementation="flash_attention_2")
model = model.eval()

# Prepare input
text = "Мама мыла [MASK]."
inputs = tokenizer(text, return_tensors="pt")
masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)

# Make prediction
outputs = model(**inputs)

# Show prediction
predicted_token_id = outputs.logits[0, masked_index].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)
print("Predicted token:", predicted_token)
# Predicted token:  посуду

Training Details#

This is the small version with 35 million parameters.

Tokenizer#

We trained a new tokenizer following the original configuration. We maintained the size of the vocabulary and added the same special tokens. The tokenizer was trained on a mixture of Russian and English from FineWeb.

Dataset#

Pre-training includes three main stages: massive pre-training, context extension, and cooldown. Unlike the original model, we did not use the same data for all stages. For the second and third stages, we used cleaner data sources.

Data SourceStage 1Stage 2Stage 3
FineWeb (En+Ru)✅❌❌
CulturaX-Ru-Edu (Ru)❌✅❌
Wiki (En+Ru)✅✅✅
ArXiv (En)✅✅✅
Book (En+Ru)✅✅✅
Code✅✅✅
StackExchange (En+Ru)✅✅✅
Social (Ru)✅✅✅
Total Tokens1.3T250B50B
Context length#

In the first stage, the model was trained with a context length of 1,024. In the second and third stages, it was extended to 8,192.

Evaluation#

To evaluate the model, we measure quality on the encodechka and Russian Super Glue (RSG) benchmarks. For RSG, we perform a grid search for optimal hyperparameters and report metrics from the dev split.

For a fair comparison, we compare the RuModernBERT model only with raw encoders that were not trained on retrieval or sentence embedding tasks.

Russian Super Glue#

Image: image

ModelRCBPARusMuSeRCTERRaRUSSERWSDDaNetQAScore
deepvk/deberta-v1-distill0.4330.560.6250.5900.9430.5690.7260.635
deepvk/deberta-v1-base0.4500.610.7220.7040.9480.5780.7600.682
ai-forever/ruBert-base0.4910.610.6630.7690.9620.5740.6780.678
deepvk/RuModernBERT-small [this]0.5550.640.7460.5930.9300.5740.7430.683
deepvk/RuModernBERT-base0.5560.610.8570.8180.9770.5830.7580.737
Encodechka#
Model SizeSTS-BParaphraserXNLISentimentToxicityInappropriatenessIntentsIntentsXFactRuRuDReCAvg. SAvg. S+W
cointegrated/rubert-tiny11.9M0.660.530.400.710.890.680.700.580.240.340.6450.575
deepvk/deberta-v1-distill81.5M0.700.570.380.770.980.790.770.360.360.440.6650.612
deepvk/deberta-v1-base124M0.680.540.380.760.980.800.780.290.290.400.6530.591
answerdotai/ModernBERT-base150M0.500.290.360.640.790.620.590.100.220.200.4860.431
ai-forever/ruBert-base178M0.670.530.390.770.980.780.770.38🥴🥴0.659🥴
DeepPavlov/rubert-base-cased180M0.630.500.380.730.940.740.740.31🥴🥴0.621🥴
deepvk/RuModernBERT-small [this]35M0.640.500.360.720.950.730.720.470.280.260.6360.563
deepvk/RuModernBERT-base150M0.670.540.350.750.970.760.760.580.370.360.6730.611

Citation#

@misc{deepvk2025rumodernbert,
    title={RuModernBERT: Modernized BERT for Russian},
    author={Spirin, Egor and Malashenko, Boris and Sokolov Andrey},
    url={https://huggingface.co/deepvk/rumodernbert-base},
    publisher={Hugging Face}
    year={2025},
}

Files

8 files · 143 MBWeights 138 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 8 files with their sha256
FileSizesha256
.gitattributes1.56 KB5c99029cda01f53c3d29349ce177335e5a90be177edbf2c48826545b14fa12fb
README.md9.70 KB619ac2794fc3092e1ee4a185552bc9c8227631840d21a77be5bee9adced930b6
config.json2.19 KBbc740868474fe21e8d0efabc286190ff9543f19ab706041d5a6793cf31ec2b14
model.safetensors138 MB48b495cbb8e5add5c723c6cb34a812028f2f85f6a4196670bac207e55255336c
rsg.jpg238 KB10cc22864cedb8a9cc2115930a5a8542ae99f1521287881dec3e46d30c6b0f12
special_tokens_map.json837 B2ea3c1eb27baf06d75115d453c067c1832d7101a97243b298a4af8d59c916d62
tokenizer.json4.75 MBc166ae391d765915521dce27bf940cc9c7bff5050260f652f9327a7df1b9cd56
tokenizer_config.json21.0 KB1449e1cc853d257335e3715a6068a53c15f321bdfb0f0d0ae6bdbd7d6b41c148
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
06d09cc59b pinned now2026-11-15 03:30 UTC8 files · 143 MB

Use it

$ fw get deepvk/RuModernBERT-small
# manifest sha256 1457f5a32fc4… · 143 MB · 8 files
$ fw verify ./RuModernBERT-small deepvk/RuModernBERT-small
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/deepvk/RuModernBERT-small.json --dir ./RuModernBERT-small $ python3 fw.py verify ./RuModernBERT-small ./deepvk__RuModernBERT-small.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download deepvk/RuModernBERT-small --revision 06d09cc59b2c4f61cb84e398e96e17aeead5b8b8 --local-dir ./RuModernBERT-small

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
619ac2794fc3092e1ee4a185552bc9c8227631840d21a77be5bee9adced930b6
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: deepvk <huggingface.co/deepvk>Newsgroups: alt.freeweights.visionSubject: RuModernBERT-smallDate: 2026-11-15Commit: 06d09ccSigned: 2DC28CC7B26A283B ✓
Upstream
deepvk/RuModernBERT-small
Pinned commit
06d09cc59b2c4f61cb84e398e96e17aeead5b8b8
Manifest
RuModernBERT-small.json · .minisig
Manifest sha256
1457f5a32fc49317279ec0f0f62cf8a7889765c4b046576747bf2fb6ad8abdad
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:30 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/deepvk/RuModernBERT-small.json $ curl -O https://freeweights.allternit.com/manifests/deepvk/RuModernBERT-small.json.minisig $ minisign -Vm RuModernBERT-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

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 deepvk/RuModernBERT-small
Open in Freeweights Studio

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

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

Variants

1 quantized or adapter build of RuModernBERT-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