wx__U6iIX6 发表于 2025-1-2 17:31:05

SOPHON-DEMO生成的bmodel运行失败

我通过以下方式生成的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_alonemodels/BM1684X/qwen2-7b_int4_seq512_1dev.bmodel 这是qwen2-7b_int4_seq512_1dev.bmodel加载信息,不能使用Dec 26 15:30:54aibox-1684x run.sh: 2024-12-26 15:30:54,172 默认模型设置为了:Qwen1.5-1.8BDec 26 15:31:01aibox-1684x run.sh:/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:   warnings.warn(Dec 26 15:32:20aibox-1684x run.sh: Traceback (most recent call last):Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/queueing.py",line 527, in process_eventsDec 26 15:32:20aibox-1684x run.sh:   response = awaitroute_utils.call_process_api(Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/route_utils.py",line 261, in call_process_apiDec 26 15:32:20aibox-1684x run.sh:   output = awaitapp.get_blocks().process_api(Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/blocks.py",line 1786, in process_apiDec 26 15:32:20aibox-1684x run.sh:   result = awaitself.call_function(Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/blocks.py",line 1338, in call_functionDec 26 15:32:20aibox-1684x run.sh:   prediction = awaitanyio.to_thread.run_sync(Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/anyio/to_thread.py",line 56, in run_syncDec 26 15:32:20aibox-1684x run.sh:   return awaitget_async_backend().run_sync_in_worker_thread(Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/anyio/_backends/_asyncio.py",line 2144, in run_sync_in_worker_threadDec 26 15:32:20aibox-1684x run.sh:   return await futureDec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/anyio/_backends/_asyncio.py",line 851, in runDec 26 15:32:20aibox-1684x run.sh:   result = context.run(func,*args)Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/venv/lib/python3.8/site-packages/gradio/utils.py",line 759, in wrapperDec 26 15:32:20aibox-1684x run.sh:   response = f(*args, **kwargs)Dec 26 15:32:20aibox-1684x run.sh:   File"/firefly_services/FireflyChat/modules/utils.py", line 92, inauto_name_chat_historyDec 26 15:32:20aibox-1684x run.sh:   returncurrent_model.auto_name_chat_history(*args)Dec 26 15:32:20aibox-1684x run.sh: AttributeError: 'NoneType' object has no attribute'auto_name_chat_history'Dec 26 15:32:20aibox-1684x run.sh: 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: 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: Started Firefly Chat.Dec 26 15:39:33aibox-1684x run.sh: 2024-12-26 15:39:33,027 默认模型设置为了:Qwen1.5-1.8BDec 26 15:39:40aibox-1684x run.sh:/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:   warnings.warn(Dec 26 15:43:46aibox-1684x run.sh: 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: Special tokens have been added in the vocabulary, makesure the associated word embeddings are fine-tuned or trained.
页: [1]
查看完整版本: SOPHON-DEMO生成的bmodel运行失败