HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

How to Fine-Tune BERT for Text Classification?

Chi Sun; Xipeng Qiu; Yige Xu; Xuanjing Huang

How to Fine-Tune BERT for Text Classification?

Abstract

Language model pre-training has proven to be useful in learning universal language representations. As a state-of-the-art language model pre-training model, BERT (Bidirectional Encoder Representations from Transformers) has achieved amazing results in many language understanding tasks. In this paper, we conduct exhaustive experiments to investigate different fine-tuning methods of BERT on text classification task and provide a general solution for BERT fine-tuning. Finally, the proposed solution obtains new state-of-the-art results on eight widely-studied text classification datasets.

Code Repositories

Derposoft/ai-educator
Mentioned in GitHub
xuyige/BERT4doc-Classification
Official
pytorch
Mentioned in GitHub
bcaitech1/p4-dkt-no_caffeine_no_gain
pytorch
Mentioned in GitHub
uzaymacar/comparatively-finetuning-bert
pytorch
Mentioned in GitHub
heraclex12/VLSP2020-Fake-News-Detection
pytorch
Mentioned in GitHub
soarsmu/BiasFinder
pytorch
Mentioned in GitHub
sahil00199/KYC
pytorch
Mentioned in GitHub
jyp1111/sentiment_analysis
pytorch
Mentioned in GitHub
saproovarun/Google-Quest-Q-A
tf
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
sentiment-analysis-on-imdbBERT_base+ITPT
Accuracy: 95.63
sentiment-analysis-on-imdbBERT_large+ITPT
Accuracy: 95.79
sentiment-analysis-on-yelp-binaryBERT_large+ITPT
Error: 1.81
sentiment-analysis-on-yelp-binaryBERT_base+ITPT
Error: 1.92
sentiment-analysis-on-yelp-fine-grainedBERT_base+ITPT
Error: 29.42
sentiment-analysis-on-yelp-fine-grainedBERT_large+ITPT
Error: 28.62
text-classification-on-ag-newsBERT-ITPT-FiT
Error: 4.8
text-classification-on-dbpediaBERT-ITPT-FiT
Error: 0.68
text-classification-on-sogou-newsBERT-ITPT-FiT
Accuracy: 98.07
text-classification-on-trec-6BERT-ITPT-FiT
Error: 3.2
text-classification-on-yahoo-answersBERT-ITPT-FiT
Accuracy: 77.62
text-classification-on-yelp-2BERT-ITPT-FiT
Accuracy: 98.08%
text-classification-on-yelp-5BERT-ITPT-FiT
Accuracy: 70.58%

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
How to Fine-Tune BERT for Text Classification? | Papers | HyperAI