Fine tuning LLM for text classification -- error with SFTTrainer

textclf
Tue, 03 Jun 2025 02:17:07 +0000

Your best bet is to find a way to create a labeled dataset even if it is small and then train a traditional classifier with some kind of embedding is almost always the best way that gets you most accurate results. All other approaches like fine tuning LLM or variations of zero/few shot classification are a hit or mess.

I have built an API that you can use your dataset with to train a custom text classification model. It supports JSON input and output formats and very easy to use. You can give it a shot and let me know if u need help running it. You can find it at textclf.com and then clicking the try API button