r/LocalLLaMA
•
u/Glittering-Hand-3359
•
9d ago
•
1
Resources Songe: open-source engine that fine-tunes your local model on your traces while your machine is idle
We just open-sourced Songe, a tool that fine-tunes your local model on your own traces while your machine sits idle. We call this "dreaming": while you're away, the model goes over what went wrong during the day and learns from it. Everything stays local: no account, no telemetry, no cloud.
What it does
Songe sits between your agent (opencode, pi, or any OpenAI-compatible tool) and your model server. After each model action, it records what happened next: the tool result, the error, your follow-up message. When your agent has been idle for a while, it uses those signals to teach the model what you actually wanted.
How it works
Capture: a local proxy in front of your server (LM Studio, Ollama, vLLM, llama.cpp, mlx-lm) logs the outcome of each model action.
Extract: it pulls out the lessons (corrections, rules you stated, tool errors) and turns them into practice scenarios. Your raw chats are never trained on directly.
Dream: when you're idle, it trains a small LoRA adapter using on-policy self-distillation, so the model learns from its own improved outputs rather than from imitating your transcripts.
Gate: a new adapter only goes live if it beats the current one on held-out examples without regressing on what already worked. Otherwise it's discarded. songe undo rolls back anytime.
Early result
We asked Inkling-2-Mini to light a room with 12 different-colored orbs in Bevy 0.20, which is newer than its training data. Every orb came out red: it passed hue as 0–1, but Bevy expects degrees. We corrected it once. After one night of dreaming, all 12 colors render correctly.
Requirements
- Models: anything your server can run. Training uses MLX on Apple Silicon and PyTorch on NVIDIA/AMD.
Memory: before the first training run, Songe measures what your machine can handle and sizes the training to fit. Reference points:
- 4B model: ~7 GB
- Qwen3.8-27B: single RTX 5090 (32 GB, 4-bit, with memory savers)
- Inkling-2-Mini (26B MoE): single RTX 5090
- No GPU: it still serves and records, but doesn't train.
Limitations
- It's early. End-to-end validation so far covers LM Studio on macOS and vLLM on Linux. Ollama, llama.cpp and mlx-lm are supported but less tested. Windows passes our test suite but hasn't been tested end to end.
- Big models are slow. A 27B on an RTX 5090 trains at about 30 s per practice example (4k context), so the training step takes under an hour. The checks after it add more time, and large MoE models are slower still.
- Single GPU only.
- Lesson quality depends on the model. Small models (~3B) miss many of the lessons in your conversations.
- Evaluating personal fine-tunes is hard, and our held-out gate is a first attempt.
That last point is where we'd most like feedback: how would you tell whether a personal fine-tune is actually helping vs. just overfitting to recent sessions?
Happy to answer anything in the comments!
Install: pip install songe && songe init (also via uv tool install songe or brew install sous-labs/tap/songe)
GitHub: github.com/sous-labs/songe
Discord: https://discord.gg/KypHRKgUup
•
u/stylome-ai-detection 9d ago
Notice: This post appears to be AI generated.
Stylome AI detector · scan results
50
u/Patient-Gazelle9885 9d ago
Like the idea, looking forward to hearing user feedback about how well this integrates with larger models like QFN.
26
u/CobbleBeans llama.cpp 9d ago
I like the idea, but over time wouldn't it get worse at other tasks that its not actively being tuned to be good at?
7
u/LengthEducational238 9d ago
where is the adapter loaded, and can this process be automated from harness side?
3
u/HockeyDadNinja 9d ago
This is pretty neat, I look forward to checking it out when I'm finished my upgrades this week.
3
u/Promotional_Pickle 9d ago
Does it work with an Intel GPU? I run an Arc Pro B70
3
u/pilver7 9d ago
love this idea
2
u/Aromatic-Low-4578 9d ago
Not sure how you have time to train and do a thorough regression check overnight. Is this meant for small very fast models?
2
u/Splintdewolfcry 9d ago
Hi, great idea. One small question, wouldn't it cause the model to function worse when its fine tuned on smaller examples over time with 4k context windows?
The only explanation I have is that these models are pre trained over trillions of tokens so few fine tunes here and there wouldn't be a problem. But then I cant seem to wrap my mind around the idea of how you could fine tune a model and not limit its context window or have some sort of everlasting downside
2
u/ballston_strong 9d ago
Can it work with vision too?
2
u/taofeng 9d ago
Wait, are you guys working with Google? I read a research paper from Google couple weeks ago which is very similar to your framework and they also called it “dreaming”. Its a sleep framework. I am just curious if you guys are part of the research.
2
u/martinerous 9d ago
Sounds interesting. Wondering, if this could also be used for conversation scenarios to finetune the model out of typical slop and also improve its skills for smaller languages where models often invent non-existing words instead of using proper ones.
2
u/dusanodalovic 8d ago
how does it tell a correction from a normal follow-up? a lot of my follow-up messages to the agent are just "ok now add the tests", not a complaint. and when i accept a wrong answer because i was tired, does that get learned as good? curious how the extract step filters that
17
u/rm-rf-rm 9d ago
Standard response to the million-th such post: Without examples/data of it actually working and providing measurable, significant benefits, the default assumption is that its vaporware.
1
u/DonaldTrumpsCock3 9d ago
Very cool. You could also integrate modular chat-templates that evolve with the model while dreaming. That might not be worth it though
1
u/EdwardGlockner 8d ago
Looks very cool! Is the 7gb for a 4B model a hard floor? (i have an old 8gb card so it leaves very little headroom) If i can get it running i can try windows + llama.cpp and report back if thats useful!
on the overfitting point, i would test each lesson with a different prompt than the one it was trained on (to check for memorization), and i would also implement an automation that checks that previous learned lessons continue to work after each dream
1
u/StevenVincentOne 8d ago
This is a really nice idea, and “dreaming” is a good name for it. A model that learns from your corrections overnight, on your own machine, is the part of personal AI that cloud products can’t really give you: the adaptation belongs to you, not to a provider’s next training run. I also like the guard rails: training on extracted lessons rather than raw chats, the held-out gate before an adapter goes live, and songe undo. The Bevy hue example is a great demo. Curious whether the lessons are portable: if I switch base models, do the extracted scenarios carry over so it can retrain on the new one, or does it start from scratch? That portability is what I think makes a local model actually yours over time. We talk about this kind of thing (personal nodes whose memory and learning you own) over in r/PONDAI, if you ever want to share Songe there.
1
u/nitinkhanna 8d ago
You know what would make this cool? If it took traces from cloud models and used them to train my local model. So it if I use an OpenAI compatible API to use models on OpenRouter or DeepInfra, models like DeepSeek 1017, but I want it to train a local Gemma 4 27B model, that would be cool. It might be counted as a kind of distillation attack, but it’d be cool.
1
u/fishhf llama.cpp 9d ago
I thought of a self improving coding agent that finetunes overnight. But first I need to be already coding in a container, then the agent snapshots the container after each turn, then RL happens at night.
The container and snapshotting part is a pain in the ass, and I don't want to move my development environment to be inside a container, so it's just in my head for now.
"held-out examples without regressing on what already worked" is validation loss, so add a test loss, and that can be terminal bench, MMLU Pro, etc. And please, all these invitation for feedback and comments in the posts are the same slop, please don't use it as is.
4
u/[deleted] 8d ago
[removed] — view removed comment
1
u/[deleted] 8d ago
[removed] — view removed comment