integrations.hatchery.plugin

integrations.hatchery.plugin

Axolotl plugin that routes training to a remote Hatchery/Tinker API.

Classes

Name Description
HatcheryPlugin Plugin that replaces local training with remote API calls.

HatcheryPlugin

integrations.hatchery.plugin.HatcheryPlugin()

Plugin that replaces local training with remote API calls.

Activated by adding to the axolotl YAML:

plugins:
  - axolotl.integrations.hatchery.HatcheryPlugin

hatchery:
  backend: tinker  # or "hatchery"
  lora_rank: 32
  loss_fn: cross_entropy
  # ... see HatcheryConfig for full options

Methods

Name Description
get_trainer_cls Return the appropriate remote trainer class.
post_trainer_create Inject hatchery config + axolotl training params into the trainer.
pre_model_load Replace model loading with a tiny stub.
register Auto-set config values needed for remote training.
get_trainer_cls
integrations.hatchery.plugin.HatcheryPlugin.get_trainer_cls(cfg)

Return the appropriate remote trainer class.

post_trainer_create
integrations.hatchery.plugin.HatcheryPlugin.post_trainer_create(cfg, trainer)

Inject hatchery config + axolotl training params into the trainer.

pre_model_load
integrations.hatchery.plugin.HatcheryPlugin.pre_model_load(cfg)

Replace model loading with a tiny stub.

register
integrations.hatchery.plugin.HatcheryPlugin.register(cfg)

Auto-set config values needed for remote training.