Skip to content

Latest commit

 

History

History
 
 

229-distilbert-sequence-classification

Sequence Classification with OpenVINO

Sequence Classification (or Text Classification) is the NLP task of predicting a label for a sequence of words.

Binder Colab

Sentiment analysis is a sub-task of Sequence Classification. It is the use of natural language processing, text analysis, computational linguistics, and biometrics to systematically identify, extract, quantify, and study affective states and subjective information. This notebook performs sentiment analysis using OpenVINO. We will use the transformer-based DistilBERT base uncased finetuned SST-2 model from Hugging Face converting to OpenVINO IR format using OpenVINO PyTorch Frontend and model conversion Python API. We can also replace the model with the other BERT-based models for sequence classification. The model predicts one of two classes: Positive or Negative, after analyzing the sentiment of any given text. The notebook also estimates time required for inference.

image

Notebook Contents

This notebook performs sequence classification, using OpenVINO with the transformer-based DistilBERT base uncased finetuned SST-2 model from Hugging Face.

Installation Instructions

If you have not installed all required dependencies, follow the Installation Guide.