Help Center/ ModelArts/ Getting Started/ Getting Started with Training: Training a Model with One Click
Updated on 2026-11-25 GMT+08:00

Getting Started with Training: Training a Model with One Click

Scenario

This case is only available in the new console.

To lower the usage threshold and enhance user experience, we provide one-click training cases on the ModelArts console. Currently, ModelArts supports SFT and LoRA fine-tuning for the Qwen3-8B, Qwen3-32B, and Qwen3-30B-A3B models, helping you quickly master the model training functions of ModelArts.

After the model training is successful, you can directly use the model for subsequent operations such as model deployment, or create a model again on the training job creation page by referring to this training process as required.

Prerequisites

  1. You have registered a Huawei Cloud account, completed real-name authentication, and been granted related permissions. For details, see 1. Prerequisites: Accounts and Permissions.
  2. To use one-click model training, you need to configure the ModelArts FullAccess permission. Otherwise, you cannot access OBS. For details, see Configuring Common Operations Permissions for ModelArts.

Constraints

One-click training is supported only on the new console.

Billing

Model training in ModelArts uses compute and storage resources, which are billed. Compute resources are billed for running training jobs. Storage resources are billed for storing data in OBS or SFS. For details, see Model Training Billing Items.

Procedure

  1. Log in to the ModelArts console.
  2. In the navigation pane, choose Getting Started. In the Popular Models area, select a model that supports training. If Popular Models is unavailable in the current region, switch to another region. Click Train on the card. The page for creating a training job is displayed.

    Currently, the following models support one-click training.

    Table 1 Models that support one-click training

    Model Name

    Model Type

    Description

    Qwen3-8B

    Dense model

    This model supports seamless switching between thinking and non-thinking modes. You can switch between the two as needed during a dialog. The model's inference capability reaches the SOTA level among models of the same scale in the industry, and its general capability significantly surpasses that of Qwen2.5-7B.

    Qwen3-32B

    Dense model

    This model supports seamless switching between thinking and non-thinking modes. You can switch between the two as needed during a dialog. The model's inference capability significantly outperforms that of QwQ, and its general capability far exceeds that of Qwen2.5-32B-Instruct, achieving SOTA performance among models of the same scale in the industry.

    Qwen3-30B-A3B

    Sparse MoE model

    This model supports seamless switching between thinking and non-thinking modes. You can switch between the two as needed during a dialog. The model's inference is on par with that of QwQ-32B, but with fewer parameters needed, and its generalization capabilities far exceed that of Qwen2.5-14B. It delivers state-of-the-art performance equal to other models of a similar scale.

  3. Quickly configure basic information.

    Table 2 Configuring parameters

    Parameter

    Description

    Default Value

    Model

    Create a model on which the training job depends.

    Selected model

    Name

    Job name, which is mandatory.

    The system automatically generates a name. You can rename it based on the following naming rules:

    • The value can contain 1 to 128 characters.
    • Only letters, digits, hyphens (-), and underscores (_) are allowed.

    Generated randomly

    Training Method

    Training method used to create a training job.

    LoRA fine-tuning

    Training Framework

    Training framework used to create a training job.

    MindSpeed

    Model Output Path

    Checkpoints and model assets generated by this training task will be saved to this path. You can select the target group in either of the following ways:

    Method 1: You can click the icon on the right of the OBS address bar and select the target OBS bucket in the displayed dialog box. If no OBS bucket is available, click Create Bucket to go to the OBS console and manually create an OBS bucket. After creating an OBS bucket, create a folder in the bucket to store the model generated after training.

    Method 2: You can manually enter an OBS bucket address. OBS address requirements: The storage address must start with obs:// or / and end with a slash (/). It cannot contain double slashes (//) except in the prefix. For example, obs://bucketname/path/ or /bucketname/path/.

    obs://bucketname/path/

    Asset Name

    Name of the model asset to be published after training. Naming rules:

    • Enter 1 to 128 characters.
    • Only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and end with a letter or digit.

    Original model name + Timestamp

    Resource Pool Type

    • Public resource pool: The public resource pool is available for all tenants and does not require user creation.
    • Dedicated resource pool: Dedicated resource pools are created separately and used exclusively. For details, see Creating a Dedicated Resource Pool.

    Public resource pool

    Resource Pool

    This parameter appears only for dedicated resource pools. In the Resource Pool section, click Select Resource Pool and choose your desired dedicated resource pool or logical subpool from the menu on the right. Click OK.

    You can view the dedicated resource pool name, node pool specifications, number of available nodes/maximum number of nodes, number of available NPU/GPUs, available CPUs (vCPUs), available memory (GiB), and resource fragments. Hover over View in the Resource Fragment column to check fragment details and check whether the resource pool meets the training requirements.

    Once you choose a resource pool, its details appear. To choose a different one, click Reselect.

    -

    Instance Specifications

    Resource instance specifications used to create a training job.

    Determines the hardware specifications for the training instances. For Dedicated resource pool, you must select a pool first. For Public resource pool, select a specification directly from the list.

    8 * Ascend-snt9b2 | 192 vCPUs | 1536 GiB | ARM (modelarts.bm.npu.arm.8snt9b2) or higher specifications are recommended.

    8 * Ascend-snt9b2 | 192 vCPUs | 1536 GiB | ARM(modelarts.bm.npu.arm.8snt9b2)

    Instances

    Number of resource instances used to create a training job.

    The value range displayed on the GUI is related to the instance specifications.

    1

    Select Dataset

    Dataset used for creating a training job. You can choose Preset Data or My Data. In this example, choose a ModelArts preset dataset.

    First dataset option

    More Settings

    Environment variables of the training job. For details, see More Training Parameters.

    The parameters are set by default.

  4. Confirm the configuration and price, and click OK. The model training job list page is displayed.

    A training job runs for a period of time. On the training job list page, view the basic information about the training job.

    • In the training job list, Status of a newly created training job is Pending.
    • When the status of a training job changes to Completed, the training job is finished, and the generated model is stored in the corresponding output path.
    • If the status is Failed or Abnormal, click the one-click training job name to go to the job details page, and view information such as the model output, task details, events, logs, and resource usage.

After the model training is successful, you can directly use the model for subsequent operations such as model deployment, or create a model again on the training job creation page by referring to this training process as required.

FAQ

For details about common errors and solutions, see Table 3.

Table 3 Common errors and solutions

Common Error

Symptom

Possible Cause

Solution

The dataset list is empty when a training job is created.

When a training job is created, the dataset selection box is empty, and no training dataset is available.

The dataset is not published.

Create a training dataset corresponding to the model and publish the dataset in advance.

Message "root: XXX valid number is 0" is displayed in training logs.

Message "root: XXX valid number is 0" is displayed in logs, indicating that the number of valid samples in the training set or validation set is 0. For example:

INFO: root: Train valid number is 0.

The number of valid samples in the dataset is 0. The possible causes are as follows:

  • Data has not been labeled.
  • The labeled data does not meet the specifications.

Check whether the data has been labeled and whether data labels meet algorithm requirements.

Message "ValueError: label_map not match" is displayed in training logs.

The training log contains "ValueError: label_map not match" and the label data, for example:

ValueError: label_map not match. {1:'apple', 2:'orange', 3:'banana', 4:'pear'} & {1:'apple', 2:'orange', 3:'banana'}

The number of labels in the training set is different from that in the validation set.

For example, there are four labels in the training set, and there are only three in the validation set.

Ensure that the number of labels in the training set is the same as that in the validation set.

A message is displayed indicating that you do not have the permission to access the OBS bucket.

OBS-related permissions, such as the OBS action obs:bucket:ListAllMyBuckets, have been manually added. However, the system still displays a message indicating that OBS cannot be accessed.

The OBS authorization scope required for ModelArts training is insufficient.

Configure the ModelArts FullAccess permission by referring to "Prerequisites."

More Training Parameters

Table 4 More training parameters

Parameter

Description

Configuration Suggestion

Default Value

LR

The learning rate is the step size used by the optimizer (such as AdamW) to update the model weights. It controls the magnitude of each update to the model parameters and is a core hyperparameter that affects the convergence speed and training stability.

  • If the learning rate is too large, parameter updates are too large, causing loss oscillation, failure to converge, or even divergence (NaN).
  • If the learning rate is too small, convergence is slow, training time increases significantly, and the model may easily get stuck in local optima.
  • In fine-tuning scenarios, the "linear warmup → cosine/linear decay" scheduling policy is often used. The learning rate rises linearly from a small value to the target value LR AT at the beginning of training and then gradually decays to MIN_LR.
  • Reference range: 1e-6 to 5e-5 for fine-tuning of large models (7B/8B or larger); 1e-5 to 2e-5 for LoRA fine-tuning.
  • For knowledge injection or domain adaptation tasks, a smaller value (below 1e-5) is recommended; for instruction-following tasks, a larger value (around 2e-5) can be used.
  • Adjust based on the convergence status: Decrease LR if the loss oscillates or NaN occurs. Increase LR appropriately if the loss does not decrease for a long time.
  • If the global batch size (GBS) is increased, increase LR proportionally following the linear scaling rule (e.g., if the GBS doubles, adjust LR by approximately 2 times).
  • You are advised to keep the default values for the initial training run and fine-tune the parameters only after the training process has stabilized.

