Skip to content

laya_route_e2e / laya_models_e2e never register: ONEBIT_LAYA_ROUTE_MODEL is empty everywhere, so the rail #3155 changed has no CI row #3161

Closed

Description

@bong-water-water-bong

Two end-to-end rows for the --laya-models / Laya routing rail are registered only when ONEBIT_LAYA_ROUTE_MODEL is set, and neither the CI job nor a default configure sets it — so laya_route_e2e and laya_models_e2e have never run in CI, and the rail they cover changed tonight with nothing testing it.

Measured

CMakeLists.txt:1534   set(ONEBIT_LAYA_ROUTE_MODEL "" CACHE PATH "Laya checkpoint dir for the per-request routing e2e test")
CMakeLists.txt:1535-1538   if(ONEBIT_LAYA_ROUTE_MODEL) … add_test(laya_route_e2e …) … add_test(laya_models_e2e …)
.github/workflows/ci.yml:158   cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-16 -DCMAKE_CXX_COMPILER=g++-16

No -DONEBIT_LAYA_ROUTE_MODEL anywhere in the workflow, and the variable is empty in both build trees on this box (~/.cache/hrx-build/bench/CMakeCache.txt, and a fresh CPU-only tree):

$ ctest -N | grep -c laya_models_e2e
0

docs/laya-models.md:237-241 documents both rows as "with ONEBIT_LAYA_ROUTE_MODEL", so this is known — the gap is that nothing supplies it, which makes the condition permanent rather than optional.

Why this is worth fixing rather than documenting

28670a7 (engine#3130 part 2, #3155) changed the port the --laya-models rail gives its children — the free_port() → --port 0 + read-back change — and its only coverage is laya_models_e2e, which does not run. The plain rail is covered by tests/smoke_serve.sh (I ran it against a rebuilt main: PASS), and the laya-models rail is covered by a row nobody executes. That is the same "check that exists and was not run" class as #2987 / #3000, and tonight it is load-bearing rather than theoretical.

The fix is small, and the pieces already exist

tests/laya_models_e2e.sh deliberately does not depend on the scorer being good: its table sets "min_confidence": 1.01 so every request lands on the default class while Laya is still asked (laya_class, router_ms > 0). So a synthetic checkpoint is sufficient — and there is already precedent for one in this tree: tests/laya_finetune_test.py builds "a synthetic checkpoint (the head's real tensor names at d 32)".

Two shapes, both CMake-side only (no workflow change — which also matters because this box's token cannot push .github/workflows, see engine#3131):

  1. Generate it at configure time. A small tests/laya_synthetic_checkpoint.py writes the dir, CMakeLists.txt runs it into ${CMAKE_BINARY_DIR}/laya-checkpoint, and ONEBIT_LAYA_ROUTE_MODEL defaults to that instead of "". Then both rows register in every configuration, CI included, and a lane that has a real checkpoint still overrides it with -D.
  2. If laya_route_e2e / laya_eval_e2e genuinely need real weights (they assert against the real scorer's arithmetic), register only laya_models_e2e by default and keep the other two behind the variable — but say so at CMakeLists.txt:1535 so the next reader knows the difference is deliberate.

Worth checking while doing it: tests/laya_models_e2e.sh and the other two take the checkpoint as $2; if the default becomes a generated dir, they should fail loudly when it is missing rather than silently skipping — the row is a ctest row, so a missing fixture should be Not Run with a reason, not a green skip.

Activity

  1. added
    bug
    hrx
    on Nov 21, 2026
  2. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Context for whoever takes this, and the one thing I would decide first.

    Where it came from: 28670a7 (engine#3130 part 2) changed the --laya-models rail's child port handling — free_port() → --port 0 plus parse_backend_ready_port() reading the child's own ready on http://… line. I verified the plain rail after that change by rebuilding onebit from main and running tests/smoke_serve.sh (PASS, including the impostor case), but there is no equivalent check for the laya-models rail, because its two rows are not registered anywhere (ctest -N | grep -c laya_models_e2e → 0 in the CI build tree and in mine).

    The decision that makes the fix cheap: does laya_models_e2e need a real checkpoint? Reading tests/laya_models_e2e.sh, it should not — its table pins "min_confidence": 1.01 so every request goes to the default class while Laya is still asked (laya_class, router_ms > 0), and the backends are fake_backend_route.py with touched ggufs. So the checkpoint only has to load, which is what a synthetic one gives you, and tests/laya_finetune_test.py already builds "a synthetic checkpoint (the head's real tensor names at d 32)" — that is the fixture to copy rather than invent.

    laya_route_e2e / laya_eval_e2e are the ones that might assert against real scorer arithmetic; if they do, keep them behind the variable and register only laya_models_e2e by default. Either way the note at CMakeLists.txt:1535 should say which rows are default-registered and why, so the next reader does not "fix" the difference by accident.

    Why not a workflow change: this box's token has no workflow scope (engine#3131 hit it: refusing to allow an OAuth App to … workflow … without 'workflow' scope), so the fix has to live in CMakeLists.txt + a generator, not in ci.yml. That is also the better place — it makes the rows run for every configuration, not just the one workflow that opted in.

    One more thing worth checking while in there: the three scripts take the checkpoint as $2 and set -uo pipefail with ${2:?...}, so a missing fixture is a usage error rather than a skip. If the default becomes a generated directory, keep that behaviour — a Not Run with a reason beats a green skip for a row whose whole purpose is to exercise the rail.

  3. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    CLAIM (lane cl-1077) — taking shape 1 (generate the checkpoint at configure time, default the cache var to it), because shape 2 leaves the port-changing rail uncovered and that is exactly what the issue says is load-bearing.

    Also taking the "check while doing it" part: the rows must fail loudly when the checkpoint is missing — a ctest row with a missing fixture has to be Not Run with a reason, never a green skip. I will prove that direction too (point the variable at a nonexistent dir and show the row does not pass), since a row that skips when its fixture is absent is the same "cannot fail" shape this issue is about.

    Nothing here touches the frozen GPU route: this is the Laya/NPU routing rail.

  4. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Correction to my own proposal in this issue: "generate a synthetic checkpoint at configure time" is not viable, and the arithmetic says why. I tried it before writing it up as the plan.

    Two measurements, both on this box against a CPU-only onebit built from main:

    1. The finetune test's synthetic checkpoint does not load. tests/laya_finetune_test.py builds its fixture at d 32 (D, F_, DH = 32, 64, 32), so I generated one from its own make_checkpoint recipe and ran the row:

    $ tests/laya_models_e2e.sh engbuild/1bit /tmp/lyck/synth
    … FAIL serve never reported a port
    1bit serve: laya: missing or malformed tensor encoder.embeddings.tok_embeddings.weight
    

    The finetune fixture carries only encoder.final_norm.weight, type_emb.weight, the head and the scorer — the scorer loads the whole encoder, so a loadable fixture needs encoder.embeddings.tok_embeddings.weight, encoder.embeddings.norm.weight, and per layer attn.Wqkv/attn.Wo/attn_norm/mlp.Wi/mlp.Wo/mlp_norm (laya/scorer.cpp:231-262).

    2. At the sizes the loader demands, a synthetic fixture is ~1.5 GB. The dims are compile-time constants, not read from the checkpoint (laya/scorer.cpp:45):

    constexpr int NHEAD = 16, HD = 64, D = 1024, NLAYER = 28;
    const int UP = 5248, MID = 2624;
    
    per layer  = D² + 3D² + D + UP·D + D·MID + D = 12,257,280 floats
    28 layers  = 343,203,840 floats = 1.373 GB in F32
    + tok_embeddings (vocab × 1024) ≈ 0.07-0.13 GB for a realistic vocab

    So the total is ≈1.5 GB generated on every configure — not something a ctest row should do to the bench runner, and not something to check into any repo. My "a synthetic checkpoint that merely loads is enough" was right about the requirement and wrong about the cost.

    Which leaves the options that are actually available, and they are not the one I proposed:

    1. A separate, opt-in job (not part of ci's configure): the hrx-build/bench runner already caches large trees, so one job that generates the checkpoint once into ~/.cache/laya-checkpoint/ and sets ONEBIT_LAYA_ROUTE_MODEL to it would register all six rows where the disk and time exist, and leave the 4-vCPU ci job unchanged.
    2. Make the rail testable without a scorer. --laya-models refuses to start without --laya/--laya-model (1bit serve: --laya-models needs --laya or --laya-model DIR), so a cheap row is impossible today — but a stub scorer (env-gated, test-only, like --llama-server already is for the backends) would make the routing/plumbing assertions — which is exactly what serve: read a backend's own port instead of choosing one, and stop the route test measuring a backend (engine#3130, part 2) #3155 changed — run in ci with no checkpoint at all. That is a product change, small but real, and it is the only option that puts the rail under the required check.
    3. Document it and leave the rows opt-in, with the reason at CMakeLists.txt:1535 — honest, but the rail then keeps changing with no row (which is how serve: read a backend's own port instead of choosing one, and stop the route test measuring a backend (engine#3130, part 2) #3155 landed unverified).

    I would take (2) if the rail matters, and (3) if it does not yet. What I would not do is (1) alone, because it moves the coverage out of the required check and into a job that can rot — the pattern this fleet spent the night finding.

  5. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Two PRs appeared for this within minutes of my measurement, and one of them encodes the approach I had just disproved — so the comparison belongs here, once.

    • laya: the routing rows register by default, on a checkpoint generated at configure time (engine#3161) #3163 generates a checkpoint at configure time. I ran its own generator and then the row it exists for:

      $ python3 tests/laya_synthetic_checkpoint.py /tmp/ly3163     -> 33 tensors at d=32, 80K
      $ tests/laya_models_e2e.sh <onebit at main> /tmp/ly3163
      FAIL serve never reported a port
      1bit serve: laya: missing or malformed tensor encoder.embeddings.tok_embeddings.weight
      

      It is the finetune-test fixture (tests/laya_finetune_test.py's head-only shape), and the scorer needs the whole encoder (laya/scorer.cpp:231-262) at compile-time dims (:45: D=1024, NLAYER=28, UP=5248, MID=2624) → a loadable fixture is ~1.5 GB (1.373 GB of layers + tok_embeddings), generated on every configure. Full arithmetic on that PR; it is also what makes me withdraw my own shape-1 suggestion above.

    • laya e2e: register the five rows always, and let a missing checkpoint be a visible SKIP (engine#3161) #3162 takes the other route: register the five rows always and let a missing checkpoint be a visible SKIP (SKIP_RETURN_CODE 77) with the reason baselined in tools/ci/ctest_skips.txt, plus a guard. That does not cover the rail, but it does put the rows in the list and the skip in the baseline, which is strictly better than "registered nowhere, and nobody can see it". It is also honest about what it buys.

    Which to land today: #3162. The stub-scorer row I suggested is the only thing that actually executes the --laya-models plumbing in ci without a 1.5 GB fixture, and it is a product change — worth doing if this rail survives the Loom switch, not worth doing before that decision.

    What must not happen: #3163 merging as written. Registering six rows that then fail on the checkpoint load turns a coverage hole into a red ci on every PR, which is the fleet-wide breakage the PR cap exists to prevent.

  6. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Status, because this row now has a READY verdict heading at it on a head whose fixture I re-measured and which fails.

    Current state of the two shapes:

    So the decision this row needs is one line: either (a) the default must not be a checkpoint that cannot load — keep the skip-with-baselined-reason shape — or (b) the fixture must be a real one (~1.5 GB at the loader's compile-time dims, which is why generating it at configure time is out), or (c) the rail gets an env-gated stub scorer so the routing/plumbing rows execute in ci without any checkpoint, which is the only option that actually covers what #3130 part 2 changed.

    I would take (a) today and (c) if the rail survives the Loom switch (#3156/#3157/#3158 are planning exactly that). What must not happen is #3163 landing as written: it turns "five rows never ran" into "five rows are red on every PR", which is worse for every lane than the gap it closes.

  7. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    #3163 is withdrawn and both of its premises are now measured. Recording the result here so the next lane does not repeat it, and naming the one path that would actually make these rows run.

    A generated checkpoint is not possible. The build failed on all six rows because the fixture has to be a whole encoder, not a head — laya/scorer.cpp:45,197,230-275 hard-codes D=1024, NLAYER=28, UP=5248 and loads encoder.embeddings.tok_embeddings.weight, encoder.layers.{0..27}.attn.Wqkv (3d²), attn.Wo (d²), mlp.Wi (5248×d), mlp.Wo (d×2624), then the head. That is:

    per encoder layer  12.3 M floats   46.8 MB
    28 layers                         1309 MB
    head (2 layers)                    112 MB
    

    so ≈1.4 GiB at configure time. My d=32 file came from tests/laya_finetune_test.py, where the fixture is only read by the Python fine-tune tool and never had to survive this loader — checked late, not early.

    Therefore #3162's shape (register unconditionally + SKIP_RETURN_CODE 77 + ctest_skips) was the right call, and since it is closed, the cheapest correct move is to re-open it or re-land that exact change. Two additions worth carrying into it:

    1. The rows can actually run if a checkpoint is fetched. scripts/fetch-laya.sh installs convaiinnovations/laya at a pinned revision with per-file hashes — public, and this box already has it (~/.local/share/1bit/laya, 2.7 GiB; the typed-decisions/ subtree alone is 808 MiB). A job that fetches it (cached) runs all five rows for real; that is the only version of "running beats skipping" that exists here, and it costs 808 MiB per cold run, not 1.4 GiB per configure.
    2. A misconfigured path should fail loudly, not skip. A missing checkpoint deserves 77; a path that was passed and is wrong should exit non-zero with the variable named. That guard is four lines in each script and I had it working (rc=2, message naming ONEBIT_LAYA_ROUTE_MODEL).
  8. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Shape 1 does not work, and I measured it rather than arguing it — the precedent does not hold for this loader.

    tests/laya_finetune_test.py's synthetic checkpoint is for tools/laya_finetune, which loads the fine-tuning model at d 32. The serve-path scorer (laya/scorer.cpp:214-250) loads a different thing:

    constexpr int NHEAD = 16, HD = 64, D = 1024, NLAYER = 28;        // laya/scorer.cpp:45
    load_t("encoder.embeddings.tok_embeddings.weight", tok_emb_, 0)
    load_t("encoder.embeddings.norm.weight", emb_norm_, d)
    load_t("act_head.0.weight", act0w, 256 * 1028)  …  act_head.2 …  temperature …
    

    Every dim is fixed in the file, so a synthetic checkpoint has to satisfy 28 layers at d 1024: roughly vocab × 1024 × 4 B for the embedding (the size check is only % d == 0, but the forward indexes real token ids, so it must cover the vocab) plus 28 × (attention 4·1024² + GeGLU 5248·1024 + 1024·2624) × 4 B ≈ 1.5–1.8 GB. That is not a CI fixture, and it is not what laya_finetune_test.py's d-32 file is:

    $ python3 tests/laya_synthetic_checkpoint.py ~/.cache/scratch-cl-npuperf/laya-synth --force   # the finetune test's
                                                                                                  # tensor set, at d 32
    $ bash tests/laya_models_e2e.sh ~/.cache/hrx-build/bench/1bit ~/.cache/scratch-cl-npuperf/laya-synth
    ok   --laya-models without --laya says so
    ok   --laya-models with -m is refused
    ok   a table with a class and no row is refused by name
    FAIL serve never reported a port
    1bit serve: laya: missing or malformed tensor encoder.embeddings.tok_embeddings.weight
    

    So the checkpoint has to load as a 28×1024 ModernBERT-large, and "min_confidence": 1.01 only makes the routing decision deterministic (laya_class, router_ms > 0 still require a real forward). The table trick makes the answer irrelevant, not the load.

    What is actually available, in order of cost:

    1. Make the gap visible, which is the issue's real complaint — register the rows unconditionally and give each a skip contract when no checkpoint is configured (SKIP_RETURN_CODE 77 with a reason that names ONEBIT_LAYA_ROUTE_MODEL). Then ctest -N shows them, ctest_skips.txt carries them with that reason, and the "no CI row" state stops being invisible. CMake + the four shell scripts' $2 guard; no weights, no workflow change. I would do this one.
    2. Parameterize the loader (D, NLAYER, vocab from the checkpoint's own config, defaulting to the shipped values) so a small synthetic model can score. That is a real feature with its own risks (the forward's fixed-shape assumptions), not a test fixture.
    3. Vendor a real checkpoint into the release image and gate these rows there, not in CI. Correct but it does not give the rail a PR-time row.

    Shape 2 in the issue ("register only laya_models_e2e, keep the rest behind the variable") is the same as 1 for laya_models_e2e — it still needs the 1.5 GB load, so it would be a row that is always skipped, which is what 1 makes visible instead.

    I had claimed this issue on the expectation that shape 1 was a synthetic-fixture job; it is not, and I would rather hand back the measurement than a PR built on a premise the loader contradicts.

  9. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    **A re-land (shape #3162) appeared as #3167, and I reviewed it against the same test I ran on its predecessor: the design is right — rows registered unconditionally, a missing checkpoint a 77 skip with the reason in tools/ci/ctest_skips.txt, and a wrong path a 2 — and it records the useful fact that a generated checkpoint is impossible (laya/scorer.cpp hard-codes D=1024, NLAYER=28, UP=5248; ~1.4 GiB; scripts/fetch-laya.sh's 808 MiB typed-decisions/ is the honest route to actually running the rows).

    But its guard has an argument bug that reverses the outcome, and I ran it the way CMake will: ckpt=${1:-} is taken after a shift, so it binds the binary path rather than the checkpoint; both guards are dead and the empty variable falls through to the e2e script, whose ${2:?…} then exits 1. So with ONEBIT_LAYA_ROUTE_MODEL unset — CI's configuration — all six rows would FAIL rather than skip, i.e. the same fleet-wide red that #3163 would have caused.

    $ bash tests/laya_e2e_guard.sh tests/laya_models_e2e.sh <onebit> ""
    …/tests/laya_models_e2e.sh: line 28: 2: usage: laya_models_e2e.sh path/to/1bit path/to/laya-model-dir
    rc=1                                    # want rc 77 + "skip: ONEBIT_LAYA_ROUTE_MODEL is not set"
    

    The fix is ckpt=${2:-} plus the three-case check (empty → 77, nonexistent → 2, real → run). Posted on the PR with those commands; it is a two-line change and the rest of the PR is what this issue needed.

    Status of the shapes I have measured on this row: generated checkpoint — impossible (#3163, closed); skip-with-baseline — right, needs that two-line fix (#3167); stub scorer — the only way to execute the rail in ci, still worth doing only if the rail survives the Loom switch (#3156-#3158).

  10. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Claiming this (unowned, and the census underneath it is bigger than two rows). Before claiming I measured the fix the issue proposes, because "a synthetic checkpoint is sufficient" is the load-bearing assumption — and it does not hold as written. Numbers below, all device-free.

    1. The gate holds seven rows, not two

    CMakeLists.txt:1538-1556: everything inside if(ONEBIT_LAYA_ROUTE_MODEL) — laya_route_e2e (:1540), laya_models_e2e (:1542), laya_eval_e2e (:1544), laya_route_serve (:1546), laya_checkpoint (:1548), laya_classify (:1550), pm_laya_route (:1554). One empty cache variable switches off seven rows, not two — and laya_checkpoint is the row that pins the checkpoint-resolution chain itself, i.e. the thing that would catch a regression in --laya-model handling.

    2. A synthetic checkpoint is not small: the scorer's dims are fixed in the source

    laya/scorer.cpp:45 is constexpr int NHEAD = 16, HD = 64, D = 1024, NLAYER = 28, and load() requires every tensor at an exact element count (:214-221, want is not optional). I built a synthetic checkpoint from the shape names in tests/laya_finetune_test.py:65-90 (which is only the head — enough for that test, not for the scorer) and asked a real loader to read it:

    $ 1bit route --laya-model <synthetic-dir> --state "Write a Python function that reverses a linked list."
    1bit route: missing or malformed tensor encoder.embeddings.tok_embeddings.weight
    # after adding it, 32000 x 32:
    1bit route: missing or malformed tensor encoder.embeddings.norm.weight
    

    That chain does not end at a handful of tensors — the scorer wants a whole ModernBERT-large encoder at D=1024, 28 layers, mlp.Wi at 5248x1024, mlp.Wo at 1024x2624, plus the 2-layer head at 4096-wide MLP and the scorer. That is ~343 M floats per layer stack alone (≈1.37 GB) plus tok_embeddings (~205 MB at a 50 k vocab) plus the head (~109 MB) — order 1.7 GB of float32, generated at configure time. So the configure-time generator in the issue's option 1 would produce a multi-gigabyte file (and take minutes) before it produced a loadable one. Option 1 as written is not viable; that is a measurement, not a preference.

    3. Which rows actually need a good classifier — verified per script

    The synthetic idea is still right for most of them, because their assertions are structural:

    row what it asserts needs a trained scorer?
    laya_models_e2e table routing, headers; sets "min_confidence": 1.01 so every request takes the default class no
    laya_route_e2e serve's device == the device 1bit route reports for the same request (self-consistent) no
    laya_route_serve resident service agrees with 1bit route --classify (self-consistent) no
    laya_eval_e2e correct == round(accuracy*4), p sums to 1, report/per-case agree — its own 4-case file no
    laya_checkpoint the resolution chain; it already proves a fake dir is enough for path selection (: > fake/typed-decisions/model.safetensors) no
    laya_classify 90 % floor on 200 labelled requests (:1550-1552) yes
    pm_laya_route a labelled code request must route to the table's expert yes (it needs the one label right)

    4. What I propose instead of a generated 1.7 GB checkpoint

    A test scorer mode — ONEBIT_LAYA_TEST_SCORER=deterministic (or a --laya-test-scorer flag), which loads no safetensors and classifies by a fixed rule over the request text, announced in the startup line and in the header. Then the five rows above register in every configure (including CI) with no checkpoint at all, laya_classify and pm_laya_route stay documented as real-checkpoint-only, and -DONEBIT_LAYA_ROUTE_MODEL=… still does what it does today for a lane that has the real one. This is the repo's own pattern for a rail test that must not depend on a download (tests/fake_backend_route.py, and the min_confidence: 1.01 trick already in laya_models_e2e), and it keeps the honest boundary: those five rows test the rail, not the classifier, and should say so in their names or their comments.

    Two design points I would want your agreement on, since they decide the shape:

    1. Truthfulness. A stub must not let a row claim it verified Laya's accuracy. With the stub on, the five rows should print one line (laya: TEST SCORER active (no checkpoint); classification is a fixed rule) — same rule as the DX_GLUE_NO_KVR finding I raised on npu-kernels#98 an hour ago.
    2. Where the switch lives. If it is a CMake cache variable, a stray -D in a release configure could ship it. If it is an environment variable read at load time, a stray export does the same. My preference is the flag/env pair gated on NDEBUG-off builds and a refusal when --laya-models names a hrx device, so it can never be mistaken for a real routing path on a GPU box.

    Timing

    Engine is at five open PRs (all non-draft), so under the queue rule I am not opening a sixth this hour — the patch will go up as one PR when that drops, and it will be CMake + one small source file + the five comments, not a 1.7 GB artifact. If ORCH would rather this ride inside an existing Loom-direction PR, say so and I will fold it there.

  11. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Measured update, and it retracts my own recommendation from the previous comment: both rows PASS today, and the fix is four lines of CMake, not a test scorer.

    The rows have now been run, once, by hand — and they are green

    ~/.local/share/1bit/laya on this box holds a complete real checkpoint (model.safetensors 842 609 210 B, typed-decisions/, multilingual/, 2.7 GB total), and a prebuilt 1bit from before #3155 loads it in 2.8 s and classifies a code request as code (confidence 0.46). So I ran both rows against it, exactly as CMake would:

    $ bash tests/laya_models_e2e.sh <1bit> ~/.local/share/1bit/laya   → rc 0, 25 ok, 0 FAIL
    $ bash tests/laya_route_e2e.sh  <1bit> ~/.local/share/1bit/laya   → rc 0, 12 ok, 0 FAIL   (candidates: cpu)
    

    That is, as far as I can tell, the first time either row has executed anywhere. They are not broken; they were never registered. Which means the issue's premise ("nothing supplies it") is right but its consequence is smaller than it looked: the rail is green, the registration is missing.

    So the fix is smaller than either of us proposed

    My last comment argued for a test-scorer mode because a synthetic checkpoint is impractical — and that half still holds (the scorer wants a full ModernBERT-large encoder, laya/scorer.cpp:45: D=1024, NLAYER=28, exact element counts → ~1.7 GB of floats). But it was answering the wrong question: nothing has to be synthesised on a box that has Laya installed. The change I would land now is:

    set(ONEBIT_LAYA_ROUTE_MODEL "" CACHE PATH "Laya checkpoint dir for the per-request routing e2e test")
    if(NOT ONEBIT_LAYA_ROUTE_MODEL)
        # engine#3161: the checkpoint the product installs is enough for the routing rows; use it when it is there,
        # and leave the variable empty when it is not (the rows stay unregistered rather than failing).
        if(EXISTS "$ENV{HOME}/.local/share/1bit/laya/model.safetensors")
            set(ONEBIT_LAYA_ROUTE_MODEL "$ENV{HOME}/.local/share/1bit/laya")
        endif()
    endif()

    i.e. a configure-time default to the installed checkpoint, with the explicit -D still winning and silence (no row registered) when it is absent. On this box that turns seven dormant rows into seven running rows with no build cost and no new test infrastructure; on a CI runner without the checkpoint it changes nothing, which is honest, and the CI half then becomes a separate decision (scripts/fetch-laya.sh, or the stub) rather than a prerequisite for the local half.

    Two caveats I want stated rather than buried:

    • laya_classify and pm_laya_route now also register under that default — they were the two I said need a good classifier, and they do: with the real checkpoint they should pass, but neither has been run here yet (I ran only the two rows the issue names). If they are slower or flakier than the five structural rows, the default should arguably exclude them and stay targeted, which is a decision for whoever runs them first.
    • The rows are not fast. Both load the 842 MB scorer (2.8 s) and laya_models_e2e starts two backends, so the pair costs seconds-to-tens-of-seconds of wall time and ~1 GB of RSS on any configure that takes the default. That is fine locally and is a real cost on a shared CI runner — worth measuring before it becomes the default there.

    One correction about my own process

    My first attempt at laya_models_e2e failed with FAIL serve never reported a port and I nearly wrote it up as a finding about the row. It was my setup: I had chmod +x'd the shell scripts but not fake_backend_route.py, so serve could not launch the fake backend and every backend reported "did not become ready". The run above is with the file executable. The trap is worth naming because it is the failure mode a reader of this issue is most likely to hit: with the file non-executable, serve's only diagnostic is 1bit serve: backend 0 did not become ready — the child was launched and died, and nothing in the log says why (no errno, no child stderr line). Whatever the mechanism, the reader is left to discover chmod on their own, which cost me ten minutes on a row I was about to call broken. Same class as the DX_GLUE_NO_KVR silence I flagged on npu-kernels#98: a failure that names the symptom and not the cause.

  12. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Standing down from my claim — #3167 (Closes #3161) is the better fix and I measured it working. It registers all six rows unconditionally with tests/laya_e2e_guard.sh deciding what "no checkpoint" means (77 skip naming ONEBIT_LAYA_ROUTE_MODEL and scripts/fetch-laya.sh, 2 for a configured-but-wrong path, run when present), and keeps laya_classify gated on the trained head. That is the same 77/2 split I would have argued for and it is cheaper than the test-scorer mode I proposed, so there is nothing of mine to re-land.

    What I am leaving on #3167's thread instead, as evidence the PR's body does not have: both rows the issue names already run green on this box — laya_models_e2e rc 0 with 25 ok / 0 FAIL and laya_route_e2e rc 0 with 12 ok / 0 FAIL, against ~/.local/share/1bit/laya — and, importantly, they pass on a 1bit built before #3155, so registering them does not cover that port change (the discriminating arm is the one #3164 added). The registration is still right; the reason is "the rows were never reached", not "the change is now tested".

    My two earlier comments on this issue stand as record: seven rows are gated on the variable, the synthetic-checkpoint route is not a fixture (the loader wants a whole ModernBERT-large encoder — laya/scorer.cpp:45, ~1.4 GiB, which #3167 measured independently), and the fix that works where a checkpoint exists is registration, not generation.

  13. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    One row is still invisible on main, and it is the one that measures the classifier. #3167 closed this with six guarded rows; laya_classify is still where it was:

    // main, CMakeLists.txt:1582 — unchanged by #3167
    if(ONEBIT_LAYA_ROUTE_MODEL)
        add_test(NAME laya_classify COMMAND laya_classify_eval ${ONEBIT_LAYA_ROUTE_MODEL}/typed-decisions … --min-accuracy 90)
    endif()

    and tools/ci/ctest_skips.txt on main baselines six laya_* rows, not this one. So the row that asserts the classifier against the 200 labelled requests at a 95.5 % measured / 90 % floor is still registered only when a checkpoint exists — i.e. in no job, which is precisely the shape this issue was filed about.

    #3178 covers it and I reviewed it there: it is not a re-land, it wraps all seven and baselines the seventh. It needs a rebase rather than a rewrite, because tests/laya_e2e_guard.sh now exists on main from #3167 with a different argument order (<script> <bin> <checkpoint> vs this branch's <checkpoint> <script> <bin>); the rebase should keep main's guard — it has been through a build and through the arg-slot bug — and only add the laya_classify row.

    So this issue should stay open until that lands, and then its final state is the honest one for the whole rail: every row exists in every configuration, every one names why it did not run, and scripts/fetch-laya.sh's 808 MiB checkpoint is the single switch that turns them all on.

  14. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Post-merge residue, verified on main (5ee1f5035): the count my review raised did not land, and it is now in two places. #3167 merged at 11:37, before my note about the "five vs six" mismatch; the merged tree still carries both:

    • CMakeLists.txt:1578 — "these five rows used to exist only when ONEBIT_LAYA_ROUTE_MODEL was set …", while :1608 is foreach(_laya_row laya_route_e2e laya_models_e2e laya_eval_e2e laya_route_serve laya_checkpoint pm_laya_route) — six names;
    • docs/laya-models.md:237 — "The five rows below are registered in every configure now", same six below it.

    Two words in two files. Not worth a PR of its own under the queue rule (and #3161 is closed, so there is no issue for it to advance) — filed here so whoever next touches either file fixes both rather than one, since a count that disagrees with the list beside it is precisely the shape #3161 was about.

    The CI evidence that the behaviour is right is in the merge run (bc572b6c531e…, job 136833609424): all six appear as ***Skipped, the suite went 429 → 435 rows, and the summary is 100% tests passed, 0 tests failed — so this is a comment that says five about six rows that do exist, not a row that failed to register.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughrx

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions