question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipeline for Conditional Generation (T5 type models)

See original GitHub issue

As text-to-text models (like T5) increase the accessibility of multi-task learning, it also makes sense to have a flexible “Conditional Generation” pipeline.

For example, I should be able to use this pipeline for a multitude of tasks depending on how I format the text input (examples in Appendix D of the T5 paper). As a baseline, this should be able to work on T5ForConditionalGeneration and allow for any of the tasks that are learned by the open sourced T5 model.

Since T5 isn’t usable for TextGenerationPipeline, I propose we add a ConditionalGenerationPipeline.

Please do let me know if there is an existing way to perform the above via pipelines, or if adding a pipeline doesn’t makes sense for this; otherwise, I can submit a PR for the above ConditionalGenerationPipeline 🙂

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

7reactions
patil-surajcommented, May 17, 2020

Yes having a “Conditional Generation” pipeline makes sense given that variety of tasks can be solved using it. We can use T5, BART for these tasks as well as the new Encoder-Decoder. I would like to call it TextToTextPipeline though, since we can solve non-generative tasks also as demonstrated in the T5 paper. I think this pipeline will be really useful.

4reactions
patrickvonplatencommented, Aug 21, 2020

Hey everybody, after thinking a bit more about it, I think it does make sense to add a ConditionalTextGeneration pipeline which will be the equivalent of TextGenerationPipeline for all models in AutoModelForSeq2Seq. It should look very similar to the TextGenerationPipeline (probably we more or less the same at the moment), but it will give us more freedom in the future (for example when we add decoder_input_ids to the generation). @sshleifer , @yjernite , @LysandreJik - what are your thoughts on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

T5 - Hugging Face
T5 is an encoder-decoder model pre-trained on a multi-task mixture of unsupervised and supervised tasks and for which each task is converted into...
Read more >
Data to Text generation with T5; Building a simple yet ...
We discussed how we can build an advanced NLG model that generates text from structured data. The text-to-text architecture of the T5 made...
Read more >
T5-Base Model for Summarization, Sentiment Classification ...
Build a text pre-processing pipeline for a T5 model · Instantiate a pre-trained T5 model with base configuration · Read in the CNNDM,...
Read more >
Fine-Tuning T5 for Question Answering using HuggingFace ...
Train a T5 (text-to-text transformer) model on a custom dataset for ... We'll look at auto-regressive text generation and different methods ...
Read more >
Pre-trained Language Models for Text Generation: A Survey
Model Architecture. Design and Selection. Application. e.g., BART, GPT-3, T5. Fig. 1. An illustrative process of applying PLMs to text generation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found