model = TransformerModel('roberta', 'roberta-base', use_cuda=False, args={'fp16': False})

You have to set both use_cuda and fp16 to False as shown above. I should probably set fp16 to False if cuda is not used by default, but this should work for now.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store