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

[Question]: UIE:CCKS基线代码:解码细节请教 #3934

Closed shihanmax closed 1 year ago

shihanmax commented 2 years ago

请提出你的问题

@luyaojie 你好👋,请问PaddleNLP/examples/information_extraction/DuUIE/inference.py 中实现的比赛基线方案中,是否实现了约束解码呢?看到代码用的是T5ForConditionalGeneration默认的generate方法,没有找到剪枝相关的操作,谢谢。

        }

        pred, _ = self.model.generate(
            input_ids=inputs['input_ids'],
            attention_mask=inputs['attention_mask'],
            max_length=self.max_target_length,
        )

        pred = self.tokenizer.batch_decode(pred.numpy())
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天,即将关闭。