Repository navigation
serve --laya: Laya classifies each conversation, a measured policy picks the device (RFC #186) - #187
Conversation
…e gate, and its eval (RFC #186) Asked for a device, Laya picked zinc for every request (it knows nothing about the hardware). It classifies the request instead: long_doc by size (>= 1024 chars, no model call), else a three-way Laya choice. tests/laya_route_cases.{py,json}: 200 labelled requests, 50 per class. tests/laya_classify_eval (checkpoint, cases): typed-decisions checkpoint, default wording: 191/200 = 95.5% (code 100, prose 82, short 100, long_doc 100), 0.59 s per decision; the root checkpoint 92.0%. Laya alone, without the gate: 64-80%, long_doc 30-70%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cks the device (RFC #186) - laya/policy.{h,cpp} + config/route-policy.json (compiled in, --route-policy FILE replaces it): class -> device with the measured reason per row, min_confidence 0.16 -> default. Every class goes to Vulkan today: no class has a measured faster device, and llama-server ignores per-request speculative settings, so per-class drafters would need a second server. - serve: --laya (checkpoint from $ONEBIT_LAYA_MODEL or ~/.local/share/1bit/laya, the pinned repo's typed-decisions/ when present) or --laya-model DIR; one decision per conversation (cached by the opening messages); X-1bit-Route "<class> <confidence> <device>" on replies; each new decision logged. Opt-in: --device auto without --laya is unchanged. - 1bit route: classify + policy; --classify prints "<class> <confidence> <device>". - scripts/fetch-laya.sh: the destination defaults to where --laya looks. - tests: laya_route_e2e.sh rewritten for the policy (three classes to three fake devices, header, reuse on a later turn, missing-checkpoint error); ctest laya_classify (90% floor). - docs/laya.md: accuracy table (95.5% typed-decisions), the per-request drafter finding, cost (first turn +~0.5 s, later turns and decode unchanged); docs/serve.md. Measured on Strix Halo, Qwen3.8-27B Q4_0 + DFlash2: 1-token reply 1,008-1,048 ms vs 498-518 on the first turn, 703-767 vs 713-849 later; decode 50.6 / 26.7 / 18.9-19.1 tok/s vs 50.5-50.7 / 26.7-26.9 / 19.0-19.2 (code / prose / short). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docs7 for 1bit-monster/engine
Commit |
PR Reviewer Guide 🔍(Review updated until commit dcec90d)Here are some key observations to aid the review process:
|
A client sending "model": null made nlohmann value() throw inside the handler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Persistent review updated to latest commit dcec90d |
Asked for a device, Laya picked zinc for every request; asked what kind of request it is, it classifies 95.5% of 200 labelled requests (size gate for long documents). The policy keeps every class on Vulkan (per-request drafter settings are ignored by llama-server); cost: first turn +~0.5 s, later turns and decode unchanged. Every number from docs/laya.md, docs/serve.md. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…UF on the NPU, 1BP; blog post (#214) README gets a Direction note (HRX with Loom kernels plus the NPU, as geramyL proposed; Vulkan stays the default until the RFC #213 gates are met) and current status lines: six GGUF architectures answer on the NPU (0.006-0.17 tok/s), DwarfStar reads 1BP, and Laya classifies conversations with its scorer on HRX at 15-16 ms. PORTING's NPU and Laya rows gain #179/#181/#209 and #187/#206/#208. The blog post covers the same. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The pin bump moves third_party/llama.cpp d8bd0ff60 -> a5c32fbf8 but not the registry's
record of it, and registry/architectures.json is what ctest `registry_pins` compares the
committed pins against - so the bump as opened fails that test.
Regenerated with the documented recipe (`scripts/registry-regenerate`: `scripts/registry-regen.sh`,
which is also what the bump workflows run) from this commit in a fresh clone: it inits the three
trees the registry reads at their pins, rewrites the file, and then checks it:
$ scripts/registry-regen.sh
wrote registry/architectures.json: hrx 294, npu 7, architectures 294, mapped 294
none of the 28 reviewed significant classes is mapped without a reason
registry/architectures.json records the committed pins
One line changes - the recorded pin - because a5c32fbf8b only adds the converter's --dspark
argparse block (#187), which moves no architecture. tools/copyright.py --check is clean.
…spark, engine #961) (#992) * Bump HRX: llama.cpp a5c32fbf8b (fork tip: the converter registers --dspark, engine #961) The pin was d8bd0ff6052, whose convert_hf_to_gguf.py reads args.dspark at :261 and registers no --dspark argument, so every conversion died with AttributeError on an argparse Namespace that has no such attribute (engine #961). a5c32fbf8b is the fork's 1bit/hrx-vulkan-patched tip: #187 squash-merged on d8bd0ff6052, one commit ahead, which adds the registration at :156 and the V4/V4.1 arch guard. tools/check_pins.py: d8bd0ff60 -> a5c32fbf8 is 'ahead' (no other submodule moves). * registry: record the llama.cpp pin the bump moves to (engine #961) The pin bump moves third_party/llama.cpp d8bd0ff60 -> a5c32fbf8 but not the registry's record of it, and registry/architectures.json is what ctest `registry_pins` compares the committed pins against - so the bump as opened fails that test. Regenerated with the documented recipe (`scripts/registry-regenerate`: `scripts/registry-regen.sh`, which is also what the bump workflows run) from this commit in a fresh clone: it inits the three trees the registry reads at their pins, rewrites the file, and then checks it: $ scripts/registry-regen.sh wrote registry/architectures.json: hrx 294, npu 7, architectures 294, mapped 294 none of the 28 reviewed significant classes is mapped without a reason registry/architectures.json records the committed pins One line changes - the recorded pin - because a5c32fbf8b only adds the converter's --dspark argparse block (#187), which moves no architecture. tools/copyright.py --check is clean. --------- Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-authored-by: pi-zarch <pi-zarch@1bit.gg>
Implements accepted RFC https://github.com/orgs/1bit-MONSTER/discussions/186.
Asked for a device, Laya picked ZINC for every request (it knows nothing about the hardware). Now it answers a question about the request, and a measured policy picks the device.
What changes
laya/route.h):long_docby size (≥ 1,024 chars, no model call), else a three-way Laya choice among code / prose / short.typed-decisions/checkpoint: 95.5% on 200 hand-labelled requests (code 100, prose 82, short 100, long_doc 100); ctestlaya_classifyfails below 90%.config/route-policy.json, compiled in;--route-policy FILE): class → device with the measured reason per row; below confidence 0.16 → default. Every class → Vulkan today: no class has a measured faster device, and llama-server ignores per-requestspeculative.*settings (verified on our pin and upstream master), so per-class drafters would need a second server holding a second copy of the model.--laya(checkpoint from$ONEBIT_LAYA_MODELor~/.local/share/1bit/laya) or--laya-model DIR: one decision per conversation (cached),X-1bit-Route: <class> <confidence> <device>on replies, each decision logged. Opt-in:--device autowithout--layais unchanged.1bit route --classify;scripts/fetch-laya.shdefaults to the path--layareads.Measured (Strix Halo, Qwen3.8-27B Q4_0 + DFlash2,
1bit serve --device auto)--laya--layaChecks (strixhalo)
ctest 10/10 with
-DONEBIT_LAYA_ROUTE_MODEL: smoke_serve, think_split, gguf_meta, laya_route_e2e (11/11: three classes to three fake devices, header, reuse on a later turn, missing-checkpoint error, npu-only), laya_classify (95.5% ≥ 90%), registry_gaps, registry_pins, npu_*.🤖 Generated with Claude Code