windows上运行bitsandbytes报错

server/2024/9/25 3:07:57/
(大语言模型) transformers 目前支持两种量化方式:bitsandbytes 和 autogptq

一、报错信息

bin C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so
False
C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\cuda_setup\main.py:149: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/Users/win10/anaconda3/envs/qlora/lib'), WindowsPath('C')}warn(msg)
C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\cuda_setup\main.py:149: UserWarning: C:\Users\win10\anaconda3\envs\qlora did 
not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...warn(msg)
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\cuda_setup\main.py:149: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}warn(msg)
CUDA SETUP: WARNING! libcuda.so not found! Do you have a CUDA driver installed? If you are on a cluster, make sure you are on a CUDA machine!   
C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\cuda_setup\main.py:149: UserWarning: WARNING: No libcudart.so found! Install 
CUDA or the cudatoolkit package (anaconda)!warn(msg)
C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\cuda_setup\main.py:149: UserWarning: WARNING: No GPU detected! Check your CUDA paths. Proceeding to load CPU-only library...warn(msg)
CUDA SETUP: Loading binary C:\Users\win10\anaconda3\envs\qlora\Lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so...
argument of type 'WindowsPath' is not iterable
CUDA SETUP: Problem: The main issue seems to be that the main CUDA library was not detected.
CUDA SETUP: Solution 1): Your paths are probably not up-to-date. You can update them via: sudo ldconfig.
CUDA SETUP: Solution 2): If you do not have sudo rights, you can do the following:
CUDA SETUP: Solution 2a): Find the cuda library via: find / -name libcuda.so 2>/dev/null
CUDA SETUP: Solution 2b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_2a   
CUDA SETUP: Solution 2c): For a permanent solution add the export from 2b into your .bashrc file, located at ~/.bashrc

二、问题分析

如果要在 Windows 平台上开启量化 LoRA(QLoRA),需要安装预编译的 bitsandbytes 库, 支持 CUDA 11.1 到 12.2, 根据您的 CUDA 版本情况选择适合的发布版本。

Release Wheels · jllllll/bitsandbytes-windows-webui · GitHub

三、解决方案

(1)直接安装预编译的库

pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.2.post2-py3-none-win_amd64.whl

(2)安装 bitsandbytes-windows

pip uninstall bitsandbytes
pip install bitsandbytes-windows


http://www.ppmy.cn/server/14731.html

相关文章

MySQL数据库SSL连接测试

环境信息:Centos7 MySQL 5.7.21 在该环境上进行SSL连接测试。 MySQL Server 配置: vi /etc/my.cnf [mysql] default-character-set utf8mb4[client] default-character-set utf8mb4# ssl_mode [ DISABLED | PREFERRED(default if not set) | REQ…

openEuler 22.03 LTS SP3(华为欧拉)一键安装 Oracle 12CR2 RAC(220118) 数据库

前言 Oracle 一键安装脚本,演示 openEuler 22.03 LTS SP3 一键安装 Oracle 12CR2 RAC(220118) 过程(全程无需人工干预):(脚本包括 ORALCE PSU/OJVM 等补丁自动安装) ⭐️ 脚本下载…

亚马逊云科技提高企业生产力神器Amazon Q评测分析

一年一度的全球云计算春晚,亚马逊云科技Re:invent在2023年11月27于Vegas震撼来袭,其中最令人关注的就是CEO Adam在Keynote中分享的内容。其中一个新内容就是提升生产力神器: Amazon Q,可以说它重新定义了企业的工作模式。那具体它神在哪里呢&…

Android Binder——Java层通信实例(十六)

前面的文章中我们介绍了 Java 层服务的注册流程,以及代理文件的查找。这里我们看一个 Binder 通信的实例,为了方便我们就以 Android 源码中现有的功能 PMS 的 install 为例,PMS 在进行 APK 安装时,会进行 dex 的翻译,依赖守护进程 installd 完成。 一、源码分析 1. AIDL…

springboot基于点餐码 二维码在线点餐系统vue.js+java

Maven: 项目管理和构建自动化工具,用于java项目。 java: 广泛使用的编程语言,适用于构建跨平台应用。 Springmvc:从而在使用Spring进行WEB开发时,可以选择使用Spring的Spring MVC框架。 MyBatis: java持久层框架,支持定制化SQL、存…

从0到1学习typescript(更新版)

1、常用ts基本命令 (1)下载 npm install typescript -g(2)检查ts版本 tsc -v(3)将ts编译为js tsc index.ts2、定义变量 首先要明确一个概念,ts中确定了类型之后,就不能再修改类…

详解JVM类加载

从类被加载到虚拟机内存中开始,到释放内存总共有7个步骤:加载(Loading)、验证(Verification)、准备(Preparation)、解析(Resolution)、初始化(Ini…

企业微信hook接口协议,开放平台id转企业用户id

开放平台id转企业用户id 参数名必选类型说明uuid是String每个实例的唯一标识,根据uuid操作具体企业微信 请求示例 {"uuid":"3240fde0-45e2-48c0-90e8-cb098d0ebe43","openid":["woO9o4EAAAUg47yCUh1mDYVh71AJ8R3w"] } …