Description

Ref: https://github.com/ThilinaRajapakse/simpletransformers/

Colab

Load the libraries

Modelling: Simpletransformer Roberta

Ref:

Available models:

"bert": "bert-base-cased"
"roberta":"roberta-base"
"distilbert": "distilbert-base-cased"
"distilroberta":"roberta"
"electra-base":"electra"
"electra-small":"electra"
"xlnet":"xlnet-base-cased"


# note: xlnet uses too high memory, reduce batch
if model_type == "xlnet":
    train_args["train_batch_size"] = 64
    train_args["gradient_accumulation_steps"] = 2