Skip to main content

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

Project description

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 }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit_llm-1.3.1.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

scikit_llm-1.3.1-py3-none-any.whl (49.1 kB view details)

Uploaded Python 3

File details

Details for the file scikit_llm-1.3.1.tar.gz.

File metadata

  • Download URL: scikit_llm-1.3.1.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for scikit_llm-1.3.1.tar.gz
Algorithm Hash digest
SHA256 e0c54446f0bede650df1dc2429a04b8aae02ece2457830fff06c2db805c0ab18
MD5 31c91218be35ee4d25dc8e0d63fc558b
BLAKE2b-256 79fbbae923e603c7e1b9880c37bfe77b29f1cf9d84638cc97189fc4eeb0599ab

See more details on using hashes here.

File details

Details for the file scikit_llm-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: scikit_llm-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 49.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for scikit_llm-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c21490076e788912ee0aaf7626d5ccc92f0d34c9f12ec8b0523649c90b77048
MD5 a04fbedd6d695f4bd2b254ec436369ac
BLAKE2b-256 4cb2717fb9d600f066220847c8c2bfbc9242bb79b0e5506a51642b1cedbae927

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page