DeBERTa Sequence Classification Base - IMDB (deberta_v3_base_sequence_classifier_imdb)


DeBERTa v3 model with sequence classification/regression head on top (a linear layer on top of the pooled output) e.g. for multi-class document classification tasks.

deberta_v3_base_sequence_classifier_imdb is a fine-tuned DeBERTa model that is ready to be used for Sequence Classification tasks such as sentiment analysis or multi-class text classification and it achieves state-of-the-art performance.

We used TFDebertaV2ForSequenceClassification to train this model and used DeBertaForSequenceClassification annotator in Spark NLP 🚀 for prediction at scale!


How to use

document_assembler = DocumentAssembler()\ 

tokenizer = Tokenizer()\ 

sequenceClassifier = DeBertaForSequenceClassification.pretrained("deberta_v3_base_sequence_classifier_imdb", "en")\ 
.setInputCols(["document", "token"])\ 

pipeline = Pipeline(stages=[

example = spark.createDataFrame([['I really liked that movie!']]).toDF("text")
result =

val document_assembler = new DocumentAssembler()

val tokenizer = new Tokenizer()

val sequenceClassifier = DeBertaForSequenceClassification.pretrained("deberta_v3_base_sequence_classifier_imdb", "en")
.setInputCols("document", "token")

val pipeline = new Pipeline().setStages(Array(document_assembler, tokenizer, sequenceClassifier))

val example = Seq("I really liked that movie!").toDS.toDF("text")

val result =
import nlu
nlu.load("").predict("""I really liked that movie!""")

Model Information

Model Name: deberta_v3_base_sequence_classifier_imdb
Compatibility: Spark NLP 3.4.3+
License: Open Source
Edition: Official
Input Labels: [token, document]
Output Labels: [ner]
Language: en
Size: 658.8 MB
Case sensitive: true
Max sentence length: 512