Quickstart

Go from raw data to a fine-tuned, verified, ready-to-run model in minutes.


1. Install

Pick the install path that matches your machine:

Standard Python (pip or uv)

# Linux / WSL2 with an NVIDIA GPU (CUDA 12.x or 13.x, SM 7.5 Turing and newer)
pip install "actuator-train[cuda] @ git+https://github.com/IluvatarLabs/actuator.git"

# Apple Silicon Mac (Apple M1 / Apple M2 / Apple M3 / Apple M4, native MLX)
pip install "actuator-train[mlx] @ git+https://github.com/IluvatarLabs/actuator.git"

# CPU-only or lightweight validation / receipt inspection
pip install "actuator-train @ git+https://github.com/IluvatarLabs/actuator.git"

Using uv:

uv tool install "actuator-train[cuda] @ git+https://github.com/IluvatarLabs/actuator.git"

PyPI note (v0.2.1+): Actuator's PyPI package name is actuator-train (the CLI command remains actuator and Python imports remain import actuator). Once v0.2.1 is published to PyPI, pip install "actuator-train[cuda]" and pip install "actuator-train[mlx]" also work directly.

Add optional features anytime without rebuilding your environment:

Extra Adds
cuda Model-agnostic Triton kernels, 4-bit NF4 (bitsandbytes), flash-linear-attention, torchao
mlx Native Apple Silicon training and evaluation (mlx-lm, mlx-lm-lora)
rl vLLM rollout generation, math-verify, and agentic RL environments
documents PDF, DOCX, Markdown, and text extraction (markitdown)
unsloth Optional Unsloth engine (--engine unsloth, text and vision)
merge Model merging (actuator merge via mergekit)
heretic Refusal removal (actuator abliterate via heretic)
vllm-export FP8 and W4A16 serving quantization (llm-compressor)
app FastAPI + SSE local server and browser Web UI (actuator ui)

Prefer a single guided script that detects CUDA, ROCm, or Apple Silicon automatically?

git clone https://github.com/IluvatarLabs/actuator.git
cd actuator
sh scripts/install.sh --source .
source actuator-env/bin/activate

Verify your setup and see which models fit your hardware:

actuator doctor

2. Bring Your Data (As It Is)

Actuator reads JSONL, JSON, CSV, Parquet, plain text, PDFs/DOCX, images, and Hugging Face datasets directly. Formats are detected automatically:

  • Prompt / completion: {"prompt": "...", "completion": "..."}
  • Multi-turn chat (messages): {"messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}
  • ShareGPT, Alpaca, Dolly: recognized without manual templates
  • Vision (images + chat): rows with image / images columns (PIL images or file paths)
  • Preference pairs (DPO / ORPO): {"prompt": "...", "chosen": "...", "rejected": "..."}
  • Binary feedback (KTO): {"prompt": "...", "completion": "...", "label": true}
  • Prompts for RL (GRPO): {"prompt": "...", "solution": "..."} or a built-in environment

Map non-standard column names with --columns question=prompt,answer=completion, or mix multiple sources with --mix-weights 0.7,0.3:

actuator train domain.jsonl general.jsonl --mix-weights 0.7,0.3 --model Qwen/Qwen3-4B

Turn a folder of PDFs, Word files, or Markdown docs into training rows first:

actuator data generate doc-spec.yaml --documents ./company-docs --out ./doc-qa
actuator train ./doc-qa/generated.jsonl --model Qwen/Qwen3-4B

Inspect how rows are parsed and which tokens receive loss before training:

actuator data validate my-data.jsonl --model Qwen/Qwen3-4B

3. Train in One Command

actuator train my-data.jsonl --model Qwen/Qwen3-4B --out runs/my-first-run

What happens inside a single process:

  1. Auto-fit & recipe generation: Actuator detects your data shape and method, estimates memory generically from the model's config.json, applies coherent defaults, and writes a plain recipe.yaml inside runs/my-first-run/.
  2. Held-out split: Holds back 10% of distinct rows unseen for the Verdict (skipped automatically below 30 rows or with --no-eval).
  3. Single-process baseline scoring (--eval fast): Loads the model once in target precision (4-bit NF4 for QLoRA, bf16 for LoRA), scores unseen rows with the adapter disabled, and records greedy baseline replies (~5–15 seconds, zero extra VRAM).
  4. Training with rolling checkpoints: Runs the native trainer with Actuator's model-agnostic fast path and saves rolling checkpoints automatically (save_total_limit: 2).
  5. Trained scoring & Verdict: Re-enables the adapter in-process, scores the exact same unseen rows, checks greedy replies for EOS termination and repetition loops, saves your adapter, and prints the Verdict.

Preview the generated recipe and memory estimate without touching disk or training:

actuator train my-data.jsonl --model Qwen/Qwen3-4B --dry-run

4. Reading the Verdict

actuator explain runs/my-first-run --plain

Actuator reports: - Paired improvement & uncertainty: Exact McNemar test for pass/fail checks; Wilcoxon signed-rank test + paired bootstrap 95% CI on mean delta for continuous loss/margin scores. - Generation health check: Automatic EOS-termination and n-gram repetition-loop detection on greedy held-out generations. A looping or non-terminating model is flagged immediately even if teacher-forced loss dropped. - Advisory by default: Your model is always saved so you can inspect and chat with it. Pass --strict-gate in CI/automation to block export and return exit code 2 on significant regression.

Evaluation Modes

Flag Behavior When to use
--eval fast (default) In-process disable_adapter() / enable_adapter() scoring + greedy EOS/loop check Everyday training and fast iteration
--eval strict Fresh-process scoring of serialized merged/quantized artifact + SHA-256 receipt Release certification and audits
--eval judge:<model> Blind position-swapped pairwise LLM judge on unseen generations Open-ended writing, tone, and style tasks
--canary Adds a 50-item general-capability canary alongside held-out scoring Guarding against catastrophic forgetting
--no-eval Trains on 100% of rows with zero evaluation overhead Rapid prototyping or external eval pipelines

5. Chat, Compare & Resume

Talk to your trained model or compare it side-by-side against the untouched base model (loaded once with instant adapter toggling):

actuator chat runs/my-first-run/export-native --compare

Add --image photo.jpg for vision models, or --thinking / --no-thinking for reasoning models.

Interrupted a long run? Resume cleanly from the latest rolling checkpoint:

actuator resume runs/my-first-run --out runs/my-first-run-cont

Next Steps