NVIDIA
NVIDIA
Question Answering Notebook
Resource
NVIDIA
NVIDIA
Question Answering Notebook

End to End workflow for question answering starting with training in TLT and deployment using Jarvis.

Question Answering

The Question Answering task in NLP pertains to building a model which can answer questions posed in natural language. Many datasets (including SQuAD, the dataset we use in this notebook) pose this as a reading comprehension task i.e. given a question and a context, the goal is to predict the span within the context with a start and end position which indicates the answer to the question. For every word in the training dataset we predict:

  • likelihood this word is the start of the span
  • likelihood this word is the end of the span

The best place to get started with TLT - Question Answering would be the TLT - Question Answering jupyter notebooks. This resource has two notebooks included.

  1. Training: Sample workflow for training a question answering model and export the model to a .ejrvs file
  2. Deployment: Sample workflow to consume the .ejrvs file and deploy it to Jarvis.

If you are a seasoned Conversation AI developer we recommend installing TLT and referring to the TLT documentation for usage information.

Pre-Requisites

Please make sure to install the following before proceeding further:

  • python 3.6.9
  • docker-ce > 19.03.5
  • docker-API 1.40
  • nvidia-container-toolkit > 1.3.0-1
  • nvidia-container-runtime > 3.4.0-1
  • nvidia-docker2 > 2.5.0-1
  • nvidia-driver >= 455.23

Note: A compatible NVIDIA GPU would be required.

Installation

We recommend that you install TLT inside a virtual environment. The steps to do the same are as follows.

virtualenv -p python3 <name of venv>
source <name of venv>/bin/activate
pip install jupyter notebook # If you need to run the notebooks

TLT is python package that is hosted in nvidia python package index. You may install by using python’s package manager, pip.

pip install nvidia-pyindex
pip install nvidia-tlt

To download the jupyter notebook please:

  1. Download the samples using the ngc cli with the following command
ngc registry resource download-version "nvidia/tlt-jarvis/questionanswering_notebook:v1.0"
  1. Instantiate the jupyter notebook server
jupyter notebook --ip 0.0.0.0 --allow-root --port 8888

License

By downloading and using the models and resources packaged with TLT Conversational AI, you would be accepting the terms of the Jarvis license

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.