- 错误信息
AttributeError: ‘ChatGLMForConditionalGeneration’ object has no attribute ‘float32’
- Jittor 运行的完整 log
(myenv) PS E:\chatGLM\JittorLLMs-main> python cli_demo.py chatglm
[i 0205 14:59:51.465000 00 compiler.py:956] Jittor(1.3.8.5) src: d:\python\anaconda\envs\myenv\lib\site-packages\jittor
[i 0205 14:59:51.481000 00 compiler.py:957] cl at E:\chatGLM\ChatCatch.cache\jittor\msvc\VC_____\bin\cl.exe(19.29.30133)
[i 0205 14:59:51.481000 00 compiler.py:958] cache_path: E:\chatGLM\ChatCatch.cache\jittor\jt1.3.8\cl\py3.9.18\Windows-10-10.x3a\11thGenIntelRCxe1\default
[i 0205 14:59:51.496000 00 __init__.py:227] Total mem: 7.69GB, using 2 procs for compiling.
[i 0205 14:59:52.309000 00 jit_compiler.cc:28] Load cc_path: E:\chatGLM\ChatCatch.cache\jittor\msvc\VC_____\bin\cl.exe
[i 0205 14:59:52.309000 00 swap.cc:29] Load cpu_mem_limit: 4000000000
[i 0205 14:59:52.309000 00 swap.cc:30] Load device_mem_limit: 2000000000
Explicitly passing arevision
is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing arevision
is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing arevision
is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:47<00:00, 5.99s/it]
Traceback (most recent call last):
File “E:\chatGLM\JittorLLMs-main\cli_demo.py”, line 8, in
model = models.get_model(args)
File “E:\chatGLM\JittorLLMs-main\models_init_.py”, line 49, in get_model
return module.get_model(args)
File “E:\chatGLM\JittorLLMs-main\models\chatglm_init_.py”, line 48, in get_model
return ChatGLMMdoel(args)
File “E:\chatGLM\JittorLLMs-main\models\chatglm_init_.py”, line 26, in init
self.model.float32()
File “C:\Users\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py”, line 1695, in getattr
raise AttributeError(f"‘{type(self).name}’ object has no attribute ‘{name}’")
AttributeError: ‘ChatGLMForConditionalGeneration’ object has no attribute ‘float32’
终端运行python cli_demo.py chatglm 启动失败
Windows无GPU环境,请问这个问题该如何解决