All Products
Search
Document Center

:Purchase and use MaxCompute model computing service

Last Updated:Oct 10, 2026

To use models in MaxCompute for data processing or offline inference without managing your own GPU resources, purchase the MaxCompute model computing service to meet your model inference and performance requirements.

Supported regions and models

  • Supported regions: The model computing service is available only in the following regions.

    • Chinese mainland: China (Beijing), China (Shanghai), China (Hangzhou), China (Shenzhen), China (Ulanqab)

    • International: Singapore

  • Supported models

    Model

    Type

    Description

    qwen3.8-max

    Supports multimodal data input

    A flagship Mixture of Experts (MoE) model from the Qwen 3.8 series with 2.4 trillion parameters. It features significantly enhanced programming and office productivity capabilities, and can autonomously program for over ten days to deliver complete projects. This model is ideal for highly complex scenarios such as autonomous programming, advanced office automation, scientific research, and long-duration tasks.

    qwen3.7-max

    Text input only

    A flagship model from the Qwen 3.7 series, featuring comprehensive upgrades in inference, code generation, and multilingual understanding. It is suitable for highly complex tasks.

    qwen3.7-plus

    Supports multimodal data input

    A balanced model from the Qwen 3.7 series that offers a good trade-off between performance and cost. It is suitable for enterprise scenarios such as long-text analysis and multi-turn conversations.

    qwen3.7-flash

    Supports multimodal data input

    A lightweight, high-speed, native vision-language model from the Qwen 3.7 series. It features enhanced multimodal understanding and agent execution capabilities, making it ideal for high-concurrency, low-latency online services and lightweight multimodal tasks.

    qwen3.7-text-embedding

    Text input only

    This unified multilingual text vector model, trained on Qwen 3.7, offers significant performance improvements in text retrieval, clustering, and classification compared to the text-embedding-v4 version.

    qwen3-vl-embedding

    Supports multimodal data input

    A Qwen multimodal vector embedding model that supports vector representations for mixed image and text inputs. It is suitable for cross-modal retrieval and image-text matching scenarios.

    text-embedding-v4

    Text input only

    A high-precision text vector embedding model suitable for semantic search, clustering, and similarity calculation.

    qwen3.6-plus

    Supports multimodal data input

    A balanced model from the Qwen 3.6 series that offers a good trade-off between performance and cost. It is suitable for general business scenarios such as dialogue, summarization, and analysis.

    qwen3.6-flash

    Supports multimodal data input

    A lightweight, high-speed model from the Qwen 3.6 series. It provides fast responses at a low cost, making it ideal for high-concurrency, low-latency online services.

    deepseek-v4-pro

    Text input only

    The fourth-generation flagship inference model from DeepSeek. It excels at high-difficulty tasks such as mathematics, coding, and complex logical reasoning.

    deepseek-v4-flash

    Text input only

    The fourth-generation lightweight model from DeepSeek. It offers fast inference and is highly cost-effective, making it suitable for daily conversations and lightweight inference tasks.

    qwen3.5-397b-a17b

    Supports multimodal data input

    A Mixture of Experts (MoE) model from the Qwen 3.5 series. It features efficient parameter activation, a vast knowledge base, and multi-step reasoning capabilities. This model is designed for high-difficulty logical deduction, full-stack code generation, and in-depth knowledge Q&A.

    qwen3.5-omni-plus

    Supports multimodal data input

    Qwen3.5-Omni is Qwen's latest omni-modal large model. It is suitable for scenarios such as text creation, voice assistants, and multimedia analysis, providing a natural and smooth multimodal understanding and interaction experience.

    qwen3-asr-flash

    Supports multimodal data input

    A lightweight speech recognition model from the Qwen 3 series. It provides real-time transcription with low latency and high concurrency, making it suitable for real-time audio processing scenarios such as generating meeting minutes, live-streaming subtitles, and recognizing voice commands.

    tongyi-embedding-vision-plus

    Supports multimodal data input

    Tongyi-Embedding-Vision is a visual multimodal representation model built on a large language model (LLM). It is suitable for a variety of downstream tasks, including image-to-image search, text-to-image search, text-to-video search, video-to-video search, text-to-text search, and text-to-image-and-text search.

    qwen3-max (Sunsetting soon)

    Text input only

    A high-performance large language model from the Qwen series, suitable for complex inference and content generation.

    Important

    The qwen3-max model is sunsetting soon. To ensure service continuity, migrate your related services to a new model as soon as possible. For more information, see Model Decommissioning Policy.

Billing

For details, see Model Compute Fee (Token Fee).

Before you begin

You only need to activate the service once per region. After activation, the service is available by default to all projects in that region.

  1. Log in to the MaxCompute console and select a region in the upper-left corner.

  2. In the left-side navigation pane, choose Manage Configurations > Quotas .

  3. On the Quotas page, click New Quota.

    On the purchase page, for Product Type, select Model Computing Service.

  4. On the MaxCompute model computing service page, select a region, agree to the service agreement, and then activate the service.

  5. After the purchase is complete, return to the console. A Pay-as-you-go quota named ai_InferenceQuota appears on the Quota Management page.

Grant permissions

By default, no accounts (including Alibaba Cloud accounts) or roles have the permission to specify a quota at the job level. You must explicitly grant the required permissions before you can use this feature.

Create a role

  1. Log in to the MaxCompute console and select a region in the upper-left corner.

  2. In the left-side navigation pane, choose Manage Configurations > Tenants .

  3. On the Tenants page, click the Roles tab.

  4. On the Roles tab, click Add Role. In the Add Role dialog box, enter a custom Role Name, provide the Policy Content, and then click OK.

    {
        "Statement": [{
                "Action": [
                    "odps:List",
                    "odps:Usage"],
                "Effect": "Allow",
                "Resource": ["acs:odps:*:regions/*/quotas/*"]}],
        "Version": "1"
    }

