WhiteLightning provides a one-stop solution with a single command. The steps are as follows:
- Install Docker and pull the WhiteLightning image:
docker pull ghcr.io/inoxoft/whitelightning:latest
- Configure the OpenRouter API key:
export OPEN_ROUTER_API_KEY="sk-..."
(for training phase only) - Run commands to generate models, such as sentiment analysis models:
docker run --rm -e OPEN_ROUTER_API_KEY="sk-..." -v "$(pwd)":/app/models ghcr.io/inoxoft/whitelightning:latest python -m text_classifier.agent -p "Categorize customer reviews as positive, neutral, or negative"
The tool automates synthetic data generation, model training and optimization, and delivers ONNX models of less than 1MB in 10-15 minutes, running completely offline and supporting multi-language deployment.
This answer comes from the articleWhiteLightning: an open source tool for generating lightweight offline text classification models in one clickThe