Songe is a local training engine that fine-tunes models on a user's machine using idle compute, integrating with LM Studio, vLLM, Ollama, llama.cpp, and mlx-lm as model servers and opencode, pi, or any OpenAI-compatible tool as agents. It operates a background service on 127.0.0.1:7613 that records interactions — corrections, stated preferences, retries, and tool errors — during active sessions. When the agent is idle, memory is free, and battery conditions allow, Songe initiates two training modes: Quick Dream, which distills preferences into model instructions within minutes, and Deep Dream, which performs on-policy distillation by generating practice scenes from lessons and training a small adapter for an hour or more. The teacher model (current version) and student model (with adapter) are evaluated at reaction points by a judge; the new version replaces the old only if it performs clearly better, preserves existing capabilities, and maintains healthy outputs. Training runs on Apple Silicon via MLX and NVIDIA/AMD via PyTorch; CPU-only machines serve and record but do not train. Data stays in ~/Library/Application Support/songe (macOS), $XDG_DATA_HOME/songe (Linux), or %LOCALAPPDATA%\songe (Windows), with learned versions stored separately in LM Studio's models folder. Commands include songe init, songe sleep, songe open, songe undo, and songe doctor. Licensed Apache-2.0.

Read original