Salesforce/wikitext
Viewer • Updated • 3.71M • 1.5M • 763
vminibert-108M is a 108.6M-parameter Transformer encoder trained from scratch as a Masked Language Model on a blended 4-domain corpus (WikiText-103, BookCorpusOpen, FineWeb, and C4) using dynamic Whole-Word Masking (WWM).
Rather than a stock BERT reimplementation, it uses a modern LLaMA-style encoder recipe:
| Parameters | 108,615,984 |
| Hidden size | 768 |
| Attention heads | 12 |
| Encoder layers | 12 |
| Intermediate size (GeGLU) | 2048 |
| Vocabulary size | 30,000 (WordPiece) |
| Max sequence length | 32 |
| Positional encoding | RoPE |
| Normalization | RMSNorm |
| Activation | GeGLU |
| Weight tying | Output projection tied to input embeddings |
Trained on ~250k samples blended from four domains:
| Source | Domain |
|---|---|
| WikiText-103 | Encyclopedic |
| BookCorpusOpen | Long-form narrative |
| FineWeb | General web text |
| C4 | Cleaned web crawl |
Masking used dynamic Whole-Word Masking at a 15% rate.
Evaluated on official unseen test splits with standard 15% WWM:
| Benchmark | Split | Masked Tokens | Loss | Perplexity | Top-1 Acc | Top-3 Acc | Top-5 Acc | MRR@10 |
|---|---|---|---|---|---|---|---|---|
| Salesforce/wikitext-2-raw-v1 | test | 8,552 | 4.0323 | 56.39 | 43.15% | 53.86% | 57.96% | — |
| Salesforce/wikitext-103-raw-v1 | test | 8,515 | 4.0378 | 56.70 | 42.82% | 53.55% | 58.06% | 49.29% |
MRR@10 for wikitext-2 is not yet computed — fill in or remove the column before publishing.
from transformers import AutoTokenizer, AutoModelForMaskedLM, pipeline
model_id = "vprojectx/VMiniBert"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id, trust_remote_code=True)
fill_mask = pipeline("fill-mask", model=model, tokenizer=tokenizer)
results = fill_mask("The capital of France is [MASK].")
for res in results:
print(f"{res['token_str']:<12} {res['score']:.4f}")
If you use this model, please cite it as:
@misc{vminibert2026,
author = {vprojectx},
title = {vminibert-108M: A From-Scratch BERT-Style Encoder with RoPE, RMSNorm, and GeGLU},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/vprojectx/VMiniBert}
}