Git Product home page Git Product logo

Comments (8)

wwlaoxi avatar wwlaoxi commented on July 23, 2024

'QuantState' has no len()

请问这个问题解决了吗?我用QLora方法跑完官方微调项目,加载模型的时候报了一样的错

from visualglm-6b.

hahaha111111 avatar hahaha111111 commented on July 23, 2024

我也遇到了相同的问题,请问解决了吗

from visualglm-6b.

Caro-zll avatar Caro-zll commented on July 23, 2024

我也遇到相同的问题,怎么解决?

from visualglm-6b.

drenched9 avatar drenched9 commented on July 23, 2024

我也是,有没有好心人回答一下

from visualglm-6b.

1049451037 avatar 1049451037 commented on July 23, 2024

把这行代码直接改成device='cuda':

https://github.com/THUDM/VisualGLM-6B/blob/main/cli_demo.py#L36

from visualglm-6b.

drenched9 avatar drenched9 commented on July 23, 2024

把这行代码直接改成device='cuda':

https://github.com/THUDM/VisualGLM-6B/blob/main/cli_demo.py#L36

试过了,还是一样的报错

from visualglm-6b.

KinokoY avatar KinokoY commented on July 23, 2024

把这行代码直接改成device='cuda':

https://github.com/THUDM/VisualGLM-6B/blob/main/cli_demo.py#L36

改了之后还是同样的报错,然后这两天试的时候还有个新的问题,用QLora微调的话会报:
Build 4bit layer failed. You need to install the latest bitsandbytes. Try pip install bitsandbytes.
(使用的还是bitsandbytes==0.39.0)
按照报错信息更新了bitsandbytes之后QLora可以跑通,但是加载微调后的模型还是会报TypeError: object of type 'QuantState' has no len()

from visualglm-6b.

Guojunwei888 avatar Guojunwei888 commented on July 23, 2024

把这行代码直接改成device='cuda':
https://github.com/THUDM/VisualGLM-6B/blob/main/cli_demo.py#L36

改了之后还是同样的报错,然后这两天试的时候还有个新的问题,用QLora微调的话会报: Build 4bit layer failed.您需要安装最新的 bitsandbytes。尝试。 (使用的还是bitsandbytes==0.39.0) 按照报错信息更新了bitsandbytes之后QLora可以跑通,但是加载微调后的模型还是会报TypeError: object of type 'QuantState' has no len()pip install bitsandbytes

你可以在 checkpoints/finetune-visualglm-6b-01-12-09-56 目录下查看一下微调之后的权重大小是多少,看是否是 7GB,还是 15GB。
删除 7GB 的微调权重,执行 bash finetune/finetune_visualglm.sh --quant 你会得到一个 15 GB 的新权重,这个权重是可执行的。
具体什么原因我不清楚,希望有高手解答吧,大概和量化有关系。

from visualglm-6b.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.