An Empirical Comparison of Pre-Trained Models of Source Code
Paper • 2302.04026 • Published • 1
# Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("claudios/cbert")
model = AutoModelForMaskedLM.from_pretrained("claudios/cbert")This model is the unofficial HuggingFace version of "C-BERT" with just the masked language modeling head for pretraining. The weights come from "An Empirical Comparison of Pre-Trained Models of Source Code". Please cite the authors if you use this in an academic setting.
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="claudios/cbert")