Skip to content

[help] 运行“运行GLM6B.bat”报错 #2

@YIZXIY

Description

@YIZXIY

windows10
cuda12
pytorch2.0.0
python3.10
已下载[simcse-chinese-roberta-wwm-ext并放在sentence-transformers\simcse-chinese-roberta-wwm-ext。并完整安装requirements.txt
修改了GLM6BAPI.py的138行model_path="D:/chatglm-6B-int4"(chatglm的绝对路径)
修改了model_name = "D:/Python/Python310/Lib/site-packages/sentence_transformers/simcse-chinese-roberta-wwm-ext"(simcse-chinese-roberta-wwm-ext的绝对路径)
运行“PS D:\Desktop\wenda-main> .\运行GLM6B.bat”
报错
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "D:\Desktop\wenda-main\GLM6BAPI.py", line 162, in
vectorstore = FAISS.load_local('xw', embeddings=embeddings)
File "D:\Python\Python310\lib\site-packages\langchain\vectorstores\faiss.py", line 406, in load_local
index = faiss.read_index(str(path / "index.faiss"))
File "D:\Python\Python310\lib\site-packages\faiss\swigfaiss.py", line 9651, in read_index
return _swigfaiss.read_index(*args)
RuntimeError: Error in __cdecl faiss::FileIOReader::FileIOReader(const char *) at D:\a\faiss-wheels\faiss-wheels\faiss\faiss\impl\io.cpp:68: Error: 'f' failed: could not open xw\index.faiss for reading: No such file or directory
No compiled kernel found.
Compiling kernels : C:\Users\zx.cache\huggingface\modules\transformers_modules\local\quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 C:\Users\zx.cache\huggingface\modules\transformers_modules\local\quantization_kernels_parallel.c -shared -o C:\Users\zx.cache\huggingface\modules\transformers_modules\local\quantization_kernels_parallel.so
'gcc' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Compile failed, using default cpu kernel code.
Compiling gcc -O3 -fPIC -std=c99 C:\Users\zx.cache\huggingface\modules\transformers_modules\local\quantization_kernels.c -shared -o C:\Users\zx.cache\huggingface\modules\transformers_modules\local\quantization_kernels.so
Kernels compiled : C:\Users\zx.cache\huggingface\modules\transformers_modules\local\quantization_kernels.so
Cannot load cpu kernel, don't use quantized model on cpu.
Using quantization cache
Applying quantization to glm layers
Exception ignored in: <module 'threading' from 'D:\Python\Python310\lib\threading.py'>
Traceback (most recent call last):
File "D:\Python\Python310\lib\threading.py", line 1567, in _shutdown
lock.acquire()
KeyboardInterrupt:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions