ThilinaRajapakse / simpletransformers

Transformers for Information Retrieval, Text Classification, NER, QA, Language Modelling, Language Generation, T5, Multi-Modal, and Conversational AI
https://simpletransformers.ai/
Apache License 2.0
4.1k stars 728 forks source link

Can I use custom pre-trained models? #17

Closed wshuyi closed 5 years ago

wshuyi commented 5 years ago

I want to do classification with Chinese texts. Though there is a BERT Chinese pre-trained model by default, it's quite out-dated. I would like to select different pre-trained models, like wwm BERT, XLnet and RoBERTa which trained on Chinese corpus. They have already been converted into pytorch-transformers format. Can I use them with simpletransformers? Thanks!

ThilinaRajapakse commented 5 years ago

Yes, you can. You just need to provide the path to the directory containing the model when you create the SimpleTransformer object.

wshuyi commented 5 years ago

Thanks! I will give it a try.