TNN logo

TNN

Enrichment pending
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 cr

GraphCanon updated today · GitHub synced today

4.6k
Stars
773
Forks
318
Open issues
90
Watchers
1y
Last push
C++ OtherCreated May 29, 2020

Trust & integrity

Full report
Maintenance
Dormant (428d since push)
As of today · Source: github_public_v1
Provenance
Not a fork · Organization account
As of today · Source: github_public_v1
Security (OSV)
No lockfile
As of today · Source: none

Public GitHub metadata and optional OSV dependency scans. Signals, not a guarantee. Trust methodology.

Overview

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.

Capability facts

Deploy
Self-host

Source: dockerfile:Dockerfile · Jul 11, 2026

Docker
Dockerfile present

Source: dockerfile:Dockerfile · Jul 11, 2026

Languages
c++

Source: github.language · Jul 11, 2026

Categories

Tags

README

Quick Start

It is very simple to use TNN. If you have a trained model, the model can be deployed on the target platform through three steps.

  1. Convert the trained model into a TNN model. We provide a wealth of tools to help you complete this step, whether you are using Tensorflow, Pytorch, or Caffe, you can easily complete the conversion. Detailed hands-on tutorials can be found here How to Create a TNN Model.

  2. When you have finished converting the model, the second step is to compile the TNN engine of the target platform. You can choose among different acceleration solutions such as ARM/OpenCL/Metal/NPU/X86/CUDA according to the hardware support. For these platforms, TNN provides convenient one-click scripts to compile. For detailed steps, please refer to How to Compile TNN.

  3. The final step is to use the compiled TNN engine for inference. You can make program calls to TNN inside your application. We provide a rich and detailed demo as a reference to help you complete.

    • Run an iOS Demo
    • Run an Android Demo
    • Run an Linux/Windows Demo