开发者

Is simultaneous generation and classification of text in encoder-decoder architectures like T5 or BART possible?

开发者 https://www.devze.com 2022-12-07 21:38 出处:网络
Given a prompt, I can use BART or T5 to generate a response. Potentially, I could train another model that accepts the prompt and the generated response and classify that into one of two categories, h

Given a prompt, I can use BART or T5 to generate a response.

Potentially, I could train another model that accepts the prompt and the generated response and classify that into one of two categories, however, due to latency,

I want to do the classification using the same BART or T5 model that generated the response.

Is there a solution for that?

Example:

prompt: What is the capital of Germany? then BART generates: answer: The capital of Germany is Berlin.

and then the classifier should classify the QA pair (What is the capital of Germany?, The capital of Germany is Berlin.) as a location QA category (assume开发者_JAVA技巧 we can't just rely on the question). Ideally, I want the classifier to be within BART/T5 itself so that I don't need to encode the pair again (particularly the answer).

0

精彩评论

暂无评论...
验证码 换一张
取 消