Training jobs run LoRA fine-tuning on a base model using documents from one of your knowledge bases. Jobs run in the background and produce a model artifact you can register in the gateway catalog for deployment.

API

MethodPathAuthDescription
GET/admin/training-jobsadminList training jobs
POST/admin/training-jobsdeployer.training.manageCreate a training job
GET/admin/training-jobs/{id}adminGet job details and status
POST/admin/training-jobs/{id}/canceldeployer.training.manageCancel a pending or running job
POST/admin/training-jobs/{id}/registerdeployer.models.manageRegister completed artifact in the model catalog

Create a training job

curl -X POST http://localhost:8180/admin/training-jobs \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-lora",
    "base_model": "meta-llama/Llama-3-8b",
    "dataset_kind": "kb",
    "dataset_ref": "<kb-id>",
    "target": "kubernetes"
  }'

Execution targets

Submits a torchtune-style training job to your Kubernetes cluster. ManyLayers polls job status and records the artifact URI when the job completes.

Job lifecycle

Register a completed model

After a training job succeeds, register the artifact in the gateway model catalog:
curl -X POST http://localhost:8180/admin/training-jobs/$JOB_ID/register \
  -H "Authorization: Bearer $ADMIN_KEY"
This creates a new logical model named <base-model>-lora-<job-id[:8]> that you can then deploy via POST /admin/deployments.

Admin UI

View and manage training jobs in the Admin sidebar under Training. The list shows job status, progress percentage, artifact URI, and action buttons — Register for completed jobs, Cancel for pending or running ones.