Skip the YAML

Use the in-browser wizard to build your config in 3 minutes.

Pick your use case, base model, dataset, and EU AI Act risk tier. The wizard writes a working quickstart-generated.yaml you can run with one command — no fine-tuning expertise required.

Or follow the 5-step guide
9 guided steps Live YAML preview EU AI Act presets

Or follow the manual 5-step reference below

1

Install

Python 3.10+ on Linux or macOS.

terminal
$ pip install forgelm==0.6.0

# or with extras (pick what you need)
$ pip install 'forgelm[ingestion]==0.6.0'          # PDF/DOCX/EPUB ingest
$ pip install 'forgelm[ingestion-scale]==0.6.0'    # MinHash LSH for >50K rows
$ pip install 'forgelm[export]==0.6.0'             # GGUF export

# sanity-check your environment before the first run
$ forgelm doctor
 Python 3.11.7  ·  CUDA 12.1  ·  bitsandbytes ok  ·  disk 142 GB free
2

Pick a template — or bring your own YAML

Bundled templates ship as YAML for SFT, customer support, code copilot, and more.

terminal
$ forgelm quickstart --list
  code-assistant       Code-completion fine-tune (SFT)
  customer-support     Multi-turn helpful + safe (SFT)
  domain-expert        PDF/DOCX corpus → domain Q&A (SFT)
  grpo-math            Step-by-step math reasoning (GRPO)
  medical-qa-tr        Turkish medical Q&A (SFT)

$ forgelm quickstart customer-support --dry-run
# renders configs/quickstart-customer-support.yaml — open it, edit it, own it.
3

Audit your data first

A leaky train/test split is the most expensive bug you can ship.

terminal
# have raw documents? Ingest first. --all-mask is shorthand for
# --secrets-mask --pii-mask (the documented combined-scrub flow).
$ forgelm ingest ./policies/ --recursive --strategy markdown \
    --all-mask --output data/policies.jsonl

# then audit (PII / secrets / leakage / quality / language). Add
# --croissant for a Google Croissant 1.0 dataset card; --pii-ml for
# Presidio NER on top (needs `forgelm[ingestion-pii-ml]` extra).
$ forgelm audit data/policies.jsonl --output ./audit/

$ jq '.pii_summary, .near_duplicate_pairs, .cross_split_overlap' \
     ./audit/data_audit_report.json
4

Validate, fit-check, then train

--dry-run proves the YAML is valid. --fit-check verifies VRAM budget.

terminal
$ forgelm --config configs/quickstart-customer-support.yaml --dry-run
 config validates
 datasets reachable
 tokenizer downloadable

$ forgelm --config configs/quickstart-customer-support.yaml --fit-check
FITS  est. peak 11.4 GB / 12 GB available

$ forgelm --config configs/quickstart-customer-support.yaml
# …45 minutes later…
 finished, exit 0 — checkpoints/customer-support/ (staging if human_approval set)

# verify the audit chain + approve the staged checkpoint
$ forgelm verify-audit ./checkpoints/customer-support/audit_log.jsonl
 audit_log.jsonl chain valid (47 events, HMAC ok)

$ forgelm approvals --pending --output-dir ./checkpoints/customer-support  # list pending stagings
$ forgelm approve <run-id> \
    --output-dir ./checkpoints/customer-support \
    --comment "benchmark + safety floors met, reviewed model card"
 promoted to ./checkpoints/customer-support/ — audit event emitted
5

Chat, export, deploy

Sanity-check the model in the streaming REPL, then quantize or generate a deployment config.

terminal
$ forgelm chat ./checkpoints/customer-support
forgelm> how do I cancel my subscription?
…streaming response…

$ forgelm export ./checkpoints/customer-support \
    --output model.gguf --quant q4_k_m

$ forgelm deploy ./checkpoints/customer-support \
    --target ollama --output ./Modelfile

 Modelfile written. Run: ollama create my-bot -f ./Modelfile

Prefer a guided wizard?

Skip the YAML — the in-browser wizard walks through trainer choice, model, dataset, LoRA rank, and evaluation gates, then writes a working config you can run with one command.