Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
fec204e
Add offline candidate trees and verification completion menus
amy-why-3459 Nov 18, 2026
d41f520
harness: assemble bounded VATS and GVO with durable work control
amy-why-3459 Nov 18, 2026
fffb3fc
harness: retain evaluator identity across search execution
amy-why-3459 Nov 18, 2026
db0de8c
harness: bind GVO groups to identical initial observations
amy-why-3459 Nov 18, 2026
79d4c6d
harness: inject search role operations across the model boundary
amy-why-3459 Nov 18, 2026
94ba88d
apps: isolate benchmark loading and use bounded protocol processes
amy-why-3459 Nov 18, 2026
b843233
harness: reconcile unstarted search work and retain known overruns
amy-why-3459 Nov 18, 2026
6f8f2c5
search: preserve terminal decisions and timeout accounting
amy-why-3459 Nov 18, 2026
41494cd
search: reconcile blocked recovery and adapt to current module layout
amy-why-3459 Nov 23, 2026
b0e9493
cli: defer search runtime loading until dispatch
amy-why-3459 Nov 24, 2026
edf25fa
docs: explain GVO and measure its incremental effect on Ascend
amy-why-3459 Nov 24, 2026
62efabf
search: enforce launch, holdout and final promotion controls
amy-why-3459 Nov 24, 2026
1d7cc74
search: bind final promotion to the verified deployment winner
amy-why-3459 Nov 24, 2026
4cf95a9
search: freeze acceptance before holdout access
amy-why-3459 Nov 24, 2026
a84eaaf
search: recover final checks interrupted before reservation
amy-why-3459 Nov 24, 2026
8af091b
search: align tests and module guides with main
amy-why-3459 Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/apps-module-migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
"docs/contracts/function-owners.md",
"docs/harness-improvement.md",
"docs/module-layout.md",
"src/inferrsi/apps/workflows/search_benchmarks.py",
"tests/check_installed.py",
"tests/apps/test_apps_module_migrations.py",
"tests/harness/test_harness_improvement.py",
Expand Down
6 changes: 6 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ The optional [service-reuse protocol](service-reuse-campaigns.md) adds project
assessment and foreground service ownership within this same controller. Its
protocol and result rules live in `harness.project_service`, with process
lifetime managed by `local_process`.
The [experimental speculative search](speculative-search.md) composes immutable
candidate trees, bounded completion menus, synchronous VATS and CPU GVO roles.
Its work controller uses shared RunStore transactions and the existing local
process executor. Apps supplies Engine/Skill grading; the support matrix identifies
remaining production accounting and pilot evidence. Serial session commands keep
their existing controller and behavior.
The [native host handoff](native-agent-sessions.md) lets the initiating Agent
resolve the task request before any campaign exists, use its host's new-session
tool and retain the native identity and returned artifacts. The child owns the
Expand Down
4 changes: 4 additions & 0 deletions docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ Effect classes used below:
| Qualify an artifact verifier host | [Manual reviewer qualification](skill-evaluation/skill-eval-reviewer-qualification.md), `python -m tools.skill_eval_qualify` | Trusted-control execution / report-generating | Manual main-only workflow; fixed software controls, no model or external artifact input; unavailable isolation fails rather than skips |
| Replay a cloud-generated parser pair | [Isolated cloud replay](skill-evaluation/skill-eval-cloud-replay.md), `python -m tools.skill_eval_cloud_replay` | Untrusted-artifact execution / report-generating | Manual pinned data ingress; same-host controls before bubblewrap-only replay; no models or credentials |
| Validate one harness-improvement step | [Offline improvement](harness-improvement.md), Python `tools.skill_eval_improve.prepare` / `run_offline` | Snapshot-writing / offline experiment-executing | Supplied declarative INV/DOM edits, shared total limits, rerun and one holdout gate; trusted fixed-output clients only; no real-model or Store execution |
| Build an offline candidate tree and completion menu | Python `harness.search_tree` / `harness.verification_plans.completion_menu`; [control contract](speculative-search.md) | Read-only / in-memory transitions | Immutable candidates, scoped caller-supplied receipts and bounded exact plans; execution, durable state, accounting, learned roles and final acceptance require separate adapters |
| Run bounded speculative Engine search and role updates | `inferrsi search engine`; [support and configuration](speculative-search.md) | Execution / candidate writes / CPU model updates | Explicit shared RunStore, permissions, checkpoint, budgets, domain and final gate; actual device allocation is caller-owned |
| Inspect/export speculative search | `inferrsi search status` / `search export` | Read / output artifact | Reads the existing store; never restarts search, training or final evaluation |
| Compose Skill speculative search | Python `apps.workflows.search_benchmarks.SkillEvaluator` and checkout `tools.speculative_skill.Comparator` | Explicit provider execution through existing comparator | Frozen original baseline, split descriptors, independent grader and bounded provider; see campaign accounting limits in the support matrix |
| Plan and report skill PR evaluations | [Skill PR integration](skill-eval-pr.md), `python -m tools.skill_eval_pr` | Read-only planning / authorized experiment-executing / PR-publishing | Trusted mapping, exact operator approval, consumed execution identity and credential-separated publication from retained evidence; no automatic paid trials |
| Recover goal progress and the next proposal | [Offline goal checkpoints](goal-checkpoints.md), `python -m tools.goal_checkpoint` | Read-only | Explicit scope/criteria, pinned owner decisions and existing comparison receipts; a disposable view, never execution or acceptance authority |
| Summarize campaign gains | `tools/campaign_summary_chart.py`; `report`/`run` figure | Figure-generating | Renders recorded values into one gain figure plus a matching table; validates the specification and computes nothing new |
Expand Down
488 changes: 488 additions & 0 deletions docs/speculative-search.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions evidence/qwen-vats-gvo-910b1-20261124/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Matched VATS and GVO deployment on one Ascend 910B1

