SOPHON-DEMO生成的bmodel运行失败

固件类型:官方提供的固件
固件文件名称:Public-All-1684-Ubuntu2004-Sdk2309LTS_SP1-Build202
固件下载地址:百度网盘
Log日志:AIBOX-BM1684x-fireflychat.txt

我通过以下方式生成的bmodel为什么不能在AIbox-1684x上运行,帮看下谢谢。

python3 tools/export_onnx_qwen2.py–model_path /work/model/huggingface/Qwen2-1.5B-Instruct --seq_length 512

./scripts/gen_bmodel.sh --target bm1684x–mode int4 --name qwen2-7b --seq_length 512 --addr_mode io_alone

models/BM1684X/qwen2-7b_int4_seq512_1dev.bmodel

这是qwen2-7b_int4_seq512_1dev.bmodel加载信息,不能使用

Dec 26 15:30:54aibox-1684x run.sh[415]: 2024-12-26 15:30:54,172 [INFO] [config.py:314] 默认模型设置为了:Qwen1.5-1.8B

Dec 26 15:31:01aibox-1684x run.sh[415]:/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/utils.py:932:UserWarning: Expected maximum 4 arguments for function <function get_modelat 0x7fa63d6430>, received 8.

Dec 26 15:31:01aibox-1684x run.sh[415]: warnings.warn(

Dec 26 15:32:20aibox-1684x run.sh[415]: Traceback (most recent call last):

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/queueing.py",line 527, in process_events

Dec 26 15:32:20aibox-1684x run.sh[415]: response = awaitroute_utils.call_process_api(

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/route_utils.py",line 261, in call_process_api

Dec 26 15:32:20aibox-1684x run.sh[415]: output = awaitapp.get_blocks().process_api(

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/blocks.py",line 1786, in process_api

Dec 26 15:32:20aibox-1684x run.sh[415]: result = awaitself.call_function(

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/blocks.py",line 1338, in call_function

Dec 26 15:32:20aibox-1684x run.sh[415]: prediction = awaitanyio.to_thread.run_sync(

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/anyio/to_thread.py",line 56, in run_sync

Dec 26 15:32:20aibox-1684x run.sh[415]: return awaitget_async_backend().run_sync_in_worker_thread(

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/anyio/_backends/_asyncio.py",line 2144, in run_sync_in_worker_thread

Dec 26 15:32:20aibox-1684x run.sh[415]: return await future

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/anyio/_backends/_asyncio.py",line 851, in run

Dec 26 15:32:20aibox-1684x run.sh[415]: result = context.run(func,*args)

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/utils.py",line 759, in wrapper

Dec 26 15:32:20aibox-1684x run.sh[415]: response = f(*args, **kwargs)

Dec 26 15:32:20aibox-1684x run.sh[415]: File"/firefly_services/FireflyChat/modules/utils.py", line 92, inauto_name_chat_history

Dec 26 15:32:20aibox-1684x run.sh[415]: returncurrent_model.auto_name_chat_history(*args)

Dec 26 15:32:20aibox-1684x run.sh[415]: AttributeError: ‘NoneType’ object has no attribute’auto_name_chat_history’

Dec 26 15:32:20aibox-1684x run.sh[415]: None of PyTorch, TensorFlow >= 2.0, or Flax havebeen found. Models won’t be available and only tokenizers, configuration andfile/data utilities can be used.

Dec 26 15:32:21aibox-1684x run.sh[415]: Special tokens have been added in the vocabulary, makesure the associated word embeddings are fine-tuned or trained.

这是开发板自带的qwen1.5-1.8b_int4_1024.bmodel是可以的

Dec 26 15:39:19aibox-1684x systemd[1]: Started Firefly Chat.

Dec 26 15:39:33aibox-1684x run.sh[412]: 2024-12-26 15:39:33,027 [INFO] [config.py:314] 默认模型设置为了:Qwen1.5-1.8B

Dec 26 15:39:40aibox-1684x run.sh[412]:/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/utils.py:932:UserWarning: Expected maximum 4 arguments for function <function get_modelat 0x7fad89d430>, received 8.

Dec 26 15:39:40aibox-1684x run.sh[412]: warnings.warn(

Dec 26 15:43:46aibox-1684x run.sh[412]: None of PyTorch, TensorFlow >= 2.0, or Flax havebeen found. Models won’t be available and only tokenizers, configuration andfile/data utilities can be used.

Dec 26 15:43:48aibox-1684x run.sh[412]: Special tokens have been added in the vocabulary, makesure the associated word embeddings are fine-tuned or trained.

tchip_askquestions
AIBOX-BM1684x-fireflychat.txt (44.1 KB)