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

ptuning v2 如何启动quantization_bit 4 #245

Open
xxll88 opened this issue Jun 5, 2023 · 1 comment
Open

ptuning v2 如何启动quantization_bit 4 #245

xxll88 opened this issue Jun 5, 2023 · 1 comment

Comments

@xxll88
Copy link

xxll88 commented Jun 5, 2023

按args.md调了些参数都没用,无法启动quantization_bit 8/4 ,直接爆显存
args.md 中 ptuning v2
global_args = {
"load_in_8bit": False, # lora 如果显卡支持int8 可以开启 , 需安装依赖 pip install bitsandbytes
"num_layers_freeze": -1, # 非lora,非p-tuning 模式 , <= config.json num_layers
"pre_seq_len": 32, #p-tuning-v2 参数
"prefix_projection": False, #p-tuning-v2 参数
"num_layers": -1, # 是否使用骨干网络的全部层数 最大1-28, -1 表示全层, 否则只用只用N层
}

  "load_in_8bit" 改成 True,有用吗
@ssbuild
Copy link
Owner

ssbuild commented Jun 6, 2023

enable_ptv2 = False

# train_model_config = train_info_models['chatglm-6b-int4']

按照需求,修改这几处即可

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

2 participants