1.25e-6

MIN_LR

Lower bound of the learning rate scheduler decay. The learning rate will not drop below this value during the entire training process. As the learning rate continuously decays in the later stages of training, MIN_LR determines the end point of the decay:

  • Setting a proper MIN_LR helps fine-tune parameters in the later stages of training and improve convergence precision.
  • This prevents training from stalling when the learning rate decays to 0, and avoids numerical stability issues caused by an excessively small learning rate.
  • Generally, set it to about 1/10 of LR (e.g., LR = 1.25e-6 → MIN_LR = 1.25e-7). The default value follows this ratio.
  • If the loss continues to trend downward in the later stages of training, keep or appropriately increase MIN_LR.
  • If the loss oscillates in the later stages, appropriately decrease MIN_LR to allow more fine-grained adjustments.
  • There is no need for precise manual tuning. Generally, set MIN_LR proportionally in conjunction with LR.

1.25e-7

RUN_TYPE

Training method for fine-tuning. Common values include:

  • LoRA (Low-Rank Adaptation): Freezes most model weights and trains only a few low-rank matrix parameters. This method requires less memory, trains faster, and is suitable for resource-constrained or rapid adaptation scenarios, while also reducing the risk of catastrophic forgetting.
  • SFT (full-parameter/instruction fine-tuning): Updates all model parameters, offering higher performance improvement potential but requiring more memory and compute resources, and longer training time.
  • When different training types are selected, the behavior and semantics of LoRA-related parameters (such as LORA_R) differ. Ensure they are configured accordingly.
  • For first-time pipeline runs, resource-constrained scenarios, or quick validation, select LoRA.
  • For the best possible performance with sufficient compute resources, select SFT.
  • When selecting LoRA, configure LoRA-related parameters such as LORA_R (rank) accordingly.
  • The learning rate characteristics may also differ between the two types. SFT typically uses a lower learning rate than LoRA.

lora

MODEL_NAME

Name of the model to be trained.

Determined by the model selected by training job type. No manual configuration is required.

qwen3_8b

SEQ_LEN

Maximum sequence length (in tokens) that the model can process in a single computation. Samples exceeding this length will be truncated. SEQ_LEN determines the context window that the model can learn from:

  • A longer sequence allows the model to capture richer context information, but it significantly increases memory usage and computational cost, as the attention mechanism scales quadratically with sequence length.
  • A sequence that is too short causes long-text information to be truncated, affecting training quality.
  • Set this parameter based on the actual length distribution of training data. For short text (such as instruction Q&A), keep the default 4096 or reduce it appropriately to avoid wasting compute on excessive padding.
  • For long-text or long-dialogue tasks, increase SEQ_LEN to (e.g., 8192, 16384, or 32768), but evaluate memory usage accordingly and reduce GBS or enable sequence parallelism. If memory is insufficient, prioritize reducing GBS, using gradient accumulation, or increasing the number of PUs when resources allow.
  • SEQ_LEN must not exceed the model's maximum context length and must match the capabilities of the model specified by MODEL_NAME.

4096

LR_WARMUP_RATIO

Ratio of learning rate warmup steps to the total number of training steps. The platform calculates the number of warmup steps using the formula: LR_WARMUP_ITERS = TRAIN_ITERS × LR_WARMUP_RATIO. At the beginning of training, the learning rate rises linearly from a very small value (near 0) to the target LR:

  • Warmup allows the model to transition with a smaller step at the beginning of training, preventing abrupt loss changes, gradient oscillation, or divergence caused by a large learning rate when pretrained weights are first loaded.
  • It plays an important role in stabilizing training and improving convergence quality.
  • Reference range: 0.01 to 0.1. In fine-tuning scenarios, commonly use 0.01 to 0.05. The default value 0.01 indicates a faster warmup.
  • When the total number of training steps is small (for example, small datasets or short training runs), increase the ratio appropriately (0.03 to 0.1) to make the warmup proportion reasonable.
  • When the total number of training steps is large, maintain a small ratio.
  • If the loss rises sharply or NaN occurs at the early stage of training, try increasing the warmup ratio.

0.01

DATA_TYPE

