[[‘cuda’, ‘fp16’]]
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.
— Logging error —
Traceback (most recent call last):
File “C:\Users\yuhao.xia/.cache\huggingface\modules\transformers_modules\local\quantization.py”, line 18, in <module>
from cpm_kernels.kernels.base import LazyKernelCModule, KernelFunction, round_up
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\cpm_kernels_init_.py”, line 1, in <module>
from . import library
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\cpm_kernels\library_init_.py”, line 2, in <module>
from . import cuda
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\cpm_kernels\library\cuda.py”, line 7, in <module>
cuda = Lib.from_lib(“cuda”, ctypes.WinDLL(“nvcuda.dll”))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\ctypes_init_.py”, line 376, in init
self.handle = dlopen(self.name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module ‘nvcuda.dll’ (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\logging_init.py”, line 1110, in emit
msg = self.format(record)
^^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\logging_init.py”, line 953, in format
return fmt.format(record)
^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\logging_init.py”, line 687, in format
record.message = record.getMessage()
^^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\logging_init_.py”, line 377, in getMessage
msg = msg % self.args
^~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\threading.py”, line 995, in _bootstrap
self._bootstrap_inner()
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\threading.py”, line 1038, in _bootstrap_inner
self.run()
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\threading.py”, line 975, in run
self._target(*self._args, **self._kwargs)
File “D:\wenda\wd-git_5.30\wenda\wenda.py”, line 50, in load_model
LLM.load_model()
File “D:\wenda\wd-git_5.30\wenda\llms\llm_glm6b.py”, line 68, in load_model
model = AutoModel.from_pretrained(
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\transformers\models\auto\auto_factory.py”, line 459, in from_pretrained
return model_class.from_pretrained(
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\transformers\modeling_utils.py”, line 2362, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File “C:\Users\yuhao.xia/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py”, line 1034, in init
self.quantize(self.config.quantization_bit, self.config.quantization_embeddings, use_quantization_cache=True, empty_init=True)
File “C:\Users\yuhao.xia/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py”, line 1394, in quantize
from .quantization import quantize, QuantizedEmbedding, QuantizedLinear, load_cpu_kernel
File “<frozen importlib._bootstrap>”, line 1178, in _find_and_load
File “<frozen importlib._bootstrap>”, line 1149, in _find_and_load_unlocked
File “<frozen importlib._bootstrap>”, line 690, in _load_unlocked
File “<frozen importlib._bootstrap_external>”, line 940, in exec_module
File “<frozen importlib._bootstrap>”, line 241, in _call_with_frames_removed
File “C:\Users\yuhao.xia/.cache\huggingface\modules\transformers_modules\local\quantization.py”, line 43, in <module>
logger.warning(“Failed to load cpm_kernels:”, exception)
Message: ‘Failed to load cpm_kernels:’
Arguments: (FileNotFoundError(“Could not find module ‘nvcuda.dll’ (or one of its dependencies). Try using the full path with constructor syntax.”),)
No compiled kernel found.
Compiling kernels : C:\Users\yuhao.xia.cache\huggingface\modules\transformers_modules\local\quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 C:\Users\yuhao.xia.cache\huggingface\modules\transformers_modules\local\quantization_kernels_parallel.c -shared -o C:\Users\yuhao.xia.cache\huggingface\modules\transformers_modules\local\quantization_kernels_parallel.so
‘gcc’ is not recognized as an internal or external command,
operable program or batch file.
Compile failed, using default cpu kernel code.
Compiling gcc -O3 -fPIC -std=c99 C:\Users\yuhao.xia.cache\huggingface\modules\transformers_modules\local\quantization_kernels.c -shared -o C:\Users\yuhao.xia.cache\huggingface\modules\transformers_modules\local\quantization_kernels.so
‘gcc’ is not recognized as an internal or external command,
operable program or batch file.
Kernels compiled : C:\Users\yuhao.xia.cache\huggingface\modules\transformers_modules\local\quantization_kernels.so
Cannot load cpu kernel, don’t use quantized model on cpu.
Cannot load cuda kernel, quantization failed.
Exception in thread Thread-1 (load_model):
Traceback (most recent call last):
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\threading.py”, line 1038, in _bootstrap_inner
self.run()
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\threading.py”, line 975, in run
self._target(*self._args, **self._kwargs)
File “D:\wenda\wd-git_5.30\wenda\wenda.py”, line 50, in load_model
LLM.load_model()
File “D:\wenda\wd-git_5.30\wenda\llms\llm_glm6b.py”, line 68, in load_model
model = AutoModel.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\transformers\models\auto\auto_factory.py”, line 459, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\transformers\modeling_utils.py”, line 2478, in from_pretrained
) = cls._load_pretrained_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\wenda\wd-git_5.30\wenda\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\transformers\modeling_utils.py”, line 2844, in _load_pretrained_model
raise RuntimeError(f"Error(s) in loading state_dict for {model.class.name}:\n\t{error_msg}")
RuntimeError: Error(s) in loading state_dict for ChatGLMForConditionalGeneration:
size mismatch for transformer.layers.0.attention.query_key_value.weight: copying a param with shape torch.Size([12288, 2048]) from checkpoint, the shape in current model is torch.Size([12288, 4096]).
size mismatch for transformer.layers.0.attention.dense.weight: copying a param with shape torch.Size([4096, 2048]) from checkpoint, the shape in current model is torch.Size([4096, 4096]).
size mismatch for transformer.layers.0.mlp.dense_h_to_4h.weight: copying a param with shape torch.Size([16384, 2048]) from checkpoint, the shape in current model is torch.Size([16384, 4096]).
size mismatch for transformer.layers.0.mlp.dense_4h_to_h.weight: copying a param with shape torch.Size([4096, 8192]) from checkpoint, the shape in current model is torch.Size([4096, 16384]).中文显示什么错误