Workflow

A deterministic path from source data to deployable SLM artifact.

BrewSLM turns model development into a repeatable runbook. Each stage emits explicit inputs, outputs, and checks so teams can inspect and improve the system without guessing.

Lifecycle Map

Stage-level execution model

01

Source Ingestion

Input: local files, URL, HF, Kaggle

Output: versioned raw dataset snapshot

Guardrail: malformed record and empty-split detection

02

Schema Normalization

Input: raw records + mapping config

Output: canonical training schema

Guardrail: field coverage and label-shape verification

03

Contract Preflight

Input: task type + model candidates + runtime profile

Output: pass/fail launch readiness report

Guardrail: capability, dependency, and memory-fit checks

04

Benchmark Sampling

Input: candidate models + sampled project data

Output: ranked model shortlist with metrics

Guardrail: score confidence floor and run reproducibility tags

05

Training Launch

Input: selected model + generated train plan

Output: checkpoints + incremental eval metrics

Guardrail: budget cap, early-stop, and retry strategy

06

Run Observability

Input: logs, metrics, worker heartbeats

Output: run timeline and issue diagnostics

Guardrail: stalled worker and metric regression alerts

07

Artifact Packaging

Input: best checkpoint + metadata + eval summary

Output: deployable artifact bundle

Guardrail: version trace and checksum validation

08

Delivery + Iteration

Input: exported bundle + serving target profile

Output: release candidate and next-run backlog

Guardrail: release gate by benchmark and drift policy

Artifact Ledger

What gets produced, where, and why it matters

Artifact Produced At Used By Purpose
Raw Snapshot Ingest Mapper, audits Preserves original source state for replay
Canonical Dataset Normalize Preflight, benchmark, train Stable schema for deterministic downstream steps
Preflight Report Contract Check Launch gate Blocks incompatible runs before compute spend
Benchmark Summary Benchmark Model selection Data-backed candidate ranking
Train Plan Train Launch Worker runtime Defines training config with traceability
Checkpoint Set Training Exporter, evaluation Captures recoverable model state
Export Bundle Packaging Serving stack Deploy-ready model with metadata

Operational Gates

Hard stops that prevent avoidable failure modes

Gate A: Data Integrity

Reject launches when mapping coverage, label validity, or split quality drops below threshold.

Gate B: Capability Match

Reject task/model pairs that fail compatibility contracts or runtime requirements.

Gate C: Benchmark Floor

Reject long training jobs when candidates fail minimum sampled quality criteria.

Gate D: Release Readiness

Reject export promotion when final metrics regress against previous accepted runs.

Workflow Starter

Run the full lifecycle in practical order

$ ./brewslm project create --name workflow-demo --template general

$ ./brewslm dataset import --project 1 --sample general-chat-v1

$ ./brewslm preflight --project 1 --task causal_lm --plan

$ ./brewslm train --project 1 --autopilot --one-click

$ ./brewslm export --project 1 --format huggingface --target vllm

$ ./brewslm optimize --project 1 --target mobile_iphone15