Dataset template and preprocessing method. They must strictly match the actual format of the data file. Different handlers parse data columns differently:

  • GeneralPretrainHandler: handles standard pretraining data formats. It supports continued pretraining using Alpaca-style datasets, which consist of raw text without structured instruction and response fields.
  • AlpacaStyleInstructionHandler: uses the LLaMA-Factory Alpaca format, with fields such as instruction/input/output. It is suitable for single-turn instruction fine-tuning.
  • SharegptStyleInstructionHandler: the LLaMA-Factory ShareGPT multi-turn conversation format, which organizes multi-turn conversations using a list of messages containing role and content fields. It is suitable for multi-turn conversation scenarios. Selecting the wrong handler will cause data parsing failures, missing field errors, or abnormal training results.
  • First check the data file structure, then select the handler: Use AlpacaStyleInstructionHandler for single-turn instruction data, SharegptStyleInstructionHandler for multi-turn conversation data, and GeneralPretrainHandler for pure text continuation or pre-training data.
  • Ensure that the data fields match the requirements of the selected handler. Otherwise, an error will occur during data loading.
  • Use a consistent data format for the same training run. You are advised not to mix single-turn templates in multi-turn conversation tasks in the same training run.
  • If the data volume is small and the format is simple, you are advised to run a small-scale test first to verify data processing, then proceed to full training.

AlpacaStyleInstructionHandler

EPOCH

Number of training epochs, that is, how many times the complete training dataset is traversed and learned. One epoch means each training sample is trained once:

  • More epochs allow the model to fit the training data more thoroughly, but too many epochs can lead to overfitting (the model memorizes the training set and its generalization ability decreases).
  • Too few epochs result in underfitting, where the model fails to adequately learn the dataset features.
  • The total number of training steps (TRAIN_ITERS) is determined by EPOCH, the number of training samples, and GBS, and also affects learning rate (LR) scheduling (warmup/decay).
  • Reference range: 1 to 10 for general fine-tuning and 3 to 5 for instruction fine-tuning. The default value 4 is a safe starting point. For smaller datasets, you can increase the value (6 to 10).
  • Evaluate based on the loss and validation set performance: If the loss has converged and no longer decreases, or the validation set metrics start to deteriorate, the training is sufficient. In this case, you can reduce the value of EPOCH or terminate the training in advance.
  • If the dataset is large or compute resources are insufficient, start with fewer epochs (1 to 2) to validate results, and then gradually increase the number of epochs.

4

GBS

Global batch size (GBS), which refers to the total number of samples processed by all machines and all cards in a single training step. It is equal to the single-card batch size multiplied by the number of cards (including gradient accumulation). GBS determines the number of samples for gradient estimation in each step:

  • Larger GBS indicates more accurate gradient estimation and more stable training, but longer single-step computation time and higher memory usage.
  • Smaller GBS indicates lower memory usage, but higher gradient noise and lower training stability.
  • With a fixed total sample size, a larger GBS results in fewer total training steps (assuming EPOCH remains unchanged).
  • Use a larger GBS (e.g., 32, 64, or 128) whenever memory allows, as it helps with training stability.
  • If memory is insufficient, use a combination of a smaller per-card batch size and gradient accumulation to reach the target GBS, which has minimal impact on throughput.
  • In distributed training, GBS must be divisible by the total number of cards.
  • When increasing GBS, you can proportionally increase the LR (linear scaling) to avoid slower convergence.
  • Reference range: 16 to 128 for large model fine-tuning. The default value 16 is conservative and can be increased based on actual memory usage.

16

LORA_R

Rank of the low-rank matrices added in LoRA. It determines the dimensionality of trainable parameter matrices (i.e., the number of additional parameters). This rank is used to measure the complexity and information capacity of the matrices.

  • A larger R value indicates stronger representational capacity and richer information capture, but more trainable parameters, increased training time, and higher memory overhead.
  • A smaller R value indicates fewer parameters, faster training, and lower memory usage. Additionally, this constrained capacity acts as a form of regularization, thereby helping to mitigate the risk of overfitting.
  • In practice, even a small R value (e.g., 8 or 16) can achieve good adaptation results when used with the backbone model.
  • The recommended value range is 8 to 64. The default value 16 is a balanced choice.
  • For small datasets or simple tasks, use a smaller rank (8 or 16) to avoid overfitting.
  • For larger datasets or complex tasks (such as multi-domain knowledge or code), increase the rank to 32 or 64.
  • Configure it in conjunction with LORA_ALPHA (scaling coefficient). Generally, LORA_ALPHA is typically set to the rank R or twice the rank (2R).
  • If increasing R does not significantly improve the results, first check the data quality and learning rate before further increasing R.

16