World-Model-Optimizer: Distilling Frontier LLMs for Agents
Cutting token costs by 50% without sacrificing agent performance usually requires a brutal trade-off between latency and intelligence. World-model-optimizer (WMO) handles this by using agent traces to distill chain-of-thought reasoning from massive frontier models into smaller, specialized ones.
Instead of relying on a single monolithic LLM, this setup uses a router to decide if a task needs a frontier model or if the distilled local model can handle it, while simultaneously compacting tokens to strip out noise.
For those wanting a deep dive into the deployment, here is the basic CLI workflow:
1. Build the simulation
Use your existing agent traces and an OpenRouter key to create the optimization baseline.
wmo build
2. Run the optimization
This step handles the heavy lifting: training the router, executing token compaction, and distilling the chain-of-thought from the teacher model into your specialized student model.
wmo optimize
3. Deploy the endpoint
Serve the optimized model to your application.
wmo serve
The real-world utility here is the continuous loop. As your agent generates more traces in production, you can feed those back into the optimizer to keep the smaller model aligned with the frontier model's capabilities. It essentially turns your production logs into a training set for a cheaper, faster version of your AI workflow.
If you prefer not to manage the infrastructure, there is a hosted version available at:https://experientiallabs.ai
All Replies (7)
Excited for this since local models usually fail. Does anyone have benchmarks comparing this to Retort?
Frustrating to see no public release. Where are the actual benchmark deltas against the base version?
Confused about the cost math. Is the model running locally or through an API call?
Frustrated by the title. This looks like model routing rather than actual distillation, doesn't it?
I'm dying to test this under load. Do those benchmarks actually hold up in real-world scenarios?