# OpenVLA-7B INT4量化加载报错.to() not supported for bitsa。

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-10-17-openvla-286
> 频道：pitfalls | 更新日期：2026-10-17 | 标签：auto, github-issue, openvla
> 核心摘要：因accelerate版本过高导致INT4量化模型内部调用.to()失败，降级accelerate至0.26.0或限制<1.2.0可解决。

# OpenVLA-7B INT4量化加载报错.to() not supported for bitsa。

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[INT4 Quantization Fails with .to() Error in OpenVLA-7B](https://github.com/openvla/openvla/issues/286)（GitHub openvla/openvla #286）

**状态**：已解决

## 问题

使用BitsAndBytesConfig加载openvla/openvla-7b进行INT4量化时，抛出ValueError: .to is not supported for 4-bit or 8-bit bitsandbytes models。

## 环境

OpenVLA-7B, BitsAndBytes (NF4), accelerate&gt;=1.2.0 (问题版本), transformers&gt;=4.40.1, Python 3.11, NVIDIA RTX 4060 8GB显存。

## 解决办法

1. 将accelerate库降级至兼容版本，执行pip install accelerate==0.26.0，或在pyproject.toml中限制accelerate&lt;1.2.0以修复依赖解析。
2. 若使用device_map="auto"，确保不再手动调用.to("cuda:0")，或改用device_map={"": 0}避免重复设备映射触发报错。
3. 加载模型时显式指定torch_dtype=torch.bfloat16及low_cpu_mem_usage=True，配合BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4")。
4. 针对transformers&gt;=4.50可能静默忽略图像输入的问题，建议安装openvla-compat[quant]补丁包或参考PR #351添加fail-fast guard及回归测试。

讨论原作者：@OmMandhane 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub openvla/openvla #286：INT4 Quantization Fails with .to() Error in OpenVLA-7B](https://github.com/openvla/openvla/issues/286)