utterworks / fast-bert

Super easy library for BERT based NLP models
Apache License 2.0
1.85k stars 342 forks source link

Multi-Label text classification #184

Open chen955 opened 4 years ago

chen955 commented 4 years ago

How can I run Multi-Label text classification with albert using fast-bert?

lingdoc commented 4 years ago

You have to set up the labels.csv with multiple labels, and your train.csv and val.csv as described in the readme for multilabel classification. Then you need to set the multilabel argument to True in the learner builder. I currently have a pull request (#190) that edits the modeling.py script to use the correct definitions for Albert - you can do this yourself by following issue #172.