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
12.17k stars 2.95k forks source link

UIE Taskflow中的batch_size参数没有作用 #3025

Closed MachineSheep closed 1 year ago

MachineSheep commented 2 years ago

image

text = ["xxxxx", "xxxxx”, "xxxxx"]
ie(text, batch_size=3......) 

预测消耗的时间和batch_size=1的消耗的时间是一致的, batch_size参数没有作用?

guoshengCS commented 2 years ago

主要是觉得时间上没差别吗,预测消耗的时间是如何评估的呢,输出的效果是符合batch_size设置的不

MachineSheep commented 2 years ago

主要是觉得时间上没差别吗,预测消耗的时间是如何评估的呢,输出的效果是符合batch_size设置的不

预测消耗的时间是用time.time()相减得到的结果。

batch_size的设置会导致输出效果有什么不同吗?都是一个列表,列表里面是字典

MachineSheep commented 2 years ago

@linjieccc 实体识别Taskflow的参数batch_size对模型预测的效率没有作用?

linjieccc commented 2 years ago

可以看下GPU利用率,如果速度没有变化可能是利用率已经打满了

MachineSheep commented 2 years ago

可以看下GPU利用率,如果速度没有变化可能是利用率已经打满了

batch_size设置为1或者其他,gpu的利用率都是80%左右,gpu的现存利用率都是20%左右。多条文本时模型的预测效率不受batch_size的影响。

MachineSheep commented 2 years ago

可以看下GPU利用率,如果速度没有变化可能是利用率已经打满了

模型是我定制训练之后的,用的是下面调用方法 Taskflow("information_extraction", schema=schema,batch_size=3, task_path='./checkpoint/model_best')

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。