[Question]: 使用uie-m-large模型报错
请提出你的问题
完整的报错信息如下
RuntimeError Traceback (most recent call last) Input In [7], in <cell line: 2>() 1 schema = ['Time', "date"] ----> 2 ie2 = Taskflow('information_extraction', schema=schema, model="uie-m-large", schema_lang="en")
File ~/work/202211/event/paddlenlp/taskflow/taskflow.py:543, in Taskflow.init(self, task, model, mode, device_id, **kwargs) 541 self.kwargs = kwargs 542 task_class = TASKS[self.task][tag][self.model]['task_class'] --> 543 self.task_instance = task_class(model=self.model, 544 task=self.task, 545 priority_path=self.priority_path, 546 **self.kwargs) 547 task_list = TASKS.keys() 548 Taskflow.task_list = task_list
File ~/work/202211/event/paddlenlp/taskflow/information_extraction.py:360, in UIETask.init(self, task, model, schema, schema_lang, **kwargs) 358 self._check_task_files() 359 self._check_predictor_type() --> 360 self._get_inference_model() 361 self._usage = usage 362 self._is_en = True if model in ['uie-base-en' 363 ] or schema_lang == 'en' else False
File ~/work/202211/event/paddlenlp/taskflow/task.py:254, in Task._get_inference_model(self) 251 if self._predictor_type == "paddle-inference": 252 self._config = paddle.inference.Config(self._static_model_file, 253 self._static_params_file) --> 254 self._prepare_static_mode() 255 else: 256 self._prepare_onnx_mode()
File ~/work/202211/event/paddlenlp/taskflow/task.py:174, in Task._prepare_static_mode(self) 172 if self.task in ["document_intelligence", "knowledge_mining"]: 173 self._config.switch_ir_optim(False) --> 174 self.predictor = paddle.inference.create_predictor(self._config) 175 self.input_names = [name for name in self.predictor.get_input_names()] 176 self.input_handles = [ 177 self.predictor.get_input_handle(name) 178 for name in self.predictor.get_input_names() 179 ]
RuntimeError: (Unavailable) An error occurred while loading model parameters. Please check whether the model file is complete or damaged.
[Hint: Expected static_cast
看报错应该是模型文件下载的问题,删除~/.paddlenlp/taskflow/information_extraction重新下载试试
看报错应该是模型文件下载的问题,删除~/.paddlenlp/taskflow/information_extraction重新下载试试
删除了这个文件夹下的uie-m-large文件夹,然后重新下载,还是报错了
看报错应该是模型文件下载的问题,删除~/.paddlenlp/taskflow/information_extraction重新下载试试 uie-m-large文件夹内容如下
large模型比较大,有可能还是下载的问题,或者试试手动下载模型文件到这个目录~/.paddlenlp/taskflow/information_extraction/uie-m-large,链接:https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_m_large_v1.0/model_state.pdparams
手动下载之后,windows和linux系统上都还是报最初的错误
large模型比较大,有可能还是下载的问题,或者试试手动下载模型文件到这个目录~/.paddlenlp/taskflow/information_extraction/uie-m-large,链接:https://bj.bcebos.com/paddlenlp/taskflow/information_extraction/uie_m_large_v1.0/model_state.pdparams
model_state.pdparams详细属性如下

paddlenlp的版本是多少?
paddlenlp的版本是多少?
2.4.0
可以尝试看下model_state.pdparams这个文件对应的md5值是否是 75f3989c515f05f6842e314d3f75ee27
可以尝试看下model_state.pdparams这个文件对应的md5值是否是 75f3989c515f05f6842e314d3f75ee27

md5值没有问题
我的也是同样问题。看看解决了吗?
File "D:\Anaconda3\envs\py3.8\lib\site-packages\paddlenlp\taskflow\task.py", line 174, in _prepare_static_mode
self.predictor = paddle.inference.create_predictor(self._config)
RuntimeError: (Unavailable) An error occurred while loading model parameters. Please check whether the model file is complete or damaged.
[Hint: Expected static_cast
我的也是同样问题。看看解决了吗?
File "D:\Anaconda3\envs\py3.8\lib\site-packages\paddlenlp\taskflow\task.py", line 174, in _prepare_static_mode self.predictor = paddle.inference.create_predictor(self._config) RuntimeError: (Unavailable) An error occurred while loading model parameters. Please check whether the model file is complete or damaged. [Hint: Expected static_cast(*buffer) == true, but received static_cast(*buffer):0 != true:1.] (at ..\paddle/fluid/operators/load_combine_op.h:86) [operator < load_combine > error] python-BaseException
没有解决
Hi,可以check下机器的内存使用情况,看下是否有内存不足的问题
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。
Hi,可以check下机器的内存使用情况,看下是否有内存不足的问题
你好,我也遇到该问题了。请问是内存不足还是显存不足导致?至少需要多少内存或显存才能加载uie-m-larege
现在解决了吗?
