Skip to content

Fine-tune a local model on your data

Problem: you want maximum semantic fidelity from a model that learned your data — without sending that data anywhere.

Solution:

Terminal window
pip install "dbsprout[llm]" # plus a backend: Unsloth (CUDA) or MLX (Apple Silicon)
# Sample → serialize → fine-tune, end to end
dbsprout train --db postgresql://localhost/myapp \
--sample-rows 1000 --epochs 3 --output .dbsprout
# Generate using the merged GGUF adapter the pipeline produced
dbsprout generate --engine spec --lora ./.dbsprout/adapter.gguf

Why it works: train extracts a stratified sample, serializes it GReaT-style, and QLoRA fine-tunes a small local model (CUDA or Apple MLX, auto-detected), emitting a merged GGUF adapter. PII values are redacted before serialization by default; pass --no-pii-redaction only for non-sensitive data. See the Training Pipeline guide for the full workflow and differential-privacy options.