# Tencent/TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.

Repository: https://github.com/Tencent/TNN
Canonical: https://ross.abutalabs.com/products/tnn
Language: C++
License: NOASSERTION
License Family: other
Topics: deep-learning, mnn, ncnn, inference, pytorch, tensorflow, coreml, tensorrt, tengine, openvino, face-detection, hairsegmentaion, ocr
Last push: 2025-05-09T07:33:14+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 20, release rhythm 8, longevity 100
- inputs: {"age_days": 2287, "days_push": 481, "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 4648, forks 772 (observed 2026-08-28T04:08:55.576141+00:00)

## What it is
TNN is a high-performance, lightweight deep learning inference framework developed by Tencent Youtu Lab, supporting mobile, desktop, and server platforms. It offers cross-platform deployment, model compression, code pruning, and hardware acceleration for ARM CPUs, X86, and NV GPUs.

## Use cases
- run neural network inference on mobile devices
- deploy face detection models on Android and iOS
- accelerate on-device pose estimation
- run Chinese OCR on a phone
- convert TensorFlow or PyTorch models for mobile inference
- optimize deep learning model performance on ARM GPUs
- deploy computer vision models in Tencent-style mobile apps

## When to choose
- you need fast on-device inference on mobile CPUs/GPUs
- you want a lightweight C++ inference engine with small binary size
- you need cross-platform support from Android/iOS to desktop and server
- you want model compression and pruning to reduce model size

## When to avoid
- you need training rather than inference
- you want a pure Python ecosystem with broad community support
- you need the newest model architectures supported on day one
- you prefer mainstream frameworks like ONNX Runtime or TFLite with larger ecosystems

## Facets
- artifact type: library
- maturity: active
- function: deep-learning, machine-learning, llm-inference, computer-vision, ocr, image-processing, gpu-computing
- domain: deep-learning, machine-learning, computer-vision, mobile-development, cross-platform
- platform: windows, cpp, cross-platform
- tags: inference-engine, model-conversion, mobile-optimization, ncnn, on-device-ai, model-compression, android, ios, linux, macos, gpu

## Member repositories
- Tencent/TNN (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:55.576141+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-29T18:19:31.056695+00:00, confidence not recorded.
  - readme: https://github.com/Tencent/TNN (fetched 2026-08-28T04:08:55.576141+00:00, sha cfb05d5720fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
