中文

LLM Finetuning Toolkit

A config-based CLI tool for launching a series of LLM fine-tuning experiments on your data and gathering their results.

Verified

Core facts

Read by a script from the official API, not rewritten by a model.

License
Apache-2.0
Languages
Python
Maintainer
georgian-io
Verified

What it is

LLM Finetuning toolkit is a config-based CLI tool for launching a series of LLM fine-tuning experiments on your data and gathering their results. The configuration file defines the behavior of the toolkit. The configuration file is written in YAML format and consists of several sections that control aspects such as data ingestion, model definition, training, inference, and quality assurance.

Main features

  1. The configuration file can be altered to support running ablation studies.

  2. The configuration file can specify different prompt templates to experiment with while fine-tuning.

  3. The configuration file can specify various LLMs to experiment with.

  4. The configuration file can specify different configurations of LoRA to ablate over.

  5. Each unique configuration generates a unique hash, so that the tool can pick up where it left off.

  6. For example, if you need to exit in the middle of the training and relaunch the script, the program automatically loads the existing dataset that has been generated, instead of doing it all over again.

  7. Users can add tests that check if the desired behaviour is being attained.

  8. As an example, for an LLM fine-tuned for a summarization task, the tests may check whether the generated summary is indeed smaller in length than the input text.

Getting started

  1. pipx installs the package and dependencies in a separate virtual environment.

  2. The Basic stage is to run the first LLM fine-tuning experiment.

  3. The Intermediate stage is to run a custom experiment by changing the components of the YAML configuration file.

  4. The Advanced stage is to launch a series of fine-tuning experiments across different prompt templates, LLMs and optimization techniques through one YAML configuration file.

  5. The config file can also ingest your own data.

From the README · shell
pipx install llm-toolkit
From the README · shell
pip install llm-toolkit
From the README · shell
llmtune generate config
llmtune run ./config.yml
From the README · shell
python toolkit.py --config-path <path to custom YAML file>

Who it is for

Fine-tuning workflows typically involve running ablation studies across various LLMs, prompt designs and optimization techniques. The prompt fields help create instructions to fine-tune the LLM on. The prompt fields use both prompt and prompt_stub during fine-tuning.

During testing, only the prompt section is used as input to the fine-tuned LLM. The parameters for LoRA, such as the rank r and dropout, can be altered. The project says the toolkit provides a modular and extensible architecture that allows developers to customize and enhance its functionality.

The project says each component of the toolkit, such as data ingestion, fine-tuning, inference, and quality assurance testing, is designed to be easily extendable.

Sources

This page is written from the official sources below. Open them to check the original text.

Verified ·

This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.