All Products
Search
Document Center

Platform For AI:PAI-TensorFlow user guide

Last Updated:Jun 16, 2026

PAI-TensorFlow optimizes the native TensorFlow kernel and provides tools to improve deep learning training efficiency. It supports service orientation, distributed scheduling, global computing scheduling, GPU mapping, and online model prediction.

Important

Public cloud GPU servers will be phased out. You can continue to submit TensorFlow tasks that run on CPU servers. To use GPUs for model training, submit jobs in Deep Learning Containers (DLC). For more information, see Create a training job.

Background information

TensorFlow is an open source deep learning framework developed by Google. It supports multiple neural network models, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and long short-term memory (LSTM). TensorFlow enables efficient model training in fields such as speech, image, and text processing, and is widely adopted for its rich features and flexible APIs.

PAI-TensorFlow is fully compatible with native TensorFlow code and delivers better performance in many production scenarios. It is a component of multiple Alibaba Cloud products, such as PAI and E-MapReduce (EMR).

Features

PAI-TensorFlow provides the following features:

  • Service orientation

    MaxCompute is an Alibaba Cloud big data platform built on the Apsara system, serving tens of thousands of businesses and developers. PAI-TensorFlow lets you run the TensorFlow framework within MaxCompute. Its APIs are identical to those of the open source version, and you can submit jobs to a MaxCompute compute cluster by using the TensorFlow Training Script API.

  • Distributed scheduling

    PAI provides massive computing resources managed by GPU Quota. The distributed scheduling system dynamically assigns PAI-TensorFlow jobs to different machines. You do not need to request physical GPU hosts in advance. GPU resources are allocated when a job starts and released when the job ends.

  • Global computing scheduling

    With the MaxCompute computing engine, you can submit both SQL jobs and PAI-TensorFlow jobs in the same project. The global computing scheduling service automatically routes PAI-TensorFlow jobs to the appropriate GPU clusters and connects data preprocessing jobs on CPU clusters with model training jobs on GPU clusters.

  • GPU mapping

    PAI-TensorFlow supports assigning different operators to specific CPUs or GPUs. With GPU mapping, you do not need to know the physical GPU structure of the host. PAI-TensorFlow automatically maps the requested GPUs to the job's process space, making them visible as `gpu:0`, `gpu:1`, and so on.

  • Online model prediction

    PAI provides Elastic Algorithm Service (EAS). You can deploy models trained in PAI-TensorFlow to EAS with a single click. EAS supports dynamic scaling, rolling updates, A/B testing, high throughput, and low latency.

Supported Python libraries

PAI-TensorFlow comes pre-installed with common third-party Python libraries such as NumPy and Six. You can import these libraries directly in your TensorFlow jobs.