Skip to content

quochieu586/NLP-assignment-experimental

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VIETNAM NATIONAL UNIVERSITY, HO CHI MINH CITY

UNIVERSITY OF TECHNOLOGY

FACULTY OF COMPUTER SCIENCE AND ENGINEERING


logo

Natural Language Processing (CO3086)

Class: CC01 - Group 1


NLP 242: Assignment Report — Fine-Tuning Techniques Comparison on Transformers


Table of Contents


Fine-Tuning Techniques

  • LoRA (Low-Rank Adaptation): Injects trainable low-rank matrices into attention layers.
  • BitFit: Only trains the bias terms in transformer layers.
  • Prompt Tuning: Uses virtual token embeddings prepended to input sequences.

Models Used

  • bert-base-uncased
  • roberta-base
  • distilbert-base-uncased

Tasks and Results

Task 1: Question Answering

For Task 1, we measure accuracy per epoch, final test accuracy, and final test loss (Binary Cross-Entropy).

Accuracy per Epoch

Task 1 Accuracy

Final Test Accuracy

Task 1 Test Accuracy

Final Test Loss (Binary Cross-Entropy)

Task 1 Test Loss


Task 2: Text Classification

For Task 2, we measure validation accuracy over epochs and compare our results with existing models.

Validation Accuracy Over Epochs

Task 2 Accuracy

Comparison with existing models

Model Variant Sharma et al. (2019) Ours
LR with Trigrams 80.8
SVM with Trigrams 80.9
Random Forest 75.7
Gradient Boosting 75.0
CBOW 83.4
LSTM + Attention 81.8
BiLSTM + Attention 82.3
BERT + LoRA 84.52
BERT + BitFit 83.63
BERT + Prompt 72.68
RoBERTa + LoRA 86.80
RoBERTa + BitFit 85.40
RoBERTa + Prompt 72.26
DistilBERT + LoRA 84.14
DistilBERT + BitFit 82.90
DistilBERT + Prompt 77.89

Task 3: Span Validation or Additional Task

For Task 3, we only report F1 scores on the validation set, to illustrates how well the model perform on predicting the answer span.

F1 scores on validation set

Task 3 Summary

Best Results Table

Model Fine-Tuning Best Result (F1-score)
BERT LoRA 0.7209
BitFit 0.6417
Prompt Tuning 0.0388
RoBERTa LoRA 0.8346
BitFit 0.7970
Prompt Tuning 0.0180
DistilBERT LoRA 0.7128
BitFit 0.5452
Prompt Tuning 0.0186

Notes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors