Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chatglm做finetune的时候报错 #40

Open
tianmala opened this issue Apr 11, 2023 · 0 comments
Open

chatglm做finetune的时候报错 #40

tianmala opened this issue Apr 11, 2023 · 0 comments

Comments

@tianmala
Copy link

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/mo/chatglm/transformers_tasks/LLM/finetune/train.py:352 in │
│ │
│ 349 │
│ 350 │
│ 351 if name == "main": │
│ ❱ 352 │ main() │
│ 353 │
│ │
│ /home/mo/chatglm/transformers_tasks/LLM/finetune/train.py:230 in main │
│ │
│ 227 │ │ model = model.quantize(args.quantization_bit) │
│ 228 │ │
│ 229 │ model = model.half() │
│ ❱ 230 │ model.gradient_checkpointing_enable() │
│ 231 │ model.enable_input_require_grads() │
│ 232 │ model.is_parallelizable = True │
│ 233 │ model.model_parallel = True │
│ │
│ /home/mo/miniconda3/envs/llm_env/lib/python3.8/site-packages/transformers/modeling_utils.py:1584 │
│ in gradient_checkpointing_enable │
│ │
│ 1581 │ │ activations". │
│ 1582 │ │ """ │
│ 1583 │ │ if not self.supports_gradient_checkpointing: │
│ ❱ 1584 │ │ │ raise ValueError(f"{self.class.name} does not support gradient check │
│ 1585 │ │ self.apply(partial(self._set_gradient_checkpointing, value=True)) │
│ 1586 │ │
│ 1587 │ def gradient_checkpointing_disable(self): │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: ChatGLMForConditionalGeneration does not support gradient checkpointing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant