Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ete_test_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ on:
Resume phases within one case stay sequential.
type: string
default: '4'
CI_E2E_DEBUG:
required: false
description: >-
CI_E2E_DEBUG:if true, start "sleep inf &" after install and before training so the
cluster job stays alive for interactive debug (including after OOM).
Default false.
type: boolean
default: false
schedule:
- cron: '00 16 * * 0-5'
env:
Expand Down Expand Up @@ -69,6 +77,7 @@ jobs:
env:
GITHUB_RUN_ID: ${{ github.run_id }}
CI_REPORTS_RAW_URL_BASE: ${{ env.CI_REPORTS_RAW_URL_BASE }}
CI_E2E_DEBUG: ${{ github.event.inputs.CI_E2E_DEBUG || 'false' }}
run: |
source /mnt/shared-storage-user/opencompass-shared/qa-llm-cicd/miniconda3/bin/activate
conda activate clusterx
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ete_test_npu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ on:
(e.g. "npu-qwen3-sft,npu-qwen3-rl-vllm").
type: string
default: 'all'
CI_E2E_DEBUG:
required: false
description: >-
CI_E2E_DEBUG:if true, start "sleep inf &" after install and before training so the
cluster job stays alive for interactive debug (including after OOM).
Default false.
type: boolean
default: false
schedule:
- cron: '00 16 * * 0-5'
env:
Expand Down Expand Up @@ -59,6 +67,7 @@ jobs:
env:
GITHUB_RUN_ID: ${{ github.run_id }}
CI_REPORTS_RAW_URL_BASE: ${{ env.CI_REPORTS_RAW_URL_BASE }}
CI_E2E_DEBUG: ${{ github.event.inputs.CI_E2E_DEBUG || 'false' }}
run: |
source /mnt/hwfile/vc-intern-delivery/qa-llm-cicd/miniconda3/bin/activate
source activate npuci
Expand Down
69 changes: 69 additions & 0 deletions autotest/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,75 @@ case:
runtime_info/text_tokens: 0
timeout: 1500

qwen3-5-sft-ep2-mtp4-vl:
-
type: sft
parameters:
config: autotest/config/qwen3_5_ep2_mtp4_vl.py
output_path: /mnt/shared-storage-user/llmrazor-share/qa-llm-cicd/test_output
resource:
num_nodes: 2
envs:
- MODEL_PATH=/mnt/shared-storage-user/llmrazor-share/model/Qwen3.5-35B-A3B
- DATA_PATH=/mnt/shared-storage-user/llmrazor-share/data/ci_vl
- MEDIA_ROOT=/mnt/shared-storage-user/llmrazor-share/data/ci_vl
- XTUNER_DETERMINISTIC=true
- TORCH_ALLOW_TF32_CUBLAS_OVERRIDE=0
assert_info:
base_metric: qwen3-5-sft-ep2-mtp4-vl/tracker.jsonl
check_metrics:
grad_norm: 0.000001
loss/local_loss: 0.000001
loss/reduced_balancing_loss: 0.000001
loss/reduced_llm_loss: 0.000001
lr: 0
memory/max_memory_GB: 0.2
runtime_info/tgs: 0.05
runtime_info/text_tokens: 0
timeout: 1500

qwen3-5-rl-vl-lmdeploy-mtp-ep:
-
type: rl
parameters:
config: autotest/config/rl_qwen3p5_vl_35B_mtp_ep.py
infer_backend: lmdeploy
output_path: /mnt/shared-storage-user/llmrazor-share/qa-llm-cicd/test_output
resource:
memory_per_task: 1200
envs:
- MODEL_PATH=/mnt/shared-storage-user/llmrazor-share/model/Qwen3.5-35B-A3B
- DATA_PATH=/mnt/shared-storage-user/llmrazor-share/data/rl_vl_dapomath_geo3k_train.jsonl
- EVAL_DATA_PATH=/mnt/shared-storage-user/llmrazor-share/data/rl_vl_dapomath_geo3k_test.jsonl
- XTUNER_USE_LMDEPLOY=1
- XTUNER_DETERMINISTIC=true
- LMDEPLOY_FP32_MAMBA_SSM_DTYPE=1
assert_info:
base_metric: qwen3-5-rl-vl-lmdeploy-mtp-ep/tracker.jsonl
check_metrics:
-
metric: response/rewards/mean
threshold: 0.3
method: absolute
operator: <
-
metric: mismatch/mismatch_k3_kl
threshold: 0.0005
method: absolute
operator: <=
-
metric: response/response_len/mean
threshold: 0.25
method: relative
operator: <
-
metric: time/step
threshold: 0.15
method: relative
operator: <
aggregate: 80
timeout: 10800

