kevinscaria / InstructABSA

Instructional learning for Aspect Based Sentiment Analysis [NAACL-2024]
https://aclanthology.org/2024.naacl-short.63/
MIT License
147 stars 24 forks source link

Is there something wrong in utils.py? #13

Closed suntea233 closed 1 year ago

suntea233 commented 1 year ago

The model in T5Generator is AutoModelForSeq2SeqLM. But the model in T5Classifier is T5ForConditionalGeneration.

kevinscaria commented 1 year ago

AutoModelForSeq2SeqLM enables to load the correct seq2seq class given a checkpoint. The automapping class will retrieve the correct class from this list 7. Therefore there is no practical difference between xxxForConditionalGeneration classes and AutoModelForSeq2SeqLM, since they are the same.

Therefore you can use T5ForConditionalGeneration or AutoModelForSeq2SeqLM.