opennmt/ctranslate2

Fast inference engine for Transformer models

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 10 minutes ago
Added to GitGenius on September 14th, 2026
Created on September 23rd, 2019
Open Issues & Pull Requests: 286 (+0)
GitHub issues: Enabled
Number of forks: 532
Total Stargazers: 4,674 (+0)
Total Subscribers: 52 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 3.0 days
Mean response time: 48.4 days
90th percentile: 148.0 days
Tracked items: 160

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 98% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 4% of issues opened in the past year have been closed. Three people close 57% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 110
New in 7 days: 2
Closed in 7 days: 0
Avg open age: 523 days
Stale 30+ days: 97
Stale 90+ days: 86

Recent activity

Opened in 7 days: 2
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 1

Top labels

  • enhancement (17)
  • documentation (2)
  • bug (1)
  • dependencies (1)
  • help wanted (1)
  • python-release (1)

Detailed Description

CTranslate2 is a C++ and Python library for efficient inference with Transformer models.

The tool addresses the challenge of running Transformer models quickly and with low memory overhead in production environments. It implements a custom inference runtime that applies performance optimization techniques including weights quantization, layer fusion, and batch reordering to accelerate execution on both CPU and GPU hardware. Models must first be converted into CTranslate2's optimized format using provided converters that support frameworks such as OpenNMT-py, OpenNMT-tf, Fairseq, Marian, OPUS-MT, and Transformers. The library supports a wide range of model architectures spanning encoder-decoder models like Transformer, NLLB, BART, T5, and Whisper; decoder-only models including GPT-2, Llama, Mistral, and Gemma; and encoder-only models such as BERT and XLM-RoBERTa.

Adoption suits teams deploying Transformer models where inference speed and memory efficiency are critical constraints. The tool is production-oriented with backward compatibility guarantees, making it appropriate for stable deployments. It also includes experimental features for model compression and inference acceleration for those willing to explore newer optimization techniques. The conversion requirement means models must be explicitly prepared for CTranslate2 rather than run directly from their original framework format.

The project maintains active development with regular updates to support new model architectures and optimization techniques. Work spans multiple hardware acceleration paths including CUDA for GPUs, AVX and AVX2 for CPU SIMD operations, and NEON for ARM processors, alongside integration with libraries like OneDNN and MKL for optimized linear algebra. The codebase shows sustained attention to both breadth of model support and depth of performance tuning across diverse hardware targets.