计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
model-backends【效率与协作】Select and troubleshoot XTuner V1 model configs, MoE/VLM backends, FSDP/TP/EP/HSDP sizing, FP8, attention, routers, dispatchers, and optional accelerators.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about XTuner V1 model configuration or backend capability: selecting dense, MoE, or multimodal model config classes; aligning FSDPConfig with model parallel settings; choosing attention/router/dispatcher options; enabling FP8; or diagnosing optional acceleration gaps.
Use this skill for:
xtuner.v1.model config classes and get_model_config / get_model_config_from_hf helpers.tp_size), expert parallel (ep_size), HSDP, MoE dispatchers, grouped GEMM, attention backend choices, FP8, optimizer/loss config interactions that affect backend sizing.Route elsewhere:
xtuner CLI/config-zoo tasks -> cli-and-tools.Classify the model family. Decide whether the requested work is text dense, text MoE, or compose/VLM. Use get_model_config(alias) only for aliases known to XTuner; instantiate concrete classes directly for unaliased variants.
Resolve required backend features. Mark each requested feature as config-only, CPU/import-checkable, CUDA/NPU-required, or optional-accelerator-required. Do not treat an import check as proof of acceleration.
Choose parallelism conservatively. Start with FSDP. Use TP only when memory requires it. For MoE, keep model_cfg.ep_size aligned with FSDPConfig(ep_size=...); choose a dispatcher only when ep_size > 1. HSDP requires ep_size == 1.
Probe safely before claiming support. Run the bundled backend checker from this sub-skill tree:
python scripts/check_xtuner_backend.py
python scripts/check_xtuner_backend.py --json --expect-cuda
python scripts/check_xtuner_backend.py --check-optional --json
The checker reports Torch/CUDA visibility, optional imports, FP8 hardware indicators, and selected XTuner imports. It does not run kernels, build models, or verify training throughput.
Use the references for decisions and troubleshooting. Keep long API tables, backend constraints, and failure modes in:
Qwen3Dense8BConfig, Qwen3Dense4BConfig, Qwen3Dense0P6BConfig, Qwen3VLDense4BConfig, Qwen3VLDense8BConfig, InternS1MiniConfig, or InternVL dense configs as appropriate. ep_size should stay 1.Qwen3MoE30BA3Config, Qwen3MoE235BA22Config, Qwen3-VL MoE, Qwen3.5-VL MoE, InternS1, GPT-OSS, DeepSeek, or GLM MoE configs. Align ep_size in both model and FSDP config.flash_attention may fall back to flex_attention when flash-attn is missing. Use eager_attention only for debugging/HF parity or when fused attention is unavailable.