Skip to content

Latest commit

 

History

History
 
 

229-distilbert-sequence-classification

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Sequence Classification with OpenVINO

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

Binder

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-english model from Hugging Face. The Hugging Face model needs to be converted to ONNX format using the torch.onnx.export function. Then, the ONNX model is converted to OpenVINO IR format. 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-english model from Hugging Face.

Installation Instructions

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