메뉴
HN
Hacker News • 61일 전

최고 성능 AI 모델을 절반 비용으로 최적화·서빙하는 도구

IMP
7/10
핵심 요약

수집된 에이전트 실행 기록(traces)을 바탕으로 작은 오픈소스 모델을 학습시키고, 요청에 따라 대형 모델과 소형 모델 간 라우팅을 수행하는 도구입니다. 라우팅을 통해 최고 수준(frontier)의 품질을 유지하면서도 비용을 획기적으로 절감할 수 있어 AI 인프라 비용 최적화에 매우 유용합니다.

번역된 본문

World Model Optimizer(wmo)의 optimize 명령어는 Tinker API를 사용하여 수집된 에이전트 실행 기록을 더 작은 오픈소스 모델로 변환하며, 선택적으로 폐루프(closed-loop) 시뮬레이션 학습을 지원합니다. wmo의 serve 명령어는 최고 수준의 대형 모델과 소형 모델 간에 요청을 분배하는 엔드포인트를 노출합니다. RouterBench 벤치마크에 따르면, 이 방식은 최고 수준의 품질을 유지하면서도 비용을 27% 절감해 줍니다. 새로운 실행 기록이 들어올 때마다 파이프라인을 재실행하여 자체 소유한 모델을 지속적으로 개선할 수 있습니다.

🌐 플랫폼 | 📚 문서 | Discord

시작하기

  1. 제공자 등록
pip install world-model-optimizer
wmo providers set

이 명령어는 제공자를 인증한 다음, 해당 모델을 .wmo/pool.toml에 라우팅 후보로 등록하도록 제안합니다. 이 파일은 아래의 모든 과정에서 선택하는 모델 목록 역할을 합니다. 제공자의 자체 카탈로그(OpenRouter에 공개된 338개 모델 포함)를 검색하며, 해당 백엔드에 필요한 항목만 요청합니다. 이 명령어를 다시 실행하면 이미 등록된 모델 옆에 다른 제공자의 모델을 추가할 수 있습니다.

  1. OTel 실행 기록을 기반으로 라우터 튜닝
wmo build --file traces.jsonl --name my-model
# 실행 기록에서 남겨둔(held-out) 작업에 대해 등록된 모든 모델의 점수를 매깁니다.
wmo optimize route sweep my-model --traces traces.otel.jsonl
# 보고용으로 30%를 결정론적으로 남겨두고 나머지 70%에 대해 피팅(fit)합니다.
wmo optimize route fit matrix.json --kind knn \
--out .wmo/models/my-model/policy.json
  1. 서빙하기
wmo serve --name my-model

이전에 사용하던 모델과 비교하여 어떤 이점을 얻었는지 확인해 보세요. 이 보고서는 정책에 기록된 라우터 피팅 시나리오를 자동으로 제외합니다:

wmo optimize route report matrix.json .wmo/models/my-model/policy.json \
--baseline gpt-5.5

wmo optimize distill을 사용하여 자체 소형 모델을 풀에 증류(distill)하거나, wmo optimize route pin을 통해 라우팅 없이 단일 모델을 서빙하거나, wmo optimize harness를 통해 에이전트를 위한 최적화된 환경(harness)을 구축할 수 있습니다.

호스팅 플랫폼 platform.experientiallabs.ai에서 계정을 생성한 후, CLI를 인증합니다:

wmo login

플랫폼에서 에이전트 ID를 복사하고 현재 챔피언 환경(champion harness)을 실행합니다:

wmo run <agent-id>

E2B 백엔드 호스팅되는 에이전트는 이미 플랫폼이 관리하는 E2B 샌드박스에서 실행됩니다. E2B 내에서 로컬 최적화를 평가하려면, 추가 패키지를 설치하고 E2B 키를 제공하세요:

pip install "world-model-optimizer[e2b]"
export E2B_API_KEY=...
wmo optimize harness my-agent my-environment --tasks tasks.jsonl --backend e2b

API로 세계 모델(World Model) 사용하기 world-model-optimizer에는 에이전트 환경을 시뮬레이션하여 테스트 및 최적화에 사용할 수 있는 세계 모델이 포함되어 있습니다.

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를 통해(동일한 코드 경로) 모델 이름을 네임스페이스로 사용하여 호출할 수 있습니다: GET /world_models, 그 다음 POST /world_models/{name}/sessions 및 POST /world_models/{name}/sessions/{id}/step

플랫폼 로그인 후 실행 wmo login 후, 동일한 wmo run 명령어로 호스팅된 세계 모델을 열거나 E2B에서 에이전트의 현재 챔피언 환경을 실행할 수 있습니다. 플랫폼이 모델 및 샌드박스 자격 증명을 관리하므로, 호스팅 실행 시 로컬 API 키가 필요하지 않습니다.

wmo login
wmo run <world-model-or-agent-id>
wmo run <agent-id> -u . --task "fix the failing tests"

