外观
踩坑GitHub openvla/openvla11 天前
OpenVLA 4-bit量化报错.to不支持bitsandbytes模型
本文由 AI 根据公开内容整理,可能有误,请以原文为准:ValueError when using 4-bit quantization - (.to) is not supported for 4-bit bitsandbytes models(GitHub openvla/openvla #287)
状态:已解决
问题
在LIBERO评测中启用--load_in_4bit True加载OpenVLA时,dispatch_model内部调用.to()触发ValueError: .to is not supported for 4-bit or 8-bit bitsandbytes models。
环境
Python 3.9.23, CUDA 12.6, PyTorch 2.7.1+cu126, transformers 4.40.1, bitsandbytes 0.46.1, accelerate ≥1.2.0 (pyproject.
解决办法
- 将accelerate版本降级至0.26.0或≤1.1.x(如
pip install accelerate==0.26.0),规避新版dispatch逻辑缺陷。 - 或在
pyproject.toml中添加依赖约束accelerate<1.2.0,防止新环境自动安装不兼容版本。 - 若需保留高版本accelerate,需修改
experiments/robot/openvla_utils.py中get_vla()函数,确保加载时显式传入device_map="auto"并避免后续手动调用.to()。 - 参考PR #351合入fail-fast运行时检查与回归测试,确保环境配置正确性。
讨论原作者:@jjjenghi 等,版权归原作者所有。
来源
本页事实对应的公开页面,以原文为准。