Skip to main content

🚂 Fine-tune OpenAI models for text classification, question answering, and more

Project description

opentrain

🚂 Fine-tune OpenAI models for text classification, question answering, and more


opentrain is a simple Python package to fine-tune OpenAI models for task-specific purposes such as text classification, token classification, or question answering.

Usage

import openai
from opentrain.train import OpenAITrainer
openai.api_key = "<ADD_OPENAI_API_KEY_HERE>"
trainer = OpenAITrainer(model="ada")
trainer.train(
    [
        {
            "prompt": "I love to play soccer ->",
            "completion": " soccer",
        },
        {
            "prompt": "I love to play basketball ->",
            "completion": " basketball",
        },
    ],
)

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

opentrain-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

opentrain-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file opentrain-0.0.1.tar.gz.

File metadata

  • Download URL: opentrain-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for opentrain-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6db3288acc5a5d4ac4b0123a5288958bbead33adb5b536fd0f6dbafa43450892
MD5 1557474ba23dd0fa3a90e2541969ed20
BLAKE2b-256 87e17f157935dcc7fd5940e4be1ebe5e81970f937ad45ceb6014f8cb1e45a73a

See more details on using hashes here.

File details

Details for the file opentrain-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: opentrain-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for opentrain-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09588fe8a3e1335850e3fa2368cfcd871e0d25812265900b1070ed7f05cd9615
MD5 7730df142a6ab16b434212977c4c3ed2
BLAKE2b-256 2cabf86bd2bd26e89a4b5ecdff50298e1dc34c24b4391561e886f150f9e5823d

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