CrucibleDeployment

CrucibleDeployment Logo

Platform-agnostic model deployment with progressive rollout strategies, format conversion, and health monitoring

Hex VersionHex DocsLicense


Features

Installation

# mix.exs
{:crucible_deployment, "~> 0.2.1"}

Quick Start

{:ok, deployment} = CrucibleDeployment.deploy(%{
  model_name: "llama-3.1-8b",
  target: :vllm,
  strategy: :canary,
  config: %{endpoint: "https://vllm.internal"}
})

{:ok, status} = CrucibleDeployment.get_status(deployment)

Targets

Targets implement CrucibleDeployment.Targets.Target:

You can register custom targets via configuration:

config :crucible_deployment,
  targets: %{my_target: MyApp.DeploymentTarget}

Strategies

Strategies implement CrucibleDeployment.Strategies.Strategy:

Pass strategy options via :strategy_opts or :canary_config:

CrucibleDeployment.deploy(%{
  model_name: "llama-3.1-8b",
  target: :vllm,
  strategy: :canary,
  strategy_opts: %{steps: [10, 30, 50, 100], evaluation_period: :timer.minutes(2)}
})

Converters

Converters implement CrucibleDeployment.Converters.Converter and support:

{:ok, path} = CrucibleDeployment.convert("/models/checkpoint.bin", :gguf, output_path: "/models/model.gguf")

Health Monitoring

CrucibleDeployment.Health.Monitor performs periodic checks and emits telemetry:

The state machine listens for health alerts and triggers rollback when thresholds are exceeded.

Telemetry

Emitted events include:

Deployment Stages

This package provides Crucible stages for model deployment:

All stages implement the Crucible.Stage behaviour with full describe/1 schemas.

Stage Options

Deploy Stage (:deploy):

Promote Stage (:deployment_promote):

Rollback Stage (:rollback):

Crucible Framework Integration

Stages are available when crucible_framework is present:

If the framework is unavailable, stages return {:error, :crucible_framework_not_available}.

Testing

mix test

Development Notes

License

Internal use.