This tutorial shows how to connect a Scikit-LLM zero-shot text classification pipeline to the local Ollama llama3 model and serve it as a REST API through FastAPI async endpoints. The pipeline uses scikit-learn’s fit/predict syntax to perform classification and serialization, producing scikit_llm_model.joblib. The model is loaded when the service starts, and it accepts multiple texts in a single request and returns the corresponding predictions.
Source:machinelearningmastery.com · Read original
Leave a Reply