LLM-Finetuning-Toolkit  by georgian-io

CLI tool for LLM finetuning, ablation, and unit testing

created 2 years ago
850 stars

Top 42.9% on sourcepulse

GitHubView on GitHub
Project Summary

This toolkit provides a config-based CLI for fine-tuning, ablating, and unit-testing open-source LLMs. It targets researchers and developers needing to manage complex LLM experimentation pipelines efficiently, offering a unified YAML configuration for prompts, models, optimization, and testing.

How It Works

The toolkit uses a YAML configuration file to define and execute LLM fine-tuning experiments. It supports various data sources (Hugging Face datasets, JSON, CSV) and allows custom prompt templating. Model configuration includes Hugging Face checkpoints, quantization (4-bit via bitsandbytes), and LoRA parameters. Flash Attention 2 can be enabled for performance gains. The system automatically manages experiment artifacts and allows for resuming interrupted runs.

Quick Start & Requirements

  • Install via pipx install llm-toolkit or pip install llm-toolkit.
  • For Flash Attention 2: pipx inject llm-toolkit flash-attn --pip-args=--no-build-isolation or pip install flash-attn --no-build-isolation.
  • Basic run: llmtune generate config followed by llmtune run ./config.yml.
  • Requires Python, Hugging Face libraries, and potentially CUDA-enabled GPUs for efficient fine-tuning.

Highlighted Details

  • Config-driven experimentation for prompts, LLMs, and LoRA parameters.
  • Supports quantization (4-bit) and Flash Attention 2.
  • Includes Quality Assurance (QA) metrics for evaluating fine-tuned models.
  • Automatic artifact management and experiment resumption.

Maintenance & Community

Contributions are welcome. Further community and roadmap details are not explicitly provided in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The README does not specify a license, which may impact commercial adoption. Detailed documentation on specific model compatibility beyond examples (Llama2, Mistral, Falcon) is not provided.

Health Check
Last commit

9 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
18 stars in the last 90 days

Explore Similar Projects

Starred by Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake).

HALOs by ContextualAI

0.3%
873
Library for aligning LLMs using human-aware loss functions
created 1 year ago
updated 2 weeks ago
Feedback? Help us improve.