how to run the model

#1
by guidobenb - opened

Hi!. I want to start with this topic, very easy topic for beginners.

S2W AI org

The model card lists some of the basic functionalities of DarkBERT such as the fill-mask task, for which the code is listed in the Sample Usage section.
For tasks that require finetuning such as text classification, you can generally refer to the HuggingFace model guides available on the Internet.
Since DarkBERT itself is implemented as a HuggingFace model, most of the tasks just require you to change the line of code where the model is specified.
Here is an example:

...
from transformers import AutoModel, AutoTokenizer

PATH_TO_DARKBERT='add/path/to/darkbert/here'

model = AutoModel.from_pretrained(PATH_TO_DARKBERT)
tokenizer = AutoTokenizer.from_pretrained(PATH_TO_DARKBERT)
...

Sign up or log in to comment