A model is a core object in MaxCompute. MaxCompute supports various model types, such as public, imported, and remote models, and provides unified management for models and model versions to help you more easily integrate model capabilities into your business analytics flow. This topic describes the basic concepts, benefits, and types of MaxCompute models. It also explains how to manage and use them.
Introduction to models
Concepts
Model: A model is a deployment object registered in MaxCompute. It can be used for prediction or generation tasks. The goal is to seamlessly integrate AI computing capabilities, such as large language models (LLMs) and machine learning models, into the same platform where your data resides.
Model version: A model version is an independent and uniquely identifiable sub-object of a model. You can create and manage multiple iterative versions under the same model name. This enables simplified grayscale control, rapid rollbacks, and performance comparisons between old and new versions when you call models and AI Functions.
Benefits
Unified management: Similar to data, models support permission management and versioning to meet enterprise security and compliance requirements.
Multi-engine integration: MaxCompute supports model calls from multiple ecosystems, such as SQL and Python (MaxFrame). The unified architecture not only enables data analysts to use familiar SQL to call powerful AI models, but also enables data scientists to use the distributed Python computing power of MaxFrame. This helps them continuously improve the efficiency and quality of data pre-processing with models.
Simplified O&M: You do not need to export data to external systems for AI inference. This avoids the security, cost, and latency issues caused by data movement.
Model types
MaxCompute provides the following model types:
Model type | Description |
Public model | MaxCompute has multiple built-in, ready-to-use open-source large models. They are pre-created in the public project named The following models are supported:
Note
For more information about the best practices for using MaxCompute public models, see Use a MaxCompute public model for sentiment analysis of online reviews. |
Remote model | You can connect to models that are already deployed on PAI-EAS. Specify the Endpoint and token required to access PAI-EAS. Then, register the model as a MaxCompute remote model to call it using an AI Function. For more information about the best practices for using MaxCompute remote models, see Use a MaxCompute remote model to automatically generate e-commerce product descriptions. |
Internally trained model | You can use MaxCompute MaxFrame to train traditional machine learning models. Execute For more information about the best practices for using internally trained MaxCompute models, see Use MaxCompute to train and predict with an XGBoost model. |
Import Model Imported model | In some business scenarios, built-in public models may not fully meet your needs. Models that are fine-tuned with algorithms can be adjusted based on business performance to achieve better results. You can import custom model files that are saved after being trained and tuned externally. Specify the OSS address of the model file and import it into MaxCompute for later inference. |
Model management
Before you manage models, ensure that you have the required permissions to operate on Model objects. For more information, see MaxCompute permissions.
MaxCompute provides multiple methods for managing model objects:
Management method | Instructions |
Manage models using SQL | You can manage models using SQL statements. This includes creating, viewing, modifying, and deleting models. For more information, see Create and manage models using SQL. |
Manage models using MaxFrame | You can manage models using MaxFrame Python statements. Currently, only model creation is supported. For more information, see MaxFrame-specific APIs. |
Manage models using the console | MaxCompute provides a graphical user interface (GUI) in its console for model management. In regions where the console has been adapted, you can view created models in the console. Follow these steps:
Note The feature of managing models in the console is currently available only in the China (Beijing) region. It will be gradually rolled out to other regions. |
Use models for inference
Built-in public models and other types of models that are created and managed in your project can be called using the AI Functions provided by MaxCompute. For more information, see Introduction to MaxCompute AI Functions.
For more information about use cases for MaxCompute models and AI Functions, see the following topics:
Use a MaxCompute public model for sentiment analysis of online reviews.
Use MaxCompute to train and predict with an XGBoost model.
Use a MaxCompute remote model to automatically generate e-commerce product descriptions.