Megvii Open Sources Deep Learning Framework

Chinese Megvii Technology open sources deep learning AI framework

Chinese Artificial Intelligence (AI) start-up Megvii Technology Limited announced that it makes its deep learning framework open-source, as China steps up the development of home-grown AI and makes the technologies more accessible to reduce reliance on US platforms.

Initially developed in 2014, MegEngine is part of Megvii’s proprietary AI platform, Brain++, which can train computer vision at a large scale and enable developers across the world to build AI solutions for industrial and commercial use, according to the Beijing-based company.

Chief Scientist and Head of Megvii Research Dr. Sun Jian said, “It took us six years from developing MegEngine for our own use in 2014 to open source it today. Open sourcing MegEngine is just the first step in our contributions to the open source movement. We have used it to power our computational photography, facial recognition, and object recognition applications, but the developer community can use our foundational technology in innovative, real world applications of AI that we have not yet imagined. They will make what we built even better, and we can spend more time commercializing our products. It’s a win-win for all.”

Brain++ Platform

Brain++, the next-generation AI productivity platform, consists of three pillars, namely, deep learning framework MegEngine, deep learning cloud computing platform MegCompute and data management platform MegData.


MegEngine was born in 2014 and open-sourced in March 2020. It is the core component of Brain ++ and a new generation of industrial-grade deep learning open-source framework. Tianyuan can help developers and users to use large-scale programming interfaces to train and deploy large-scale deep learning models.

Tianyuan is specifically divided into five layers of computing interface, graph representation, optimization and compilation, runtime management, and computing kernel, which can greatly simplify the algorithm development process, realize the non-destructive migration of model training speed, and accuracy, and support dynamic and static mixed programming. And model import, built-in high-performance computer vision operators, especially suitable for large model algorithm training.

  • Training inference
  • Static and dynamic
  • Compatible
  • Flexible and efficient


MegCompute, a distributed deep learning platform, is a large-scale artificial intelligence computing platform independently developed by Desperate. It provides E-level computing resource scheduling, EB-level massive data storage management, and 400G RDMA high-speed backbone network.

It contains functional modules such as infrastructure, data storage, computing scheduling, and upper-level services. Through distributed cluster management to maximize the utilization of resources, the full service of algorithm production makes the training process more efficient.

  • 400G RDMA
  • Heterogeneous resource pool
  • Flexible task scheduling
  • Algorithm generation process


MegData is an original self-developed artificial intelligence data management platform of MegVision Research Institute, covering the five dimensions of data acquisition, data processing, data annotation, data management, and data security. Starting with data production, it supports different business scenarios and training methods to process and label data.

The platform provides standard processing procedures for annotation, feature processing, derivation, and screening of structured data. It also provides online annotation capabilities for a variety of unstructured data. The standardized annotation process enables annotation data, tasks, personnel, and progress.

The unified management of labeling quality and labeling tools provides high-quality training data for AI model training. At the same time, MegData has designed multiple data security functions to ensure data security and privacy.

  • Efficient
  • Professional
  • Safety
  • Stable

Framework Advantages

MegEngine has a variety of advantages compared to the majority of open-source deep learning frameworks:

  • Computing speed: MegEngine has dynamic and static memory optimization mechanism of binding, and therefore is faster than TensorFlow;

  • Small memory footprint: by analyzing the entire execution of the program, MegEngine fully optimizes memory utilization. Particularly using a linear algorithm of memory optimization, it can support complex network structure, automatic reduction is calculated using the portion of the redundant memory footprint, up to two orders of magnitude, so it supports larger models training;

  • Ease of use is good: MegEngine platform encapsulates the details of the new user is easy to quickly get started;

  • Support multiple hardware platforms and heterogeneous computing: MegEngine support common CPU, GPU, FPGA, and other hardware end mobile devices, multiple cards can be multi-machine training;

  • Training deployment integration: the entire framework both for training and to support the inference, to achieve a training model, multi-device deployment, avoid performance degradation and loss of accuracy due to the complexity of the conversion process.


MegEngine’s Chinese name, Tianyuan, means “the origin for everything” and also refers to the center point of a Go board. The name is not only a salute to AlphaGo, the computer program developed by Google’s DeepMind, but represents Megvii’s wish to enable a better future for the country’s AI industry.