qwen3-rl-lmdeploy:
-
type: rl
Expand Down
95 changes: 95 additions & 0 deletions autotest/config/qwen3_5_ep2_mtp4_vl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import os

from xtuner.v1.config import FSDPConfig, LRConfig, MuonConfig
from xtuner.v1.datasets import Qwen3VLTokenizeFnConfig
from xtuner.v1.datasets.config import DataloaderConfig, DatasetConfig
from xtuner.v1.loss.ce_loss import CELossConfig
from xtuner.v1.model import Qwen3_5_VLMoE35BA3Config
from xtuner.v1.module.mtp import MTPConfig
from xtuner.v1.train import ResumeConfig, TrainerConfig


MEDIA_ROOT = os.environ["MEDIA_ROOT"]
MODEL_PATH = os.environ["MODEL_PATH"]
DATA_PATH = os.environ["DATA_PATH"]
WORK_DIR = os.environ["WORK_DIR"]

sample_max_length = 16 * 1024
pack_max_length = 64 * 1024
ep_size = 2

moe_cfg = Qwen3_5_VLMoE35BA3Config(only_llm_forward=False, compile_cfg=True)
moe_cfg.text_config.ep_size = ep_size
moe_cfg.text_config.dispatcher = "deepep"
moe_cfg.text_config.mtp_config = MTPConfig(
num_layers=4,
share_weights=True,
loss_scaling_factor=1.0,
)

optim_cfg = MuonConfig(lr=2e-5, weight_decay=0.05)
lr_cfg = LRConfig(lr_type="cosine", warmup_ratio=0.1, lr_min=1e-6)
fsdp_cfg = FSDPConfig(
recompute_ratio=1.0,
torch_compile=True,
cpu_offload=False,
ep_size=ep_size,
checkpoint_preserve_rng_state=False,
)

dataset_config = [
{
"dataset": DatasetConfig(
name="multimodal",
anno_path=DATA_PATH,
class_name="VLMJsonlDataset",
media_root=MEDIA_ROOT,
sample_ratio=1.0,
cache_dir=os.path.join(WORK_DIR, "jsonl_cache"),
cache_tag=f"qwen3p5_vl_{sample_max_length}",
),
"tokenize_fn": Qwen3VLTokenizeFnConfig(
processor_path=MODEL_PATH,
chat_template="qwen3.5-vl",
llm_pack_weight=-3.2,
visual_pack_weight=5.0,
max_length=sample_max_length,
rand_video_max_frames=24,
max_pixels=16384 * 32 * 32,
),
},
]

dataloader_config = DataloaderConfig(
dataset_config_list=dataset_config,
pack_level="soft",
pack_max_length=pack_max_length,
pack_to_max_length=True,
pack_chunk_size=10000,
pack_workers=4,
global_pack=True,
group_by_length=True,
collator="qwen3_vl_sft_collator",
pack_extra_buffer_size=20,
num_workers=1,
)

loss_cfg = CELossConfig(mode="chunk", chunk_size=1024, loss_reduction="square")

trainer = TrainerConfig(
load_from=MODEL_PATH,
model_cfg=moe_cfg,
optim_cfg=optim_cfg,
fsdp_cfg=fsdp_cfg,
dataloader_cfg=dataloader_config,
lr_cfg=lr_cfg,
loss_cfg=loss_cfg,
tokenizer_path=MODEL_PATH,
resume_cfg=ResumeConfig(auto_resume=True),
global_batch_size=16,
total_step=20,
sp_size=4,
work_dir=WORK_DIR,
seed=0,
)

Loading
Loading