SAVRN
Search Contact SAVRN

Open-weight model · Fill mask

codebert-python

by NeuLab @ LTI/CMU neulab/codebert-python

This is a microsoft/codebert-base-mlm model, trained for 1,000,000 steps (with batchsize=32) on Python code from the codeparrot/github-code-clean dataset, on the masked-language-modeling task.

Parameters125M
Context514
Weights997.7 MB
License
AccessOpen weights
Monthly Downloads359.4k

Runs On

What it takes to serve codebert-python (125M 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.2 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 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.

Model Card

This is a microsoft/codebert-base-mlm model, trained for 1,000,000 steps (with batchsize=32) on Python code from the codeparrot/github-code-clean dataset, on the masked-language-modeling task. It is intended to be used in CodeBERTScore: https://github.com/neulab/code-bert-score, but can be used for any other model or task. If you use this model for research, please cite

Excerpt from the card by NeuLab @ LTI/CMU.

Configuration

Architecture
RobertaForMaskedLM
Context length (tokens)
514
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
50,265
Stored precision
float32
Model type
roberta

Identity and Version

Repository
neulab/codebert-python
Publisher
NeuLab @ LTI/CMU
Task
Fill mask
Modality
Text
Library
transformers
Parameters
125M parameters
Languages
Not stated by the source
Revision
c4ff459e2a91d002d9bb4ab8cc2b7ee7125ef213
First published
2022-09-23
Last updated
2025-06-12

Files and Weights

10 files, 1.0 GB in total. The weights are 2 files totalling 997.7 MB in bin, safetensors.

Weights2 files · 997.7 MB
Configuration2 files · 983 B
Tokenizer4 files · 3.4 MB
Documentation1 file · 853 B
Repository1 file · 1.4 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights498.8 MB b96022334a02
pytorch_model.binWeights498.9 MB 8130e8739f24
config.jsonConfiguration703 B
special_tokens_map.jsonConfiguration280 B
README.mdDocumentation853 B
.gitattributesRepository1.4 KB
merges.txtTokenizer456.4 KB
tokenizer.jsonTokenizer2.1 MB
tokenizer_config.jsonTokenizer1.5 KB
vocab.jsonTokenizer798.3 KB

License and Download

License
Not stated by the source
Access
Open weights, no gate
Download size
997.7 MB
Download from NeuLab @ LTI/CMU

Released by NeuLab @ LTI/CMU through its official repository on Hugging Face.

Built From

  • Described by arXiv:2302.05527

Memory Requirements

PrecisionWeights in memory
As published997.7 MB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.1 GB

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

Compare codebert-python

Questions About codebert-python

How much GPU memory does codebert-python need?

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

What is the cheapest GPU to run codebert-python 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.

What is codebert-python's context length?

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

Similar Models

Model · Fill mask

roberta-base

Facebook AI 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 is case-sensitive: it makes a difference between english and English. Disclaimer: The team releasing RoBERTa did not write a model card for this model so this model card has been written by the Hugging Face team. RoBERTa 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…

Open weights mit 125M parameters 514 tokens transformers

This model is a distilled version of the BERT base multilingual model. The code for the distillation process can be found here. This model is cased: it does make a difference between english and English. The model is trained on the concatenation of Wikipedia in 104 different languages listed here. The model has 6 layers, 768 dimension and 12 heads, totalizing 134M parameters (compared to 177M parameters for mBERT-base). On average, this model, referred to as DistilmBERT, is twice as fast as mBERT-base. We encourage potential users of this model to check out the BERT base multilingual model card to learn more about usage, limitations and potential biases. You can use the raw model for either…

Open weights apache-2.0 135M parameters 512 tokens transformers

Model · Fill mask

bert-base-arabertv02

AUB MIND LAB

AraBERT is an Arabic pretrained language model based on Google's BERT architechture. AraBERT uses the same BERT-Base config. More details are available in the AraBERT Paper and in the AraBERT Meetup There are two versions of the model, AraBERTv0.1 and AraBERTv1, with the difference being that AraBERTv1 uses pre-segmented text where prefixes and suffixes were split using the Farasa Segmenter. We evaluate AraBERT models on different downstream tasks and compare them to mBERT), and other state of the art models (To the extent of our knowledge). The Tasks were Sentiment Analysis on 6 different datasets (HARD, ASTD-Balanced, ArsenTD-Lev, LABR), Named Entity Recognition with the ANERcorp, and…

Open weights 136M parameters 512 tokens transformers

Model · Fill mask

camembert-base

ALMAnaCH (Inria)

CamemBERT is a state-of-the-art language model for French based on the RoBERTa model. It is now available on Hugging Face in 6 different versions with varying number of parameters, amount of pretraining data and pretraining data source domains. CamemBERT was trained and evaluated by Louis Martin\, Benjamin Muller\, Pedro Javier Ortiz Suárez\, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot. If you use our work, please cite

Open weights mit 111M parameters 514 tokens transformers

Model · Fill mask

juribert-base

DaSciM

JuriBERT is a set of BERT models (tiny, mini, small and base) pre-trained from scratch on French legal-domain specific corpora. JuriBERT models are pretrained on 6.3GB of legal french raw text from two different sources: the first dataset is crawled from Légifrance and the other one consists of anonymized court’s decisions and the pleadings from the Court of Cassation (mémoires ampliatifs). The latter contains more than 100k long documents from different court cases. It is now on Hugging Face in four different versions with varying number of parameters. JuriBERT was trained and evaluated at École Polytechnique in collaboration with HEC Paris by Stella Douka, Hadi Abdine, Mihcalis…

Open weights mit 111M parameters 512 tokens transformers

Model · Fill mask

bert-base-uncased

BERT 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 is uncased: it does not make a difference between english and English. Disclaimer: The team releasing BERT did not write a model card for this model so this model card has been written by the Hugging Face team. BERT 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 labeling 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…

Open weights apache-2.0 110M parameters 512 tokens transformers