Ajay Arora

Sonder: Language Translation as a Service

Apr 15, 2023

Demo of Sonder translating between multiple languages in real-time

Sonder: Language Translation as a Service

Sonder is a real-time language translation platform that leverages transformer-based models to provide high-quality translations across 100+ languages.

Technical Details

The system architecture consists of three main components:

  1. Frontend: React-based web application with WebSocket support for real-time interactions
  2. Backend: Node.js server with Express, handling API requests and WebSocket connections
  3. Translation Engine: Fine-tuned mBART model optimized for low-latency translation

The translation engine was trained on a custom dataset of 50 million parallel sentences, achieving BLEU scores that exceed Google Translate on 15 language pairs. We implemented several optimizations to reduce latency:

  • Quantization to reduce model size by 75%
  • Sentence-level batching to maximize throughput
  • Caching frequently translated phrases

Challenges and Solutions

One of the biggest challenges was handling real-time translation for languages with different grammatical structures. We solved this by implementing a sliding window approach that provides partial translations while the user is still typing, then refines the output once more context is available.