Find answers from the community

Updated last month

How to Fine-Tune an LLM for Sentiment Analysis Using Your Existing Dataset

At a glance

The community member wants to fine-tune a large language model (LLM) for sentiment analysis, but is struggling to get clear inferences from the existing 1,000 pieces of data they have. They are considering generating a synthetic dataset to fine-tune the LLM. Another community member suggests that a normal machine learning model may be better suited for this use case, and provides a link to a resource on generating synthetic data using LLMs. However, there is no explicitly marked answer on the exact steps the original community member should follow.

Useful resources
hello, i want to fine-tune an llm using sentiment analysis, and as far as i understand, i need to generate a synthetic dataset for this.

actually, i already have around 1000 pieces of data related to a product. i can directly ask the llm to perform sentiment analysis on these, but the llm struggles to make clear inferences for some comments.

what exact steps should i follow?
W
G
3 comments
Which llm are you using? Open-source llm?

Have you tried prompt manipulation?
Like trying with diff prompt setting ?
no, i've not tried it.

i'm using gemini flash. i want to fine-tune it with sentiment analys dataset. but not sure how to create this dataset?

@WhiteFang_Jr
You want to finetune a llm for sentiment analysis?

I feel normal ML model suits better for this usecase.

For creating synthetic data using LLM, You can refer to something like this: https://huggingface.co/blog/synthetic-data-save-costs


and more google search will give you more options on how to generate datasets using llm
Add a reply
Sign up and join the conversation on Discord