Deploy and train models

更新时间:
复制 MD 格式

Model Gallery provides hundreds of pretrained models that support one-click deployment as inference services and fine-tuning.

Select a model

Model Gallery offers a diverse collection of models. Use the following methods to quickly find the model that best suits your needs:

  • Search by domain and task: Filter models by application domain and task type.

  • Review the pretraining dataset: A dataset that closely matches your use case yields better model performance for direct deployment and fine-tuning. The model details page contains more information about the pretraining dataset.

  • Consider the model size: Models with more parameters usually perform better, but they also have higher deployment costs and require more data for fine-tuning.

To find a model:

  1. Go to the Model Gallery page.

    1. Log on to the PAI console.

    2. In the left-side navigation pane, click Workspaces, and then select a workspace.

    3. In the left-side navigation pane, click QuickStart > Model Gallery to go to the Model Gallery page.

  2. Find a model.

    You can find a model by using the search box, filtering by model source (ModelScope, PAI, or NIM), or applying use-case tags.

    After you find a model, deploy it, debug it online, or verify its inference performance. Deploy a model, Fine-tune a model.

Deploy a model

To deploy Qwen3-0.6B as an example, follow Model Gallery Quick Start - Model Deployment.

Fine-tune a model

To fine-tune Qwen3-0.6B as an example, follow Model Gallery Quick Start - Model Fine-tuning.

Configure the following parameters on the fine-tuning job details page.

Configurable parameters for fine-tuning

Parameter type

Parameter

Description

Training Mode

Supervised Fine-tuning (SFT)

Supported training modes:

  • Supervised Fine-tuning (SFT): Fine-tunes model parameters with specified input-output pairs.

  • Direct Preference Optimization (DPO): Aligns a language model with human preferences, sharing the same goal as Reinforcement Learning from Human Feedback (RLHF).

Both modes support full-parameter fine-tuning, LoRA, and QLoRA.

Direct Preference Optimization (DPO)

Job Configuration

Task name

A default name is provided. Modify as needed.

Maximum running time

Maximum task duration. The task stops when exceeded.

Default: no time limit.

Dataset Configuration

Training dataset

Default training data is provided. To use a custom dataset, prepare it in the format specified in the model documentation and upload it by using one of the following methods:

  • OSS file or directory

    Click image to select the OSS path of your dataset. In the Select OSS folder or file dialog box, select an existing file or click Upload file.

  • Custom Dataset

    Use datasets stored in cloud storage such as OSS. Click image to select an existing dataset. If no dataset exists, create one by following Create and manage datasets.

Validate dataset

Click Add validation dataset to add one. Configure it the same way as Training dataset.

Output Configuration

Cloud storage path for the trained model and TensorBoard log files.

Note

If a default OSS path is configured on the workspace details page, this field is auto-populated. Manage workspaces.

Computing Resources

Resource Type

Supported: General Computing and Lingjun Intelligent Computing.

Source

  • Public Resources:

    • Billing mode: pay-as-you-go.

    • Use cases: Small-scale tasks without strict latency requirements.

  • Resource Quota: General Computing or Lingjun Intelligent Computing resources.

    • Billing mode: subscription.

    • Use cases: Larger workloads requiring high availability and guaranteed execution.

  • Preemptible Resources:

    • Billing mode: pay-as-you-go.

    • Use cases: Offered at a significant discount to reduce costs.

    • Limitations: Availability is not guaranteed. Resources may be unavailable or reclaimed. Use preemptible jobs.

Hyperparameters

Hyperparameters vary by model. Use defaults or modify as needed.

Note

Available parameters vary by model. Adjust based on your model's requirements.

Billing

Model Gallery is free. You are charged for EAS and DLC resources consumed during deployment and training. Billing for Elastic Algorithm Service (EAS), Billing for Deep Learning Containers (DLC).

References

Model Gallery FAQ