declBERTa / README.md
mstaron's picture
Update README.md
c976b97 verified
metadata
license: mit

This is an example model trained on C declarations. It is a foundational model that can essentially only complete C declarations.

It has been trained on a variety of OSS software declarations, not entire functions.

Usage:

# make a prediction
from transformers import pipeline
from pprint import pprint

fill_mask = pipeline(
    "fill-mask",
    model="mstaron/declBERTa",
    tokenizer="mstaron/declBERTa"
)

strPredicted = fill_mask("int i = <mask>;", top_k=10)

pprint(strPredicted)