One-paragraph summary
You started with a rigorous, mostly unsubmitted research programme in laya-lab. Only two pieces were ever packaged upstream at first: PR #696 (a state-budget docs + test correction, merged in v0.3.22 and now in CI) and PR #697 (a position-sensitivity benchmark for the classic encoder, merged in v0.3.22 and a headline finding). The rest — a powered n=200 baseline, the mechanism probe, the frozen-encoder head fine-tune, the cross-attention negative, the refuted interventions, and a launch audit — remains a research portfolio. We then packaged the one piece that answers a current question in the new engine: PR #1538, a three-file research PR measuring the default Vega engine's accuracy against evidence position at fixed document length, on the same 20-item construction as #697. It was audited independently, every prediction was committed, only four pre-specified paired tests were reported, and it is merged into Laya v0.5.6.
Maintainer, on merging #1538: “Merged in 0.5.6, thank you. A careful study, and an honest reading of the abstain rate. The C++ ONNX failures were the ONNX Runtime outage, fixed by #1541.”
— NandhaKishorM, github.com/NandhaKishorM/laya/pull/1538
Current situation analysis
State as of 2026-11-28, retrieved from GitHub APIs and the upstream repo. “Retrieved” means read from a page/API this session; “claimed” means asserted by a doc or maintainer, not independently verified.
Laya / Vega
- Latest release
- Laya v0.5.6 (2026-11-27). Previous: v0.5.5, v0.5.4, v0.5.3. retrieved
- Default engine
- Since v0.5.0 (2026-11-19),
laya.Agent()loads Vega: a frozen 0.8B reader (nandakishorm/vega-U) + thevegamldecision engine. retrieved - Classic encoder
- Not deprecated; a stable maintenance/compatibility path. Name a checkpoint or pass
vegaml=False. Frozen weights. The long-context benchmarks are labelled “for the classic encoder.” retrieved - vegaml
- Separate Apache-2.0 engine repo;
vegaml>=0.18.0is a core dependency; installed 0.19.0. Frozen LLM reader + 14.3M-parameter physics head; 73,728-token context; conformal sets, abstain, unbound, route; optional continuous learning. retrieved - Scale
- ~35.9k stars, ~3.2k forks, 1,035+ merged PRs, 53 open issues + 52 open PRs, release every ~17h; ~252k PyPI downloads/month. retrieved
- Commercial
- Open core. Vega Proxy + Studio on platform.embedding.in; not required for this contribution. retrieved
Your three merged contributions
| PR | What it did | Shipped |
|---|---|---|
| #696 | Corrected the state budget to max_len − head_len − 1; added tests/test_state_budget.py; wired CI + release. Later extended three times; now in scripts/test_suites.py. README text survives verbatim. | v0.3.22 |
| #697 | Added bench_position_sensitivity.py, a committed n=20 JSON, and a README section. Result is a headline finding in research/README.md. | v0.3.22 |
| #1538 | Added bench_vega_position.py, a 240-prediction JSON, and a README finding. First independent position × length curve for the default Vega engine; honest abstention finding. No library change. | v0.5.6 |
CI / merge status now
- PR #1538 merged; merge commit
e4d81b0c; merged 2026-11-27T12:21Z; inv0.5.6. - The three ONNX C++ failures were the external ONNX Runtime 1.30.0 archive 404 (issue #1529). Not caused by the research diff.
- #1541
fix(cpp): fetch ONNX Runtime from NuGetfixed that lane; currentmainCI is green. - The
tests (py3.9)“expected required” blocker was a stale branch-protection rule (no such job; CI is 3.10–3.13;requires-python >=3.10). The maintainer merged anyway; it no longer blocks.
Your lab, beyond the PRs
The laya-lab repo is a 100-commit, pre-registered research programme (78 commits authored by you, 18 by an engineer session, 4 by a launch audit). It contains 13 findings, 16 experiment directories, 68 ledger claims, a 2,000-row powered baseline, a 600-item extension, and an independent re-derivation. PR-PLAN called it “the safe subset”; the rest was never packaged. The public repo’s launch README/audit is still unpushed (4 commits ahead), and a separate laya-contributions explainer site is deployed locally. Those are public-credibility tasks, not upstream PRs.
What exactly we did
- Audit first. An independent subagent audited the proposed PR before any code. Verdict: GO WITH CHANGES. It verified the Vega API, the construction, the novelty/collision map, the 8 GB feasibility, and the PR shape; it caught three issues we fixed.
- The fixes. Load one arm at a time and free it before the next; report exactly four pre-specified paired tests (not 14); honest top-cell labelling; and document the OOM.
- Isolated branch. Fresh worktree from current
upstream/main(v0.5.3 → merged onto v0.5.6), branchpr/vega-position-sensitivity. Nolaya/orvegaml/code change. - Fresh environment. Python 3.12 venv,
torch 2.11.0+cu128,transformers 5.24.0,vegaml 0.19.0, editablelaya 0.5.3, plusflash-linear-attention. The old lab venv (transformers 4.57.6) could not run Vega. - Smoke test. Single 72k-nominal call. It OOM'd on the 8 GB card even with
fla; 48k-nominal passed (46,954prompt tokens, no truncation, ~4.7 s/call). The reference gated-delta-rule fallback OOMs even at 48k withoutfla. - Full grid. Vega at 7k / 32k / 48k × start / middle / end + classic
laya-multilingualat 7k × start / middle / end. 20 requests/cell. 240 predictions. GPU lock used. One arm at a time. - Artifacts. Script + committed JSON + README finding. Every number re-derivable from committed rows with
--analyse(no model). No fabricated numbers; local gates passed. - Opened + merged. Commit
73fc8409→ PR #1538 → mergede4d81b0c→ v0.5.6.
The experiment, precisely
| Task | Needle-in-haystack choice. A short labelled request (billing/technical/sales/other) embedded in domain-matched repeating filler at a known fraction of a fixed-length document. |
|---|---|
| 20 requests | Same 20 requests in 8 languages as bench_position_sensitivity.py; 9 billing / 7 technical / 4 sales / 0 other → majority floor 0.45. |
| Question | department choice, 4 options, identical wording as #697. |
| Construction | place(reps, frac, request); same FILLER, same "\n\nActual request: "; frac=1.0 byte-identical to #697; classic 7k reproduces #697's cells exactly. |
| Vega arm | laya.Agent(vegaml=True, device="cuda"); predict_long(state, questions); nandakishorm/vega-U; max_len=73,728; one read, no windowing. |
| Classic arm | laya.load("convaiinnovations/laya", subfolder="multilingual"); predict(..., max_len=8192); 7k, below the state room. |
| Lengths | Filler tokens under the classic tokenizer; report the reader's own usage["input_tokens"]. Vega lengths 7k/32k/48k; classic 7k. |
| Positions | 0.00 start / 0.50 middle / 1.00 end. Position 0.0 places the request right after the options; 1.0 at the end. |
| Metrics | Forced-choice accuracy choice == gold; Wilson 95% CI; majority floor 0.45; per-class recall; modal share; abstain rate; route=review rate; truncated count; latency; exact McNemar. |
| Truncation | usage["truncated"] + input_tokens per case. No cell truncated. The 72k attempt OOM'd; that is hardware, not accuracy. |
The result
Accuracy
Forced-choice accuracy, positions start / middle / end:
| Engine | 7k | 32k | 48k |
|---|---|---|---|
| Vega 0.8B · start | 0.750 | 0.550 | 0.450 |
| Vega 0.8B · middle | 0.450 | 0.400 | 0.350 |
| Vega 0.8B · end | 0.750 | 0.750 | 0.750 |
| classic multilingual · 7k | 0.850 | 0.500 | 0.400 |
Classic row is start / middle / end at 7k. Classic has no abstain/route. Majority floor 0.45; random 0.25. Wilson CIs in the committed JSON.
The four pre-specified paired tests
Exact two-sided McNemar on the same 20 items. Only these four; everything else is descriptive. With n=20, testing every pair would be 14 comparisons and would not survive multiplicity correction.
| Test | Discordant | p |
|---|---|---|
| Vega · 48k · start vs middle | 2 / 0 | 0.50 |
| Vega · 48k · middle vs end | 0 / 8 | 0.0078 |
| Vega · end · 7k vs 32k | 0 / 0 | 1.0 |
| Vega · end · 32k vs 48k | 0 / 0 | 1.0 |
The abstention finding — the honest headline
Vega abstains and routes to review on 17–20 of 20 items in every cell (0.85–1.00).
The accuracy above is forced-choice, not auto-route accuracy. The engine reports abstain, unbound, prediction_set, answer_confidence, route, and route_reason; on this synthetic, repetitive construction it mostly says “review.” The auto-routed subset is 0–3 items, too small to score. The classic encoder has no abstain/route; it answers all 20, often confidently wrong.
This is not “Vega is worse.” It is the opposite: the engine flags a hard, OOD construction instead of pretending to answer. The maintainer explicitly called it “an honest reading of the abstain rate.”
Interior collapse
At 32k/48k, interior cells collapse toward a constant answer (modal prediction share 0.90–1.00 at the 32k middle, 48k start, and 48k middle cells); the end cell is not. The start falls with length (0.75 → 0.55 → 0.45); the middle falls (0.45 → 0.40 → 0.35); the end is flat at 15/20.
Power/caveats
- n=20 per cell → ±0.22 Wilson interval; a null is underpowered, not equivalence.
- One synthetic repetitive filler, one question, 20 requests, one 8 GB machine, one checkpoint family.
- 72k nominal OOMs on 8 GB even with
flash-linear-attention(6.78 GiB used, 276 MiB short); committed top cell 48k (~47k prompt tokens, ~5.5 s/call). - Documents sized with the classic tokenizer; the reader’s own prompt token count is reported.
- Classic arm at 7k, not 8,192, to avoid the ~46-token head cut.
- The aggregate
longctx0.831 is a different construction, not a like-for-like comparison. The 73k claim is a capacity claim. - The preprint (
10.20944/preprints202611.0781.v1) returned 403; not peer-reviewed; whether it has a table is unverified.
What it means — and what it doesn’t
It means
- First independent position × length curve for the default Vega engine.
- Vega forced-choice is end-best at 7k/32k/48k; classic at 7k is start-best. Prompt layouts differ; it is a measurement, not a mechanism.
- Length at the end position is flat; interior falls with length.
- The engine abstains/routes to review on most of this synthetic construction. That is a real, useful output.
- 72k is not runnable on 8 GB even with
fla; 48k is the measured top cell here. - This is not a router change, a library change, or a “Vega vs classic” ranking; the classic 7k cell is a construction control.
It doesn’t mean
- “Vega is worse.” It routes most items to review.
- “The 0.831 longctx claim is false.” Different construction; not a replication.
- “It is definitive.” n=20, synthetic, OOD filler, one filler/question, one machine.
- “The cross-attention work in the lab should be submitted.” It is inference-inert; see the portfolio.
- “All lab claims are proven.” The ledger has 32 candidate + 15 reproduced; P1b is still
candidate; arm2 is unconverged.
Your full lab portfolio (not just PRs)
The user’s point is correct: the lab is much bigger than #1538 or even #696/#697. Not all of it should be a PR.
The scientific arc
- Reproduce upstream exactly on upstream’s own texts; then a balanced n=200/cell synthetic harness with paired tests.
- Two regimes: truncation at 1,024 (request tokens kept = 0.00) vs partial use at 8,192 (request present, accuracy still falls 0.840 → 0.420).
- Position: n=20 merged (#697); n=200 U-shaped 0.580/0.295/0.335/0.280/0.415 in the lab; merged result later extended to Vega (#1538).
- Mechanism: marker features carry the label at 0.820 on held-out templates while the shipped head returns 0.300;
random_poscontrol 0.44. The encoder is not the bottleneck; extraction is. candidate - Positive: fine-tune the shipped head with the encoder frozen → +9.5pp at the primary cell across three seeds (+15–19pp mid-document on larger seed ranges); not converged;
arm2_random_initnever run. lab artifact - Negative architecture: init-fair cross-attention is inference-inert — 0.472 vs 0.472, 8/600 flips, 4/4 symmetric at n=600. measured
- Refuted: RoPE scaling (identity in-window), sliding-window widening (reverses at n=120), all-layers-global (0.000 at pad=1000), bf16=fp16=fp32. measured
- Audit: independent re-derivation, drift gate, red-team, 18 stated limitations; corrected its own overwritten seed artifact, wrong n, stale PR status, etc. measured
What is verified vs not
- 18/18 PASS
run.py --recheck baseline-power-n200; baseline table re-derived exactly;reproduce.shexit 0. this session - Ledger: 32 candidate, 15 reproduced, 6 falsified variants, 1 unresolved, 1 superseded. Not every claim is promoted.
- Architecture arms single-seed; arm2 has three; protocol required three for architecture; capacity-matched control never run;
arm2_random_initnever run. - Two disjoint pools (3-class vs 4-class, zero item overlap; nulls 0.335 vs 0.250); no cross-pool comparison.
- The lab itself warns the synthetic repetitive filler is a salience shortcut and not evidence about real long documents.
What else can we contribute?
The PR is merged; here is a ranked, realistic shortlist. Signal first for a new research PR. Avoid #1452/#1266/#1267 unless coordinating. Do not submit the cross-attention head. No router tuning; the maintainer has declined that framing.
1. Follow-up research PR: auto-route accuracy + calibration for Vega at long context highest value
Your merged finding is that forced-choice ≠ auto-route. The natural next measurement: among route="auto", what is accuracy and coverage? ECE / reliability of answer_confidence, prediction_set, unbound? And does agent.fit(...) on a small number of items reduce the 85–100% review rate and improve accuracy on this construction, at 7k/32k/48k?
- Collision: none. Fit: research/eval is first-class. Effort: ~1–2 days GPU. No library change.
2. Power + natural-text arm of your own result
n=20 → n=200 balanced 4-class; replace repetitive filler with natural text; test whether abstention drops and accuracy stabilizes; test 72k on a larger GPU; paired classic-vs-Vega on identical items.
- Collision: low. Effort: medium. The lab already has an n=200 balanced pool; upstream convention commits per-item JSON.
3. Small docs follow-up on your merged work
A tiny docs PR qualifying the main README’s “with vegaml=True… 73,728 tokens whole” with the measured 48k/8 GB limit and abstention rate, linking research/results/vega_position_sensitivity.json. Highest merge probability; lowest value.
4. #1452 paired predict/predict_long evaluation — offer, don’t take
The cleanest unclaimed measurement ask, but it is owned by xinpingzh and has had maintainer silence. Comment offering your paired-test harness; don’t implement unilaterally. Note default Vega predict_long is read-whole, not windowed; #1452 is about classic predict_long. #1266/#1267 is claimed/stale; don’t duplicate.
5. P1 sliding-mask perf benchmark, re-measured on current main
Your earlier finding (all 22 layers receive dense 7069×7069 masks; ~4.40 GB masks; sliding ≈ global in SDPA; CPU already windows; TileLang fast=True already windows on GPU) was on v0.3.20 and not re-measured on v0.5.6. Benchmark-first; no accuracy claim; now that CI ONNX is fixed. Lower strategic value since Vega is the default.
6. Publish the lab (not an upstream PR)
- Push the 4 unpushed launch commits to
Parswanadh/laya-lab(fast-forward; adds root README,docs/REDTEAM.md,docs/REDDIT-POST.md, re-derivation scripts, figures; removes 14 tracked scratch/third-party files from the tree). - Fix stale PR-status lines:
PR-PLAN.md,progress.md,CHANGELOG.mdstill say #696/#697 open; also note #1538 merged v0.5.6. (progress is append-only; add a new entry.) - Deploy or drop
laya-site/laya-contributions;laya-contributionsalready has a Cloudflare Pages projectlaya-contributions.pages.dev. Fix its n=20-vs-n=200 and “we measured” labels first.
7. Write up the mechanism + negatives (not a code PR)
P1b + arm2 + H5 + the audit is a coherent story: the encoder carries the information, the head does not use it, fine-tuning recovers part, and the architectural fix is inference-inert. Better as a long-form post or preprint; this PR-page is the same idea applied to Vega.
8. Contribute to vegaml separately (optional)
The engine repo is younger and very active; your measurement harness could target engine-specific issues. The user’s goal is Laya contribution; this is optional.
What not to submit
- The cross-attention head. Its own ablation is indistinguishable from it (0.472 vs 0.472, 8/600, 4/4). The negative write-up is valuable; the branch is not mergeable.
- The full 2,000-row harness as one monolithic PR without a maintainer conversation. Carve out a bounded artifact like #1538.
- Router tuning. The maintainer declined that framing; a measured crossover is a baseline, a proposed threshold is a product decision.
- Replicating the Vega board.
longctxitems aren’t public; 4B/27B don’t fit 8 GB; not novel. - Duplicating #1266/#1267 or #1452. Coordinate first.
- Masking CI (e.g., a fake
tests (py3.9),continue-on-errorfor ONNX). That would make the page green by making checks dishonest. The ONNX issue was real and was fixed separately in #1541.
Concrete next steps
- Confirm the merged PR at github.com/NandhaKishorM/laya/pull/1538 and the v0.5.6 release note.
- Re-derive the table locally, no model:
python research/scripts/bench_vega_position.py --analyse research/results/vega_position_sensitivity.json. - Pick contribution #1 (auto-route accuracy + fitted-vs-zero-shot for Vega at long context) or #3 (tiny docs follow-up). Open a short issue signalling; research is first-class.
- Push the lab launch branch and fix stale docs.
- Use this page as the reference; it is a snapshot, not a live dashboard.
One-paragraph description you can reuse
With PR #1538 merged in Laya v0.5.6, I have three upstream contributions. #696 corrected the state budget and added a CI test. #697 measured the classic encoder’s evidence-position sensitivity. #1538 added the first independent position × length curve for Laya’s default Vega engine, on the same 20-item construction as #697. On this synthetic stress test, Vega’s forced-choice accuracy is end-best (0.75 at 7k/32k/48k) versus start-best for the classic encoder (0.85/0.50/0.40 at 7k); only middle-vs-end at 48k is significant (0/8, p=0.0078); length at the end is flat. The honest headline is that Vega abstains and routes to review on 85–100% of the items, so accuracy is forced-choice, not auto-route; the maintainer called it “a careful study, and an honest reading of the abstain rate.” It is a three-file research PR with no library change, every prediction committed, four pre-specified tests, and documented limits (n=20, synthetic, 48k top cell on 8 GB, 72k OOM even with
flash-linear-attention).
Provenance, tags, and limits
measured = re-derived this session or in the committed artifact. retrieved = read from GitHub/HF/PyPI this session. claimed = asserted by a doc/maintainer, not independently verified. No number is invented; where the lab itself marks a claim candidate or unconverged, this page says so.
Environment (measured on the committed run)
- Laya
0.5.3(PR branch) → merged onto0.5.6;vegaml 0.19.0;torch 2.11.0+cu128;transformers 5.24.0; CUDA 12.8. - NVIDIA RTX 4070 Laptop 8 GB;
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True;flash-linear-attention 0.6.0;USE_TF=0;flock .gpu.lock; one GPU job at a time. - Vega reader
nandakishorm/vega-U;max_len=73,728; classicconvaiinnovations/layamultilingualmax_len=8192; tokenizerconvaiinnovations/laya/multilingual/tokenizer.
Commands
# re-derive, no model
python research/scripts/bench_vega_position.py --analyse \
research/results/vega_position_sensitivity.json
# run the grid (8 GB; install flash-linear-attention first)
python research/scripts/bench_vega_position.py --device cuda \
--lengths 7000,32000,48000 --classic-lengths 7000 \
--positions 0.0,0.5,1.0 --arms vega,classic \
--out research/results/vega_position_sensitivity.json
# upstream gates
ruff check laya/ --select=E9,F63,F7,F82,F401,F811 --line-length=120
python -m compileall -q laya/ tests/
Links
- PR #1538: github.com/NandhaKishorM/laya/pull/1538
- Laya v0.5.6: releases/tag/v0.5.6
- #696 / #697 / #1452 / #1266 / #1267 / #1529 / #1541 on NandhaKishorM/laya
- Laya lab: github.com/Parswanadh/laya-lab
- Research report:
reports/Laya relevance and PR viability.md