快速开始
135 字小于 1 分钟
2025-06-30
启动命令类似于 LlamaFactory。以下是使用损失加权器的示例:
FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/weighters/loss.yaml与普通的 LlamaFactory 不同,您的 .yaml 配置文件必须包含 DataFlex 特定的参数:
### dynamic_train
train_type: dynamic_weight
components_cfg_file: src/dataflex/configs/components.yaml
component_name: loss
warmup_step: 1
num_train_epochs: 1.0
train_step: 0 # 设为正数时固定总步数,并覆盖 num_train_epochs多 epoch 训练只需设置 num_train_epochs: N 并保持 train_step: 0。warmup_step 是全局 step 阈值,不会在每个 epoch 重置。

