llama factory本地部署常见问题

问题1:启动微调时报错:safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

根因:

使用git clone 下载的模型,没有提前安装lfs(large file storage),导致模型文件没有下载完成;
在这里插入图片描述

解决方案1:安装lfs

安装 Git

sudo apt-get install git -y # Ubuntu/Debian
brew install git # macOS

安装 Git LFS

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install # 初始化 LFS

方案2:使用huggingface客户端下载模型:

  1. 安装工具
    pip install -U huggingface_hub

2. 设置镜像源(国内用户必选)

export HF_ENDPOINT=https://hf-mirror.com # Linux/macOS

3. 下载命令

sudo hf download --token 替换成自己的token Qwen/Qwen2.5-VL-3B-Instruct --local-dir /opt/models/Qwen2_5_VL_3B

下载需要登录鉴权的私有模型:
huggingface-cli login

推荐使用方案2,下载速度更快。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值