Skip to main content

A Large Language Model Fine-tuning package. The package uses a single line to fine-tune an LLM by taking care of all the boilerplate in the backend.

Project description

🔥 One Line LLM Tuner

Fine-tune a Large Language Model (LLM) in a single line.

Overview

one-line-llm-tuner is a Python package designed to simplify the process of fine-tuning large language models (LLMs) like GPT-2, Llama-2, GPT-3 and more. With just one line of code, you can fine-tune a pre-trained model to your specific dataset. Consider it as a wrapper for transformers library, just like how keras is for tensorflow.

Features

  • Simple: Fine-tune models with minimal code.
  • Supports Popular LLMs: Works with models from the transformers library, including GPT, BERT, and more.
  • Customizable: Advanced users can customize the fine-tuning process with additional parameters.

Installation

You can install one-line-llm-tuner using pip:

pip install one-line-llm-tuner

Usage

The PyPI package can be used in the following way after installation.

from one_line_llm_tuner.tuner import llm_tuner

fine_tune_obj = llm_tuner.FineTuneModel()

fine_tune_obj.fine_tune_model(input_file_path="train.txt")

fine_tune_obj.predict_text("Elon musk founded Spacex in ")

Contributing

We welcome contributions! Please see the contributing guide for more details.

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.

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

one_line_llm_tuner-0.0.13.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

one_line_llm_tuner-0.0.13-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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