This Engine diagnostic for [InferRSI #363](https://github.com/InferMatrixLab/InferRSI/issues/363)
compares a fixed-order serial control, frozen VATS and VATS after one GVO update
on the packaged Qwen-Image 2.1 denoiser. The underlying search and task code was
[f5b9a18](https://github.com/InferMatrixLab/InferRSI/tree/f5b9a1819d387e0a0a1a219da6dcc0f5504c4069).
The [design document](../../docs/speculative-search.md#measuring-the-contribution-of-gvo)
explains the comparison and reports the independent-final results.

- [Frozen plan](plan/plan.json), [archived measurement driver](https://github.com/InferMatrixLab/InferRSI/blob/1921271c99d1fc3532e882c1ce6dd4e3ce6d74a0/evidence/qwen-vats-gvo-910b1-20261124/plan/run.py) and [RunSpec](plan/runspec.json) identify the exact edits, weights, workload, ordered seeds, evaluation caps, runtime and task file hashes.
- [Summary](results/summary.json) contains every online result, the shared root and training durations, the before/after weights, group returns and paired aggregates.
- [Trial index](results/trials.jsonl) records every physical task evaluation, its selected source hash, verdict, task-result hash and path inside its attempt directory.
- [Local archive metadata](results/local-archive.json) gives the size and SHA-256 of the 725-file raw bundle retained in the shared experiment workspace. The public PR provides the compact inputs and results.
- [Candidate sources](patch/README.md) and [verification instructions](validator/README.md) explain how to regenerate the experiment with the [current driver](plan/run.py) and re-assess the retained measurements against their durable final decisions.

The task uses random BF16 weights, five numerical cases, three latency cases and
fixed workload seeds. Each complete evaluation runs two paired AB/BA blocks
with two timed samples per block and one warmup per arm and case. The score
is the geometric mean of the three original-baseline/candidate median latency
ratios. The frozen quality gate checks trajectory steps and weight updates.

Before successful qualification, the first container could not initialize its
allocated device. That root attempt produced an infrastructure failure with
verified cleanup and no score. All methods and input hashes were retained when
the job was relaunched with the known working allocator/container mapping.
The initial failure, queueing, container startup and experimental setup sit
outside the reported online arm times. Root acquisition and GVO collection plus
the gradient update have separate measured costs. Each online arm includes its
own independent final. The final repeats the same workload. Transfer to new prompts or tasks and
variability across independent training runs remain unmeasured.
9 changes: 9 additions & 0 deletions evidence/qwen-vats-gvo-910b1-20261124/patch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Candidate sources

All arms used the packaged Qwen denoiser baseline and the exact replacements in
[the frozen edit vocabulary](../plan/edits.json). The two allowed edits compose in
either order. The experiment driver checks the baseline SHA-256, materializes
the four possible source files and identifies each selected candidate by its
file hash. Infra, the evaluator and the search implementation were common to all
arms. The [measured runtime revision](https://github.com/InferMatrixLab/InferRSI/tree/f5b9a1819d387e0a0a1a219da6dcc0f5504c4069)
contains the original baseline and the full Engine evaluation protocol.
14 changes: 14 additions & 0 deletions evidence/qwen-vats-gvo-910b1-20261124/plan/edits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
[
"prefix-reuse",
"candidate.py",
" current = latents\n for step in range(sigmas.numel() - 1):\n # The original entry projects conditioning before sequence preparation,\n # even when decode subsequently uses the already cached prefix K/V.\n prefix = _rms(text, params[\"text_norm\"], eps, zero_center=True)\n prefix = F.linear(\n F.gelu(F.linear(prefix, params[\"text_in\"]), approximate=\"tanh\"), params[\"text_out\"]\n )\n",
" prefix = _rms(text, params[\"text_norm\"], eps, zero_center=True)\n prefix = F.linear(\n F.gelu(F.linear(prefix, params[\"text_in\"]), approximate=\"tanh\"), params[\"text_out\"]\n )\n current = latents\n for step in range(sigmas.numel() - 1):\n"
],
[
"modulation-reuse",
"candidate.py",
" for index, block in enumerate(params[\"blocks\"]):\n scale1, gate1, scale2, gate2 = modulation.chunk(4, dim=-1)\n normalized = F.layer_norm(value, (hidden,), eps=eps)\n normalized = normalized * (1 + _rows(scale1, target_rows, batch))\n qkv = F.linear(normalized, block[\"qkv\"]).view(batch, -1, 3, heads, head_dim)\n query, key, projected = qkv.unbind(2)\n query = _rotate(_rms(query, block[\"q_norm\"], eps), angles)\n key = _rotate(_rms(key, block[\"k_norm\"], eps), angles)\n if step == 0:\n cache.append((key[:, :prefix_tokens].clone(), projected[:, :prefix_tokens].clone()))\n else:\n key = torch.cat((cache[index][0], key), dim=1)\n projected = torch.cat((cache[index][1], projected), dim=1)\n attended = (\n F.scaled_dot_product_attention(\n query.transpose(1, 2),\n key.transpose(1, 2),\n projected.transpose(1, 2),\n attn_mask=attention_mask,\n )\n .transpose(1, 2)\n .reshape(batch, -1, hidden)\n )\n value = value + _rows(gate1, target_rows, batch).tanh() * F.linear(\n attended, block[\"attention_out\"]\n )\n normalized = F.layer_norm(value, (hidden,), eps=eps)\n normalized = normalized * (1 + _rows(scale2, target_rows, batch))\n # Separate gate/up projections are present in the original source.\n mlp = F.silu(F.linear(normalized, block[\"gate\"])) * F.linear(normalized, block[\"up\"])\n value = value + _rows(gate2, target_rows, batch).tanh() * F.linear(mlp, block[\"down\"])\n",
" scale1, gate1, scale2, gate2 = modulation.chunk(4, dim=-1)\n scale1_rows = 1 + _rows(scale1, target_rows, batch)\n scale2_rows = 1 + _rows(scale2, target_rows, batch)\n gate1_rows = _rows(gate1, target_rows, batch).tanh()\n gate2_rows = _rows(gate2, target_rows, batch).tanh()\n for index, block in enumerate(params[\"blocks\"]):\n normalized = F.layer_norm(value, (hidden,), eps=eps)\n normalized = normalized * scale1_rows\n qkv = F.linear(normalized, block[\"qkv\"]).view(batch, -1, 3, heads, head_dim)\n query, key, projected = qkv.unbind(2)\n query = _rotate(_rms(query, block[\"q_norm\"], eps), angles)\n key = _rotate(_rms(key, block[\"k_norm\"], eps), angles)\n if step == 0:\n cache.append((key[:, :prefix_tokens].clone(), projected[:, :prefix_tokens].clone()))\n else:\n key = torch.cat((cache[index][0], key), dim=1)\n projected = torch.cat((cache[index][1], projected), dim=1)\n attended = (\n F.scaled_dot_product_attention(\n query.transpose(1, 2),\n key.transpose(1, 2),\n projected.transpose(1, 2),\n attn_mask=attention_mask,\n )\n .transpose(1, 2)\n .reshape(batch, -1, hidden)\n )\n value = value + gate1_rows * F.linear(\n attended, block[\"attention_out\"]\n )\n normalized = F.layer_norm(value, (hidden,), eps=eps)\n normalized = normalized * scale2_rows\n # Separate gate/up projections are present in the original source.\n mlp = F.silu(F.linear(normalized, block[\"gate\"])) * F.linear(normalized, block[\"up\"])\n value = value + gate2_rows * F.linear(mlp, block[\"down\"])\n"
]
]
32 changes: 32 additions & 0 deletions evidence/qwen-vats-gvo-910b1-20261124/plan/plan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"task": "qwen21-denoise-npu",
"sampling": ["--pairs", "2", "--samples", "2", "--warmups", "1"],
"source_baseline_sha256": "21c9ae912902a10fcbb39ecebbc49fa715d33ec9cad72296f651793cfe10a217",
"image": "sha256:5d81b480618d76accb1c80afd26b0c572b4ff585c1de1a3c37687faf3176d0f9",
"checkpoint": {
"drafter": [0, 0],
"policy": [1, 1, 2, 0, 0, 0, 0.5, 0.5],
"scorer": [0, 0, 0, 0, 0, 0, 0, 0],
"origin": "Fixed initial preference for executing and verifying edits; uniform edit prior."
},
"settings": {
"max_steps": 5, "max_parents": 1, "draft_depth": 2, "max_targets": 2,
"max_jobs": 3, "max_plans": 16, "preparation_ms": 5000, "draft_ms": 5000,
"search_ms": 390000, "refine_queries": 0
},
"max_candidates_including_root": 3,
"max_depth": 2,
"max_attempts_including_root": 5,
"check_ms": 180000,
"train": {"rounds": 1, "group_size": 6, "training_cap_ms": 20000, "learning_rate": 1.0, "seed": 17, "mode": "reset"},
"blocks": [
[101, ["serial", "frozen", "trained"]],
[202, ["frozen", "trained", "serial"]],
[303, ["trained", "serial", "frozen"]]
],
"serial_order": ["prefix-reuse", "prefix-reuse+modulation-reuse"],
"final_quality": "Full packaged numerical gate and verified cleanup; report every final score and target miss.",
"primary": "Geometric mean across blocks of trained/frozen independent-final speedup ratios. Also report trained/serial, frozen/serial, the paired ratios and mean online wall time.",
"cost": "One root qualification shared across all conditions. Charge the single training collection and update separately. Each online arm gets at most two candidate checks and a fresh final. No retuning or target-triggered stopping.",
"interpretation": "Three descriptive deployment blocks of one task and one training checkpoint. Incomplete pairs stay visible and cannot establish efficacy."
}
13 changes: 13 additions & 0 deletions evidence/qwen-vats-gvo-910b1-20261124/plan/retained-sha256.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"README.md": "e8ae15c859ecbb15a9c2af8da15c26725886940540f4cdaf9c590b94f2002705",
"patch/README.md": "e2a3af7bd373d9e1637265f3980fd272cbbc181d455d275794bf66f2cc6f8095",
"plan/edits.json": "2975fee42370debd80f627ecd58880e45280968f739ca3045c8b388bc9ab4cbb",
"plan/plan.json": "66344b1ca1522fd3b38966c243bbb6ec8eb8fecc203ccd171690463569632013",
"plan/run.py": "8c66690aa9bb7b53dcbfe568bfe3654a65436a11ee7a05b21c2d3c0d611e1ad5",
"plan/runspec.json": "f3f2ab71d227ee3e7d95233cc3d34e17ab41d086f519f558fb3aca5200515404",
"results/local-archive.json": "c5df5dc55feb202e53f28d5b6f4ba28913e893277d9deb5e783a472c686d9ae6",
"results/summary.json": "df3029cfcaacb91018b6c931017b059b99a80633116586f9446fe82e31986132",
"results/trials.jsonl": "6bd39719a5c0d794b1c5e04403b03789ae5ca42e0c9c74694200bdb6355a0756",
"validator/README.md": "3b2b92982f3e3c377a755972002beaad454451bdc08cd2db68e5d4256337fa3d",
"validator/check.py": "4b408d07d0cdff724312f86746c9de5d6996e9b8925f61c5453dc9761f646f04"
}
Loading
Loading