CTranslate2

CTranslate2 provides a C++ and Python inference engine for transformer models.

github.com/OpenNMT/CTranslate2
CTranslate2 homepage screenshot

About CTranslate2

CTranslate2 is a C++ and Python library for running inference with Transformer models. It uses a custom runtime with performance optimizations, including weight quantization, layer fusion, and batch reordering, to speed up models and reduce their memory use on CPU and GPU. Supported architectures include encoder-decoder, decoder-only, and encoder-only models, such as Transformer, NLLB, Whisper, Llama, Mistral, and BERT variants.

Compatible models must first be converted into the library's optimized model format. The project includes converters for OpenNMT-py, OpenNMT-tf, Fairseq, Marian, OPUS-MT, and Hugging Face Transformers. The project describes itself as production-oriented with backward compatibility guarantees, but it also includes experimental features related to model compression and inference acceleration.

Key features

  • Weight quantization to FP16, BF16, INT16, INT8, and AWQ INT4 precision
  • Support for x86-64 and AArch64/ARM64 processors with multiple CPU backends
  • Automatic runtime selection of backends and instruction sets based on CPU
  • Parallel and asynchronous batch processing across multiple GPUs or CPU cores
  • Advanced decoding for autocompleting partial sequences and returning alternatives
  • Tensor parallelism to split very large models across multiple GPUs
Best for: Developers and engineers who need to run Transformer models efficiently in their own applications on CPU or GPU hardware.
Good for
  • Can run supported models faster and with less memory than general-purpose deep learning frameworks, according to the project
  • Quantization can reduce model size on disk by up to four times with minimal accuracy loss
  • Provides simple Python and C++ APIs and has few dependencies
Watch out for
  • Models must be converted into the optimized format before use
  • Includes experimental features alongside its production-oriented releases

CTranslate2 at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

CTranslate2 alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 21 alternatives

Popular in Model Serving & Inference

Well-known listings from the same topic.

All 26

CTranslate2 FAQ

Which model types does CTranslate2 support?
It supports encoder-decoder models such as Transformer, NLLB, Whisper, and T5; decoder-only models such as GPT-2, Llama, Mistral, and Gemma; and encoder-only models such as BERT and DistilBERT.
How is CTranslate2 installed?
The Python package can be installed with pip using the command pip install ctranslate2. AMD ROCm GPU users can use specific Python wheels provided on the releases page.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing