-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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-6B模型微调报错 #967
Comments
首先确认一下运行代码后,你的这个文件是否存在 排除so文件不存在的情况,如果还存在 在你下载的源码 |
感谢回复,采用你的修改方案问题已经解决 |
卡在这个问题好几天了,终于解决了!感谢感谢 |
我按你的方法改了代码,但报错这个 |
chatglm2-6b-int4 |
@Qednn 看起来像是你在直接用int4模型的时候还继续用.half().quantize(4) web_demo.py里 |
你好,可以给我分享一下源代码嘛 |
感谢,终于解决了 |
很感谢,卡了一天,才搜到这个答案。 正好是python3.10环境:( |
Is there an existing issue for this?
Current Behavior
[WARNING|modeling_utils.py:3034] 2023-05-08 16:09:35,083 >> Some weights of ChatGLMForConditionalGeneration were not initialized from the model checkpoint at D:\project\python\chatglm\ChatGLM-6B\model2 and are newly initialized: ['transformer.prefix_encoder.embedding.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
[INFO|modeling_utils.py:2690] 2023-05-08 16:09:35,127 >> Generation config file not found, using a generation config created from the model config.
D:/app/gcc/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels.so: Permission denied
collect2.exe: error: ld returned 1 exit status
No compiled kernel found.
Compiling kernels : C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.c -shared -o C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.so
Load parallel cpu kernel failed, using default cpu kernel code:
Traceback (most recent call last):
File "C:\Users\Administrator/.cache\huggingface\modules\transformers_modules\model2\quantization.py", line 145, in init
kernels = ctypes.cdll.LoadLibrary(kernel_file)
File "D:\app\python\lib\ctypes_init_.py", line 452, in LoadLibrary
return self.dlltype(name)
File "D:\app\python\lib\ctypes_init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.so' (or one of its dependencies). Try using the full path with constructor syntax.
Compiling gcc -O3 -fPIC -std=c99 C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels.c -shared -o C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels.so
Load kernel : C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels.so
Using quantization cache
Applying quantization to glm layers
Quantized to 4 bit
No compiled kernel found.
Compiling kernels : C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.c -shared -o C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.so
Load parallel cpu kernel failed, using default cpu kernel code:
Traceback (most recent call last):
File "C:\Users\Administrator/.cache\huggingface\modules\transformers_modules\model2\quantization.py", line 145, in init
kernels = ctypes.cdll.LoadLibrary(kernel_file)
File "D:\app\python\lib\ctypes_init_.py", line 452, in LoadLibrary
return self.dlltype(name)
File "D:\app\python\lib\ctypes_init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels_parallel.so' (or one of its dependencies). Try using the full path with constructor syntax.
Compiling gcc -O3 -fPIC -std=c99 C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels.c -shared -o C:\Users\Administrator.cache\huggingface\modules\transformers_modules\model2\quantization_kernels.so
Compile default cpu kernel failed.
Failed to load kernel.
Traceback (most recent call last):
File "D:\project\python\chatglm\ChatGLM-6B\ptuning\main.py", line 431, in
main()
File "D:\project\python\chatglm\ChatGLM-6B\ptuning\main.py", line 129, in main
model = model.quantize(model_args.quantization_bit)
File "C:\Users\Administrator/.cache\huggingface\modules\transformers_modules\model2\modeling_chatglm.py", line 1430, in quantize
load_cpu_kernel(**kwargs)
File "C:\Users\Administrator/.cache\huggingface\modules\transformers_modules\model2\quantization.py", line 430, in load_cpu_kernel
assert cpu_kernels.load
AssertionError
Expected Behavior
No response
Steps To Reproduce
sh ChatGLM-6B\ptuning\train.sh
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: