THUDM / CodeGeeX2

CodeGeeX2: A More Powerful Multilingual Code Generation Model
https://codegeex.cn
Apache License 2.0
7.57k stars 533 forks source link

run_demo.py RuntimeError #157

Open atopx opened 7 months ago

atopx commented 7 months ago

系统:Windows11 python:3.9 备注:我使用的管理员PowerShell 完整报错如下:

(codegeex) PS E:\CodeGeex2>  python demo/run_demo.py --quantize 4 --model-path ../codegeex2-6b --chatglm-cpp
fastllm disabled.
Using chatglm-cpp to improve performance
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████| 7/7 [00:04<00:00,  1.70it/s]
Processing model states: 100%|█████████████████████████████████████████████████████████████| 199/199 [00:28<00:00,  7.00it/s]
+---------------------------------------------------------------------+---------------------------+---------+
| name                                                                | shape                     | dtype   |
|---------------------------------------------------------------------+---------------------------+---------|
| transformer.embedding.word_embeddings.weight                        | torch.Size([65024, 4096]) | Q4_0    |
| transformer.encoder.layers.0.input_layernorm.weight                 | torch.Size([4096])        | F32     |
...
| transformer.encoder.final_layernorm.weight                          | torch.Size([4096])        | F32     |
| transformer.output_layer.weight                                     | torch.Size([65024, 4096]) | Q4_0    |
+---------------------------------------------------------------------+---------------------------+---------+
Traceback (most recent call last):
  File "E:\CodeGeex2\demo\run_demo.py", line 363, in <module>
    main()
  File "E:\CodeGeex2\demo\run_demo.py", line 233, in main
    tokenizer, model = get_model(args)
  File "E:\CodeGeex2\demo\run_demo.py", line 58, in get_model
    model = chatglm_cpp.Pipeline(args.model_path, dtype=dtype)
  File "C:\Users\atopx\.conda\envs\codegeex\lib\site-packages\chatglm_cpp\__init__.py", line 25, in __init__
    super().__init__(f.name)
RuntimeError: D:\a\chatglm.cpp\chatglm.cpp\chatglm.cpp:287 check failed (fd > 0) cannot open file C:\Users\atopx\AppData\Local\Temp\tmp6ixszbm7: Permission denied
123titanium commented 6 months ago

+1

vfraloo commented 3 months ago

+1