Custom Models
Contents
Custom Models#
The following NLP task is supported in Riva:
Punctuation and capitalization
Custom, supported NLP models trained with NVIDIA NeMo can be deployed in Riva using the riva-build
and
riva-deploy
commands as documented in the Riva Build and Riva Deploy sections. In the simplest case, you can deploy an NLP pipeline as follows:
riva-build <task_name> \
<rmir_filename>:<encryption_key> \
<riva_filename>:<encryption_key> \
Where:
<task_name>
is the type of NLP pipeline to deploy. Supported value ispunctuation
.<rmir_filename>
is the Rivarmir
file that is generated<riva_filename>
is the name of theriva
file to use as input<encryption_key>
is the key used to encrypt the files. The encryption key for the pre-trained Riva models uploaded on NGC istlt_encode
.
The punctuation and capitalization task (that is, <task_name>=punctuation
) supports an optional parameter called --language_code
which must be set to the BCP-47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code of the language the target model was trained on. When receiving ASR requests with the enable_automatic_punctuation
Boolean flag set to true
, the Riva server will look for a punctuation and capitalization model with the requested language code, and use it to add punctuation and capitalization to the ASR transcript.
Each of the tasks supports a set of arguments that enables you to configure your settings using the CLI. Use the
format riva-build <task name> -h
to view a list of available CLI inputs for each task.