Coder Social home page Coder Social logo

Comments (10)

yxk9810 avatar yxk9810 commented on September 11, 2024

之前跑的是这个:https://github.com/mymusise/ChatGLM-Tuning/blob/master/finetune.py, 所以这个load 模型的部分应该是由优化的方法的吧?之前这个由于glm 模型升级后就不能跑了

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

你跑的是chatGLM2-6B吗?
我实测chatGLM2-6B在训练时内存占用明显高于chatGLM-6B,刚刚更新了README文件,做了说明。
在24G显存的情况下,per_device_batch_size设置为4可以正常跑下去,而chatGLM-6B,在12G显存的时候,都可以把per_device_batch_size调到8
关于这点,我也困惑中……

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

@wujindou 看了下,我和他用的是一样的load方法,都是用peft库把8bit或4bit的模型加载进来

from chatglm-6b-qlora.

yxk9810 avatar yxk9810 commented on September 11, 2024

我跑的是chatglm6B,可能我这显存不太够,请教6b加载需要多少GPU?提示oom错误是在prepare_kbit时候

from chatglm-6b-qlora.

starphantom666 avatar starphantom666 commented on September 11, 2024

你跑的是chatGLM2-6B吗? 我实测chatGLM2-6B在训练时内存占用明显高于chatGLM-6B,刚刚更新了README文件,做了说明。 在24G显存的情况下,per_device_batch_size设置为4可以正常跑下去,而chatGLM-6B,在12G显存的时候,都可以把per_device_batch_size调到8 关于这点,我也困惑中……

这显存占用的问题太大了,输出质量高输入长度长固然很好,但是要优化还是得靠sft、ppo什么的,,,现在我单卡2k上下文啃都啃不动,而chatglm1代,轻松4k上下文

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

@wujindou 不应该啊,我例子里那个数据集,如果使用chatglm-6b的话,一张RTX3060,12G的显存就能跑下来了,batchsize=8,刚开始占用8G多,后面11G多,但没有OOM
如果是chatglm2-6b的话,我用的24G的3090,batchsize=4,占用22G

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

@starphantom666 你多大的显存?

from chatglm-6b-qlora.

starphantom666 avatar starphantom666 commented on September 11, 2024

@starphantom666 你多大的显存?

24G 4090

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

好像2代模型普遍存在这个问题:THUDM/ChatGLM2-6B#94

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

@starphantom666 @wujindou 2代模型已经修复了,拉最新的模型,主要是里面几个py文件,训练时显存占用和1代差不多

from chatglm-6b-qlora.

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.