Coder Social home page Coder Social logo

peft报错 about chatglm-6b-qlora HOT 4 CLOSED

1a2cjitenfei avatar 1a2cjitenfei commented on September 11, 2024
peft报错

from chatglm-6b-qlora.

Comments (4)

1a2cjitenfei avatar 1a2cjitenfei commented on September 11, 2024

换成peft=0.4.0.dev0报错如下:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /data/mlamp/jitengfei/chatGLM-6B-QLoRA-main/train_qlora.py:204 in │
│ │
│ 201 │
│ 202 if name == "main": │
│ 203 │ args = parse_args() │
│ ❱ 204 │ train(args) │
│ 205 │
│ 206 │
│ │
│ /data/mlamp/jitengfei/chatGLM-6B-QLoRA-main/train_qlora.py:148 in train │
│ │
│ 145 │ │ │ │ │ │ │ │ │ device_map='auto', │
│ 146 │ │ │ │ │ │ │ │ │ trust_remote_code=True) │
│ 147 │ │
│ ❱ 148 │ model = prepare_model_for_kbit_training(model, use_gradient_checkpointing=True) │
│ 149 │ │
│ 150 │ # LoRA │
│ 151 │ target_modules = TRANSFORMERS_MODELS_TO_LORA_TARGET_MODULES_MAPPING['chatglm'] │
│ │
│ /home/mlamp/miniconda3/envs/chatglm/lib/python3.9/site-packages/peft/utils/other.py:86 in │
│ prepare_model_for_kbit_training │
│ │
│ 83 │ if loaded_in_kbit and use_gradient_checkpointing: │
│ 84 │ │ # For backward compatibility │
│ 85 │ │ if hasattr(model, "enable_input_require_grads"): │
│ ❱ 86 │ │ │ model.enable_input_require_grads() │
│ 87 │ │ else: │
│ 88 │ │ │ │
│ 89 │ │ │ def make_inputs_require_grad(module, input, output): │
│ │
│ /home/mlamp/miniconda3/envs/chatglm/lib/python3.9/site-packages/transformers/modeling_utils.py:1 │
│ 206 in enable_input_require_grads │
│ │
│ 1203 │ │ def make_inputs_require_grads(module, input, output): │
│ 1204 │ │ │ output.requires_grad_(True) │
│ 1205 │ │ │
│ ❱ 1206 │ │ self._require_grads_hook = self.get_input_embeddings().register_forward_hook(mak │
│ 1207 │ │
│ 1208 │ def disable_input_require_grads(self): │
│ 1209 │ │ """ │
│ │
│ /home/mlamp/miniconda3/envs/chatglm/lib/python3.9/site-packages/transformers/modeling_utils.py:1 │
│ 223 in get_input_embeddings │
│ │
│ 1220 │ │ """ │
│ 1221 │ │ base_model = getattr(self, self.base_model_prefix, self) │
│ 1222 │ │ if base_model is not self: │
│ ❱ 1223 │ │ │ return base_model.get_input_embeddings() │
│ 1224 │ │ else: │
│ 1225 │ │ │ raise NotImplementedError │
│ 1226 │
│ │
│ /home/mlamp/miniconda3/envs/chatglm/lib/python3.9/site-packages/transformers/modeling_utils.py:1 │
│ 225 in get_input_embeddings │
│ │
│ 1222 │ │ if base_model is not self: │
│ 1223 │ │ │ return base_model.get_input_embeddings() │
│ 1224 │ │ else: │
│ ❱ 1225 │ │ │ raise NotImplementedError │
│ 1226 │ │
│ 1227 │ def set_input_embeddings(self, value: nn.Module): │
│ 1228 │ │ """ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
NotImplementedError

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

@1a2cjitenfei 2代版本的模型一直在更新中,你把你用的2代模型重新拉取一下最新的。
如果你用的git lfs拉取的模型,直接git pull就可以

from chatglm-6b-qlora.

1a2cjitenfei avatar 1a2cjitenfei commented on September 11, 2024

@1a2cjitenfei 2代版本的模型一直在更新中,你把你用的2代模型重新拉取一下最新的。 如果你用的git lfs拉取的模型,直接git pull就可以

感谢回复,按你说的方法已经解决了,不过peft=0.3.0好像还是不能运行但是peft=0.4.0dev0可以运行

from chatglm-6b-qlora.

shuxueslpi avatar shuxueslpi commented on September 11, 2024

@1a2cjitenfei peft目前0.3.0版本还无法支持qlora,需要使用0.4.0dev0,可能要等peft完全更新到0.4.0

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.