Practical overview
When it fits
Use Nllb Serve when you want to run an NLLB translation model as a local or server-hosted web service, expose translation through REST, or handle larger files with its batch CLI.
Who it is for
- Developers who want to connect text translation to an application through a REST endpoint.
- People who need a web interface for translating text with an NLLB model.
- Teams processing translation files in batches through a command-line workflow.
Documented uses
- Translate a string or list of strings through a REST request.
- Use a browser-based interface to access a served NLLB model.
- Process larger translation datasets with the `nllb-batch` command-line tool.
Requirements & limits
- The README describes translation across 200 languages and requires source and target language identifiers in requests.
- The REST endpoint supports GET and POST; its input may be a single string or a list.
- The batch CLI is described as optimized for larger files, while the REST API is aimed at individual translations.
- The default REST source-length limit is 250; the batch tool’s default maximum is 512 characters.
- The repository code is stated to use Apache License 2.0, while model weights follow the selected model’s license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Nllb Serve and start its local service
Install the project from GitHub and launch the web interface and REST service using the documented default entry point.
Before you start
- Python environment with pip.
- Access to the Nllb Serve GitHub repository.
Steps
Run the command below.
pip install git+https://github.com/thammegowda/nllb-serveStart the service with
nllb-serveor the command below.python -m nllb_serveUse the documented default address, http://localhost:6060.
Expected outcome
The NLLB service starts on localhost:6060 by default, providing the web interface and REST API.
Guide limitations
- CUDA and PyTorch version mismatches may affect GPU use; the README recommends matching their CUDA versions as closely as possible.
- Code and model weights have different licenses; the selected model’s terms apply to its weights.
Send a translation request to the REST endpoint
Submit text and source and target language identifiers to the running `/translate` endpoint.
Before you start
- A running Nllb Serve instance.
- Source text and NLLB language identifiers for the source and target languages.
Steps
Address the
/translateendpoint on the service host and port.Provide
source,src_langandtgt_langas query parameters, URL-encoded form fields or a JSON POST body.For multiple texts, provide
sourceas a list in JSON or send repeated source values using the documented request format.
Expected outcome
The request is submitted to the service for translation; the endpoint supports a single string or a batch of strings.
Guide limitations
- The default maximum source length is 250, and longer sequences are truncated.
- The service requires language identifiers, for example
eng_Latnandfra_Latn.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- thammegowda/nllb-serve · Official homepage title · retained in its source language

