Skip to main content

LLM fine-tuning and alignment framework for the Kailash platform

Project description

kailash-align

LLM fine-tuning and alignment framework for the Kailash platform. Part of the Kailash Python SDK by the Terrene Foundation.

Overview

kailash-align provides structured LoRA/QLoRA fine-tuning with full lifecycle tracking:

  • AdapterRegistry -- Track adapters from training through evaluation, merge, GGUF export, and deployment
  • AlignmentPipeline -- Thin wrappers around TRL SFTTrainer and DPOTrainer with checkpoint management
  • AlignmentConfig -- Validated configuration dataclasses with NaN/Inf protection

Installation

pip install kailash-align

Optional Extras

pip install kailash-align[rlhf]    # QLoRA via bitsandbytes
pip install kailash-align[eval]    # Model evaluation via lm-eval
pip install kailash-align[serve]   # GGUF export via llama-cpp-python
pip install kailash-align[all]     # All extras

Quick Start

from kailash_align import AlignmentConfig, AlignmentPipeline, AdapterRegistry

# Configure
config = AlignmentConfig(
    base_model_id="meta-llama/Llama-3.1-8B",
    method="sft",
)

# Track adapters
registry = AdapterRegistry()

# Train
pipeline = AlignmentPipeline(config=config, adapter_registry=registry)
result = await pipeline.train(dataset=my_dataset, adapter_name="my-adapter")

# Result includes adapter path, metrics, and registry version
print(result.adapter_path)
print(result.training_metrics)

License

Apache 2.0 -- see LICENSE.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kailash_align-0.3.1-py3-none-any.whl (59.5 kB view details)

Uploaded Python 3

File details

Details for the file kailash_align-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: kailash_align-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 59.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kailash_align-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9211079c15c9039086d003e4c6cf928bb8e1c798aaae4bd2119fe05339b62f96
MD5 0d7c3b2d3835921026c6b7f521536730
BLAKE2b-256 373b95ff06a29dd13b322d8e8299531e9536b1ba29b96daffb1d3da785ffb84c

See more details on using hashes here.

Provenance

The following attestation bundles were made for kailash_align-0.3.1-py3-none-any.whl:

Publisher: publish-pypi.yml on terrene-foundation/kailash-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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