When to use AutoModelForSeq2SeqLM?
Can anyone tell me when to use AutoModelForSeq2SeqLM. Is it generally used for translation? Can I use AutoModelForSeq2SeqLM for fine tuning a custom task using t5 model. If not when to use AutoModelForSeq2SeqLM and T5ForConditionalGeneration?When to useAutoModelForSeq2SeqLM.from_pretrained(‘t5-base’)T5ForConditionalGeneration.from_pretrained(‘t5-base’)
2022-07-21T11:21:31Z
Hi,AutoModelForSeq2SeqLMcan be used to load any seq2seq (or encoder-decoder) model that has a language modeling (LM) head on top. These include BART, PEGASUS, T5, etc. You can check the full list of supported models in the docs:Auto ClassesSo when you doAutoModelForSeq2SeqLM.from_pretrained(‘t5-base’), it will actually load aT5ForConditionalGenerationfor you behind the scenes.
2024-06-05T21:30:39Z
Can you recommend a model to extract specific values from a large set of text? I am trying to do the SROIE dataset task2 - convert OCR-extracted text from receipts into total amount spent and company where the purchase was made. I am able to get ChatGPT-4 to extract the info quite nicely, but with t5-base, so far, I just get:'<pad> True</s>'Data is bounding box coords + extracted text.190,864,309,864,309,880,190,880,EXCHANGEABLE142,883,353,883,353,901,142,901,***137,903,351,903,351,920,137,920,***202,942,292,942,292,959,202,959,THANK YOU163,962,330,962,330,977,163,977,PLEASE COME AGAIN !412,639,442,639,442,654,412,654,9.00The prompt I tried is:input_text = f"Context: {the_data_above}\n\nQuestion: What is the total amount spent?\n\nAnswer:"Is t5 a good model to use, or is there a better one? Any special tricks needed to getting it to use bounding box coordinates to infer text relationships?Many thanks!
2024-06-10T09:15:57Z
Hi,T5 is a model meant to be fine-tuned, it is very limited in the zero-shot setting.As SROIE is a document AI task, I recommend to take a look at the models we offer for that:Accelerating Document AI.