SAVRN
Search Contact SAVRN

Open-weight model · Fill mask

albert-base-v2

by ALBERT community albert/albert-base-v2

Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository.

Parameters12M
Context512
Weights328.5 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads991.8k

Runs On

What it takes to serve albert-base-v2 (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 Sep 18, 2026.

SAVRN's Notes on albert-base-v2

Twelve million parameters is small enough that our memory table rounds the requirement to zero at 16-bit, 8-bit and 4-bit alike. The cheapest listed setup, one MI300X with 192 GB at $1.85 an hour on-demand, is simply the smallest card the Index prices; this model would occupy a sliver of it, and the weights total about 328 MB. The job is filling masked tokens in uncased English inside a 512-token window, which suits fine-tuning on short passages rather than long documents.

Apache 2.0 allows commercial use, modification and redistribution, with the duties of keeping the license and notice files and stating significant changes, plus a patent grant from contributors. Check that 512 tokens covers your inputs and that pretraining on bookcorpus and wikipedia, described in arXiv:1909.11942, matches your domain. The last update was 2024-02-19, so treat it as a settled artifact.

Model Card

By ALBERT community, published under apache-2.0, revision 8e2f239c5f8a.

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.

Model description

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 inputs and labels from those texts. More precisely, it was pretrained with two objectives:

Read the full model card (1,117 words)

Configuration

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

Identity and Version

Repository
albert/albert-base-v2
Publisher
ALBERT community
Task
Fill mask
Modality
Text
Library
transformers
Parameters
12M parameters
Languages
en
Revision
8e2f239c5f8a2c0f253781ca60135db913e5c80c
First published
2022-03-02
Last updated
2024-02-19

Files and Weights

12 files, 330.6 MB in total. The weights are 6 files totalling 328.5 MB in bin, h5, msgpack, ot, safetensors.

Weights6 files · 328.5 MB
Configuration1 file · 684 B
Tokenizer3 files · 2.1 MB
Documentation1 file · 9.7 KB
Repository1 file · 445 B
Every file
FileTypeSizeSHA-256
flax_model.msgpackWeights44.9 MB 40dc942fcc79
model.safetensorsWeights47.4 MB d24c30ec641e
pytorch_model.binWeights47.4 MB 46704a4f59d6
rust_model.otWeights62.7 MB 3b207f0b36b2
tf_model.h5Weights63.0 MB d894ce4dc105
with-prefix-tf_model.h5Weights63.0 MB d894ce4dc105
config.jsonConfiguration684 B
README.mdDocumentation9.7 KB
.gitattributesRepository445 B
spiece.modelTokenizer760.3 KB
tokenizer.jsonTokenizer1.3 MB
tokenizer_config.jsonTokenizer25 B

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
328.5 MB
Download from ALBERT community

Released by ALBERT community through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:1909.11942
  • Trained on (disclosed) bookcorpus
  • Trained on (disclosed) wikipedia

Memory Requirements

PrecisionWeights in memory
As published328.5 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

How much GPU memory does albert-base-v2 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 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 commercially?

Yes. albert-base-v2 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is albert-base-v2's context length?

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

Similar Models

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

Model · Fill mask

Bio_ClinicalBERT

Emily Alsentzer

The Publicly Available Clinical BERT Embeddings paper contains four unique clinicalBERT models: initialized with BERT-Base (casedL-12H-768A-12) or BioBERT (BioBERT-Base v1.0 + PubMed 200K + PMC 270K) & trained on either all MIMIC notes or only discharge summaries. This model card describes the Bio+Clinical BERT model, which was initialized from BioBERT & trained on all MIMIC notes. The BioClinicalBERT model was trained on all notes from MIMIC III, a database containing electronic health records from ICU patients at the Beth Israel Hospital in Boston, MA. For more details on MIMIC, see here. All notes from the NOTEEVENTS table were included (~880M words). Each note in MIMIC was first split…

Open weights mit 512 tokens transformers