End to End sample workflow for Token Classification starting with training in TLT and deployment using Jarvis.
Named Entity Recognition
Named entity recognition (NER), also referred to as entity chunking, identification or extraction, is the task of detecting and classifying key information (entities) in text.
For example, in a sentence: Mary lives in Santa Clara and works at NVIDIA, we should detect that Mary is a person, Santa Clara is a location and NVIDIA is a company.
The best place to get started with TLT - NER would be the TLT - NER jupyter notebooks enclosed with this sample. This resource has two notebooks included.
- Training: Sample workflow for training a named entity recognition model and export the model to a
.ejrvsfile - Deployment: Sample workflow to consume the
.ejrvsfile 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:
- Download the samples using the ngc cli with the following command
ngc registry resource download-version "nvidia/tlt-jarvis/tokenclassification_notebook:v1.0"
- 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