CMULAB: An Open-Source Framework for Training and Deployment of Natural Language Processing Models

Zaid Sheikh, Antonios Anastasopoulos, Shruti Rijhwani, Lindia Tjuatja, Robbie Jimerson, Graham Neubig · DOI

Abstract

CMULAB is an open-source, web-based framework designed to democratize state-of-the-art NLP for under-resourced and endangered languages. By providing a user-friendly interface for deploying and fine-tuning massively multilingual models, it allows linguists and community members to build high-quality tools for OCR, speech, and translation without needing deep technical or coding expertise.

Introduction

The rapid advancement of Natural Language Processing (NLP) has created a significant "skill gap" that prevents these technologies from reaching the communities that need them most. Developing high-quality NLP systems for low-resource languages typically requires a rare combination of deep linguistic knowledge, expertise in machine learning architectures, and the engineering skills necessary to deploy and maintain complex server infrastructures. While tools like Gradio or Streamlit facilitate quick demos, they often lack the specialized workflows—such as iterative human-in-the-loop fine-tuning—essential for language documentation and revitalization. CMULAB addresses this gap by providing a modular, scalable "backend-as-a-service" specifically tailored for linguistic annotation and model adaptation.

System Architecture and Methods

CMULAB is built on a modern, scalable stack designed for flexibility and ease of use. The backend is powered by Django (Python), utilizing REST APIs to communicate with various frontends. It employs Redis as a message broker and background workers to manage computationally intensive training and inference tasks asynchronously.

CMULAB System Architecture showing the interaction between the Django backend, Redis task queues, and various frontend interfaces.

The framework features a modular "plug-and-play" architecture, allowing developers to integrate new models by registering them as Python packages. CMULAB automatically handles data management, task queuing, and logging. Central to its design is a human-in-the-loop workflow: Predict $\rightarrow$ Correct $\rightarrow$ Fine-tune. Users can execute an off-the-shelf model, manually correct a small sample of errors through the interface, and trigger a fine-tuning job to adapt the model to their specific language or domain.

Frontend and Integration

The user interface includes a React-based web application and a dedicated extension for ELAN, a standard tool for audio and video annotation in linguistics. This integration recognizes that researchers are more likely to adopt AI tools if they fit into existing, familiar software environments.

The CMULAB frontend interface, showcasing the OCR post-correction workflow and the ELAN extension for audio transcription.

Datasets and Model Integration

CMULAB integrates several massive multilingual models to support a wide range of tasks:

  • Allosaurus: Pre-trained on over 2,000 languages for phoneme recognition.
  • NLLB-200 (No Language Left Behind): Supports translation across 200 languages.
  • GlossLM: A model for interlinear glossing covering 1.8k languages.

The framework's effectiveness was evaluated through a case study on Seneca, an Iroquoian language, using 19th-century religious texts.

Key Results: Seneca OCR Case Study

The framework demonstrated significant utility in OCR post-correction for the Seneca language. Initially, using off-the-shelf Google Cloud Vision OCR on historical Seneca documents resulted in a Character Error Rate (CER) of 44.11%. By manually correcting just 10 pages of text and using CMULAB to fine-tune a post-correction model, the CER dropped to 18.53%. This substantial improvement drastically reduces the manual labor required for full-scale digitization projects.

Conclusion and Future Work

CMULAB lowers the barrier to entry for advanced NLP by removing the need for local GPU resources or complex scripting. While currently limited by fixed model architectures and a dependency on user-provided data quality, future developments will focus on implementing active learning and a detailed version history system for data and models. By meeting users where they are and simplifying complex workflows, CMULAB empowers non-technical experts to build high-quality linguistic tools.

Summary updated

BibTeX
@misc{sheikh2024cmulab,
  author = {Zaid Sheikh and Antonios Anastasopoulos and Shruti Rijhwani and Lindia Tjuatja and Robbie Jimerson and Graham Neubig},
  title = {{CMULAB: An Open-Source Framework for Training and Deployment of Natural Language Processing Models}},
  year = {2024},
  eprint = {2404.02408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.02408},
}
Figure