#191 · Primary category: NLP Tools & Text Processing
BERT4doc-Classification
Code and source for paper ``How to Fine-Tune BERT for Text Classification?``
Project last updated:10/19/21
GitHub Stars
640
Forks
101
Contributors
4
License
Apache-2.0
Why we included this project
This is the code behind the paper "How to Fine-Tune BERT for Text Classification?", and it remains one of the most direct demonstrations of the fine-tuning techniques that paper laid out. If you are trying to get more accuracy out of a pretrained BERT model on a classification task, the repo shows concrete choices: which layers to use as features, how to pool hidden states, how to handle long documents by truncating head and tail, and how to set layer-wise decreasing learning rates. It also covers further pre-training on a domain corpus before fine-tuning, which helps when your text looks nothing like the general web data BERT was trained on. The experiments are documented against standard benchmarks such as IMDB and AG News, so it works as a reference for comparing fine-tuning strategies. One caveat: the code pins older TensorFlow and PyTorch versions, so plan to adapt the scripts to a modern stack rather than run them as-is.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
flair
A very simple framework for state-of-the-art Natural Language Processing (NLP)
compromise
modest natural-language processing
tokenizers
💥 Fast State-of-the-Art Tokenizers optimized for Research and Production
CoreNLP
CoreNLP: A Java suite of core NLP tools for tokenization, sentence segmentation, NER, parsing, coreference, sentiment analysis, etc.
Chinese-Word-Vectors
100+ Chinese Word Vectors 上百种预训练中文词向量