Iagovar

Training a machine-learning classification model

Why?

I made a filter for the events section of cometocoruna.com where there's a category selector. The problem is that events are not being properly categorized.

Most of the times is not possible to obtain the category from the data source, or the categories are being so lazily applied that it becomes useless for such task.

I've tried to apply pre-trained zero-shot models and use OpenAI API for events coming from Instagram.

Results have been pretty poor IMO. All zero-shot models I've tried perform poorly. LLMs are better but calling APIs becomes pricey once you have to call several times to play with the model context. I also limited myself to run all the pipeline in an old Acer B115m so running a local LLM is out of the question.

So what's next?

I'm not completely unfamiliar with this field, but training a NLP model from scratch is completely new to me. For what I've been able to gather it seems that I need to build a pipeline to train or finetune DistillBERT with my own dataset on multiple choice classification.

Read more