ALL INTELLIGENCE
Hacker News AIT2·Tools

Songe Trains Local Models on Idle Compute While You Work

Original title: A training engine for your local model, using your idle compute
62AI Score

Songe is a local training engine that plugs into your everyday model via OpenAI-compatible tools like opencode or pi, learning from tool results, errors and your corrections whenever the agent goes quiet. It offers Quick Dream and Deep Dream modes, promotes a new version only if it performs better on your own conversations, and runs fully offline with no account or telemetry.

Full Report

Contents4 sections

A training engine for your local model, using your idle compute.

Install • How it works • Commands • Roadmap • Discord • Website

Use your local model as usual through opencode, pi or any OpenAI-compatible tool. While you work, Songe notices what happens after each of the model's actions: the tool result, the error, your next message. When your agent is quiet, it teaches the model to see those coming. A new version is used only if it passes its checks, and nothing ever leaves your machine.

✨ Highlights

  • Learns from how you work. Your corrections, stated preferences and the tools' errors become lessons for your own model.
  • Two kinds of Dreams. A Quick Dream adds your preferences to the model's instructions in minutes; a Deep Dream trains the model itself while you are away.
  • Safe by default. A new version is used only if it does better on your own conversations; one click goes back to any earlier version.
  • Stays out of the way. Runs only when your agent is quiet, memory is free and the battery is fine, and stops the moment you are back.
  • Private. No account, no telemetry, no cloud. Songe never runs your tools.

📥 Install

With uv or pipx (Python 3.11 or later):

BASH
uv tool install songe        # or: pipx install songe
songe init

No uv or pipx yet? Either installs in one line:

BASH
curl -LsSf https://astral.sh/uv/install.sh | sh    # uv (or: brew install uv)
brew install pipx                                  # pipx on macOS (Debian/Ubuntu: sudo apt install pipx)

Both give Songe its own environment in a lasting place, which its background service needs.

macOS with Homebrew:

BASH
brew tap sous-labs/tap
brew trust sous-labs/tap     # newer Homebrew asks this once
brew install songe
songe init

songe init finds your model server and your agents, shows what it will change, and asks once:

BASH
$ songe init

  Models    3 from LM Studio, listed under Songe
  Agent     opencode → Songe models · default granite-4.2-3b-MLX-4bit
  Agent     pi → Songe models · choose one with /model
  Data      ~/Library/Application Support/songe
  Service   starts at login
  Learning  new conversations · starts when idle
  Replace   loaded copy when a better version is ready

Install? (Y/n)

Then pick a Songe model in your agent (opencode lists them as songe/songe/<name>), and work as usual.

<details> <summary>Plain pip, and what you need</summary>

pip install songe works inside a virtual environment; outside one, Homebrew's and most Linux distributions' Python refuse it.

You need a model served locally, and an agent:

SupportedTested end to end
Model serversLM Studio, vLLM, Ollama, llama.cpp, mlx-lmLM Studio (macOS), vLLM (Linux)
Agentsopencode and pi (set up for you); any OpenAI-compatible toolopencode, pi
TrainingApple Silicon (MLX); NVIDIA and AMD (PyTorch)Apple Silicon, NVIDIA

Machines without a GPU still serve and record, but do not train. Tried Songe on another setup? Share the result on the testing board.

</details>

🌙 How it works

TEXT
 your agent ──► Songe (127.0.0.1:7613) ──► your model server
                   │ records what happened
                   ▼
            when you are away: a Dream
   read lessons ─► practice ─► train ─► check ─► use only if better
Quick DreamDeep Dream
Takesa few minutesan hour or more
Doesadds the preferences you stated or showed to the model's instructionswrites practice from your lessons and trains a small adapter on it
You seeeach new preference, with a before/after where the answer changeswhy the new version was or was not used
Undoundo the Quick Dream, or remove one preferencego back to any earlier version

With auto-dream on, Dreams start when your agent has been quiet for a while. Or press Dream in the dashboard (songe open). A Dream never just disappears: it keeps going on the page, or says why it stopped.

<details> <summary>How it learns, in more detail</summary>
  • Reading. Songe reads each conversation for the moments that teach something: your corrections and stated rules, retries, tool errors.
  • Practice. For each lesson your model writes short practice scenes in your agent's own tools. Your real conversations are never trained on.
  • Training. The model as it was, shown the lesson, is the teacher; the same model with a small adapter, shown only the scene, is the student (on-policy distillation). Earlier skills are rehearsed so they stay.
  • Checking. At the moments you reacted to, the version in use and the new one each answer, and a judge compares what they do. The new version is used only if it does clearly better, does not change what already worked, and its answers stay healthy.

Before the first training Songe measures how much your computer can learn at once, and trains on what fits. See DESIGN.md.

</details>

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)