Fill-Mask
Transformers
PyTorch
English
roberta
smart-contract
web3
software-engineering
embedding
codebert
Instructions to use web3se/SmartBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use web3se/SmartBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="web3se/SmartBERT")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("web3se/SmartBERT") model = AutoModelForMaskedLM.from_pretrained("web3se/SmartBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,013 Bytes
2810c64 50f2fb1 2810c64 50f2fb1 2810c64 50f2fb1 2810c64 6499cfc 2810c64 50f2fb1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ---
license: mit
language:
- en
inference: true
base_model:
- FacebookAI/roberta-base
pipeline_tag: fill-mask
tags:
- fill-mask
- smart-contract
- web3
- software-engineering
- embedding
- codebert
library_name: transformers
---
# SmartBERT V1 RoBERTa (2022)
## Overview
This **smart contract pre-trained model** is used to transfer smart contract _function-level_ code to embeddings.
It is trained by **[Sen Fang](https://github.com/TomasAndersonFang)** in 2022 on over **40,000** smart contracts.
Initialized with **RoBERTa**
Please update to [SmartBERT V2](https://huggingface.co/web3se/SmartBERT-v2)
## Citations
```tex
@article{huang2025smart,
title={Smart Contract Intent Detection with Pre-trained Programming Language Model},
author={Huang, Youwei and Li, Jianwen and Fang, Sen and Li, Yao and Yang, Peng and Hu, Bin and Zhang, Tao},
journal={arXiv preprint arXiv:2508.20086},
year={2025}
}
```
## Thanks
- [Institute of Intelligent Computing Technology, Suzhou, CAS](http://iict.ac.cn/) |