fastllm
fastllm copied to clipboard
添加代码后运行报错,这是为什么
Traceback (most recent call last):
File "web_demo3.py", line 9, in <module>
model = llm.from_hf(model, tokenizer, dtype = "float16") # dtype支持 "float16", "int8", "int4"
File "/home/remotesense/anaconda3/envs/glm/lib/python3.8/site-packages/fastllm_pytools-0.0.1-py3.8.egg/fastllm_pytools/llm.py", line 94, in from_hf
return hf_model.create(model, tokenizer, dtype = dtype);
File "/home/remotesense/anaconda3/envs/glm/lib/python3.8/site-packages/fastllm_pytools-0.0.1-py3.8.egg/fastllm_pytools/hf_model.py", line 84, in create
if len(active_adapter) != 0:
TypeError: object of type 'method' has no len()
我的model.active_adapter是一个方法,而84行附近却是调用数值,这该如何解决
active_adapter = "" if hasattr(model, "active_adapter"): try: active_adapter = model.active_adapter() except ValueError: print("No adapter loaded.") 我将源代码修改成以上后,报以下错误 No adapter loaded. convert ( 200 / 200 ) Warmup... status = 7 1 16 128 Error: cublas error. terminate called after throwing an instance of 'char const*' Aborted (core dumped)
一样的情况,相同代码,centos下无问题,在WSL2中的ubuntu编译后出现该问题
一样的情况,相同代码,centos下无问题,在WSL2中的ubuntu编译后出现该问题
这是编译时的问题,还是代码本身问题,后面报错是显存爆了,我在源代码中更改了下
尝试tramsformer版本改低点试试呢,我们这边4.33.0也遇到这问题,改成4.31.0就好了
尝试tramsformer版本改低点试试呢,我们这边4.33.0也遇到这问题,改成4.31.0就好了
No adapter loaded. convert ( 200 / 200 ) Warmup... status = 7 1 16 128 Error: cublas error. terminate called after throwing an instance of 'char const*' Aborted (core dumped) 但是这个报错没法解决
User:你好 Error: cublas error. Aborted (core dumped)
直接报错,这是因为啥呢,cuda117环境
同样错误
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:12<00:00, 1.82s/it]
Traceback (most recent call last):
File "/Users/Maximin/Downloads/fastllm/build/tools/test.py", line 14, in <module>
model = llm.from_hf(
File "/Users/Maximin/Downloads/fastllm/build/tools/fastllm_pytools/llm.py", line 161, in from_hf
return hf_model.create(model, tokenizer, dtype=dtype)
File "/Users/Maximin/Downloads/fastllm/build/tools/fastllm_pytools/hf_model.py", line 84, in create
if len(active_adapter) != 0:
TypeError: object of type 'method' has no len()
Illegal instruction: 4
同样报错,transformer==4.33.2