Skip to page content
SAVRN
Search Plan a project

Open-weight model · Fill mask

albert-base-v2-persian-zwnj-shiraz-mlm

by Shekar AI shekar-ai/albert-base-v2-persian-zwnj-shiraz-mlm

albert-base-v2-persian-zwnj-shiraz-mlm is an open-weight model for fill mask from Shekar AI, released under MIT License. It has 12M parameters and a 512-token context. At 16-bit it needs about 0 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

ALBERT-base-v2 adapted to Persian with a freshly trained 38,016-token SentencePiece unigram tokenizer. English Wikipedia supplies additional English text. ZWNJ (U+200C, Persian half-space) is preserved as a standalone token, ID 5.

Parameters12M
Context512
Weights49.0 MB
Licensemit
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve albert-base-v2-persian-zwnj-shiraz-mlm (12M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 18, 2026.

albert-base-v2-persian-zwnj-shiraz-mlm on every accelerator the SAVRN Index prices, at every precision

Model Card

By Shekar AI, published under mit, revision 9b2ce2f408f2.

ALBERT-base-v2 adapted to Persian with a freshly trained 38,016-token SentencePiece unigram tokenizer. English Wikipedia supplies additional English text. ZWNJ (U+200C, Persian half-space) is preserved as a standalone token, ID 5. Initialized from albert/albert-base-v2, with word embeddings and the tied vocabulary head reinitialized for the new vocabulary. Trained with 15% masked-language modeling on normalized shekar-ai/Shiraz and English Wikipedia (target 10% of corpus characters). Persian text is normalized with shekar.Normalizer before tokenization; the tokenizer itself only normalizes whitespace. The tokenizer was trained from up to 6 million sampled corpus lines. validation gains…

Read Shekar AI's full model card

Persian ZWNJ-aware ALBERT MLM

ALBERT-base-v2 adapted to Persian with a freshly trained 38,016-token SentencePiece unigram tokenizer. English Wikipedia supplies additional English text. ZWNJ (U+200C, Persian half-space) is preserved as a standalone token, ID 5. Maximum input length: 512 tokens.

Training

Initialized from albert/albert-base-v2, with word embeddings and the tied vocabulary head reinitialized for the new vocabulary. Trained with 15% masked-language modeling on normalized shekar-ai/Shiraz and English Wikipedia (target 10% of corpus characters). Persian text is normalized with shekar.Normalizer before tokenization; the tokenizer itself only normalizes whitespace. The tokenizer was trained from up to 6 million sampled corpus lines.

Released checkpoint: 134,000 optimizer steps, 2.20 epochs, stopped early as validation gains diminished. Effective batch size 128, BF16, two RTX A6000 GPUs. The training dataset contains 7,794,452 examples: 75% packed 512-token blocks and 25% natural 8–64-token sentences. Natural short sentences stay intact; 10% of long blocks are randomly cropped. Sentence-content hashes separate train/eval before packing; this is sentence-level, not document-level separation.

Held-out MLM loss at the released checkpoint (lower is better):

Full blocks Natural short sentences 64-token crops
2.359 2.422 2.591

Usage

from transformers import pipeline
from shekar import Normalizer

fill = pipeline(
    "fill-mask",
    model="shekar-ai/albert-base-v2-persian-zwnj-shiraz-mlm",
    device=-1,  # CPU
)
text = Normalizer()("سلام بر تو ای") + " [MASK]"
print(fill(text, top_k=5))

Install torch, transformers, and shekar for this example. Use [MASK] (uppercase). Each mask predicts one tokenizer token, which may be a word piece.

Compatibility and limitations

Tested with Transformers 4.57.6 / tokenizers 0.22.2 and Transformers 5.17.0 / tokenizers 0.23.2: identical token IDs on the test texts, tokenizer save/reload, preserved ZWNJ, tied embeddings, and finite CPU outputs at 8, 64, 511, and 512 tokens. See compatibility.json. No custom model code or trust_remote_code is required.

This is an MLM checkpoint for fill-mask and further fine-tuning. It has not yet been contrastively trained or benchmarked as a sentence embedding model. Predictions can be inaccurate or reflect corpus biases; English capability is limited and has not been established by a comprehensive benchmark.

License

This adapted checkpoint and fresh tokenizer are released under the MIT License (see LICENSE). The original ALBERT base is Apache-2.0 licensed; its license is included in LICENSE.base-albert. Original upstream rights and notices remain applicable to the base components.

Configuration

Architecture
AlbertForMaskedLM
Context length (tokens)
512
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
38,016
Model type
albert

Identity and Version

Repository
shekar-ai/albert-base-v2-persian-zwnj-shiraz-mlm
Publisher
Shekar AI
Task
Fill mask
Modality
Text
Library
transformers
Parameters
12M parameters
Languages
fa, en
Revision
9b2ce2f408f2133e9b164a20af21c78295a144de
First published
2026-09-29
Last updated
2026-09-29

Files and Weights

11 files, 52.3 MB in total. The weights are 1 file totalling 49.0 MB in safetensors.

Weights1 file · 49.0 MB
Configuration3 files · 2.3 KB
Tokenizer2 files · 2.6 MB
Documentation3 files · 15.6 KB
Other1 file · 741.0 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights49.0 MB 4fe13bf9e72f
compatibility.jsonConfiguration1.4 KB —
config.jsonConfiguration795 B —
special_tokens_map.jsonConfiguration124 B —
LICENSEDocumentation1.1 KB —
LICENSE.base-albertDocumentation11.4 KB —
README.mdDocumentation3.2 KB —
spm.modelOther741.0 KB cf3041cfc252
.gitattributesRepository1.5 KB —
tokenizer.jsonTokenizer2.6 MB —
tokenizer_config.jsonTokenizer330 B —

License and Download

License
mit
Access
Open weights, no gate
Download size
49.0 MB
Download from Shekar AI

Released by Shekar AI through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published49.0 MB
16-bit0.0 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About albert-base-v2-persian-zwnj-shiraz-mlm

How much GPU memory does albert-base-v2-persian-zwnj-shiraz-mlm need?

About 0 GB at 16-bit and 0 GB at 4-bit: the weights (12M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run albert-base-v2-persian-zwnj-shiraz-mlm on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use albert-base-v2-persian-zwnj-shiraz-mlm commercially?

Yes. albert-base-v2-persian-zwnj-shiraz-mlm is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is albert-base-v2-persian-zwnj-shiraz-mlm's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Fill mask

albert-base-v2

ALBERT community

Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model, as all ALBERT models, is uncased: it does not make a difference between english and English. Disclaimer: The team releasing ALBERT did not write a model card for this model so this model card has been written by the Hugging Face team. ALBERT is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate…

Open weights apache-2.0 12M parameters 512 tokens transformers

Model · Fill mask

esm2_t6_8M_UR50D

AI at Meta

ESM-2 is a state-of-the-art protein model trained on a masked language modelling objective. It is suitable for fine-tuning on a wide range of tasks that take protein sequences as input. For detailed information on the model architecture and training data, please refer to the accompanying paper. You may also be interested in some demo notebooks (PyTorch, TensorFlow) which demonstrate how to fine-tune ESM-2 models on your tasks of interest. Several ESM-2 checkpoints are available in the Hub with varying sizes. Larger sizes generally have somewhat better accuracy, but require much more memory and time to train

Open weights mit 8M parameters 1,026 tokens transformers

To use the pre-trained model for masked language modeling, use the following snippet: Alternatively, you can instantiate a model from scratch to train on your own data as follows: This is the Caduceus-PS model with hidden dimension 256 and 16 MambaDNA layers. This model is reverse complement (RC) equivariant and thus no RC data augmentation is required when training this model, either during pre-training or for downstream fine-tuning. Note that the model hidden state will be twice that of a non-RC equivariant counterpart. For downstream task training and inference, and to ensure RC invariant outputs at downstream time, one can either run the downstream model on the hidden state and its RC…

Open weights apache-2.0 8M parameters transformers

To use the pre-trained model for masked language modeling, use the following snippet: Alternatively, you can instantiate a model from scratch to train on your own data as follows: This is the Caduceus-Ph model with hidden dimension 256 and 16 MambaDNA layers. This model is not inherently reverse complement (RC) equivariant. Rather, it was pre-trained using RC data augmentation. Its intended usage is as follows: for downstream tasks, the model should be trained with RC data augmentation. At downstream task inference, the model should be run twice: once on a sequence and once on its RC. The output of these two applications should be combined (averaged) to form the downstream task prediction.…

Open weights apache-2.0 8M parameters transformers

Model · Fill mask

mdeberta-v3-base

Microsoft

DeBERTa improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. With those two improvements, DeBERTa out perform RoBERTa on a majority of NLU tasks with 80GB training data. In DeBERTa V3, we further improved the efficiency of DeBERTa using ELECTRA-Style pre-training with Gradient Disentangled Embedding Sharing. Compared to DeBERTa, our V3 version significantly improves the model performance on downstream tasks. You can find more technique details about the new model from our paper. Please check the official repository for more implementation details and updates. mDeBERTa is multilingual version of DeBERTa which use the same structure as DeBERTa and was…

Open weights mit 512 tokens transformers

Model · Fill mask

deberta-v3-base

Microsoft

DeBERTa improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. With those two improvements, DeBERTa out perform RoBERTa on a majority of NLU tasks with 80GB training data. In DeBERTa V3, we further improved the efficiency of DeBERTa using ELECTRA-Style pre-training with Gradient Disentangled Embedding Sharing. Compared to DeBERTa, our V3 version significantly improves the model performance on downstream tasks. You can find more technique details about the new model from our paper. Please check the official repository for more implementation details and updates. The DeBERTa V3 base model comes with 12 layers and a hidden size of 768. It has only 86M…

Open weights mit 512 tokens transformers