Skip to content

Latest commit

 

History

History
 
 

223-text-prediction

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Text Prediction with OpenVINO™

Text generation is a type of natural language processing that uses computational linguistics and artificial intelligence to automatically produce text that can meet specific communicative needs.

In this demo we have the models:

  • Generative Pre-trained Transformer 2 (GPT-2) model for text prediction.
  • Generative Pre-trained Transformer Neo (GPT-Neo) model for text prediction.
  • PersonaGPT (PersonaGPT) model for Conversation.

The complete pipeline of this Text Generation is shown below:

image2

This notebook demonstrates how to generate text using user input. By entering the beginning of a sentence or paragraph, the network generates additional text to complete the sequence. Also, This process can be repeated as many times as the user desires, and the model responds to each input, allowing users to engage in a conversation-like interaction.

The following images show an example of the input sequence and corresponding predicted sequence.

  • GPT-2: image
  • GPT-Neo: image

The Modified Pipeline For Conversation is shown below.

image2

The following image shows an example of a conversation.

image

Notebook Contents

The notebook demonstrates text prediction with OpenVINO using the following models

  • gpt-2 model from HuggingFace Transformers.
  • gpt-neo model from HuggingFace Transformers.
  • personaGPT model from HuggingFace Transformers

Installation Instructions

If you have not done so already, please follow the Installation Guide to install all required dependencies.