Skip to content

Seamlessly integrate powerful language models like ChatGPT into scikit-learn for enhanced text analysis tasks.

License

Notifications You must be signed in to change notification settings

techthiyanes/scikit-llm

This branch is 4 commits behind BeastByteAI/scikit-llm:main.

Folders and files

NameName
Last commit message
Last commit date
Jun 9, 2024
Aug 4, 2024
Dec 25, 2023
Jun 9, 2024
Dec 13, 2023
May 27, 2023
Sep 13, 2023
May 12, 2023
May 25, 2024
Aug 4, 2024
Jun 3, 2023

Repository files navigation

logo

Scikit-LLM: Scikit-Learn Meets Large Language Models

Seamlessly integrate powerful language models like ChatGPT into scikit-learn for enhanced text analysis tasks.

Installation πŸ’Ύ

pip install scikit-llm

Support us 🀝

You can support the project in the following ways:

  • ⭐ Star Scikit-LLM on GitHub (click the star button in the top right corner)
  • πŸ’‘ Provide your feedback or propose ideas in the issues section or Discord
  • πŸ“° Post about Scikit-LLM on LinkedIn or other platforms
  • πŸ”— Check out our other projects: Dingo, Falcon

Logo

Logo

Quick Start & Documentation πŸ“š

Quick start example of zero-shot text classification using GPT:

# Import the necessary modules
from skllm.datasets import get_classification_dataset
from skllm.config import SKLLMConfig
from skllm.models.gpt.classification.zero_shot import ZeroShotGPTClassifier

# Configure the credentials
SKLLMConfig.set_openai_key("<YOUR_KEY>")
SKLLMConfig.set_openai_org("<YOUR_ORGANIZATION_ID>")

# Load a demo dataset
X, y = get_classification_dataset() # labels: positive, negative, neutral

# Initialize the model and make the predictions
clf = ZeroShotGPTClassifier(model="gpt-4")
clf.fit(X,y)
clf.predict(X)

For more information please refer to the documentation.

Citation

You can cite Scikit-LLM using the following BibTeX:

@software{ScikitLLM,
  author = {Iryna Kondrashchenko and Oleh Kostromin},
  year = {2023},
  publisher = {beastbyte.ai},
  address = {Linz, Austria},
  title = {Scikit-LLM: Scikit-Learn Meets Large Language Models},
  url = {https://github.com/iryna-kondr/scikit-llm }
}

About

Seamlessly integrate powerful language models like ChatGPT into scikit-learn for enhanced text analysis tasks.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%