PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12k stars 2.93k forks source link

[Question]: UIE蒸馏模型的部署 #6276

Open cqray1990 opened 1 year ago

cqray1990 commented 1 year ago

请提出你的问题

蒸馏UIE-mini 模型底座ernie-3.0-mini-zh :UIE蒸馏模型的部署可以直接用UIE deploy 的infer.py,? Taskflow 加了uie-data-distill-gp,只能用以下方式推理? ie = Taskflow("information_extraction",model="uie-data-distill-gp", task_path="data_distill/checkpoint-mini/model_best")

我尝试用infer.py代码替换模型预测,报错
start_prob, end_prob = self._infer(input_dict) ValueError: not enough values to unpack (expected 2, got 1) @AlphaHinex @ZeyuChen

w5688414 commented 4 months ago

根据提示,只有一个输出,您应该这样写:

out = self._infer(input_dict)