All projects

NLP model & API

Tweet sentiment

A small model, trained and served as an API.

My role

ML and backend developer

Status

Small demo · deployed on CPU

Built with

Python / MiniLM / FastAPI / ONNX / Docker

The live classifier with a sample sentence.

This small demonstration project covers training a text classifier and making it available through a working API. It labels English text as positive, neutral or negative.

Training and evaluation

I started with a TF-IDF baseline, then fine-tuned MiniLM on TweetEval. Macro-F1 reached 0.693, compared with 0.564 for the baseline on the same published test split.

These are results on that benchmark. They do not establish accuracy on every kind of English text. The project includes an analysis of common prediction errors.

Serving the model

I prepared the data, trained and evaluated the model, exported it to quantized ONNX and built the FastAPI service. The model runs on CPU without PyTorch in the serving container.

The live app has a text input and example sentences. API documentation, validation and readiness checks are included, along with training instructions and Docker setup in the repository.

Another projectLLM GatewayGo backend experiment

Contact

Have something similar in mind?

Send me the task and what you already have. We can work out the scope from there.

Message me on Upwork