Local language models provide complete privacy, zero inference subscriptions, and fast response times, but they remain frozen in time once downloaded. When a developer corrects a local coding model on custom APIs, internal naming conventions, or project architectures, those corrections vanish the moment the context window closes. Repeating the same behavioral corrections day after day frustrates developers who expect modern tools to adapt to their workflow.
Songe (sous-labs/songe) solves this persistent divergence by turning workstation idle time into automated fine-tuning sessions. Built by Sous Labs as an open-source background daemon, Songe intercepts agent traces, tracks developer corrections, and initiates background Low-Rank Adaptation (LoRA) fine-tuning when the host machine is quiet. By combining automated idle detection, native acceleration via MLX on macOS and PyTorch on Linux/Windows, and strict held-out evaluation gates, Songe enables local models to continuously learn without user intervention.
The Core Dilemma of Local Coding Models
Every developer using local LLMs through frameworks like Ollama, LM Studio, or vLLM faces a stark tradeoff:
- Context Window Stuffing: Developers inject custom coding rules, system prompts, and library conventions into system instructions. This wastes context window tokens on every prompt, slows Time-to-First-Token (TTFT), and frequently degrades reasoning performance as prompts expand.
- Manual Dataset Preparation and LoRA Fine-Tuning: Extracting conversation logs, formatting JSONL training pairs, configuring hyper-parameters, and running training scripts requires significant time and machine learning expertise.
- Hardware Contention: Running local training scripts on a primary development machine consumes 100% of GPU compute and memory bandwidth, freezing user interfaces and interrupting active coding sessions.
Songe eliminates this manual friction by automating the complete data collection, training, and model replacement lifecycle in the background.
How Songe Structures Background Learning: Quick Dreams vs Deep Dreams
Songe organizes learning into two distinct execution tiers: Quick Dreams and Deep Dreams.
| Learning Tier | Execution Window | Technique Used | Resource Impact | Adaptation Target |
|---|---|---|---|---|
| Quick Dream | 1 to 3 minutes | In-context steering and prompt adjustment | Negligible CPU/RAM | Immediate behavioral preferences and rule tweaks |
| Deep Dream | 15 to 90 minutes (idle) | Parameter-efficient fine-tuning (LoRA) | Full idle GPU/NPU utilization | Core weights, syntax patterns, and library APIs |
Quick Dreams: Immediate Preference Alignment
Quick Dreams execute almost immediately after a session completes. When you correct an AI agent, Songe logs the negative generation alongside the user correction. The Quick Dream process analyzes these interaction traces and updates a lightweight steering prompt or system patch. If you tell the agent to stop generating deprecated React 18 patterns, the Quick Dream registers that constraint without waiting for a full weight training run.
Deep Dreams: Parameter-Efficient Fine-Tuning on Idle Compute
Deep Dreams execute only when the host computer enters a verified idle state. Songe continuously inspects system metrics:
- User Activity: Keyboard and mouse input must be idle for a configurable duration (default: 15 minutes).
- Process Activity: System CPU and GPU utilization must remain below configured thresholds.
- Power and Battery Health: On laptops, Deep Dreams pause immediately if the device runs on battery power or if battery levels fall below safe thermal limits.
- Memory Headroom: Songe verifies that sufficient unified memory or VRAM is available before loading training tensors.
If a developer returns to the workstation and moves the mouse or begins typing, Songe instantly pauses the training loop, checkpoints intermediate optimizer states to disk, and yields memory back to the operating system.
Hardware Sizing and Framework Engines: MLX vs PyTorch
To support diverse hardware setups without forcing users to configure complex CUDA environments manually, Songe abstracts hardware acceleration across two primary backends:
+-----------------------------------------------------------+
| Songe Daemon Engine |
| (Activity Monitor, Memory Guard, Checkpoint Controller) |
+-----------------------------+-----------------------------+
|
+---------------+---------------+
| |
v v
+-------------------+ +-------------------+
| MLX Engine | | PyTorch Engine |
| (Apple Silicon) | | (NVIDIA/AMD GPUs) |
+-------------------+ +-------------------+
| Unified Memory | | Dedicated VRAM |
| 4-bit/8-bit LoRA | | BitsAndBytes QLoRA|
| Zero-Copy Weights | | CUDA / ROCm Ops |
+-------------------+ +-------------------+
Apple Silicon Acceleration via Apple MLX
On macOS, Songe defaults to Apple’s native MLX framework. Because Apple Silicon features high-bandwidth unified memory architecture (ranging from 18 GB on base M-series chips to 128 GB+ on Max and Ultra variants), MLX loads quantized model weights directly into unified RAM without expensive host-to-device bus transfers. Songe applies 4-bit LoRA adapter training directly to popular architectures such as Qwen 2.5 Coder, Llama 3.3, and DeepSeek, maintaining minimal memory overhead.
Linux and Windows Acceleration via PyTorch and QLoRA
On Linux and Windows systems equipped with NVIDIA GPUs, Songe leverages PyTorch combined with bitsandbytes 4-bit quantization (QLoRA). The engine automatically detects available CUDA compute capability, allocates memory paging to avoid out-of-memory (OOM) crashes, and offloads non-critical optimizer states to system RAM when VRAM limits are tight. AMD ROCm support is similarly supported on Linux hosts equipped with modern Radeon or Instinct hardware.
Safety Gates, Benchmarking, and Instant Rollback
The most dangerous failure mode of continuous automated fine-tuning is catastrophic forgetting or reward hacking, where a model improves on specific niche tasks but loses its general coding, reasoning, and instruction-following abilities.
Songe mitigates this risk through an automated validation gate:
[Idle Training Completed]
|
v
[Automated Evaluation Gate]
- General reasoning benchmark pass?
- Syntax correctness test pass?
- Regression check on held-out tasks pass?
|
+----+----+
| |
[Yes] [No]
| |
v v
[Promote to] [Discard Checkpoint]
[Active Model] (Zero Risk to Base Weights)
- Held-Out Validation Tasks: Before promoting newly trained LoRA weights to the active model server, Songe evaluates the candidate adapter against a held-out evaluation set containing standard coding problems, syntax verification tests, and general language reasoning tasks.
- Quality Threshold Enforcement: If the candidate adapter exhibits performance regressions exceeding 1.5% on baseline tasks, Songe discards the checkpoint and flags the training trace for developer inspection.
- Single-Command Rollback: If an updated model exhibits subtle hallucinations during daily use, developers can execute:
songe undo
This command instantly restores the previous known-good adapter checkpoint without requiring model redownloads or full re-initialization.
Quickstart: Setting Up Songe
Setting up Songe requires a modern Python environment (Python 3.11+) and an active local model server.
Installation via uv or Homebrew
On macOS using Homebrew:
brew tap sous-labs/tap
brew install songe
songe init
On Linux or Windows using uv:
uv tool install songe
songe init
The songe init command detects installed local model runtimes (such as Ollama, LM Studio, or vLLM), inspects available system memory, and registers a background daemon that runs during system idle periods.
Configuring Interaction Trace Logging
To feed developer corrections into Songe, configure your coding agent or terminal environment to log prompts and tool responses into Songe’s local spool directory:
songe status
Output:
Songe Daemon: Active (Idle Detection Enabled)
Engine: MLX (Apple M4 Max, 64 GB Unified Memory)
Active Model: Qwen2.5-Coder-14B-Instruct-4bit
Queued Interactions: 14 traces
Pending Training: Deep Dream scheduled for next idle window (>15 min)
Last Rollback Point: 2026-11-24 22:15 UTC (Pass rate: 98.4%)
When to Use Songe (and When to Avoid It)
| Scenario | Recommendation | Rationale |
|---|---|---|
| Monorepo with proprietary APIs | Highly Recommended | Adapts local coding models to internal patterns without cloud data exposure. |
| Repetitive styling and linting fixes | Highly Recommended | Eliminates the need to repeat styling rules in system prompts. |
| Low-power laptops with <16 GB RAM | Not Recommended | Deep Dream training requires at least 8 GB of free memory headroom. |
| Heavily dynamic, shifting codebases | Use with Caution | Rapidly changing APIs may cause training data to contradict active code. |
Key Takeaways for Developers
- Continuous Personalization: Songe transforms static local LLMs into self-improving tools that adapt to personal coding habits and team standards.
- Zero Workday Disruption: Idle compute scheduling ensures training occurs exclusively during breaks, overnight, or when the workstation is unused.
- Guaranteed Safety: Strict evaluation gates and instant rollback (
songe undo) prevent catastrophic degradation of general coding intelligence. - Completely Private: All interaction traces, adapters, and model weights remain strictly on local disk with zero external network dependencies.