THUDM / ChatGLM2-6B

ChatGLM2-6B: An Open Bilingual Chat LLM | 开源双语对话语言模型
Other
15.68k stars 1.85k forks source link

[BUG/Help] <title> #601

Open Hubotcoder opened 10 months ago

Hubotcoder commented 10 months ago

Is there an existing issue for this?

Current Behavior

PS D:\svn\ChatGLM2-6B> & C:/ProgramData/Anaconda3/envs/chatglm/python.exe d:/svn/ChatGLM2-6B/web_demo.py Symbol cudaLaunchKernel not found in C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common\cudart64_65.dll Load parallel cpu kernel failed C:\Users\Administrator.cache\huggingface\modules\transformers_modules\THUDM_chatglm2-6b-int4\quantization_kernels_parallel.so: Traceback (most recent call last): File "C:\Users\Administrator/.cache\huggingface\modules\transformers_modules\THUDM_chatglm2-6b-int4\quantization.py", line 148, in init kernels = ctypes.cdll.LoadLibrary(kernel_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\chatglm\Lib\ctypes__init__.py", line 454, in LoadLibrary return self._dlltype(name) ^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\chatglm\Lib\ctypes__init.py", line 376, in init__ self._handle = _dlopen(self._name, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: Could not find module 'C:\Users\Administrator.cache\huggingface\modules\transformers_modules\THUDM_chatglm2-6b-int4\quantization_kernels_parallel.so' (or one of its dependencies). Try using the full path with constructor syntax.

C:\ProgramData\Anaconda3\envs\chatglm\Lib\site-packages\gradio\components\textbox.py:259: UserWarning: The style method is deprecated. Please set these arguments in the constructor instead. warnings.warn( Running on local URL: http://127.0.0.1:7860/

Expected Behavior

No response

Steps To Reproduce

I changed this two lines:

tokenizer = AutoTokenizer.from_pretrained(r"D:\Howard\Models\THUDM_chatglm2-6b-int4", trust_remote_code=True)
model = AutoModel.from_pretrained(r"D:\Howard\Models\THUDM_chatglm2-6b-int4", trust_remote_code=True).cuda()

and ran python web_demo.py, then I got this error.

Environment

- OS:windows 10
- Python:python 3.11.3
- Transformers: 4.30.2
- PyTorch:2.0.1
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :True

Anything else?

No response