Scikit-LLM

Scikit-LLM

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

Scikit-LLM is an open-source Python library that seamlessly integrates large language models into scikit-learn, so LLM-powered text understanding becomes just another estimator in your pipelines. Instead of hand-writing prompts and parsing free-form replies, you get familiar fit/predict classes for tasks like zero-shot classification, summarization and tagging that compose with the rest of the scikit-learn ecosystem. Maintained by BeastByte, the project has about 3,500 stars on GitHub and is under active development in 2026.

Overview

The library wraps several model backends โ€” OpenAI, Azure OpenAI, Google Vertex AI/Gemini and local GGUF models โ€” behind a consistent interface, so swapping providers is a configuration change rather than a rewrite. Estimators cover zero-shot and few-shot text classification, multi-label classification, text summarization, text tagging and dynamic few-shot prompting, plus transformers that extract structured features from raw text for downstream classical models. Because everything follows the scikit-learn API, Scikit-LLM estimators drop into Pipelines, GridSearchCV and cross-validation workflows alongside TF-IDF vectorizers and conventional classifiers, which makes it easy to benchmark an LLM approach against a traditional baseline with the same code.

Key Features

  • Zero-shot and few-shot text classification with a native scikit-learn API
  • Summarization, tagging and multi-label classification estimators included
  • Multiple backends: OpenAI, Azure OpenAI, Google Vertex AI and local GGUF models
  • Feature-extraction transformers that feed LLM output into classical ML models
  • Fully compatible with scikit-learn Pipelines, model selection and evaluation tools
  • Dynamic few-shot prompting that retrieves the most relevant examples automatically

๐Ÿ’ณ Pricing

Scikit-LLM is completely free and open source under the MIT license. If you use a hosted model backend, you pay that provider’s standard API rates; local models run at no cost.

Who Is It For

Scikit-LLM is for Python data scientists and ML engineers who want LLM-grade text classification and summarization inside their existing scikit-learn workflows, without abandoning pipelines, metrics and validation habits.

๐Ÿš€ Visit Scikit-LLM Official Site

๐Ÿšฉ Report an issue