Uniform deep learning inference framework for mobile, desktop and server.

github.com/Tencent/TNN
TNN homepage screenshot

About TNN

TNN, developed by Tencent Youtu Lab and Guangying Lab, is a neural network inference framework for mobile, desktop and server use. Deployment follows three steps: convert a trained model to TNN format, compile the engine for the target hardware, and call the engine from an application for inference.

It describes conversion support for TensorFlow, PyTorch and Caffe models, and engine builds for ARM, OpenCL, Metal, NPU, X86 and CUDA. The repository includes examples for face detection, face alignment, hair segmentation, pose estimation, object detection and Chinese OCR.

Key features

  • Converts TensorFlow, PyTorch, and Caffe models to TNN format
  • Builds target-specific engines for ARM, OpenCL, Metal, NPU, X86, CUDA
  • Includes face detection example using BlazeFace
  • Includes Chinese OCR example for tilted, rotated, and vertical text
  • Includes object detection examples for YOLOv5s and MobileNetV2-SSD
  • Supports model compression and code pruning
Best for: Developers deploying trained models for inference on mobile, desktop, or server hardware.
Good for
  • Covers mobile, desktop, and server deployment targets
  • Supports multiple hardware backends including ARM, NPU, X86, and CUDA
  • Provides conversion tools and examples for vision and OCR tasks

TNN at a glance

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

TNN alternatives

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

All 5 alternatives

MindSpore

github.com/mindspore-ai/mindspore

MindSpore provides a deep learning framework for training and inference across mobile, edge, and cloud scenarios.

Open source
21 alternatives

Rapid-MLX

github.com/raullenchai/Rapid-MLX

For Apple Silicon, Rapid-MLX offers an open-source LLM inference server and Mac app compatible with OpenAI and Anthropic APIs.

Popular in Model Serving & Inference

Well-known listings from the same topic.

All 26

TNN FAQ

What steps are needed to use TNN with a trained model?
Convert the trained model to a TNN model, compile the TNN engine for the target platform, then use the compiled engine for inference.
Which training frameworks are mentioned for model conversion?
TensorFlow, PyTorch, and Caffe are listed as supported for conversion to TNN format.
Which acceleration options are mentioned for compiling TNN?
ARM, OpenCL, Metal, NPU, X86, and CUDA are listed as selectable options.
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