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

lmdeploy 部署量化出现错误 #1893

Open
bestkojima opened this issue Sep 18, 2024 · 2 comments
Open

lmdeploy 部署量化出现错误 #1893

bestkojima opened this issue Sep 18, 2024 · 2 comments

Comments

@bestkojima
Copy link

lmdeploy lite auto_awq
/root/models/internlm2_5-1_8b-chat
--calib-dataset 'ptb'
--calib-samples 128
--calib-seqlen 2048
--w-bits 4
--w-group-size 128
--batch-size 1
--search-scale False
--work-dir /root/models/internlm2_5-1_8b-chat-w4a16-4bit
输入此命令后
报错显示

Traceback (most recent call last):
File "/root/.conda/envs/lmdeploy/bin/lmdeploy", line 8, in <module>
  sys.exit(run())
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/cli/entrypoint.py", line 36, in run
  args.run(args)
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/cli/lite.py", line 139, in auto_awq
  auto_awq(**kwargs)
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/lite/apis/auto_awq.py", line 80, in auto_awq
  vl_model, model, tokenizer, work_dir = calibrate(model,
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/lite/apis/calibrate.py", line 216, in calibrate
  calib_loader, _ = get_calib_loaders(calib_dataset,
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/lite/utils/calib_dataloader.py", line 302, in get_calib_loaders
  return get_ptb(tokenizer, nsamples, seed, seqlen)
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/lite/utils/calib_dataloader.py", line 58, in get_ptb
  traindata = load_dataset('ptb_text_only', 'penn_treebank', split='train')
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/datasets/load.py", line 2074, in load_dataset
  builder_instance = load_dataset_builder(
File "/root/.conda/envs/lmdeploy/lib/python3.10/site-packages/datasets/load.py", line 1832, in load_dataset_builder
  builder_instance: DatasetBuilder = builder_cls(
TypeError: 'NoneType' object is not callable

如何解决?

@bestkojima
Copy link
Author

已解决 原因是最新的datasets3.0 无法下载calibrate数据集
输入 pip index versions datasets
找到离最新的最近的一个版本进行下载即可

@JunyaoHu
Copy link

JunyaoHu commented Oct 2, 2024

非常感谢,对我有用,我选择的版本是 2.19.2

Available versions: 3.0.1, 3.0.0, 2.21.0, 2.20.0, 2.19.2, 2.19.1, 
2.19.0, 2.18.0, 2.17.1, 2.17.0, 2.16.1, 2.16.0, 2.15.0, 2.14.7, 
2.14.6, 2.14.5, 2.14.4, 2.14.3, 2.14.2, 2.14.1, 2.14.0, 2.13.2, 
2.13.1, 2.13.0, 2.12.0, 2.11.0, 2.10.1, 2.10.0, 2.9.0, 2.8.0, 
2.7.1, 2.7.0, 2.6.2, 2.6.1, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.4.0, 
2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.0, 1.18.4, 
1.18.3, 1.18.2, 1.18.1, 1.18.0, 1.17.0, 1.16.1, 1.16.0, 1.15.1, 
1.15.0, 1.14.0, 1.13.3, 1.13.2, 1.13.1, 1.13.0, 1.12.1, 1.12.0, 
1.11.0, 1.10.2, 1.10.1, 1.10.0, 1.9.0, 1.8.0, 1.7.0, 1.6.2, 1.6.1, 
1.6.0, 1.5.0, 1.4.1, 1.4.0, 1.3.0, 1.2.1, 1.2.0, 1.1.3, 1.1.2, 
1.1.1, 1.1.0, 1.0.2, 1.0.1, 1.0.0, 0.0.9

pip install datasets==2.19.2

测试可行

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