Troubleshooting NVIDIA NMT NIM Microservice Issues#
This page covers troubleshooting issues specific to the NVIDIA NMT NIM microservices. For issues shared across all NVIDIA Speech NIM microservices, see Common Issues.
Truncated Translation Output#
Symptom#
The translated text is cut off mid-sentence, especially when translating to Arabic, Turkish, Finnish, or other morphologically complex languages.
Cause#
The default --max-len-variation value (20) limits how many additional tokens the decoder can produce beyond the source token count. Morphologically complex languages often require significantly more tokens than the source text.
Solution#
Increase --max-len-variation to allow longer output. A value of 150 works for most cases.
python3 python-clients/scripts/nmt/nmt.py --server 0.0.0.0:50051 \
--text "Your long input text here" \
--source-language-code en-US \
--target-language-code ar-AR \
--max-len-variation 150
The --max-len-variation parameter accepts a string value that controls the maximum variation between the length of source and translated text in terms of tokens. Higher values may increase latency. European languages typically do not require adjustment.
Unsupported Language Code Error#
Symptom#
The translation request returns an error indicating an unsupported or unrecognized language code, such as 404 Model not found for language <code>.
Cause#
The language code does not match any deployed model. The NIM performs language matching in two passes: first an exact match on the full code (for example, en-US), then a fallback match on the base language (for example, en). If neither matches, the request fails.
Solution#
Use the correct language codes from the NMT support matrix. Common mistakes:
Intended Language |
Incorrect Code |
Correct Code |
|---|---|---|
English |
|
|
Simplified Chinese |
|
|
Traditional Chinese |
|
|
European Spanish |
|
|
LATAM Spanish |
|
|
European Portuguese |
|
|
Brazilian Portuguese |
|
|
Some language codes accept short forms (for example, de for German, fr for French) because the NIM falls back to matching the base language code. If in doubt, use the full code listed in the support matrix.
Model Not Found for Language#
Symptom#
The translation request returns 404 Not Found with the message Model not found for language <language_code>.
Cause#
The model deployed in the NIM does not support the requested language pair. Different NMT models support different language sets:
Riva Translate 1.6B: 37 languages including
es-ES,es-US,pt-PT,pt-BR,zh-CN,zh-TW.Riva Translate 4B Instruct: 12 languages including
en,de,fr,ja,ko,ar.Megatron 1B NMT: 33 languages with simplified codes (for example,
es,pt,zh).
Solution#
Verify the deployed model supports your language pair. Check the container startup logs for loaded model language codes.
If you need a language not supported by the deployed model, deploy a different NMT NIM that supports the required language pair.