Repository navigation
serve --pm: the served model is the Project Manager, delegating to expert models Lemonade runs - #321
Conversation
PR Reviewer Guide 🔍(Review updated until commit e8283a7)Here are some key observations to aid the review process:
|
db232f4 to
0aaf823
Compare
|
Persistent review updated to latest commit 0aaf823 |
…pert models Lemonade runs `1bit serve --pm [--pm-experts FILE] [--lemonade-url URL]`: the resident model (ZAYA1-8B) keeps every conversation; POST /v1/chat/completions runs a tool loop (app/pm.cpp) instead of a plain forward. The PM gets a system prompt and two tools, experts() and delegate(expert, task, context). A delegate call is one OpenAI chat request to Lemonade for the expert's catalog id (Lemonade loads it; one expert runs beside the PM within its two-LLM limit); the expert's answer is the tool result, cut at pm.max_result_bytes; the loop runs at most pm.max_rounds (4), the last round without tools. The final answer streams as SSE when the client asked for a stream. Lemonade down or an expert error becomes a tool result that says so, and the PM answers alone; one log line per delegation. Tool calls are read from llama-server's tool_calls or from ZAYA's own <zyphra_tool_call> text. config/pm-experts.json (built in, like recipes.json): code -> Qwen2.5-Coder-7B-Instruct-1bit (the light default), code-heavy -> Qwen3-Coder-30B-A3B-Instruct-1bit, reasoning -> Qwen3.8-27B-1bit, agentic -> gpt-oss-20b-mxfp4-1bit; general chat is the PM's own. tests/pm_route.sh (ctest pm_route, no GPU): mock llama-server + mock Lemonade; both tool-call forms, no delegation on a general question, streaming, Lemonade unreachable, an erroring expert, the round cap, /v1/completions untouched, refusals. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…pm.md `1bit serve --pm` (app/pm.cpp) makes the served model the Project Manager: it answers general conversation itself and delegates to expert models Lemonade loads beside it. Documented in docs/pm.md, with the README status line and the `--pm` entry in the serve.md usage block and option list. Co-Authored-By: Claude Fable 5.1 <[email protected]>
0aaf823 to
e8283a7
Compare
|
Persistent review updated to latest commit e8283a7 |
…ng or short prompt (#2137) (#2241) * Bump llama.cpp (hrx) 4107043c1 -> 228e1f652: the 27B holds no weight twice (engine #2137) + llama.cpp #322: the fused conv4 prefill shares the weight copy prefill already reads + llama.cpp #321 (engine #2150 test) and the attention accumulator bound test docs/hrx.md: the 27B paragraph gets the #322 measurement. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Bump llama.cpp (hrx) 228e1f652 -> 962507f8e: a short prompt holds no weight twice either (#2137) llama.cpp #324: at 6 to 8 tokens the few-token kernels leave a weight prefill reads packed to the packed kernels (Qwen3-4B 611 -> 398 device copies on a 6- or 8-word prompt). llama.cpp #325: a tied weight stays on the few-token kernel. docs/hrx.md records the copies and the rate cost at those sizes. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: bong-water-water-bong <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
What
ZAYA1-8B becomes the engine's Project Manager. Owner direction (2026-10-05):
1bit serve --pm [--pm-experts FILE] [--lemonade-url URL]: the resident model keeps every conversation andPOST /v1/chat/completionsruns a tool loop (app/pm.cpp) instead of a plain forward. The PM gets a systemprompt and two tools,
experts()anddelegate(expert, task, context). Adelegatecall becomes one OpenAIchat request to Lemonade for the expert's catalog id; Lemonade loads the expert (it keeps two LLMs at once,
so one expert runs beside the PM); the expert's answer is the tool result, cut at
pm.max_result_bytes. At mostpm.max_rounds(4) rounds, the last without tools. Final answer streams as SSE when the client asked for a stream.Lemonade down, or an expert error, becomes a tool result that says so and the PM answers alone. One log line per
delegation. Tool calls are read from llama-server's
tool_callsor from ZAYA's own<zyphra_tool_call>text.config/pm-experts.jsonships built in (likerecipes.json):code(default)Qwen2.5-Coder-7B-Instruct-1bitcode-heavyQwen3-Coder-30B-A3B-Instruct-1bitreasoningQwen3.8-27B-1bitagenticgpt-oss-20b-mxfp4-1bitGeneral chat is the PM's own.
--pm-experts FILEreplaces the built-in list.Measured, on Strix Halo (real run, not a mock)
1bit serve -m zaya1-8b-Q4_K_M.gguf --alias ZAYA1-8B-PM --pm --lemonade-url http://127.0.0.1:38725,with Lemonade (our fork,
2026.42.0~1654.d7703e06) holding the catalog:and Lemonade's own
/api/v1/healthconfirms the expert it was asked for is resident beside the PM:{"backend_alive": true, "backend_health": "ready", "backend_url": "http://127.0.0.1:8001/v1", "checkpoint": "Qwen/Qwen2.5-Coder-7B-Instruct-GGUF:qwen2.5-coder-7b-instruct-q4_k_m.gguf", "loaded": true, "model_name": "Qwen2.5-Coder-7B-Instruct-1bit", "pid": 824277, "recipe": "onebit", "slot_pool": "standard/llm", "status": "ready"}The expert's llama-server runs on HRX (
--device HRX0 -ngl 99) at ~47 t/s decode for the coder.Tests
tests/pm_route.sh— ctestpm_route, no GPU, mock llama-server + mock Lemonade (27/27 pass):both tool-call forms, no delegation on a general question, streaming SSE, Lemonade unreachable,
an erroring expert, the round cap,
/v1/completionsuntouched, refusals (--pmwith--laya,an experts file without ids).
tools/copyright.py --checkpasses.Notes
onebitrecipe with the PM option (ZAYA1-8B-PM-1bit, recipe optiononebit_pm) — that catalog branch is the companion PR in the lemonade fork.