CoolFace
Modelpublic

likhith231/roberta-base-lora-text-classification

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes10downloads
Model Card

Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. --> This model classifies whether the text/email is spam or ham.

Model Details

This model is a fine-tuned version of roberta-base using LoRA specifically for a binary classification task containing emails (subject + message) and a label whether it is spam or ham.

Model Description

<!-- Provide a longer summary of what this model is. --> The base model for this fine-tuning is roberta-base, which is a transformer-based model pre-trained on a large corpus of English data in a self-supervised fashion. RoBERTa is an optimized version of BERT, designed to perform better on natural language understanding tasks. We have applied LoRA to adapt the original RoBERTa model to the specific nuances of our binary classification problem. LoRA introduces low-rank matrices that are trained during the fine-tuning process, enabling the model to learn task-specific adaptations without altering the pre-trained weights directly.

  • Developed by: Likhith231
  • Model type: Text Classification
  • Finetuned from model: Roberta Base

Training Data

The model was finetuned on truncated version of SetFit/enronspam dataset. The SetFit/enronspam consists of 33716 rows. The truncated version consists of 1000 train samples and 1000 test samples with columns, text and label.

Model Sources

<!-- Provide the basic links for the model. -->

  • Repository: https://huggingface.co/FacebookAI/roberta-base

Training Details

  • pretrained model= Roberta-base
  • all params = 125,313,028
  • trainable params= 665,858
  • trainable% = 0.531355766137899

Parameters

  • weight_decay = 0.01
  • lr = 1e-3
  • batch_size = 4
  • num_epochs = 10

Results

EpochTraining LossValidation LossAccuracy
1No log0.1727880.957
20.1945000.2029910.956
30.1945000.2299500.958
40.0384000.2673900.954
50.0384000.2831160.963
60.0070000.2549600.961
70.0070000.2993750.961
80.0079000.2763210.966
90.0079000.2753040.967
100.0020000.2712340.967

Framework versions

  • PEFT 0.8.2