# Action due Context Sentiment

**URL:** <https://discuss.huggingface.co/t/action-due-context-sentiment/112123>\
**Category:** Research\
**Created:** [October 15, 2024, 9:27am UTC](https://discuss.huggingface.co/t/action-due-context-sentiment/112123 "2024-10-15T09:27:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxNpl](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maxnpl/32/32948_2.png) [@MaxNpl](https://discuss.huggingface.co/u/MaxNpl)\
**Post date:** [October 15, 2024, 9:27am UTC](https://discuss.huggingface.co/t/action-due-context-sentiment/112123/1 "2024-10-15T09:27:04Z")

</div>

I need a hand, I would like to train/make a model to do Sentiment analysis of a context/situation, given a sentence/action.

ex.

Context: There are $0.50 available. You have to choose between two possible actions:  
● BOOST THE OTHER PARTICIPANT: In which case, you get 0 cents and the other participant gets $0.50;  
● DON’T BOOST THE OTHER PARTICIPANT: In which case, you get $0.50 and the other participant gets 0 cents.

Action: BOOST THE OTHER PARTICIPANT

And I would like from the model a single Sentiment score of this action (but evaluated in the general context).

I have tried various BERT models but they do not satisfy me, perhaps I have simply tried the wrong models.

Advice? Help?

---

<div class="post-metadata">

**Author:** ![Pankaj8922](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pankaj8922/32/50668_2.png) [@Pankaj8922](https://discuss.huggingface.co/u/Pankaj8922)\
**Post date:** [October 15, 2024, 10:05am UTC](https://discuss.huggingface.co/t/action-due-context-sentiment/112123/2 "2024-10-15T10:05:19Z")

</div>

You should try gpt2 models they are good in case of contextual understanding. But the task you are describing will require a lot of somewhere between 50k-100k samples with,5-7 epoch ( Cause gpt2 was trained on very less data it takes more epoch to understand data)

---

<div class="post-metadata">

**Author:** ![MaxNpl](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maxnpl/32/32948_2.png) [@MaxNpl](https://discuss.huggingface.co/u/MaxNpl)\
**Post date:** [October 16, 2024, 6:53am UTC](https://discuss.huggingface.co/t/action-due-context-sentiment/112123/3 "2024-10-16T06:53:07Z")

</div>

isn’t just a matter of prompt with gpt like models?

---

<div class="post-metadata">

**Author:** ![Pankaj8922](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pankaj8922/32/50668_2.png) [@Pankaj8922](https://discuss.huggingface.co/u/Pankaj8922)\
**Post date:** [October 16, 2024, 9:52am UTC](https://discuss.huggingface.co/t/action-due-context-sentiment/112123/4 "2024-10-16T09:52:54Z")

</div>

what? 🙂  
You can fine tune gpt2 models on text right?  
So why don’t you use your dataset rows and create a text structure like this:" Text: {Your\_text\_here} (helps model understand that this portion have ended.) Sentiment: {ideal\_ sentiment\_here.} \<|eos|\>(this can be used as ending genration word.
