World Model Optimizer: Distill and Serve Frontier Models at Half the Cost
World Model Optimizer: Distill and Serve Frontier Models at Half the Cost
World Model Optimizer enables continuous model improvement using agent traces
이 도구는 기존의 agent traces를 world‑model simulation, meta‑harness optimization 및 model distillation의 루프로 전환하여, 비용을 절감하면서도 frontier 급 품질을 갖춘 모델을 생성합니다.
Getting started with wmo
먼저 패키지를 설치하고, model providers를 등록한 다음, OTel traces로부터 router를 구축하십시오.
- Install:
pip install world-model-optimizer - Register providers:
wmo providers set - Build a router:
wmo build --file traces.jsonl --name my-endpoint - Score models on held‑out tasks:
wmo optimize route sweep my-endpoint --traces traces.otel.jsonl - Fit a routing policy:
wmo optimize route fit matrix.json --kind knn --out.wmo/models/my-endpoint/policy.json - Serve the endpoint:
wmo serve --name my-endpoint
Evaluating cost and quality gains
서빙 후에는 report 명령어를 사용하여 새로운 endpoint를 baseline model(예: gpt‑5.5)과 비교할 수 있습니다.
wmo optimize route report matrix.json.wmo/models/my-endpoint/policy.json --baseline gpt-5.5
이를 통해 개선 차이(improvement delta)와 비용 절감액을 보여주는 메트릭이 생성됩니다.
Distilling a small model into the pool
라우팅을 피하고 단일 최적화 모델을 서빙하려면 model distillation subcommand를 사용하십시오.
wmo optimize model (자세한 내용은 distill README 참조)은 라우팅된 pool의 성능을 상속받는 작은 모델을 생성합니다.
그 다음 wmo optimize route pin으로 모델을 고정하거나, wmo optimize harness를 통해 최적화된 harness를 구축할 수 있습니다.
Hosted platform usage
platform.experientiallabs.ai에서 계정을 생성하면 자격 증명을 관리할 필요 없이 에이전트를 실행할 수 있습니다. 로그인 후:
wmo login- 에이전트의 champion harness 실행:
wmo run <agent-id>플랫폼이 모델 및 sandbox 인증을 처리하므로 로컬 API key가 필요하지 않습니다.
Using the E2B backend for isolated evaluation
격리된 sandbox에서 최적화 결과를 평가하려면 E2B extra를 설치하고 API key를 제공하십시오.
pip install "world-model-optimizer[e2b]"
export E2B_API_KEY=...
그 다음 E2B 내부에서 harness optimization 또는 evaluation을 실행하십시오:
wmo optimize harness my-agent my-environment --tasks tasks.jsonl --backend e2b
wmo eval tasks.jsonl --mode closed-loop --harness my-agent --harness-backend e2b
모든 후보는 동일한 시뮬레이션 태스크에 대해 측정되며, evaluation gate를 통과하는 변경 사항만이 새로운 버전의 champion harness가 됩니다.
World model as an API
이 패키지에는 프로그래밍 방식 또는 HTTP를 통해 쿼리할 수 있는 world models가 포함되어 있습니다. Python 예시:
from wmo import Action, ActionKind
from wmo.config.store import WorldModelStore
from wmo.engine.loader import load_world_model
model_dir = WorldModelStore("\.wmo").resolve("airline")
wm, _provider = load_world_model(model_dir)
session = wm.new_session(task="check out the cart")
obs = wm.step(session.id, Action(kind=ActionKind.TOOL_CALL, name="add_to_cart", arguments={"sku": "A1"}))
print(obs.content)
HTTP endpoints: GET /world_models는 모델 목록을 나열하고, POST /world_models/{name}/sessions는 세션을 생성하며, POST /world_models/{name}/sessions/{id}/step은 세션을 진행시킵니다.
Workspace upload and detach/reattach workflow
로그인 후 로컬 변경 사항의 실시간 동기화와 함께 에이전트를 실행할 수 있습니다.
- Attach workspace:
wmo run <agent-id> -u. --task "fix the failing tests" - Detach to continue in the platform:
wmo run <agent-id> -u. --detach - Send a message to the detached agent:
wmo run --send "Now run the full test suite" - Reattach later:
wmo run --attach - End the run:
wmo run --end
Development setup
이 프로젝트는 uv로 관리되며, linting/formatting에는 ruff를, type checking에는 ty를 사용합니다.
- Install dev environment:
uv sync --extra dev - Lint:
uv run ruff check. - Format:
uv run ruff format. - Type check:
uv run ty check - Run tests:
uv run pytest -q
Usage telemetry
wmo는 익명의 메타데이터만 수집합니다. 프롬프트, traces, actions, observations, 파일 경로, 모델 이름 또는 자격 증명은 저장되지 않습니다.
Telemetry는 기본적으로 활성화되어 있습니다. 프로젝트에 대해 비활성화하려면:
uv run wmo config telemetry disable
이는 .wmo/settings.toml에 기록됩니다. uv run wmo config telemetry enable로 다시 활성화하거나, uv run wmo config telemetry status로 상태를 확인하거나, DO_NOT_TRACK=1 또는 WMO_TELEMETRY=0을 통해 프로세스별로 비활성화할 수 있습니다.
Community feedback on Hacker News
댓글에는 열광과 회의적인 시각이 공존했습니다.
- 한 사용자는 구체적인 증거를 요구했습니다: "이 방법이 작동한다는 것을 증명하는 가장 좋은 방법은 이 방법으로 fine-tuned된 모델을 출시하고 기본 모델과 fine-tuned 모델 사이의 개선 차이를 보여주는 벤치마크를 보여주는 것입니다.... 그때까지 이것은 소음일 뿐입니다." — @Art9681
- 다른 사용자는 라우팅에 대한 초점을 지적했습니다: "제목이 오해의 소지가 있습니다. 이것은 model routing이지, distillation이 아닙니다." — @surround
- 한 댓글 작성자는 로컬 모델에 대한 비용 계산에 의문을 제기했습니다: "이해가 안 가네요. 개선하려는 모델이 로컬인가요? 그렇다면 API와 비교하여 비용을 어떻게 계산합니까?" — @jack_pp
- 긍정적인 의견으로는: "멋진 프로젝트네요" — @digitaltrees, "멋진 아이디어입니다! 개인정보 보호는 어떻게 보장하나요?" — @yiyingzhang, 그리고 "직접 써보고 싶네요." — @rglover 가 있었습니다.
이러한 반응들은 벤치마킹, 라우팅 대 distillation에 대한 명확한 구분, 개인정보 보호 보장, 그리고 로컬 대 API 모델에 대한 비용 모델링에 대한 관심을 보여줍니다.