# Tencent/TurboTransformers

a fast and user-friendly runtime for transformer inference (Bert, Albert, GPT2, Decoders, etc) on CPU and GPU.

Repository: https://github.com/Tencent/TurboTransformers
Canonical: https://ross.abutalabs.com/products/turbotransformers
Language: C++
License: NOASSERTION
License Family: other
Topics: nlp, transformer, bert, decoder, gpu, machine-translation, inference, huggingface-transformers, pytorch, albert, roberta, gpt2
Last push: 2025-07-18T03:51:18+00:00

## Health v2 (maintenance only)
Score: 37/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 32, release rhythm 8, longevity 100
- inputs: {"age_days": 2326, "days_push": 411, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1548, forks 208 (observed 2026-08-28T04:05:01.869682+00:00)

## What it is
A fast, user-friendly C++/Python runtime for transformer model inference (BERT, ALBERT, RoBERTa, GPT2, decoders) on CPU and GPU. It works as a PyTorch plugin, requiring only a few lines of code to accelerate Hugging Face transformer models with variable-length inputs and smart batching.

## Use cases
- speed up bert inference on cpu and gpu
- accelerate huggingface transformer models in production
- serve variable-length transformer batches without offline tuning
- run gpt2 decoder inference faster
- boost nlp services like faq matching and sentiment analysis
- replace tensorrt or onnx runtime for transformer serving

## When to choose
- you need faster BERT/ALBERT/GPT2 inference than PyTorch with minimal code changes
- you serve variable-length inputs and want to avoid static-shape preprocessing
- you want both CPU and GPU acceleration from one runtime

## When to avoid
- you need the latest LLM architectures beyond classic encoder/decoder transformers
- you require a permissively licensed dependency (license is non-standard)
- you want a broadly maintained ecosystem - the project sees infrequent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: llm-inference, machine-learning, nlp, sdk
- domain: machine-learning, deep-learning, large-language-models
- platform: cpp, python, cross-platform
- tags: transformer-inference, bert, gpt2, huggingface, pytorch-plugin, cpu-gpu, smart-batching, natural-language-processing, linux, gpu

## Member repositories
- Tencent/TurboTransformers (main) score 37

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:01.869682+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:30:25.391051+00:00, confidence not recorded.
  - readme: https://github.com/Tencent/TurboTransformers (fetched 2026-08-28T04:05:01.869682+00:00, sha fb371dd4949f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
