LLM 大模型学习必知必会系列(九):Agent微调最佳实践,用消费级显卡训练属于自己的Agent!
SWIFT支持了开源模型,尤其是中小型模型(7B、14B等)对Agent场景的训练,并将loss-scale技术应用到agent训练中,使中小模型API Call能力更稳定,并支持使用单张商业级显卡进行Agent推理和部署,可以直接在生产场景中全链路闭环落地使用。
1.环境安装
#设置pip全局镜像 (加速下载)
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
#安装ms-swift
git clone https://github.com/modelscope/swift.git
cd swift
pip install