Grant the role to accounts

Your Alibaba Cloud account or a RAM user with the Super_Administrator permission can grant these permissions. The authorization process varies depending on the account type.

Authorizing Alibaba Cloud accounts

Run the following commands to authorize an Alibaba Cloud account:

-- Add the Alibaba Cloud account to the tenant and grant a tenant role to the account.
ADD TENANT USER <Aliyun$xxxx>;
GRANT TENANT ROLE <role_name> TO USER <Aliyun$xxxx>;

-- View the permissions of a tenant role or user.
SHOW GRANTS FOR TENANT ROLE <role_name>;
SHOW GRANTS FOR TENANT USER <user_name>;
SHOW PRINCIPALS FOR TENANT [ROLE] <role_name>;

Authorizing RAM users

Follow these steps to authorize a RAM user:

  1. Log in to the MaxCompute console and select a region in the upper-left corner.

  2. In the left-side navigation pane, choose Manage Configurations > Tenants .

  3. On the Tenants page, click the Users tab.

  4. On the Users tab, find the target RAM user and click Modify Role in the Actions column.

  5. In the Edit Role dialog box, move the desired roles from the Available Roles section to the Added Roles section, and then click OK.

Usage

Use in MaxFrame jobs

To use the MaxCompute model computing service, specify a supported model in a MaxFrame AI Function.

Example: Use the qwen3.6-plus multimodal model for image understanding

The following code is a sample.

import os

import pandas as pd
import maxframe.dataframe as md
from maxframe import new_session
from maxframe.config import options
from maxframe.learn.contrib.llm import ImageContentType
from maxframe.learn.utils import read_odps_model
from odps import ODPS

# Configure the execution engine: DPE first.
options.dag.settings = {
    "engine_order": ["DPE", "MCSQL"],
}

# 1. Create an ODPS connection.
o = ODPS(
    os.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"),
    os.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"),
    project="<your-project-name>",
    endpoint="<your-endpoint>",  # Example: https://service.cn-shanghai.maxcompute.aliyun.com/api
)

# 2. Configure the engine and create a session.

# Model Studio VL model inference is performed by the DPE engine. It is billed based on token consumption, and you do not need to pre-provision CU/GU resources.

# Create a MaxFrame session.
session = new_session(o)
print(f"Session ID: {session.session_id}")
print(f"Logview: {session.get_logview_address()}")

# Load the VL model from the Model Studio public model set.
image_llm = read_odps_model(
    "qwen3.6-plus", project="bigdata_public_modelset", odps_entry=o
)

# Load the pre-registered multimodal understanding model from the MaxCompute public model set.
image_llm = read_odps_model(
    "qwen3.6-plus", project="bigdata_public_modelset", odps_entry=o
)

## 4. Prepare OSS image data.

# Use the format `oss:////` and pass the OSS access credentials by using `storage_options`.
# OSS configuration
OSS_ENDPOINT = "oss-cn-shanghai-internal.aliyuncs.com"  # Replace with your OSS endpoint.
OSS_BUCKET = "your-bucket"                              # Replace with your bucket name.
OSS_PREFIX = "images"                                   # Replace with the prefix of the path where the images are stored.

storage_options = {
    "access_key_id": os.getenv("OSS_ACCESS_KEY_ID"),
    "access_key_secret": os.getenv("OSS_ACCESS_KEY_SECRET"),
}

# Construct a list of image URLs.
image_urls = [
    f"oss://{OSS_ENDPOINT}/{OSS_BUCKET}/{OSS_PREFIX}/image{i}.jpg"
    for i in range(1, 9)
]

df = md.DataFrame({"image_url": image_urls})
df.execute()

## 5. Call the VL model for image understanding.

# Pass the text prompt and OSS images to the model by using the `generate()` interface.

cp = image_llm.content_part

result_df = image_llm.generate(
    df,
    messages=[
        {
            "role": "user",
            "content": [
                cp.text("Describe this image in one sentence."),
                cp.image(
                    data=df.image_url,
                    type=ImageContentType.IMAGE_URL,
                    storage_options=storage_options,
                ),
            ],
        }
    ],
    simple_output=True,
    params={"max_tokens": 128},
)

## 6. Run the inference and view the results.

# MaxFrame uses a lazy execution model. Call `.execute()` to trigger the actual computation.
result = result_df.execute()
print(result)

## 7. Clean up resources.
session.destroy()
print("Session destroyed")

For more syntax details and examples, see MaxFrame AI function.

Use in SQL jobs

To use the MaxCompute model computing service in a SQL job, specify a supported model in an AI Function. The following code provides an example:

SET odps.namespace.schema=true;

SELECT 
    prompt,
    AI_GENERATE(
        bigdata_public_modelset.default.`qwen3.7-max`,
        DEFAULT_VERSION,
        concat('Perform sentiment classification for the following review. The output must be exactly one of the following three options: Positive, Negative, Neutral. Review:', prompt)
    ) AS generated_text
FROM (
    VALUES 
        ('The weather is great today, and I''m in a good mood! It''s sunny and perfect for a walk.'),
        ('The weather is great today, and I''m in a good mood! It''s sunny.'),
        ('Technology is advancing rapidly, and AI is changing our lives.'),
        ('The prevention and control measures are excellent. Kudos to the healthcare workers!'),
        ('The quality of this product is very poor.')
) t (prompt);

For more syntax details and examples, see AI_GENERATE.