Language model configuration
By default, V‑Blaze loads all licensed and installed language and acoustic models at startup. This default model loading is sufficient for most implementations, and in most cases, language model loading does not need to be further configured.
For cases where V‑Blaze has more installed models than it needs or than it can load at one time, customized model loading can be configured with the models.list file in /opt/voci.
Customized loading controls which models to load at startup, which models to load on demand as needed for transcription, and other related options like model reload time and the amount of system memory to keep available. This customization can be used to reduce startup time, optimize performance, and manage model memory allocation.
Customized loading is used for very fine-tuning of advanced implementations, and models.list should not be configured without consultation with or guidance from the Voci support team.
Demand-based loading is available for language models only; all available acoustic models load at startup.
models.list
The models.list file is located in /opt/voci and is organized into lines. There are two types of line: the global #config line and the model line. models.list should contain only one #config line, but it may contain multiple model lines.
The optional #config line is used for global configuration parameters that are applied when V‑Blaze loads any model.
Model lines are used for parameters applied when V‑Blaze loads the line's specified models. A model line may specify a single model, or multiple models using a wildcard. For example, specifying eng* captures all installed and available English models, such as eng-us, eng-eu, and eng-ca.
When determining the order of lines in models.list, begin with the most specific and end with the least specific model sets. The first matched configuration is used.
Parameters
#config and model lines. The following table lists all parameters and describes their behavior by context. | Name | Context | Description |
|---|---|---|
cycle | #config and model |
Defines the number of hours between periodic model reloads. Specifying any value for cycle indicates that models should be reloaded periodically to de-fragment memory and potentially improve performance. By default, the system does not periodically reload models. |
memfree | #config only |
Specifies an amount of host system memory in gigabytes to keep available. The ASR engine will attempt to unload the least used language models until the By default, there is no minimum, and the system will not unload any models and will not attempt to retain a free-memory buffer. Does not affect acoustic models. |
gpumempad | #config only | Default 40. Specifies an amount of GPU memory in mebibytes to leave unallocated for each GPU when loading models. Use this option in the rare case that the autosize-calculated configuration doesn't load successfully. |
expire | #config and model |
Defines the amount of idle time in hours after which the system unloads a language model. By default, the system never unloads a model due to idle time. Does not affect acoustic models. Note:
The information used to make expiration decisions can be retrieved from the |
all=load|demand|no [INTERNAL ONLY] | #config only |
[INTERNAL ONLY] Specifies a global loading rule for all available language models.
The
In this example, specifying |
{model} load|demand|no | model only |
|
numgpus=N | #config and model |
Define the number of GPU processes for associated acoustic models. Acoustic processes are shared among all language models that use the same acoustic model. Explicit setting of Note:
If two language models use the same acoustic model, then the number of GPU processes used for that acoustic model is the higher of the two
In the preceding example, the acoustic model loads with 4 GPU processes. When there is a conflict between
Note:
By default,
|
numgpus=cN | #config and model |
Load acoustic model(s) in CPU only. When GPU resources are available on the host, configuring CPU-only acoustic model loading results in the specified acoustic model(s) being enabled in host CPU and RAM rather than GPU. This configuration can be used to conserve GPU resources for models that require more performance while still making the specified models available for use at a lower throughput rate. On systems without GPU resources, the |
Sizing and loading models into memory
Acoustic models are of fixed size and are always loaded at startup. Whether the model is loaded in GPU or CPU memory, the acoustic model process sizes do not change during ASR operation.
Language model processes, however, can be very dynamic in their use of system memory. They do not grow without bound, but there can be significant differences in language model memory usage between initialization and peak operation. Monitoring the memfree element in /statusfull or the asr_memory_low_bytes gauge in /metrics is recommended to avoid out-of-memory conditions due to over-sizing configurations .
Acoustic model auto-sizing when limited by GPU memory
If the system runs out of GPU memory when loading acoustic models, it restarts in safe mode, ends all acoustic model processes, and sets numgpus to 1. One of each installed and available model loads to measure the memory requirements and optimize loading behavior accordingly. The system restarts when it finishes calculating optimal memory sizing for the models, and attempts to pack as many models as it can into the GPU based on the initially requested configuration.
In this case the system logs the following entries to /var/log/vociserver/err.log during the memory sizing process:
Decode server failed to start. Restarting in safe mode.
Decode server successfully started in safe mode. Restarting.
Example and default models.list
#config memfree=5 cycle=24The preceding code shows the generally recommended configuration for models.list that is typically included with Voci-produced system images like AWS EC2 AMIs.
eng-us:callcenter
fre-ca:callcenterThe preceding models.list configuration limits the models loaded at startup to eng-us:callcenter and fre-ca:callcenter.
#config memfree=5 cycle=24 expire=12
eng-us:callcenter load
eng1* no
eng* demand
This example demonstrates dynamic loading.
-
The first line represents a global configuration command with the following settings:
-
memfree=5— ensures that there is at least 5 GB of free memory on the system. -
cycle=24— reload models every 24 hours to help refresh memory. -
expire=12— automatically unload any language model if it has not been used in 12 hours.
-
-
The second line instructs
vociserverto automatically loadeng-us:callcenterinto memory whenvociserverservice starts up. -
The third line ensures deprecated
eng1models are not loaded. -
The fourth line uses a wildcard to load all other
engmodels dynamically.
