Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Generation Maximum Length #32

Open
aboggust opened this issue Jan 8, 2023 · 1 comment
Open

Text Generation Maximum Length #32

aboggust opened this issue Jan 8, 2023 · 1 comment

Comments

@aboggust
Copy link

aboggust commented Jan 8, 2023

Thank you so much for this repo! It has been a pleasure to work with.

I am setting up a chart captioning finetuning task. My dataset contains pairs of chart images and chart scenegraphs (textual representations of the chart spec). I also have ground truth natural language captions.

I have finetuned your pretrained VLT5 model on my data. It is generating informative captions, but the generated captions are much shorter than the ground truth captions. The ground truth captions are on average 450 characters, whereas the generated captions are on average 181 characters.

Would you expect VLT5 to prefer short captions (i.e., because it was pretrained on short text)? Or would you expect I have a parameter set incorrectly? I have set gen_max_length = 512 and max_text_length = 512.

@j-min
Copy link
Owner

j-min commented Jan 9, 2023

Hi, thanks a lot for your interest!

In my experiments, most of the target text was pretty short (< 20 tokens), so I don't have experience using VL-T5 to generate such long text. Theoretically, the model would learn the distribution in the target data, but LM can often degenerate for various reasons (e.g., trained on small data).

For your use case, how about controlling min_length parameters in generate() method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants