Language AI Playbook
  • 1. Introduction
    • 1.1 How to use the partner playbook
    • 1.2 Chapter overviews
    • 1.3 Acknowledgements
  • 2. Overview of Language Technology
    • 2.1 Definition and uses of language technology
    • 2.2 How language technology helps with communication
    • 2.3 Areas where language technology can be used
    • 2.4 Key terminology and concepts
  • 3. Partner Opportunities
    • 3.1 Enabling Organizations with Language Technology
    • 3.2 Bridging the Technical Gap
    • 3.3 Dealing with language technology providers
  • 4. Identifying Impactful Use Cases
    • 4.1 Setting criteria to help choose the use case
    • 4.2 Conducting A Needs Assessment
    • 4.3 Evaluating What Can Be Done and What Works
  • 5 Communication and working together
    • 5.1 Communicating with Communities
    • 5.2 Communicating and working well with partners
  • 6. Language Technology Implementation
    • 6.1 Navigating the Language Technology Landscape
    • 6.2 Creating a Language-Specific Peculiarities (LSP) Document
    • 6.3 Open source data and models
    • 6.4 Assessing data and model maturity
      • 6.4.1 Assessing NLP Data Maturity
      • 6.4.2 Assessing NLP Model Maturity:
    • 6.5 Key Metrics for Evaluating Language Solutions
  • 7 Development and Deployment Guidelines
    • 7.1 Serving models through an API
    • 7.2 Machine translation
      • 7.2.1 Building your own MT models
      • 7.2.2 Deploying your own scalable Machine Translation API
      • 7.2.3 Evaluation and continuous improvement of machine translation
    • 7.3 Chatbots
      • 7.3.1 Overview of chatbot technologies and RASA framework
      • 7.3.2 Building data for a climate change resilience chatbot
      • 7.3.3 How to obtain multilinguality
      • 7.3.4 Components of a chatbot in deployment
      • 7.3.5 Deploying a RASA chatbot
      • 7.3.6 Channel integrations
        • 7.3.6.1 Facebook Messenger
        • 7.3.6.2 WhatsApp
        • 7.3.6.3 Telegram
      • 7.3.7 How to create effective NLU training data
      • 7.3.8 Evaluation and continuous improvement of chatbots
  • 8 Sources and further bibliography
Powered by GitBook
On this page
  1. 7 Development and Deployment Guidelines
  2. 7.2 Machine translation

7.2.2 Deploying your own scalable Machine Translation API

Previous7.2.1 Building your own MT modelsNext7.2.3 Evaluation and continuous improvement of machine translation

Last updated 1 year ago

is an open-source REST API designed for serving multiple machine translation models in production environments. It offers a range of features and supports various translation system types, including ctranslate2 models, Transformers-based models from Hugging Face, and custom rule-based translators.

Features

  • Minimal REST API interface for using many models

  • Batch translation

  • Low-code specification for loading various types of models at start-up

  • Automatic downloading of huggingface models

  • Multilingual model support

  • Model Chaining

  • Translation pipeline specification (lowercasing, tokenization, subwording, recasing)

  • Automatic sentence splitting (uses nltk library)

  • Manual sentence splitting with punctuation

  • Supports sentence piece and byte-pair-encoding models

  • GPU support

  • Easy deployment with docker-compose

Usage Instructions

  1. Model Configuration: In the config.json file, you can specify the translation models, their settings, pre- and post-processors. You can configure various translation model types such as ctranslate2, Hugging Face transformer models, and custom rule-based translators.

  2. Custom Configuration Examples: The repository README provides example configurations for different model types, including , OPUS and OPUS-big models of , models, and models. These examples demonstrate how to set up the config.json file for each model type.

  3. Advanced Configuration Features: The README explains how to use advanced features like alternative model loading, model chaining, and sentence splitting. These features allow you to customize your translation pipelines and choose appropriate models for various translation tasks.

  4. Building and Running: The README guides you through the process of building and running the API. You can run it locally using a virtual environment and Python 3.8, or you can utilize Docker Compose for easy deployment.

  5. Example API Calls: The README provides example cURL and Python code snippets to demonstrate how to use the API for simple translation, using alternative models, and performing batch translations. Additionally, it explains how to retrieve the list of supported languages and model pairs.

TWB-MT-fastapi
ctranslate2
Helsinki-NLP
NLLB
M2M100