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

从本地加载量化,程序没反应 #37

Closed
wweyl opened this issue Jul 12, 2023 · 3 comments
Closed

从本地加载量化,程序没反应 #37

wweyl opened this issue Jul 12, 2023 · 3 comments

Comments

@wweyl
Copy link

wweyl commented Jul 12, 2023

`import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation.utils import GenerationConfig

tokenizer = AutoTokenizer.from_pretrained("/root/autodl-tmp/model/Baichuan-13B-Base", use_fast=False, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("/root/autodl-tmp/model/Baichuan-13B-Base", torch_dtype=torch.float16, trust_remote_code=True)
model = model.quantize(8).cuda()`

从本地加载,再量化,程序没反应,内存也不涨。不知道哪些写的有问题

@jameswu2014
Copy link
Collaborator

你的机器配置是什么?

@wweyl
Copy link
Author

wweyl commented Jul 13, 2023

显卡V100-32GB, 29G 内存

@jameswu2014
Copy link
Collaborator

可以试试增大swap区。

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

3 participants