작업 공간 업로드는 -u 옵션을 사용해 선택할 수 있습니다. WMO는 변경 사항을 실시간으로 동기화하고 동시 로컬 편집을 유지합니다. 장기 실행 에이전트는 분리하여 플랫폼에서 계속 실행할 수 있으며, 나중에 메시지를 보내거나 다시 연결할 수 있습니다.

wmo run <agent-id> -u . --detach
wmo run --send "Now run the full test suite"
wmo run --attach
wmo run --end

E2B 샌드박스의 런타임 에이전트 및 최적화 도구 세계 모델이 환경을 제공하는 동안 WMO는 격리된 E2B 샌드박스 내에서 실제 pi 워커를 실행할 수 있습니다. 최적화 및 평가 롤아웃이 병렬로 실행되며, 모델 자격 증명은 샌드박스 외부에 유지됩니다.

wmo optimize harness my-agent my-environment --tasks tasks.jsonl --ba
원문 보기
원문 보기 (영어)
World Model Optimizer wmo optimize turns collected agent traces into smaller open-source models using the Tinker API, with optional closed-loop simulation training. wmo serve exposes an endpoint that routes requests between frontier and smaller models; on RouterBench, it maintains frontier quality at 27% lower cost. Rerun the pipeline as new traces arrive to continually improve a model you own. 🌐 Platform | 📚 Docs | Discord Getting started 1. Register your providers. pip install world-model-optimizer wmo providers set That verifies the provider and then offers to register its models as routing candidates in .wmo/pool.toml , the roster everything below chooses from. It searches the provider's own catalog (OpenRouter's 338 published models included) and asks only for what that backend needs. Re-run it to add another provider's models beside the ones already registered. 2. Tune a router on your OTel traces. wmo build --file traces.jsonl --name my-model # Score every registered model on held-out tasks from your traces wmo optimize route sweep my-model --traces traces.otel.jsonl # Deterministically reserve 30% for reporting and fit on the other 70% wmo optimize route fit matrix.json --kind knn \ --out .wmo/models/my-model/policy.json 3. Serve it. wmo serve --name my-model See what it bought you against the model you were using before. The report automatically excludes the router-fit scenarios recorded in the policy: wmo optimize route report matrix.json .wmo/models/my-model/policy.json \ --baseline gpt-5.5 Distill your own small model into the pool with wmo optimize distill , serve a single model with no routing via wmo optimize route pin , or build an optimized harness for your agent with wmo optimize harness . Hosted platform Create an account at platform.experientiallabs.ai , then authenticate the CLI: wmo login Copy an agent ID from the platform and run its current champion harness: wmo run < agent-id > E2B backend Hosted agents already run in platform-managed E2B sandboxes. To evaluate a local optimization in E2B, install the extra and provide an E2B key: pip install " world-model-optimizer[e2b] " export E2B_API_KEY=... wmo optimize harness my-agent my-environment --tasks tasks.jsonl --backend e2b Use a world model as an API world-model-optimizer includes world models that can be used to simulate your agent environment for testing and optimization. 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 ) Or over HTTP (same code path), namespaced by model name: GET /world_models , then POST /world_models/{name}/sessions and POST /world_models/{name}/sessions/{id}/step . Run after platform login After wmo login , the same wmo run command can open a hosted world model or run an agent's current champion harness in E2B. The platform manages model and sandbox credentials, so hosted runs do not need local API keys. wmo login wmo run < world-model-or-agent-id > wmo run < agent-id > -u . --task " fix the failing tests " Workspace upload is opt-in with -u : WMO live-syncs changes and preserves concurrent local edits. Long-running agents can detach, continue in the platform, and be messaged or reattached later. wmo run < agent-id > -u . --detach wmo run --send " Now run the full test suite " wmo run --attach wmo run --end Runtime agents and optimizers in E2B sandboxes WMO can run the real pi worker inside isolated E2B sandboxes while the world model supplies the environment. Optimization and evaluation rollouts run in parallel, and model credentials stay outside the sandbox. 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 The optimizer can change prompts, tools, policies, skills, and runtime code. Every candidate is measured against the same simulated tasks, and only changes that pass the evaluation gates become the new versioned champion harness. Development Managed with uv ; linting/formatting with ruff ; type checking with ty ; tasks run through just ( brew install just / cargo install just ). Conventions live in AGENTS.md . just setup # first time: .env from the template + uv sync uv sync --extra dev # env + dev tools uv run ruff check . # lint uv run ruff format . # format uv run ty check # type check uv run pytest -q # tests Usage telemetry wmo uses anonymous usage telemetry to track the volume of usage. Telemetry is strictly metadata. It never includes prompts, traces, actions, observations, file paths, model names, provider credentials, or raw user content. Telemetry is enabled by default. To opt out for a project: uv run wmo config telemetry disable This writes .wmo/settings.toml . You can re-enable it with uv run wmo config telemetry enable , check the current setting with uv run wmo config telemetry status , or disable it for a process with DO_NOT_TRACK=1 or WMO_TELEMETRY=0 .