monologg / GoEmotions-pytorch

Pytorch Implementation of GoEmotions 😍😢😱
Apache License 2.0
152 stars 46 forks source link

faster prediction using GoEmotions-pytorch models based on bert-mini, bert-small or bert-tiny #4

Open chedia-d opened 3 years ago

chedia-d commented 3 years ago

Hi, Thank you for your great work on GoEmotions-pytorch! I am trying to use your code to generate models using either bert-mini, bert-small or bert-tiny for faster predictions. I changed the file original.json by setting model_name_or_path to prajjwal1/bert-mini for example and I run python3 run_goemotions.py --taxonomy original It works and the new model is a bit faster than the one using bert-base. However, I was wondering if I need to also change the tokenizer_name_or_path to a different value. The original value is "monologg/bert-base-cased-goemotions-original". Any thoughts on how to get a tokenizer based on bert-mini?

Many thanks! Chedia

monologg commented 3 years ago

If you use the vocab from prajjwal/bert-mini when training, then you should also change the tokenizer_name_or_path