ModelHub XC 61d9d7836f 初始化项目,由ModelHub XC社区提供模型
Model: swift/qwen2-7b-agent-instruct
Source: Original Platform
2026-09-29 18:31:15 +08:00

frameworks, license, tasks
frameworks license tasks
Pytorch
Apache License 2.0
text-generation

Fine-tuning the qwen2-7b-instruct model using the msagent-pro dataset and the loss_scale technique with swift, the script is as follows:

NPROC_PER_NODE=8 \
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
MASTER_PORT=29500 \
swift sft \
    --model_type qwen2-7b-instruct \
    --learning_rate 2e-6 \
    --sft_type full \
    --dataset msagent-pro \
    --gradient_checkpointing true \
    --gradient_accumulation_steps 8 \
    --deepspeed default-zero3 \
    --use_loss_scale true \
    --save_strategy epoch \
    --batch_size 1 \
    --num_train_epochs 1 \
    --max_length 4096 \
    --preprocess_num_proc 4 \
    --use_loss_scale true \
    --loss_scale_config_path agent-flan \
    --ddp_backend nccl \

Comparison with the Original Model on the ToolBench Evaluation Set

Model ToolBench (in-domain) ToolBench (out-of-domain)
Plan.EM Act.EM HalluRate (lower is better) Avg.F1 R-L Plan.EM Act.EM HalluRate (lower is better) Avg.F1
qwen2-7b-instruct 74.11 54.74 4.16 46.53 8.51 73.17 57.67 3.84 48.58
qwen2-7b-agent-instruct 83.37 60.01 2.58 54.41 26.34 82.57 60.14 1.79 55.25

For detailed explanations of the evaluation metrics, please refer to document

您可以通过如下git clone命令,或者ModelScope SDK来下载模型

SDK下载

#安装ModelScope
pip install modelscope
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('swift/qwen2-7b-agent-instruct')

Git下载

#Git模型下载
git clone https://www.modelscope.cn/swift/qwen2-7b-agent-instruct.git

如果您是本模型的贡献者,我们邀请您根据模型贡献文档,及时完善模型卡片内容。

Description
Model synced from source: swift/qwen2-7b-agent-instruct
Readme 4.2 MiB