# bailian-model

Part of **BAILIAN**

# Bailian Model Training and Data Management Console Guide

## Operations Overview

| Operation | Console Navigation | Prerequisites | Description |
|-----------|-------------------|---------------|-------------|
| Environment Preparation | Console > Preparations | Active Alibaba Cloud account | Set up account, billing, and access Model Studio. |
| Region Selection | Console > Region Settings | Console access | Select deployment region and service scope for data residency. |
| Dataset Management | Console > Datasets > Add Dataset | None | Create, version, and manage training and evaluation datasets. |
| Data Cleansing & Augmentation | Console > Data Management > Data Stream | Published dataset | Clean and augment raw data using visual data flow workflows. |
| Model Fine-Tuning | Console > Model Fine-Tuning > Create Training Task | Published dataset | Configure and launch SFT, CPT, or DPO training jobs. |
| Import LoRA Model | Console > My Models > Import Model | OSS bucket with LoRA files | Import custom LoRA adapters from OSS into Model Studio. |
| Model Deployment | Console > Model Deployment > Create Model Deployment | Trained or imported model | Deploy models as dedicated instances or serverless services. |
| Model Evaluation | Console > Model Evaluation > Create Evaluation Task | Deployed model, Evaluation set | Evaluate model performance using AI evaluators or automatic metrics. |

## Operations Steps

### Environment Preparation and Region Selection

**Navigation**: Console > Preparations / Region Settings

**Prerequisites**:
- An active Alibaba Cloud account with a valid payment method.

1. Log in to the Alibaba Cloud console.
   - Element: **Log In** (button) — top-right corner

2. Navigate to the Model Studio service page.
   - Element: **Model Studio** (link) — left navigation panel

3. Select a region from the dropdown menu to define the physical location of the access point and static data storage.
   - Element: **Region** (dropdown) — top-right corner of the console
   - Notes: Options include China (Beijing), US (Virginia), Singapore, Germany (Frankfurt), and China (Hong Kong).

4. Choose a service deployment scope to determine the compute region for model inference.
   - Element: **Service deployment scope** (dropdown) — main content area
   - Notes: Must be selected from predefined combinations (e.g., Global, International, Chinese mainland). Custom pairings are not supported.

5. Review the combination table to confirm compatibility between region and deployment scope.
   - Element: **Region and deployment scope combinations table** (section) — main content area

6. Generate or retrieve an API key for the selected scope.
   - Element: **API Key (Singapore)** (link) — right sidebar
   - Notes: API keys are region-specific and must match the selected deployment scope.

### Dataset Management

**Navigation**: Console > Datasets > Add Dataset

1. Navigate to the Datasets page.
   - Element: **Datasets** (link) — top navigation panel

2. Click the button to create a new dataset.
   - Element: **Add Dataset** (button) — top-right corner of the Datasets page

3. Enter a descriptive name for the dataset.
   - Element: **Dataset Name** (text_input) — main content area

4. Select the dataset type.
   - Element: **Dataset Type** (dropdown) — main content area
   - Notes: Choose either Training Set or Evaluation Set.

5. Select the training scenario and mode.
   - Element: **Training Scenario** (dropdown) — main content area
   - Notes: Options include Text Generation, Multimodal Understanding, Image-to-Video (first frame), and Image-to-Video (last frame).

6. Choose the storage location.
   - Element: **Platform Storage** (radio) — main content area
   - Notes: Platform Storage is free and unlimited.

7. Select the import method.
   - Element: **Local Upload** (radio) — main content area

8. Click the upload icon to select and upload your file.
   - Element: **Upload icon** (button) — main content area
   - Notes: The uploaded file must match the required data format (e.g., JSONL, ChatML); otherwise, import will fail.

9. Select the publishing status.
   - Element: **Publish Now** (radio) — main content area
   - Notes: For CPT and Image-to-Video training sets, draft status is not supported; you must publish immediately.

10. Click to finalize and start dataset creation.
    - Element: **Confirm** (button) — bottom of the form

11. View import status using the status indicator.
    - Element: **Status icon** (button) — right side of dataset row
    - Notes: Import may take longer during peak hours.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Dataset Name | text_input | Yes | — | The name of the dataset to be created. |
| Dataset Type | dropdown | Yes | Training Set, Evaluation Set | Specifies whether the dataset is for fine-tuning or evaluation. |
| Training Scenario | dropdown | Yes | Text Generation, Multimodal Understanding, Image-to-Video | Defines the specific task for the training dataset. |
| Training Mode | dropdown | Yes | CPT, SFT, DPO | The fine-tuning method used for training. |
| Storage Location | radio | Yes | Platform Storage, OSS | Where the dataset will be stored. |
| Import Method | radio | Yes | Local Upload, Import from OSS | How the dataset files are imported. |
| Publishing Status | radio | Yes | Publish Now, Save as Draft | Whether to immediately publish or save as draft. |

### Data Cleansing and Augmentation

**Navigation**: Console > Data Management > Data Stream

**Prerequisites**:
- A training set in ChatML format already published.

1. Go to the Data Management page.
   - Element: **Data Management** (link) — top navigation panel

2. Click on the Data Stream tab.
   - Element: **Data Stream** (tab) — main content area

3. Click to create a new data flow.
   - Element: **Create a Data Flow** (button) — upper-right corner

4. Enter a name and description for the data flow in the dialog.
   - Element: **Create a Data Flow** (dialog) — center of screen

5. Drag the Data Cleansing node from the left panel to the canvas.
   - Element: **Data Cleansing** (panel) — left panel

6. Enable the Sensitive Data Masking operator in the configuration panel.
   - Element: **Sensitive Data Masking** (checkbox) — configuration panel of Data Cleansing node

7. Connect the Start node to the Data Cleansing node.
   - Element: **Start node** (panel) — canvas

8. Drag the Data Augmentation node to the canvas.
   - Element: **Data Augmentation** (panel) — left panel

9. Configure parameters for the Data Augmentation node.
   - Element: **Data Augmentation** (panel) — canvas
   - Notes: Set scenario, sample count, similarity threshold, etc.

10. Connect the Data Cleansing node to the Data Augmentation node.
    - Element: **Data Cleansing node** (panel) — canvas

11. Connect the Data Augmentation node to the End node.
    - Element: **End node** (panel) — canvas

12. Click to publish the workflow.
    - Element: **Publish** (button) — upper-right corner
    - Notes: Changes the status from Draft to Published.

13. Go back to the Data Stream tab and create a task.
    - Element: **Create a Task** (button) — upper-right corner

14. Select the published data flow and confirm.
    - Element: **OK** (button) — dialog box

15. Enter a task name and select the training set.
    - Element: **Task Name** (text_input) — form fields

16. Click to start the task.
    - Element: **Created** (button) — dialog box
    - Notes: This initiates the data processing pipeline.

### Model Fine-Tuning (SFT, CPT, DPO)

**Navigation**: Console > Model Fine-Tuning > Create Training Task

**Prerequisites**:
- Access to a workspace with model fine-tuning permissions.
- Dataset ready and published.

1. Go to the model fine-tuning page.
   - Element: **model fine-tuning** (link) — top navigation panel

2. Click the button to start a new job.
   - Element: **Create Training Task** (button) — main content area

3. Select a fine-tuning method.
   - Element: **Training Method** (radio) — left panel
   - Notes: Choose between CPT, SFT, or DPO.

4. Choose the training mode.
   - Element: **Training Mode** (radio) — left panel
   - Notes: Select Efficient training (LoRA) for fast/low-cost, or Full-parameter training (Full-Tuning) for better results.

5. Select the base model to be fine-tuned.
   - Element: **Model** (dropdown) — Model section
   - Notes: Options include Qwen3-8B, qwen-plus, wan2.7-t2v, and custom models.

6. Select the uploaded dataset as the training dataset.
   - Element: **Training Dataset** (dropdown) — Dataset section

7. Set the validation dataset configuration.
   - Element: **Validation Dataset** (dropdown) — Dataset section
   - Notes: Default is Automatic split (15%).

8. Configure hyperparameters such as batch size, learning rate, and epochs.
   - Element: **Hyperparameter Configuration** (panel) — main content area
   - Notes: Default values are recommended for first-time users.

9. Set the output model name and configure checkpoint retention.
   - Element: **Saved Model Limit** (number_input) — Training Output settings

10. Enable enhanced security if needed.
    - Element: **Enhanced security** (checkbox) — Training Output settings

11. Start the training job.
    - Element: **Start Training** (button) — bottom of form
    - Notes: Confirm the billing reminder before proceeding.

12. Monitor logs and metrics during training.
    - Element: **View Logs** (button) — training task details

13. Publish the final checkpoint or an intermediate one.
    - Element: **Publish Model** (button) — Output tab
    - Notes: Checkpoints expire automatically; publish before deletion.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Batch size (batch_size) | number_input | No | — | Number of data samples processed before parameter updates. |
| Learning rate (learning_rate) | number_input | No | — | Controls the step size of parameter updates. |
| Epochs (n_epochs) | number_input | No | — | Number of times the model iterates over the entire dataset. |
| Learning rate schedule | dropdown | No | linear, cosine, constant, polynomial, etc. | Strategy for dynamically adjusting the learning rate. |
| Sequence length (max_length) | number_input | No | — | Maximum sequence length in tokens for a single sample. |
| LoRA rank (lora_rank) | number_input | No | 8, 16, 32, 64 | Rank of the low-rank update matrices in LoRA. |
| Freeze ViT (freeze_vit) | checkbox | No | true, false | Prevents vision backbone weights from updating (Qwen-VL only). |

### Import Custom LoRA Models from OSS

**Navigation**: Console > My Models > Import Model

**Prerequisites**:
- OSS bucket created with a tag.
- Bucket storage class is not Archive, Cold Archive, or Deep Cold Archive.
- Model files (`adapter_model.safetensors` and `adapter_config.json`) placed in a subdirectory.
- Rank value must be 8, 16, 32, or 64.
- Vocabulary and chat template must match the foundation model.

1. Navigate to the My Models page and click the import button.
   - Element: **Import Model** (button) — top-right corner of the My Models page

2. Fill in the required display name for the model.
   - Element: **Model Name** (text_input) — main content area
   - Notes: Name can be up to 50 characters long.

3. Select the corresponding foundation model from the dropdown.
   - Element: **Foundation Model** (dropdown) — main content area
   - Notes: Options include Qwen3-32B, Qwen2.5-72B-Instruct, Qwen2.5-VL-72B-Instruct, etc.

4. Confirm the import source.
   - Element: **Import Source** (dropdown) — main content area
   - Notes: Only "Import from OSS" is supported.

5. Select the OSS bucket containing the model files.
   - Element: **Bucket** (dropdown) — main content area

6. Submit the import request.
   - Element: **OK** (button) — bottom of the form
   - Notes: System validates file format and integrity before starting import.

### Model Deployment

**Navigation**: Console > Model Deployment > Create Model Deployment

**Prerequisites**:
- A model must be uploaded, registered, or fine-tuned in the model repository.
- Sufficient compute resources available in the selected region.

1. Navigate to the Model Deployment Console.
   - Element: **Model Deployment Console (China)** (link) — top navigation panel

2. Click the button to create a new deployment.
   - Element: **Create Dedicated Service** (button) — top-right corner
   - Notes: Use "Create Model Deployment" for serverless/PTU options.

3. Select a model from the list.
   - Element: **Model** (dropdown) — main content area
   - Notes: Available models include Qwen, DeepSeek, Qwen-VL, GLM-5.1, and multimodal variants.

4. Choose a billing method.
   - Element: **Billing Method** (dropdown) — main content area
   - Notes: Options: Provisioned Throughput (PTU), Model Units (MU), Token Usage (Pay-as-you-go).

5. Enter a unique name for the deployment.
   - Element: **Name** (text_input) — main content area

6. Set the instance type and number of replicas (for dedicated services).
   - Element: **Instance Type** (dropdown) — main content area
   - Notes: Options include gpu.gn7i-c4g1.4xlarge, gpu.gn7i-c8g1.8xlarge, etc.

7. Configure the network settings.
   - Element: **Network Settings** (panel) — main content area
   - Notes: Must select an existing VPC and a security group with appropriate inbound rules.

8. Review the configuration and deploy.
   - Element: **Deploy** (button) — bottom-right corner
   - Notes: After deployment, status changes to "Running" and billing begins.

9. Scale the service if needed.
   - Element: **Expand** (button) — service management panel
   - Notes: Only available for PTU and pay-as-you-go models.

10. Deactivate the service when no longer needed.
    - Element: **Offline** (button) — service management panel
    - Notes: Billing stops after confirmation.

### Model Evaluation

**Navigation**: Console > Model Evaluation > Create Evaluation Task

**Prerequisites**:
- A custom model must be deployed before it can be selected for evaluation.
- Evaluation sets must be created or available.

1. Click to create a new evaluation task.
   - Element: **Create Evaluation Task** (button) — top-right corner of the Model Evaluation page

2. Select the evaluation type.
   - Element: **Single Evaluation** (radio) — Evaluation Type section
   - Notes: Choose Single Evaluation or Comparative Evaluation.

3. Select one or more models to be evaluated.
   - Element: **Select Model** (dropdown) — main content area
   - Notes: If the custom model is not listed, it may not be deployed yet.

4. Select an evaluation dataset.
   - Element: **Select Evaluation Data** (dropdown) — main content area
   - Notes: Options include Online Inference, Offline Results, Mixed Mode.

5. Select a dimension template from the list.
   - Element: **Dimension Template** (dropdown) — main content area
   - Notes: The default "Comprehensive Evaluation" uses a three-level scoring system.

6. Begin the evaluation task.
   - Element: **Start Evaluation** (button) — bottom of the form

7. View the latest evaluation status.
   - Element: **Refresh** (button) — top-right corner of the evaluation task list
   - Notes: When status is "In Progress", you can click Stop to terminate.

8. Start manual evaluation if the status is "Annotating".
   - Element: **Annotate** (button) — top-right corner

9. Compare the evaluation set results with the model output.
   - Element: **Evaluation Set Results** (text_input) — main content area

10. Save progress and move to the next prompt.
    - Element: **Save And Next** (button) — bottom of the page
    - Notes: If you click Skip, the prompt will be marked as Unlabeled.

11. Finalize the manual evaluation.
    - Element: **Complete Evaluation And Submit** (button) — bottom of the page

## FAQ

Q: Can I use a draft dataset for model fine-tuning?
A: No, datasets must be in "Published" status to be used in training jobs. Furthermore, CPT and Image-to-Video training sets do not support draft status at all and must be published immediately upon creation.

Q: What happens if I stop a fine-tuning job or deployment?
A: For fine-tuning jobs, billing stops immediately if the job is interrupted. For deployments, billing stops after you click the "Offline" button and confirm deactivation. Stopped instances are not billed.

Q: How do I import a custom LoRA model?
A: You must upload `adapter_model.safetensors` and `adapter_config.json` to a subdirectory in an OSS bucket. Ensure the bucket is tagged and not using Archive storage. Then, use the "Import Model" feature in the My Models page, select the foundation model, and point to the OSS bucket.

Q: What are the supported training methods for text generation models?
A: The console supports Supervised Fine-Tuning (SFT) for instruction following, Continued Pre-Training (CPT) for domain adaptation, and Direct Preference Optimization (DPO) for aligning models with human preferences.

Q: Where do I find the API key for my deployed model?
A: API keys are region-specific. Navigate to the Region Settings, select your deployment scope (e.g., Singapore), and click the "API Key" link in the right sidebar to generate or retrieve the key for that specific scope.

## Pricing & Billing

### Billing Models
Model Studio supports multiple billing models depending on the service:
- **Per Token**: Pay-as-you-go based on input and output tokens (e.g., 0.002 CNY/1k tokens).
- **Per Instance Hour**: Billed per hour for dedicated GPU instances (e.g., 0.8 CNY/hour).
- **Per Model Unit (MU) / Provisioned Throughput (PTU)**: Subscription-based reserved capacity (e.g., 54 CNY/hour or 26,118 CNY/month).

### Price Reference

| Model / Tier | Input Price | Output Price | Other / MU Price |
|--------------|-------------|--------------|------------------|
| qwen3.6-plus-2026-04-02 | 57.6 CNY/10k TPM | 34.56 CNY/1k TPM | 54 CNY/hour (MU) |
| qwen-plus-2025-12-01 | 23.04 CNY/10k TPM | 5.76 CNY/1k TPM (non-thinking) | 54 CNY/hour (MU) |
| deepseek-v3 | 86.4 CNY/10k TPM | 34.56 CNY/1k TPM | 54 CNY/hour (MU) |
| qwen3-8b | 0.0005 CNY/1k tokens | 0.002 CNY/1k tokens | — |
| Qwen3-8B (LoRA Fine-tuning) | 0.002 CNY/1k tokens | 0.004 CNY/1k tokens | — |
| gpu.gn7i-c4g1.4xlarge (Dedicated) | 0.8 CNY/hour | 0.8 CNY/hour | — |
| gpu.gn7i-c16g1.16xlarge (Dedicated)| 3.2 CNY/hour | 3.2 CNY/hour | — |

### Free Tier
- **Model Invocation**: 1 million tokens free per month for standard pay-as-you-go models.
- **Model Fine-Tuning**: 5 hours free training per month.
- **Dedicated Services**: New users enjoy 10 hours free trial in the first month.
- **Dataset Storage**: The model data feature and dataset storage are completely free of charge with unlimited capacity.

### Billing Notes
- PTU and MU subscriptions are non-refundable; prepaid daily subscriptions auto-renew.
- Billing starts when the deployment status becomes "Running".
- Maximum 5 dedicated service instances per project.
- Async tasks are billed on completion; minimum billing unit is 100 tokens for async, 1 token for standard.
- Fine-tuning tasks are billed per hour based on actual runtime. If a job is interrupted, billing stops immediately.
- Resources are released after 1 month of inactivity for token-based models.

## Source Documents

- `Model Deployment_4759650.xdita`
- `Model deployment_4544249.xdita`
- `Fine-tuning training_4759654.xdita`
- `Preparations_6039375.xdita`
- `Import models_6371452.xdita`
- `User Guide ModelsHong Kong_6032133.xdita`
- `Select region and service deployment scope_6314005.xdita`
- `Create an evaluation task_5124183.xdita`
- `Evaluation dimensions_4544252.xdita`
- `Run evaluation tasks_5261613.xdita`
- `Fine-tune a text generation model_6314010.xdita`
- `Fine-tune models in the console_4544246.xdita`
- `Best Practices for Custom Models_4608419.xdita`
- `Zero-Code Reinforcement for Large Language Model Security and Compliance_6429780.xdita`
- `Data cleansing and augmentation_5103636.xdita`
- `Data cleansing and enhancement_5103636.xdita`
- `Training set and evaluation set_4544247.xdita`
- `Training sets and evaluation sets_4544247.xdita`