Analyzing Intel® OneAPI's Multilingual Public Reviews with Fine Tuned BERT Model using Intel® OneAPI Toolkit (Daal4Py, OneDAL) and PyTorch

Risab Biswas

Risab Biswas

Jalpaiguri, West Bengal

This is a fun project where I fine-tuned a BERT model for analyzing Intel® OneAPI Public Reviews. The model comes with a twist, that it doesn't have any language barrier. The input sentiment could be of almost (any) language. ...learn more

Project status: Under Development

oneAPI, Artificial Intelligence

Groups
Artificial Intelligence India, DeepLearning

Intel Technologies
oneAPI, Intel NUC, Intel Opt ML/DL Framework, Intel Python, DPC++

Overview / Usage

Sentiment Extraction is one of the widely adopted use-cases in the Industry. It's a very good starting point for NLP research enthusiasts.

You'll learn how to do the required text preprocessing (special tokens, padding, and attention masks) and build a Sentiment Classifier using the amazing Transformers library by Hugging Face!

Fine Tuned a BERT Sentiment Model using Intel OneAPI ToolKit and PyTorch. The training was done both on a NUC and Intel DevCloud. The model is trained on the IMDB Dataset of 50k reviews. The model accuracy came to 96.3% and the inference shows some great results.

This will give you a great understanding of Intel's OneAPI Advanced Analytics toolkit and how to leverage the power of Intel DevCloud.

Dataset- https://rb.gy/mri6k4

Methodology / Approach

Following are the Steps -

  • Intuitively understand what BERT is!
  • Setting up the environment on Intel DevCloud
  • Preprocess text data for BERT and build PyTorch Dataset (tokenization, attention masks, and padding)
  • Use Transfer Learning to build Sentiment Classifier using the Transformers library by Hugging Face
  • Evaluate the model on test data
  • Predict sentiment on raw text
  • Serving the solution as a web app using Flask

Technologies Used

  • Intel® Distribution for Python*
  • Intel® Optimization for PyTorch*
  • Intel® oneAPI Toolkit
  • Daal4Py
  • Intel® Data Analytics Acceleration Library
  • Hugging Face Library
  • Intel® DevCloud
  • Intel® NUC Mini PC
  • Flask

Collaborators

2 Results

2 Results

Comments (1)