CoolFace
Apppublic

marconolimits/NMT

sourceHugging Faceupdated 4mo agoView on Hugging Face
1likes
App README

NMT-MenKan

Real-Time Neural Machine Translation for HoloLens 2 Bridging the gap for the hearing impaired through Language.

๐Ÿ“Œ Project Overview

NMT-MenKan is a high-performance, on-device NMT engine specifically optimized for the HoloLens 2 (ARM64). It serves as the translation layer in a cascaded pipeline (ASR โ†’ NMT), converting English speech into Italian holographic text with minimal latency.

The project name derives from "MenKan" (Bambara for hear and understand), reflecting the use of holographic light to provide clarity to the user.

๐Ÿ›  Technical Stack

  • โ€”Architecture: C++ Native (UWP Compatible)
  • โ€”Model: facebook/nllb-200-distilled-600M
  • โ€”Inference Engine: CTranslate2
  • โ€”Quantization: Int8 (Optimized for Snapdragon 850 / 4GB RAM)
  • โ€”Language Pair: English (En) โ†’ Italian (It)

๐Ÿš€ Architectural Decisions

  • โ€”Why NLLB-200? Selected over standard Transformer models for superior handling of Italian morphology and better performance on spoken-dialogue structures.
  • โ€”Why CTranslate2? Provides a lightweight C++ execution provider that avoids the overhead of Python/PyTorch, essential for real-time holographic rendering cycles.
  • โ€”Fine-Tuning: The model is targeted for fine-tuning on the OpenSubtitles dataset to better align with "messy" real-world speech captured via ASR.

๐Ÿ“‚ Repository Structure

  • โ€”/src: Native C++ implementation of the translation worker.
  • โ€”/models: Scripts for converting HuggingFace checkpoints to CTranslate2 format.
  • โ€”/docs: Architecture diagrams and HoloLens 2 deployment guides.

HTTP API Deployment (Hugging Face Spaces)

  • โ€”A Docker-ready HTTP API is available at scripts/nmt_http_api.py.
  • โ€”Endpoint docs:
  • โ€”GET /healthz
  • โ€”POST /translate with JSON { "text": "..." }
  • โ€”Deployment guide: HUGGINGFACE_SPACES.md
  • โ€”Integrate another app (any stack) against the live Hugging Face URL: HF_API_INTEGRATION.md

๐Ÿค– Context for AI Assistants

If you are assisting with this repo, please adhere to the following constraints:

Role: Lead Embedded AI Engineer & C++ Architect. Target: HoloLens 2 (Snapdragon 850, UWP). Objective: Maintain low-latency En-It translation using NLLB-200-distilled-600M via CTranslate2 (Int8). Focus: Memory safety, SIMD optimizations for ARM64, and efficient buffer management between ASR and NMT layers.