diff --git a/.gitattributes b/.gitattributes index 7b797e8c4..041f7bceb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,6 +4,10 @@ # Preserve recorded evidence and historical validator bytes across checkouts. /evidence/** -text /tests/fixtures/legacy/** -text +/tests/fixtures/atomic-reader/** -text whitespace=-blank-at-eof +# Migrated task paragraphs and YAML headers retain their original LF separators. +/src/inferrsi/knowledge/atoms/task-*.md text eol=lf whitespace=-blank-at-eof +/src/inferrsi/knowledge/compositions/*-header.yaml text eol=lf whitespace=-blank-at-eof # A session started by an older runtime keeps its exact bytes; its plan pins file hashes. /tests/fixtures/optimization-session/pre-infra-removal-session/** -text /tests/fixtures/optimization-session/pre-trials-rename-session/** -text @@ -12,9 +16,18 @@ /evidence/README.md text eol=lf /evidence/_template/** text eol=lf +/src/inferrsi/knowledge/atoms/casebooks/* -text +/src/inferrsi/knowledge/atoms/workflows/** -text +# Two released Markdown guides use trailing spaces for hard line breaks. +/src/inferrsi/knowledge/atoms/workflows/cite-check-downstream-pr.md whitespace=-blank-at-eol +/src/inferrsi/knowledge/atoms/workflows/competitor-scan.md whitespace=-blank-at-eol + # Retain this upstream license's original CRLF Git blob bytes. /src/inferrsi/knowledge/data/skill_library/systems/frameworks/torch-npu/torch-npu/references/licenses/op-plugin-LICENSE.txt -text +# Source-backed Record atoms pin byte ranges in the original release files. +/src/inferrsi/knowledge/atoms/records/*.json -text + # Generated third-party bundles, with source references and notices beside them. /plugins/inferrsi-dsh/vendor/ssh2.cjs linguist-generated=true linguist-vendored=true /plugins/inferrsi-dsh/vendor/yaml.cjs linguist-generated=true linguist-vendored=true diff --git a/docs/apps-module-migrations.json b/docs/apps-module-migrations.json index 9256effd3..49ab68810 100644 --- a/docs/apps-module-migrations.json +++ b/docs/apps-module-migrations.json @@ -549,7 +549,10 @@ "src/inferrsi/apps/cli/__init__.py", "tests/apps/test_apps_context_provider.py", "tests/apps/test_apps_knowledge.py", - "tests/harness/test_harness_generation_seal.py" + "tests/apps/test_optimization_session.py", + "tests/harness/test_harness_generation_seal.py", + "tests/knowledge/test_atomic_casebooks.py", + "tests/knowledge/test_atomic_records.py" ], "status": "retired", "first_removal_version": "0.3.4" diff --git a/docs/guides/knowledge/knowledge-layout.md b/docs/guides/knowledge/knowledge-layout.md index 8caf9ec7f..25da0b6df 100644 --- a/docs/guides/knowledge/knowledge-layout.md +++ b/docs/guides/knowledge/knowledge-layout.md @@ -4,6 +4,111 @@ The diagrams and counts record the layout migration in [#516](https://github.com To reproduce the #516 search comparison, use the baseline and candidate checkouts from that migration on the same machine. The [search comparison](../../../tools/compare_find_layouts.py) checks ordered results across both trees and times the end-to-end CLI. The [task queries and acceptance criteria](../../../tests/fixtures/find/layout-queries.json) define the workload. +## Atomic candidate for domain authors and Apps + +The shared candidate accepts JSON descriptors for atoms and compositions. An +author works under `src/inferrsi/knowledge/atoms/` or `compositions/`. For a +clean build, pass that Knowledge root and a separate, new installation directory +to `inferrsi.knowledge.atomic_build.build_generation(source, target, permits=..., +source_roots=...)`. Supply physical source snapshots keyed by the exact Git commit +or, for a content-addressed source, the complete file SHA-256. Use the original +source paths within each snapshot. A release wheel can be staged under the +corresponding repository paths after verifying its release digest. +The existing wheel and plugin continue to load the published library during +candidate review. + +Each descriptor carries normalized Bundle `metadata`, optional in-bundle +`dependencies`, and a `content` mapping. A resource is either `{"text": "..."}` +or `{"path": "inputs/file"}` relative to its descriptor directory. The default +authority is `package`. An explicit `authority` preserves a different source's +identity and requires its own grants. A navigation composition can omit its +entrypoint and content. The builder derives its navigation record. A Case +provides the original `case.json` so a finding can be reopened by stable ID or +by its JSON pointer at the requested revision. + +For a Case backed by released files, `case_resources` maps each public resource +name to a pinned L3 node. The builder derives the entrypoint and required +resource order from the original `case.json`, checks relative paths against the +same source snapshot, and retains both names when the release exposed its JSON +under two names. The public L1 route takes one finding and delivers its source +span with the Case's original applicability, state, limits, credit and sources. +L0 opens the Case's navigation, L2 its guide, and L3 both complete originals. +The [Case migration tests](../../../tests/knowledge/test_atomic_casebooks.py) +replay the released Reader's decision cards through the installed public refs. + +A self-contained Record keeps its released JSON bytes under `atoms/records/`. +Its L3 descriptor can declare named `parts`, each with a layer, source JSON +pointers, a half-open byte range and a digest. The builder seals each part as +an individually addressable atom using the original source and grants. The +public Record composition pins the full original and its parts. A +`record.json` entrypoint with `{"record_node": "original"}` derives the canonical +resource from that complete L3 node. L1 routes include the Record's original +scope, limitations, verification, status, recommendations and validation plan +alongside its claims and sources. L3 reopens the original file byte for byte. +Records declaring linked skill documents need their full relative resource set. +The [Record migration checks](../../../tests/knowledge/test_atomic_records.py) +compare the candidate with decision cards captured from the released wheel. + +- `metadata.atom` declares its L0–L3 layer, applicability (`when`), license, + separate read/retain/redistribute grants, and a `source_span` with source + index, path, half-open byte range and SHA-256. Publication checks the whole + file against `sources[index].sha256` and compares the declared slice with the + atom's actual bytes. A content-addressed atom containing its complete file at + offset zero carries its own snapshot. The reader records `verified_at_build` + for each atom whose range the build compared with a separately supplied file + and whose installed generation matches the caller's trusted release ID. + Without either check the receipt records `declared`. Its Bundle revision + covers metadata and resources. +- `metadata.composition` declares named `nodes` (qualified ref, exact revision, + required prerequisite nodes), `routes` (layer, required and optional roots, + conditions, finding, conflicts and superseded routes), and its grants and + license. An exportable composition adds `skill` with `name`, `description`, + an L0 node called out by `body`, and a mapping from public relative resource + paths to pinned nodes. For a host that loads a complete procedure, list its + additional pinned text nodes in `skill.sections` in reading order. The + builder appends their original bytes, including whitespace, to the L0 body. + A Reader request for L0 still returns the composition's L0 route. Each of + the seven public task names has one owner. + To preserve native host fields during migration, `skill.frontmatter` can + name a content resource in the pinned composition. The builder verifies its + name and description, requires exactly one header with no procedure text, + and emits its original bytes, including invocation settings and attribution. + The [executable authoring example](../../../tests/knowledge/test_atomic_generation.py) + builds all seven entries and a supporting skill. +- For the task-domain migration, read the [v0.3.4 owner and byte + map](../../../tests/fixtures/atomic-reader/task-domain-v0.3.4.json). Run + `inferrsi skills --root /skills enter task-debug` against a + built candidate to open the complete primary procedure. Use the same root + with `resource inference-task-router references/routes/debug.json` for its + original routing card. The card's candidate skill IDs identify owners to + consult in the other domains. +- The installer writes `knowledge/{atoms,compositions}/`, the generated catalog + and file digests in `knowledge/generation.json`, and `skills//SKILL.md` + with the declared references, assets and scripts. Two builds of the same + input yield the same generation ID. `InstalledGeneration(root)` verifies the + complete tree against its own seal before exposing `tasks`, `skills`, + `catalog` or `read_resolved`. To attest the build, obtain the expected ID + independently of the installation (for example from the trusted release + record) and open `InstalledGeneration(root, expected=release_id)`. An ID + mismatch refuses the open. A prior generation can reopen its own receipts. +- Ordinary callers use `apps.workflows.knowledge.read_selection(source, ref, + permits=..., revision=..., layer=..., finding=..., context=..., max_bytes=...)`. + Managed optimization uses `apps.workflows.campaign.capture_selection(root, + source, ref, ...)` with the same selection and the additional retain grant. + The response binds original bytes, digests, source ranges and dependency + paths to the chosen revision. A required-group refusal delivers zero + bodies. Optional omissions carry a reason. + +Project-service reuse has a separate receipt format that excludes content +fingerprints. The pinned-finding capture above covers ordinary managed +optimization. For `evaluation_mode=service_reuse`, use the service's own +receipt path. In the [#709 CLI](https://github.com/InferMatrixLab/InferRSI/pull/709), +`find --session` retains the source at search time and its returned `read_args` +open and page that retained version, including relative resources. The new +pinned capture rejects this mode before reading or writing session state. +Atomic finding selection for this mode needs a service-compatible receipt +and belongs to the subsequent Reader adaptation. + ## 1. Task layers and evidence ```mermaid diff --git a/src/inferrsi/apps/workflows/campaign.py b/src/inferrsi/apps/workflows/campaign.py index 3340eca2d..52dd2cd38 100644 --- a/src/inferrsi/apps/workflows/campaign.py +++ b/src/inferrsi/apps/workflows/campaign.py @@ -11,8 +11,10 @@ from pathlib import Path from inferrsi import __version__ -from inferrsi.harness.records import campaign_records, knowledge_capture +from inferrsi.harness import optimization +from inferrsi.harness.records import atomic_capture, campaign_records, knowledge_capture from inferrsi.knowledge._skill_selection import FIND_RELEVANCE, validate_relevance_method +from inferrsi.knowledge.atomic_reader import AtomicReader, PinnedSource from inferrsi.knowledge.catalog import BACKENDS from inferrsi.knowledge.context_projection import ( PROVENANCE_FIELDS, @@ -31,6 +33,14 @@ def create_campaign(root: Path, campaign_id: str, *, target: float | None = None ) +def capture_selection(root: Path, source: PinnedSource, reference: str, *, + permits, **request) -> dict: + """Supply the same Reader as an ordinary read to the managed campaign.""" + return optimization.capture_selection(root, AtomicReader(source, permits=permits), + reference=reference, assemble_text=assemble_context_text, + **request) + + def capture_context(root: Path, *, context_id: str, reader, query: str = "", relevance: str | None = None, relevance_method: str | None = None, @@ -177,6 +187,11 @@ def verify_capture(raw: bytes) -> tuple[dict | None, str]: document, state = knowledge_capture.verify_capture(raw) if document is None: return None, state + if document["request"].get("mode") == "pinned_selection": + try: + atomic_capture.verify_stored(document) + except (KeyError, TypeError, ValueError, AttributeError): + return None, "atomic_receipt_mismatch" if assemble_context_text(document["contexts"]) != document["assembled_text"]: return None, "assembly_mismatch" return document, "verified" diff --git a/src/inferrsi/apps/workflows/knowledge.py b/src/inferrsi/apps/workflows/knowledge.py index f6adedd1b..c5936af81 100644 --- a/src/inferrsi/apps/workflows/knowledge.py +++ b/src/inferrsi/apps/workflows/knowledge.py @@ -2,6 +2,7 @@ from pathlib import Path +from inferrsi.knowledge.atomic_reader import AtomicReader, GroupDelivery, PinnedSource from inferrsi.knowledge.knowledge_operations import KnowledgeReader, safe_path from inferrsi.knowledge.knowledge_store import KnowledgeStore @@ -40,3 +41,8 @@ def read( raise ValueError(f"Unknown resource: {path}") view.update(content=bundle.content[path].decode("utf-8"), content_resource=path) return qualified, view["revision"], view + + +def read_selection(source: PinnedSource, reference: str, *, permits, **request) -> GroupDelivery: + """Ordinary Apps read of a fixed composition using this project's grants.""" + return AtomicReader(source, permits=permits).read_selection(reference, **request) diff --git a/src/inferrsi/harness/optimization.py b/src/inferrsi/harness/optimization.py index 00611e55d..059a280ba 100644 --- a/src/inferrsi/harness/optimization.py +++ b/src/inferrsi/harness/optimization.py @@ -11,6 +11,7 @@ from . import attempt_recovery, candidates from .artifact_primitives import digest, file_lock, sha256 from .atomic_json import atomic_write_json, durable_write_json +from .records import atomic_capture from .records.evidence import bounded_record_bytes, sanitized_text from .records.knowledge_capture import MAX_CONTEXT_CAPTURE_BYTES from .task_protocol import TaskProtocolError @@ -442,6 +443,37 @@ def _store_knowledge(root, kind, number, record): "kind": kind, "round": number} +def _register_context(root, state, number, binding, path, fingerprint, *, selected=False): + reference = {"path": path.relative_to(root).as_posix(), "sha256": fingerprint, + "kind": "delivered_context"} + document = _read_context(root, reference) + if selected and document["selection"]["status"] != "delivered": + reference["kind"] = "knowledge_refusal" + retained = {**reference, "round": number} if number is not None else dict(reference) + if binding: + retained["diagnosis_id"] = binding["diagnosis_id"] + state["contexts"].append(retained) + return {"reference": reference, "context": document} + + +def capture_selection(root: Path, reader, *, assemble_text, **request) -> dict: + """Retain an explicit pin in a managed optimization campaign with its current diagnosis.""" + with _locked(root): + plan, state = _load(root) + if plan.get("evaluation_mode") == "service_reuse": + raise ValueError("Service-reuse sessions require their fingerprint-free capture format") + number = _knowledge_round(plan, state) + binding = _context_diagnosis(plan, state) + path, fingerprint = atomic_capture.retain_selection( + root, reader=reader, context_id="context-" + uuid.uuid4().hex, + diagnosis_binding=binding, ranking_policy=plan.get("ranking_policy"), + assemble_text=assemble_text, **request, + ) + response = _register_context(root, state, number, binding, path, fingerprint, selected=True) + atomic_write_json(root / "state.json", state) + return response + + def capture_context(root: Path, reader, *, retain_context, external_provider=None, external_provider_for=None, **request) -> dict: with _locked(root): @@ -457,14 +489,7 @@ def capture_context(root: Path, reader, *, retain_context, external_provider=Non binding = _context_diagnosis(plan, state) path, fingerprint = retain_context(root, context_id="context-" + uuid.uuid4().hex, reader=reader, diagnosis_binding=binding, **request) - reference = {"path": path.relative_to(root).as_posix(), "sha256": fingerprint, - "kind": "delivered_context"} - # Keep the local tool response compatible with stored Codex trace verification. - retained = {**reference, "round": number} if number is not None else reference - if binding: - retained = {**retained, "diagnosis_id": binding["diagnosis_id"]} - state["contexts"].append(retained) - response = {"reference": reference, "context": _read_context(root, reference)} + response = _register_context(root, state, number, binding, path, fingerprint) if settings: remaining = _knowledge_time(plan, state) if remaining > 0: @@ -474,7 +499,7 @@ def capture_context(root: Path, reader, *, retain_context, external_provider=Non limit=request["limit"], timeout=remaining) else: result = {"state": "timeout", "items": [], "count": 0} - search = {**result, **settings, "context_ref": reference["path"]} + search = {**result, **settings, "context_ref": response["reference"]["path"]} search_ref = _store_knowledge(root, "external_search", number, search) state["contexts"].append(search_ref) response["external"] = {**search, "reference": search_ref} @@ -524,7 +549,7 @@ def _validate_knowledge_refs(root, contexts, refs): if len(set(refs)) != len(refs): raise ValueError("Cite unique delivered knowledge references") delivered = {entry["path"]: entry for entry in contexts - if entry["kind"] != "external_search"} + if entry["kind"] not in ("external_search", "knowledge_refusal")} for ref in refs: path, separator, item = ref.partition("#") reference = delivered.get(path) diff --git a/src/inferrsi/harness/records/atomic_capture.py b/src/inferrsi/harness/records/atomic_capture.py new file mode 100644 index 000000000..c3379f63b --- /dev/null +++ b/src/inferrsi/harness/records/atomic_capture.py @@ -0,0 +1,107 @@ +"""Verify bytes returned by an injected Reader and retain the selected delivery or refusal.""" + +from __future__ import annotations + +import base64 +import hashlib +from pathlib import Path + +from inferrsi import __version__ + +from . import knowledge_capture + +_REFUSALS = {"over_budget", "unavailable_revision", "permission_denied", + "not_applicable", "conflict"} + + +def _verify_receipt(receipt, bodies, request): + selection = receipt["selection"] + if any(selection[key] != request[key] for key in ("ref", "revision", "layer", "finding")): + raise ValueError("Reader receipt belongs to a different selection") + records = receipt["delivered"] + if not isinstance(records, list) or len(records) != len(bodies): + raise ValueError("Reader receipt must enumerate exactly the delivered bodies") + status = receipt["status"] + if status == "delivered": + if not records: + raise ValueError("Successful delivery requires at least one atom") + elif status not in _REFUSALS or records: + raise ValueError("Invalid Reader refusal or nonempty refused delivery") + seen = set() + for body, record in zip(bodies, records): + pin = (record["ref"], record["revision"]) + if pin in seen: + raise ValueError("An atom may occur only once in a delivery") + seen.add(pin) + if not isinstance(body, bytes): + raise ValueError("The Reader must supply the original bytes") + digest = hashlib.sha256(body).hexdigest() + if (record["sha256"] != digest or record["source_sha256"] != digest + or type(record["bytes"]) is not int or record["bytes"] != len(body)): + raise ValueError("Delivered bytes differ from the Reader receipt") + span = record["source_byte_range"] + if (not isinstance(span, list) or len(span) != 2 + or not all(type(offset) is int for offset in span) + or span[0] < 0 or span[1] - span[0] != len(body)): + raise ValueError("Source range differs from the delivered bytes") + total = sum(map(len, bodies)) + if (type(receipt["body_bytes"]) is not int or receipt["body_bytes"] != total + or total > request["max_bytes"]): + raise ValueError("Invalid delivered byte count or budget") + + +def _resource(body, record): + resource = {"path": record["source_path"], "sha256": record["sha256"]} + try: + resource["content"] = body.decode("utf-8") + except UnicodeDecodeError: + resource.update(content=base64.b64encode(body).decode("ascii"), content_encoding="base64") + return resource + + +def verify_stored(document): + """Check a retained atomic receipt against the resources a caller can actually recover.""" + request, receipt = document["request"], document["selection"] + records, contexts = receipt["delivered"], document["contexts"] + if len(records) != len(contexts) or len(records) != len(document["items"]): + raise ValueError("Atomic capture does not match the delivered atom count") + bodies = [] + for record, context, item in zip(records, contexts, document["items"]): + identity = {"ref": record["ref"], "revision": record["revision"]} + if item != identity or any(context[key] != value for key, value in identity.items()): + raise ValueError("Retained atom does not match its receipt") + resource, = context["resources"] + if resource["path"] != record["source_path"] or resource["sha256"] != record["sha256"]: + raise ValueError("Retained resource differs from its receipt") + bodies.append(knowledge_capture.resource_bytes(resource)) + _verify_receipt(receipt, bodies, request) + if (document["context_bytes_used"] != receipt["body_bytes"] + or document["context_budget"] != request["max_bytes"]): + raise ValueError("Atomic capture accounting differs from its request") + + +def retain_selection(root: Path, *, reader, context_id, reference, revision, layer, max_bytes, + context, assemble_text, finding=None, diagnosis_binding=None, + ranking_policy=None): + campaign = knowledge_capture.capture_campaign(root, context_id) + request = {"mode": "pinned_selection", "ref": reference, "revision": revision, "layer": layer, + "finding": finding, "max_bytes": max_bytes, "context": dict(context), + "operations": ["read", "retain"]} + if ranking_policy is not None: + request["ranking_policy"] = ranking_policy + delivery = reader.read_selection(reference, revision=revision, layer=layer, finding=finding, + max_bytes=max_bytes, context=context, operations=("retain",)) + receipt, bodies = delivery.receipt, delivery.bodies + _verify_receipt(receipt, bodies, request) + items = [{"ref": record["ref"], "revision": record["revision"]} + for record in receipt["delivered"]] + contexts = [{**item, "resources": [_resource(body, record)], "omissions": []} + for item, body, record in zip(items, bodies, receipt["delivered"])] + return knowledge_capture.store_capture( + root, campaign_id=campaign["campaign_id"], context_id=context_id, request=request, + selection=receipt, items=items, omissions=receipt.get("omissions", []), + context_omissions=[], + context_budget=max_bytes, context_bytes_used=receipt["body_bytes"], contexts=contexts, + assembled_text=assemble_text(contexts), diagnosis_binding=diagnosis_binding, + captured_by=f"inferrsi pinned knowledge read {__version__}", + ) diff --git a/src/inferrsi/harness/records/knowledge_capture.py b/src/inferrsi/harness/records/knowledge_capture.py index caabd9d54..8ea7feefa 100644 --- a/src/inferrsi/harness/records/knowledge_capture.py +++ b/src/inferrsi/harness/records/knowledge_capture.py @@ -11,6 +11,7 @@ from __future__ import annotations +import base64 import hashlib import json import os @@ -102,6 +103,15 @@ def store_capture(root: Path, *, campaign_id: str, context_id: str, request: dic return target, hashlib.sha256(payload).hexdigest() +def resource_bytes(resource: dict) -> bytes: + encoding = resource.get("content_encoding", "utf-8") + if encoding == "utf-8": + return resource["content"].encode("utf-8") + if encoding == "base64": + return base64.b64decode(resource["content"], validate=True) + raise ValueError("Unknown captured resource encoding") + + def verify_capture(raw: bytes) -> tuple[dict | None, str]: """Check the stored bytes of a capture. @@ -140,7 +150,7 @@ def verify_capture(raw: bytes) -> tuple[dict | None, str]: if not all(isinstance(resource.get(key), str) for key in ("path", "sha256", "content")): return None, "invalid_format" - actual = hashlib.sha256(resource["content"].encode("utf-8")).hexdigest() + actual = hashlib.sha256(resource_bytes(resource)).hexdigest() if resource["sha256"].lower() != actual: return None, "resource_hash_mismatch" for omission in context["omissions"]: @@ -156,7 +166,7 @@ def verify_capture(raw: bytes) -> tuple[dict | None, str]: labels += [omission["path"], omission["reason"]] for label in labels: label.encode("utf-8") - except (KeyError, TypeError, AttributeError, UnicodeError): + except (KeyError, TypeError, AttributeError, ValueError): return None, "invalid_format" try: digest = hashlib.sha256(document["assembled_text"].encode("utf-8")).hexdigest() diff --git a/src/inferrsi/knowledge/atomic_build.py b/src/inferrsi/knowledge/atomic_build.py new file mode 100644 index 000000000..bcdff6020 --- /dev/null +++ b/src/inferrsi/knowledge/atomic_build.py @@ -0,0 +1,434 @@ +"""Build the candidate Knowledge and host skill trees from the same authored inputs.""" + +from __future__ import annotations + +import json +import re +from collections.abc import Callable, Mapping +from io import BytesIO +from pathlib import Path, PurePosixPath +from tempfile import TemporaryDirectory + +from .atomic_composition import AtomPin, applies, select_routes +from .atomic_generation import ( + FORMAT, + PUBLIC_TASKS, + SEAL, + InstalledGeneration, + digest, + filesystem_root, + owned_path, +) +from .atomic_json import matches_span, member_spans +from .atomic_reader import atom_material, permits_operations +from .atomic_skill_directory import directory_dependencies, export_directory_skill, skill_spans +from .decision_cards import DecisionSource +from .knowledge_operations import IDENTITY, Bundle, _json, case_required_resources, safe_path +from .skill_catalog import _frontmatter_parts + +_PUBLISH = {"read", "retain", "redistribute"} + + +def _complete_original(body: bytes, origin: dict) -> bool: + return (origin["layer"] == "L3" and origin["source_byte_range"] == [0, len(body)] + and origin["sha256"] == origin["source"].get("sha256")) + + +def _record_content(metadata: dict, node: str, material: dict) -> bytes: + nodes = metadata["composition"]["nodes"] + if not isinstance(node, str) or node not in nodes: + raise ValueError("Record entrypoint must name a declared source node") + pin = nodes[node] + target = AtomPin(pin["ref"], pin["revision"]) + if target not in material: + raise ValueError(f"Missing pinned Record source: {target.ref}") + body, origin = material[target] + if not _complete_original(body, origin): + raise ValueError("Record entrypoint requires the complete L3 original") + record = json.loads(body) + if (not isinstance(record, dict) or record.get("id") != metadata["id"] + or record.get("skill_documents")): + raise ValueError("Record source must match its identity and be self-contained") + return _json(record) + + +def _verify_case_finding_routes(metadata, raw, record, material): + case = DecisionSource(metadata["id"], "", "case", "case.json", record["content"], record) + declaration = metadata["composition"] + members = member_spans(raw) + source = metadata["sources"][0] + nodes = declaration["nodes"] + + def required_spans(roots): + pending, visited, spans = list(roots), set(), set() + while pending: + name = pending.pop() + if name in visited: + continue + visited.add(name) + if name not in nodes: + raise ValueError(f"Undeclared Case decision node: {name}") + node = nodes[name] + pin = AtomPin(node["ref"], node["revision"]) + if pin not in material: + raise ValueError(f"Missing pinned Case decision node: {pin.ref}") + _, origin = material[pin] + if origin["source"] != source: + raise ValueError("A source-backed Case decision must use its original Case") + if origin["layer"] != "L1": + raise ValueError("A Case decision must use original L1 fields") + spans.add(tuple(origin["source_byte_range"])) + pending.extend(node.get("requires", [])) + return spans + + findings = members["/findings"] + for route in declaration["routes"].values(): + if route["layer"] != "L1": + continue + selector = route.get("finding") + if not isinstance(selector, str): + raise ValueError("A Case L1 decision route needs one original finding") + index, _ = case.finding(selector) + member = members[f"/findings/{index}"] + selected = {(member.start, member.end)} + required = required_spans(route["required"]) + optional = required_spans(route.get("optional", [])) + overlapping = {span for span in required | optional + if span[0] < findings.end and findings.start < span[1]} + if not selected <= required or overlapping != selected: + raise ValueError("Case decision route must bind only its selected original finding") + declared = case.project(finding=selector)["card"]["declared"] + for field in declared.keys() - {"finding"}: + member = members["/" + field] + if not any(lo <= member.start and member.end <= hi for lo, hi in required): + raise ValueError(f"Case route omits a required original decision field: {field}") + for index in range(len(record["findings"])): + selected = select_routes(declaration, layer="L1", context={}, case=case, + finding=case.finding_locator(index)) + if selected.refusal: + raise ValueError("Case must provide a decision route for every original finding") + + +def _pinned_resources(metadata: dict, bindings: dict, material: dict) -> tuple[dict, dict]: + content, origins = {}, {} + nodes = metadata["composition"]["nodes"] + for name, key in bindings.items(): + safe_path(name) + if not isinstance(key, str) or key not in nodes: + raise ValueError(f"Undeclared resource node for {name}") + node = nodes[key] + pin = AtomPin(node["ref"], node["revision"]) + if pin not in material: + raise ValueError(f"Missing pinned resource for {name}") + body, origin = material[pin] + if not _complete_original(body, origin): + raise ValueError(f"Resource requires a complete L3 original: {name}") + content[name], origins[name] = body, origin["source"] + return content, origins + + +def _case_content(metadata: dict, bindings: dict, material: dict) -> dict[str, bytes]: + """Resolve the original Case and its declared relative resources from pinned L3 nodes.""" + if not isinstance(bindings, dict) or "case.json" not in bindings: + raise ValueError("Case resources must bind the original case.json") + content, origins = _pinned_resources(metadata, bindings, material) + source = origins["case.json"] + record = json.loads(content["case.json"]) + if (not isinstance(record, dict) or record.get("kind") != "case" + or record.get("id") != metadata["id"] or source != metadata["sources"][0]): + raise ValueError("Case identity or pinned source differs from the original") + required = case_required_resources(record) + if (len(set(required)) != len(required) or set(bindings) != set(required) + or metadata.get("entrypoint", record["content"]) != record["content"] + or metadata.get("required_resources", required) != required): + raise ValueError("Case resource bindings must cover the original relative resources") + parent = PurePosixPath(source["path"]).parent + for name, origin in origins.items(): + if name == "case.json": + continue + if (origin.get("repo") != source.get("repo") or origin.get("commit") != source.get("commit") + or origin.get("path") != (parent / name).as_posix()): + raise ValueError(f"Case resource differs from its original relative source: {name}") + metadata.update(entrypoint=record["content"], required_resources=required) + _verify_case_finding_routes(metadata, content["case.json"], record, material) + return content + + +def _authored(directory, path, field, descriptor, material, roots) -> tuple[AtomPin, Bundle]: + metadata = descriptor["metadata"] + if field not in metadata or ("atom" in metadata and "composition" in metadata): + raise ValueError(f"{path.name} must declare one {field}") + content = {} + dependencies = descriptor.get("dependencies", {}) + directory_required = metadata[field].get("skill") == {"directory_entry": True} + if (field == "composition" and metadata["kind"] == "skill" + and descriptor.get("authority") == "checkout"): + original = next(iter(metadata.get("sources", [])), {}).get("path", "") + guide = PurePosixPath(metadata.get("entrypoint", "")).name == "SKILL.md" + directory_required |= guide or original.endswith(f"/{metadata['id']}/SKILL.md") + if directory_required and "directory_resources" not in descriptor: + raise ValueError("Directory Skill requires checked original directory resources") + if "case_resources" in descriptor: + if field != "composition" or metadata["kind"] != "case" or "content" in descriptor: + raise ValueError("Only a Case composition may bind its content through case_resources") + content = _case_content(metadata, descriptor["case_resources"], material) + if "directory_resources" in descriptor: + if (field != "composition" or metadata["kind"] != "skill" + or descriptor.get("authority") != "checkout" or "content" in descriptor + or dependencies): + raise ValueError("Checkout Skill directories must use source-declared dependencies") + bindings = descriptor["directory_resources"] + if not isinstance(bindings, dict): + raise ValueError("Skill directory resources must bind original relative names") + content, origins = _pinned_resources(metadata, bindings, material) + dependencies = directory_dependencies(metadata, bindings, content, origins, material, roots) + for name, value in descriptor.get("content", {}).items(): + safe_path(name) + if isinstance(value, dict) and value.keys() == {"path"}: + content[name] = owned_path(directory, value["path"]).read_bytes() + elif (field == "composition" and metadata["kind"] == "knowledge" + and name == metadata.get("entrypoint") == "record.json" + and isinstance(value, dict) and value.keys() == {"record_node"}): + content[name] = _record_content(metadata, value["record_node"], material) + elif (isinstance(value, dict) and value.keys() == {"text"} + and isinstance(value["text"], str)): + content[name] = value["text"].encode() + else: + raise ValueError(f"Expected one text or relative path for {name} in {path.name}") + if field == "composition" and "entrypoint" not in metadata and metadata["kind"] != "case": + metadata["entrypoint"] = "navigation.json" + if "navigation.json" in content: + raise ValueError("Explicit navigation content must declare its entrypoint") + content["navigation.json"] = _json(metadata[field]) + bundle = Bundle(metadata, content, dependencies) + ref = descriptor.get("authority", "package") + ":" + metadata["id"] + return AtomPin(ref, bundle.revision), bundle + + +def _host_skill(bundle: Bundle, nodes: dict, material: dict) -> tuple[str, dict[str, bytes]]: + declaration = bundle.metadata["composition"]["skill"] + name, description = declaration["name"], declaration["description"] + if (not isinstance(name, str) or len(name) > 64 + or not re.fullmatch(r"[a-z0-9]+(?:-[a-z0-9]+)*", name)): + raise ValueError(f"Invalid host skill name: {name}") + if not isinstance(description, str) or not 1 <= len(description.strip()) <= 1024: + raise ValueError(f"Invalid host skill description: {name}") + if declaration["body"] not in nodes: + raise ValueError(f"Undeclared navigation node for host skill {name}") + sections = declaration.get("sections", []) + if not isinstance(sections, list) or not all(isinstance(key, str) and key in nodes + for key in sections): + raise ValueError(f"Host skill {name} must declare each procedure section as a node") + pins = [nodes[key] for key in (declaration["body"], *sections)] + if material[pins[0]][1]["layer"] != "L0": + raise ValueError(f"Host skill {name} must start at an L0 navigation atom") + if len(set(pins)) != len(pins): + raise ValueError(f"Repeated host skill section in {name}") + body = b"".join(material[pin][0] for pin in pins) + markdown = body.decode("utf-8") + if "frontmatter" in declaration: + path = safe_path(declaration["frontmatter"]) + if path not in bundle.content: + raise ValueError(f"Missing pinned host frontmatter for {name}") + header = bundle.content[path] + stream = BytesIO(header) + host, _ = _frontmatter_parts(stream) + if (host.get("name") != name or host.get("description") != description + or stream.read().strip() or not header.endswith(b"\n")): + raise ValueError(f"Invalid host frontmatter for {name}") + else: + quoted = json.dumps(description, ensure_ascii=False) + header = f"---\nname: {json.dumps(name)}\ndescription: {quoted}\n---\n\n".encode() + output = {f"skills/{name}/SKILL.md": header + body} + resources = declaration.get("resources", {}) + for relative, node in resources.items(): + if safe_path(relative).partition("/")[0] not in {"references", "assets", "scripts"}: + raise ValueError(f"Unsupported host skill resource: {relative}") + if "/" not in relative: + raise ValueError(f"Expected a file inside a host resource directory: {relative}") + if node not in nodes: + raise ValueError(f"Undeclared resource node {node} for host skill {name}") + output[f"skills/{name}/{relative}"] = material[nodes[node]][0] + links = re.findall(r"\]\(#?]+)", markdown) + if any(link not in resources for link in links): + raise ValueError(f"Undeclared resource linked from host skill {name}") + return name, output + + +def _verify_source(body: bytes, record: dict, roots: Mapping[str, Path]) -> bool: + source, path = record["source"], record["source_path"] + snapshot = source.get("sha256") + if not isinstance(snapshot, str) or not re.fullmatch(r"[0-9a-f]{64}", snapshot): + raise ValueError(f"Missing complete source file digest for {path}") + if source.get("path", path) != path: + raise ValueError(f"Atom path differs from its pinned source path: {path}") + start, end = record["source_byte_range"] + key = source.get("commit", snapshot) + if key not in roots: + if "commit" not in source and start == 0 and snapshot == record["sha256"]: + return False + raise ValueError(f"Missing pinned source root for {key} at {path}") + original = owned_path(roots[key], path).read_bytes() + if digest(original) != snapshot: + raise ValueError(f"Complete pinned source file differs at {path}") + if end > len(original) or original[start:end] != body: + raise ValueError(f"Atom bytes differ from pinned source range at {path} [{start}, {end})") + return True + + +def _authored_inputs(directory: Path, field: str, material: dict, roots=None): + for path in sorted(directory.glob("*.json")): + if not re.fullmatch(IDENTITY, path.stem): + raise ValueError(f"Invalid descriptor filename: {path.name}") + descriptor = json.loads(owned_path(directory, path.name).read_bytes()) + pin, bundle = _authored(directory, path, field, descriptor, material, roots) + yield path.stem, pin, bundle + if "parts" not in descriptor: + continue + if field != "atom" or len(bundle.content) != 1 or bundle.dependencies: + raise ValueError("Atom parts require a single, self-contained original") + body, origin = material[pin] + if not _complete_original(body, origin): + raise ValueError("Atom parts require a complete L3 source") + parts = descriptor["parts"] + if not isinstance(parts, dict) or not parts: + raise ValueError("Atom parts must declare named source spans") + is_skill = PurePosixPath(origin["source_path"]).name == "SKILL.md" + members = skill_spans(body) if is_skill else member_spans(body) + for name, part in parts.items(): + if not re.fullmatch(r"[a-z0-9][a-z0-9-]*", name): + raise ValueError(f"Invalid atom part name: {name}") + start, end = part["byte_range"] + if type(start) is not int or type(end) is not int or not 0 <= start < end <= len(body): + raise ValueError(f"Invalid source range for atom part {name}") + if is_skill: + section = part.get("skill_section") + if (not isinstance(section, str) + or members.get(section) != (part["layer"], start, end)): + raise ValueError(f"Mismatched Skill section source range or layer: {name}") + locator = {"source_section": section} + fields = section + else: + pointers = part.get("pointers") + if (not isinstance(pointers, list) or not pointers or not all( + isinstance(ptr, str) and ptr.startswith("/") for ptr in pointers)): + raise ValueError(f"Expected source JSON pointers for atom part {name}") + if not matches_span(members, pointers, start, end): + raise ValueError(f"JSON pointers do not match the source range for part {name}") + locator = {"source_pointers": pointers} + fields = ", ".join(ptr.removeprefix("/") for ptr in pointers) + atom = bundle.metadata["atom"] + span = {**atom["source_span"], "byte_range": [start, end], "sha256": part["sha256"]} + title = bundle.metadata.get("title", bundle.metadata["id"]) + child = Bundle({ + **bundle.metadata, "id": bundle.metadata["id"] + "." + name, + "title": part.get("title", f"{title} — {fields}"), + "summary": part.get("summary", bundle.metadata.get("summary", "")), + "entrypoint": "excerpt", + "atom": {**atom, "resource": "excerpt", "layer": part["layer"], + "source_span": span, **locator}, + }, {"excerpt": body[start:end]}, {}) + child_pin = AtomPin(pin.ref + "." + name, child.revision) + yield path.stem + "." + name, child_pin, child + + +def _prepare(source: Path, permits: Callable[[AtomPin, str], bool], roots: Mapping[str, Path]): + files, entries, material, compositions = {}, {}, {}, {} + skills = {} + for family, field in (("atoms", "atom"), ("compositions", "composition")): + directory = owned_path(source, family) + if not directory.is_dir(): + raise ValueError(f"Missing authored {family} directory") + for stem, pin, bundle in _authored_inputs(directory, field, material, roots): + if pin.ref in entries: + raise ValueError(f"Duplicate qualified reference: {pin.ref}") + view = bundle.view() + declaration = view[field] + if (not all(permits(pin, operation) for operation in _PUBLISH) + or not permits_operations(declaration, _PUBLISH)): + raise PermissionError(f"Publication denied for {pin.ref}") + applies(declaration["when"], {}) + prefix = f"knowledge/{family}/{stem}" + if prefix + ".json" in files: + raise ValueError(f"Duplicate generated manifest: {prefix}") + files[prefix + ".json"] = _json(bundle.manifest()) + if declaration.get("skill") != {"directory_entry": True}: + files.update({prefix + "/" + name: data for name, data in bundle.content.items()}) + entry = {"revision": pin.revision, "manifest": prefix + ".json", "kind": view["kind"]} + for key in ("title", "summary"): + if isinstance(view.get(key), str): + entry[key] = view[key] + if field == "atom": + material[pin] = atom_material(bundle, view) + entry["source_range_verified"] = _verify_source(*material[pin], roots) + entry["layer"] = declaration["layer"] + else: + compositions[pin] = bundle + entries[pin.ref] = entry + + for pin, bundle in compositions.items(): + view = bundle.view() + declaration = view["composition"] + case = DecisionSource.from_bundle(pin.ref, bundle, view) if view["kind"] == "case" else None + select_routes(declaration, layer="L0", context={}, case=case, finding=None) + nodes = {key: AtomPin(node["ref"], node["revision"]) + for key, node in declaration["nodes"].items()} + for node in nodes.values(): + if node not in material: + raise ValueError(f"Missing pinned atom {node.ref} at {node.revision} for {pin.ref}") + for route in declaration["routes"].values(): + layers = {material[nodes[name]][1]["layer"] for name in route["required"]} + if route["layer"] not in layers: + raise ValueError(f"No required root supplies {route['layer']} for {pin.ref}") + if "skill" in declaration: + if declaration["skill"] == {"directory_entry": True}: + name, output = export_directory_skill(bundle) + else: + name, output = _host_skill(bundle, nodes, material) + if name in skills: + raise ValueError(f"Multiple compositions export host skill {name}") + skills[name] = pin.ref + files.update(output) + missing = PUBLIC_TASKS - skills.keys() + if missing: + raise ValueError(f"Missing public task compositions: {', '.join(sorted(missing))}") + portable = {name.casefold() for name in files} + parents = (p.as_posix().casefold() for name in files for p in PurePosixPath(name).parents) + if len(portable) != len(files) or any(p in portable for p in parents): + raise ValueError("Generation contains colliding resource paths") + seal = {"format": FORMAT, "entries": entries, "skills": skills, + "files": {name: digest(data) for name, data in files.items()}} + generation = "sha256:" + digest(_json(seal)) + files[SEAL] = _json({**seal, "generation": generation}) + return generation, files + + +def build_generation(source: Path, target: Path, *, permits: Callable[[AtomPin, str], bool], + source_roots: Mapping[str, Path] | None = None) -> str: + """Stage and verify a complete new generation; repeat installs must have identical bytes.""" + source = filesystem_root(source).resolve(strict=True) + target = filesystem_root(target) + if target.is_symlink() or target.resolve() != target: + raise ValueError("Generation target must be a physical directory") + if target.is_relative_to(source) or source.is_relative_to(target): + raise ValueError("Separate the authored and installed generation roots") + roots = {key: filesystem_root(path).resolve(strict=True) + for key, path in (source_roots or {}).items()} + generation, files = _prepare(source, permits, roots) + if target.exists(): + return InstalledGeneration(target, expected=generation).generation + target.parent.mkdir(parents=True, exist_ok=True) + with TemporaryDirectory(prefix=".atomic-build-", dir=target.parent) as staging: + root = Path(staging) / "generation" + for name, data in files.items(): + path = root / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(data) + InstalledGeneration(root, expected=generation) + try: + root.rename(target) + except OSError: + if not target.is_dir(): + raise + return InstalledGeneration(target, expected=generation).generation + return generation diff --git a/src/inferrsi/knowledge/atomic_composition.py b/src/inferrsi/knowledge/atomic_composition.py new file mode 100644 index 000000000..80e60a349 --- /dev/null +++ b/src/inferrsi/knowledge/atomic_composition.py @@ -0,0 +1,186 @@ +"""Resolve the authored branches and dependency paths of one pinned composition.""" + +from __future__ import annotations + +import re +from collections.abc import Mapping +from dataclasses import dataclass + +from .decision_cards import DecisionSource, UnknownFinding +from .knowledge_operations import AUTHORITIES, IDENTITY + +LAYERS = ("L0", "L1", "L2", "L3") + + +@dataclass(frozen=True) +class AtomPin: + ref: str + revision: str + + def __post_init__(self) -> None: + if not isinstance(self.ref, str) or not isinstance(self.revision, str): + raise ValueError("Atom reference and revision must be strings") + authority, _, identity = self.ref.partition(":") + if authority not in AUTHORITIES or not re.fullmatch(IDENTITY, identity): + raise ValueError("A pinned atom needs an authority-qualified reference") + if not re.fullmatch(r"sha256:[0-9a-f]{64}", self.revision): + raise ValueError("A pinned atom needs a complete Bundle revision") + + +@dataclass(frozen=True) +class AtomUse: + """One path through a composition to the requested atom.""" + + pin: AtomPin + path: tuple[str, ...] + + def __post_init__(self) -> None: + if (not isinstance(self.path, tuple) or not self.path + or not all(isinstance(step, str) and step for step in self.path)): + raise ValueError("A dependency path must name each step") + + +def _release_number(value: object) -> tuple[int, ...] | None: + if not isinstance(value, str) or not re.fullmatch(r"v?[0-9]+(?:\.[0-9]+)*", value): + return None + parts = [int(part) for part in value.removeprefix("v").split(".")] + while parts and parts[-1] == 0: + parts.pop() + return tuple(parts) + + +def _matches(condition: object, actual: str | None) -> bool: + if isinstance(condition, list): + if not condition or not all(isinstance(value, str) and value for value in condition): + raise ValueError("An exact-match condition requires nonempty strings") + return actual in condition + if not isinstance(condition, Mapping) or not condition or condition.keys() - {"min", "before"}: + raise ValueError("Expected an allowlist or a release range with min and/or before") + lower = _release_number(condition.get("min")) + upper = _release_number(condition.get("before")) + if ("min" in condition and lower is None) or ("before" in condition and upper is None): + raise ValueError("Release bounds must be dotted numeric release strings") + if lower is not None and upper is not None and lower >= upper: + raise ValueError("Release range must contain at least one release") + release = _release_number(actual) + return (release is not None and (lower is None or lower <= release) + and (upper is None or release < upper)) + + +def applies(when: Mapping[str, object], context: Mapping[str, str]) -> bool: + """Match every dimension: exact allowlists or [min, before) dotted release ranges.""" + if not isinstance(when, Mapping): + raise ValueError("Conditions must map named dimensions to constraints") + matches = True + for key, condition in when.items(): + if not isinstance(key, str) or not key: + raise ValueError("Conditions must name a dimension") + if not _matches(condition, context.get(key)): + matches = False + return matches + + +@dataclass(frozen=True) +class RouteSelection: + required: tuple[AtomUse, ...] = () + optional: tuple[tuple[AtomUse, ...], ...] = () + routes: tuple[str, ...] = () + finding: str | None = None + refusal: str | None = None + + +def _names(values: object, targets: Mapping, field: str) -> tuple[str, ...]: + if not isinstance(values, list) or not all(isinstance(name, str) and name in targets + for name in values): + raise ValueError(f"{field} must list names declared in the composition") + if len(set(values)) != len(values): + raise ValueError(f"Duplicate name in {field}") + return tuple(values) + + +def _acyclic(edges: dict[str, tuple[str, ...]], relation: str) -> None: + visited = set() + active = set() + + def visit(name): + if name in active: + raise ValueError(f"Cycle in composition {relation} at {name}") + if name not in visited: + active.add(name) + for other in edges[name]: + visit(other) + active.remove(name) + visited.add(name) + + for name in edges: + visit(name) + + +def select_routes(composition: dict, *, layer: str, context: Mapping[str, str], + case: DecisionSource | None, finding: str | None) -> RouteSelection: + """Select one disclosure layer and expand applicable routes in authored dependency order.""" + if layer not in LAYERS: + raise ValueError("Select one of L0, L1, L2 and L3") + selected_finding = None + if finding is not None: + if not isinstance(finding, str) or case is None: + return RouteSelection(refusal="not_applicable") + try: + selected_finding = case.finding_locator(case.finding(finding)[0]) + except UnknownFinding: + return RouteSelection(refusal="not_applicable") + elif case is not None and layer == "L1": + return RouteSelection(refusal="not_applicable") + + nodes, routes = composition["nodes"], composition["routes"] + if not all(isinstance(group, dict) and group and all( + isinstance(key, str) and key and isinstance(value, dict) for key, value in group.items() + ) for group in (nodes, routes)): + raise ValueError("A composition must declare named nodes and routes") + pins = {name: AtomPin(node["ref"], node["revision"]) for name, node in nodes.items()} + requires = {name: _names(node.get("requires", []), nodes, "requires") + for name, node in nodes.items()} + _acyclic(requires, "requires") + supersedes = {} + conflicts = {} + required = {} + optional = {} + matches = set() + for name, route in routes.items(): + if route["layer"] not in LAYERS: + raise ValueError(f"Invalid disclosure layer for route {name}") + required[name] = _names(route["required"], nodes, "required") + optional[name] = _names(route.get("optional", []), nodes, "optional") + if not required[name] or set(required[name]).intersection(optional[name]): + raise ValueError(f"Route {name} needs distinct required and optional roots") + supersedes[name] = _names(route.get("supersedes", []), routes, "supersedes") + conflicts[name] = _names(route.get("conflicts", []), routes, "conflicts") + if name in conflicts[name]: + raise ValueError(f"Route {name} conflicts with itself") + selector = route.get("finding") + if selector is not None: + if case is None or not isinstance(selector, str): + raise ValueError("Only a Case route may declare a finding selector") + selector = case.finding_locator(case.finding(selector)[0]) + applicable = applies(route.get("when", {}), context) + if applicable and layer == route["layer"] and selector == selected_finding: + matches.add(name) + _acyclic(supersedes, "supersedes") + chosen = matches.difference(other for name in matches for other in supersedes[name]) + if not chosen: + return RouteSelection(finding=selected_finding, refusal="not_applicable") + if any(chosen.intersection(conflicts[name]) for name in chosen): + return RouteSelection(finding=selected_finding, refusal="conflict") + + def expand(node, path): + via = (*path, node) + for child in requires[node]: + yield from expand(child, via) + yield AtomUse(pins[node], via) + + ordered = tuple(sorted(chosen)) + return RouteSelection( + tuple(use for name in ordered for node in required[name] for use in expand(node, (name,))), + tuple(tuple(expand(node, (name,))) for name in ordered for node in optional[name]), + ordered, selected_finding, + ) diff --git a/src/inferrsi/knowledge/atomic_generation.py b/src/inferrsi/knowledge/atomic_generation.py new file mode 100644 index 000000000..0bd08f20c --- /dev/null +++ b/src/inferrsi/knowledge/atomic_generation.py @@ -0,0 +1,141 @@ +"""Open one immutable installed Knowledge generation and resolve only its exact pins.""" + +from __future__ import annotations + +import hashlib +import json +import os +from pathlib import Path, PurePosixPath + +from .atomic_composition import AtomPin +from .knowledge_operations import Bundle, UnavailableRevision, _json, safe_path + +PUBLIC_TASKS = frozenset({ + "task-day-0", "task-performance", "task-debug", "task-accuracy", "task-version-alignment", + "task-derived-engine", "task-independent-engine", +}) +SEAL = "knowledge/generation.json" +FORMAT = 2 + + +def digest(data: bytes) -> str: + return hashlib.sha256(data).hexdigest() + + +def filesystem_root(root: Path) -> Path: + """Use absolute filesystem paths that accommodate deep installed resources on Windows.""" + absolute = Path(root).absolute() + if os.name != "nt": + return absolute + name = str(absolute) + if name.startswith(("\\\\?\\", "\\\\.\\")): + return absolute + if name.startswith("\\\\"): + return Path("\\\\?\\UNC\\" + name[2:]) + return Path("\\\\?\\" + name) + + +def directory_skill_path(metadata: dict, name: str) -> str: + entry = PurePosixPath(safe_path(metadata["entrypoint"])) + relative = PurePosixPath(safe_path(name)).relative_to(entry.parent) + return f"skills/{safe_path(metadata['id'])}/{relative.as_posix()}" + + +def owned_path(root: Path, name: str) -> Path: + """Resolve a portable resource within its owner, rejecting links and Windows junctions.""" + path = root + for part in safe_path(name).split("/"): + path = path / part + if path.is_symlink() or path.resolve() != path: + raise ValueError(f"Linked generation resource: {name}") + return path + + +def inventory(root: Path) -> dict[str, bytes]: + result = {} + for family in ("knowledge", "skills"): + directory = owned_path(root, family) + if not directory.is_dir(): + raise ValueError(f"Missing generation directory: {family}") + for path in directory.rglob("*"): + name = path.relative_to(root).as_posix() + owned_path(root, name) + if path.is_file() and name != SEAL: + result[name] = path.read_bytes() + return result + + +class InstalledGeneration: + """An internally consistent snapshot, optionally pinned by its caller's release record.""" + + def __init__(self, root: Path, *, expected: str | None = None): + root = filesystem_root(root).resolve(strict=True) + seal = json.loads(owned_path(root, SEAL).read_bytes()) + generation = seal.pop("generation") + if seal.get("format") != FORMAT or generation != "sha256:" + digest(_json(seal)): + raise ValueError("Invalid Knowledge generation seal") + if expected is not None and expected != generation: + raise UnavailableRevision(f"Requested generation is unavailable: {expected}") + files = inventory(root) + if {path: digest(data) for path, data in files.items()} != seal["files"]: + raise ValueError("Installed Knowledge and skills differ from the sealed generation") + self.generation = generation + self._catalog = seal["entries"] + self._skills = seal["skills"] + self._bundles = {} + exports = {} + for ref, entry in self._catalog.items(): + pin = AtomPin(ref, entry["revision"]) + path = safe_path(entry["manifest"]) + manifest = json.loads(files[path]) + metadata = manifest["metadata"] + skill = metadata.get("composition", {}).get("skill") + if skill == {"directory_entry": True}: + content = {name: files[directory_skill_path(metadata, name)] + for name in manifest["resources"]} + else: + content = {name: files[path.removesuffix(".json") + "/" + safe_path(name)] + for name in manifest["resources"]} + bundle = Bundle(manifest["metadata"], content, manifest["dependencies"]) + if (ref.partition(":")[2] != bundle.metadata["id"] or bundle.manifest() != manifest + or bundle.revision != pin.revision): + raise ValueError(f"Installed Bundle differs from its catalog entry: {ref}") + self._bundles[pin] = bundle + if skill is not None: + name = metadata["id"] if skill == {"directory_entry": True} else skill["name"] + if name in exports or f"skills/{name}/SKILL.md" not in files: + raise ValueError(f"Invalid host skill export: {name}") + exports[name] = ref + if exports != self._skills or PUBLIC_TASKS - exports.keys(): + raise ValueError("Installed skill catalog differs from the public composition exports") + self._release_pinned = expected is not None + + @property + def release_pinned(self) -> bool: + """Whether this installation matched a generation ID supplied by the caller.""" + return self._release_pinned + + def source_range_verified(self, pin: AtomPin) -> bool: + entry = self._catalog.get(pin.ref, {}) + return (self.release_pinned and entry.get("revision") == pin.revision + and entry.get("source_range_verified") is True) + + @property + def catalog(self) -> dict: + return {ref: dict(entry) for ref, entry in self._catalog.items()} + + @property + def skills(self) -> dict[str, str]: + """Generated host skill name to its owning composition.""" + return dict(self._skills) + + @property + def tasks(self) -> dict[str, str]: + return {name: self._skills[name] for name in sorted(PUBLIC_TASKS)} + + def read_resolved(self, reference: str, *, revision: str) -> tuple[str, Bundle]: + pin = AtomPin(reference, revision) + if pin not in self._bundles: + raise UnavailableRevision(f"Revision unavailable in {self.generation}: {pin.ref}") + bundle = self._bundles[pin] + return pin.ref, Bundle(bundle.metadata, dict(bundle.content), dict(bundle.dependencies)) diff --git a/src/inferrsi/knowledge/atomic_json.py b/src/inferrsi/knowledge/atomic_json.py new file mode 100644 index 000000000..feeb78ffb --- /dev/null +++ b/src/inferrsi/knowledge/atomic_json.py @@ -0,0 +1,65 @@ +"""Locate JSON members in the exact UTF-8 source used to build an atom.""" + +import json +import re +from dataclasses import dataclass + + +@dataclass(frozen=True) +class Member: + parent: str + index: int + start: int + end: int + + +_TOKEN = re.compile(rb'"(?:[^"\\]|\\.)*"|[{}\[\],:]|[^{}\[\],:" \t\r\n]+') + + +def member_spans(source: bytes) -> dict[str, Member]: + # The standard decoder validates syntax. Token positions retain the original + # bytes, including escaped keys, UTF-8 text and the spacing between members. + json.loads(source.decode("utf-8")) + tokens = _TOKEN.finditer(source) + members = {} + + def visit(pointer, token): + opening = token.group() + if opening not in (b"{", b"["): + return token.end() + closing = b"}" if opening == b"{" else b"]" + token = next(tokens) + index = 0 + while token.group() != closing: + start = token.start() + if opening == b"{": + key = json.loads(token.group()) + segment = key.replace("~", "~0").replace("/", "~1") + next(tokens) # colon after the key + token = next(tokens) + else: + segment = str(index) + child = pointer + "/" + segment + if child in members: + raise ValueError(f"Duplicate JSON member at {child}") + end = visit(child, token) + members[child] = Member(pointer, index, start, end) + index += 1 + token = next(tokens) + if token.group() == b",": + token = next(tokens) + return token.end() + + visit("", next(tokens)) + return members + + +def matches_span(members: dict[str, Member], pointers: list[str], start: int, end: int) -> bool: + """A part covers complete, consecutive siblings, from the first key/item to the last value.""" + if not pointers or any(pointer not in members for pointer in pointers): + return False + selected = [members[pointer] for pointer in pointers] + first = selected[0] + return (first.start == start and selected[-1].end == end + and all(item.parent == first.parent and item.index == first.index + offset + for offset, item in enumerate(selected))) diff --git a/src/inferrsi/knowledge/atomic_reader.py b/src/inferrsi/knowledge/atomic_reader.py new file mode 100644 index 000000000..f580e8c4c --- /dev/null +++ b/src/inferrsi/knowledge/atomic_reader.py @@ -0,0 +1,239 @@ +"""Read a required group of pinned atoms from one authorized Knowledge source view.""" + +from __future__ import annotations + +import hashlib +import re +from collections.abc import Callable, Iterable, Mapping +from dataclasses import dataclass +from typing import Protocol + +from .atomic_composition import LAYERS, AtomPin, AtomUse, applies, select_routes +from .atomic_generation import InstalledGeneration +from .decision_cards import DecisionSource +from .knowledge_operations import ( + Bundle, + IdentityError, + UnavailableRevision, + safe_path, +) + +_DIGEST = re.compile(r"[0-9a-f]{64}") +_OPERATIONS = frozenset({"read", "retain", "redistribute"}) + + +class PinnedSource(Protocol): + def read_resolved(self, reference: str, *, revision: str) -> tuple[str, Bundle]: ... + + +@dataclass(frozen=True) +class GroupDelivery: + """Bodies and their corresponding public receipt records in delivery order.""" + + bodies: tuple[bytes, ...] + receipt: dict + + +def _refused(reason: str, *, required_bytes: int | None = None) -> GroupDelivery: + receipt = {"status": reason, "body_bytes": 0, "delivered": []} + if required_bytes is not None: + receipt["required_bytes"] = required_bytes + return GroupDelivery((), receipt) + + +def _selected(delivery: GroupDelivery, request: dict) -> GroupDelivery: + return GroupDelivery(delivery.bodies, {**delivery.receipt, "selection": request}) + + +def _actions(max_bytes: int, operations: Iterable[str]) -> set[str]: + if type(max_bytes) is not int or max_bytes < 0: + raise ValueError("Body budget must be a nonnegative integer") + actions = {"read", *operations} + if not actions <= _OPERATIONS: + raise ValueError("Unknown atom operation") + return actions + + +def permits_operations(declaration: dict, actions: set[str]) -> bool: + """Check each declared grant and the explicit license required for redistribution.""" + if not all(declaration["permissions"].get(action) is True for action in actions): + return False + license_id = declaration.get("license") + if "redistribute" in actions and (not isinstance(license_id, str) or + license_id.strip().lower() in {"", "unknown", "none", "noassertion", "no_license"}): + return False + return True + + +def _restriction(declaration: dict, actions: set[str], context: Mapping[str, str]) -> str | None: + if not permits_operations(declaration, actions): + return "permission_denied" + if not applies(declaration["when"], context): + return "not_applicable" + return None + + +def atom_material(bundle: Bundle, view: dict) -> tuple[bytes, dict]: + """Recover and verify the authored byte span, including a binary attachment.""" + atom = view["atom"] + resource = safe_path(atom.get("resource", view["entrypoint"])) + if resource not in bundle.content: + raise ValueError("Atom resource is missing from the pinned Bundle") + body = bundle.content[resource] + span = atom["source_span"] + index = span["source_index"] + if type(index) is not int or not 0 <= index < len(view["sources"]): + raise ValueError("Atom source_span must select a declared source") + source = view["sources"][index] + commit = source.get("commit") + snapshot = source.get("sha256") + if "commit" in source: + if not isinstance(commit, str) or not re.fullmatch(r"[0-9a-f]{40}", commit): + raise ValueError("Invalid immutable source commit") + elif not isinstance(snapshot, str) or not _DIGEST.fullmatch(snapshot): + raise ValueError("An atom needs an immutable source snapshot") + start, end = span["byte_range"] + if type(start) is not int or type(end) is not int or start < 0 or end - start != len(body): + raise ValueError("Source range must cover the exact bytes of the atom") + digest = hashlib.sha256(body).hexdigest() + if span["sha256"] != digest or view["resources"][resource] != digest: + raise ValueError("Atom does not match the declared source digest") + if atom["layer"] not in LAYERS: + raise ValueError("Invalid atom disclosure layer") + return body, { + "resource": resource, + "layer": atom["layer"], "source": dict(source), "source_path": safe_path(span["path"]), + "source_byte_range": [start, end], "source_sha256": span["sha256"], + "sha256": digest, "bytes": len(body), + } + + +class AtomicReader: + """The caller supplies a snapshot reader and grants for the current project.""" + + def __init__(self, source: PinnedSource, *, permits: Callable[[AtomPin, str], bool]): + self.source = source + self.permits = permits + + def _snapshot(self, pin: AtomPin) -> tuple[Bundle, dict] | None: + try: + qualified, held = self.source.read_resolved(pin.ref, revision=pin.revision) + except UnavailableRevision: + return None + except IdentityError as exc: + if exc.code != "unknown_identity": + raise + return None + if qualified != pin.ref or held.metadata.get("id") != pin.ref.partition(":")[2]: + return None + bundle = Bundle(held.metadata, dict(held.content), dict(held.dependencies)) + view = bundle.view() + return (bundle, view) if view["revision"] == pin.revision else None + + def _materialize(self, required, optional, *, max_bytes, context, actions, + layer=None) -> GroupDelivery: + cached: dict[AtomPin, tuple[bytes, dict]] = {} + paths: dict[AtomPin, list[list[str]]] = {} + omissions = [] + used_bytes = 0 + + def include(group: Iterable[AtomUse]) -> GroupDelivery | None: + nonlocal used_bytes + proposed: dict[AtomPin, list[list[str]]] = {} + for use in group: + via = list(use.path) + if via not in proposed.setdefault(use.pin, []): + proposed[use.pin].append(via) + if not proposed: + return _refused("not_applicable") + if any(not self.permits(pin, op) for pin in proposed for op in actions): + return _refused("permission_denied") + for pin in proposed: + if pin in cached: + continue + snapshot = self._snapshot(pin) + if snapshot is None: + return _refused("unavailable_revision") + bundle, view = snapshot + atom = view.get("atom") + if not isinstance(atom, dict): + raise ValueError("A composition node must reference an atom") + reason = _restriction(atom, actions, context) + if reason: + return _refused(reason) + cached[pin] = atom_material(bundle, view) + total = used_bytes + sum(len(cached[pin][0]) for pin in proposed if pin not in paths) + if total > max_bytes: + return _refused("over_budget", required_bytes=total) + for pin, vias in proposed.items(): + seen = paths.setdefault(pin, []) + seen.extend(via for via in vias if via not in seen) + used_bytes = total + return None + + refusal = include(required) + if refusal is not None: + return refusal + if layer is not None: + routes = {via[0] for vias in paths.values() for via in vias} + supplied = {via[0] for pin, vias in paths.items() if cached[pin][1]["layer"] == layer + for via in vias if len(via) == 2} + if routes != supplied: + raise ValueError(f"Selected route has no required root supplying {layer}") + for group in optional: + refusal = include(group) + if refusal is not None: + omissions.append({"path": list(group[-1].path), + "reason": refusal.receipt["status"]}) + installed = self.source if isinstance(self.source, InstalledGeneration) else None + records = [{"ref": pin.ref, "revision": pin.revision, "paths": via, + "source_range_verification": ("verified_at_build" if installed + and installed.source_range_verified(pin) + else "declared"), + **cached[pin][1]} + for pin, via in paths.items()] + receipt = {"status": "delivered", "body_bytes": used_bytes, "delivered": records} + if omissions: + receipt["omissions"] = omissions + return GroupDelivery(tuple(cached[pin][0] for pin in paths), receipt) + + def read_group( + self, uses: Iterable[AtomUse], *, max_bytes: int, context: Mapping[str, str], + operations: Iterable[str] = (), + ) -> GroupDelivery: + """Resolve and authorize every required path before releasing any body.""" + return self._materialize(uses, (), max_bytes=max_bytes, context=context, + actions=_actions(max_bytes, operations)) + + def read_selection( + self, reference: str, *, revision: str, layer: str, max_bytes: int, + context: Mapping[str, str], finding: str | None = None, operations: Iterable[str] = (), + ) -> GroupDelivery: + """Read one pinned composition by layer and, for a Case, one original finding.""" + pin = AtomPin(reference, revision) + actions = _actions(max_bytes, operations) + if layer not in LAYERS: + raise ValueError("Select one of L0, L1, L2 and L3") + requested = {"ref": reference, "revision": revision, "layer": layer, "finding": finding} + if not all(self.permits(pin, action) for action in actions): + return _selected(_refused("permission_denied"), requested) + snapshot = self._snapshot(pin) + if snapshot is None: + return _selected(_refused("unavailable_revision"), requested) + bundle, view = snapshot + composition = view.get("composition") + if not isinstance(composition, dict): + raise ValueError("Expected a pinned composition") + reason = _restriction(composition, actions, context) + if reason: + return _selected(_refused(reason), requested) + case = None + if view["kind"] == "case": + case = DecisionSource.from_bundle(reference, bundle, view) + plan = select_routes(composition, layer=layer, context=context, case=case, finding=finding) + if plan.refusal: + return _selected(_refused(plan.refusal), requested) + delivery = self._materialize(plan.required, plan.optional, max_bytes=max_bytes, + context=context, actions=actions, layer=layer) + return _selected(delivery, {**requested, "canonical_finding": plan.finding, + "routes": list(plan.routes)}) diff --git a/src/inferrsi/knowledge/atomic_skill_directory.py b/src/inferrsi/knowledge/atomic_skill_directory.py new file mode 100644 index 000000000..2b5f5932d --- /dev/null +++ b/src/inferrsi/knowledge/atomic_skill_directory.py @@ -0,0 +1,106 @@ +"""Build the pinned sections, relative resources and host export of a self-contained Skill.""" + +from __future__ import annotations + +import re +from io import BytesIO +from pathlib import PurePosixPath + +from ._skill_selection import skill_procedure +from .atomic_composition import AtomPin, select_routes +from .atomic_generation import digest, directory_skill_path, owned_path +from .knowledge_operations import Bundle, _tree, safe_path +from .skill_catalog import _effective, _frontmatter_parts + + +def skill_spans(body: bytes) -> dict: + _, procedure = skill_procedure("SKILL.md", body) + header = re.match(rb"\A---[ \t]*\r?\n.*?^---[ \t]*(?:\r?\n|\Z)", body, re.M | re.S) + if not procedure or not header: + raise ValueError("Skill sections require a complete guide with embedded decision metadata") + navigation_end = procedure["source_byte_ranges"][0][1] + public, _ = _frontmatter_parts(BytesIO(body[:navigation_end] + b"---\n")) + if not all(isinstance(public.get(key), str) and public[key].strip() + for key in ("name", "description")): + raise ValueError("Skill navigation must include its original name and description") + return {"navigation": ("L0", 0, navigation_end), "decision": ("L1", 0, header.end()), + "procedure": ("L2", header.end(), len(body))} + + +def _verify_directory_routes(declaration, bindings, guide, source, material, dependencies): + sections = skill_spans(guide) + if any(any(route.get(key) for key in ("when", "optional", "supersedes", "conflicts")) + for route in declaration["routes"].values()): + raise ValueError("Directory routes must preserve their unconditional delivery") + nodes = declaration["nodes"] + file_pins = {path: AtomPin(nodes[name]["ref"], nodes[name]["revision"]) + for path, name in bindings.items()} + for layer, names in (("L0", ["navigation"]), ("L1", ["decision"]), + ("L2", ["decision", "procedure"]), ("L3", [])): + selected = select_routes(declaration, layer=layer, context={}, case=None, finding=None) + pins = list(dict.fromkeys(use.pin for use in selected.required)) + if layer == "L3": + if set(pins) != set(file_pins.values()): + raise ValueError("Skill L3 must deliver the complete original directory") + continue + if layer == "L2": + if pins[len(names):] != [file_pins[path] for path in dependencies]: + raise ValueError("Skill L2 must deliver its declared original references") + pins = pins[:len(names)] + actual = [] + for pin in pins: + if pin not in material: + raise ValueError(f"Missing pinned Skill section: {pin.ref}") + origin = material[pin][1] + if origin["source"] != source: + raise ValueError(f"Skill {layer} must deliver its own pinned guide sections") + actual.append((origin["layer"], *origin["source_byte_range"])) + if actual != [sections[name] for name in names]: + raise ValueError(f"Skill {layer} must deliver its own pinned guide sections") + + +def directory_dependencies(metadata, bindings, content, origins, material, roots) -> dict[str, str]: + """Verify the original Skill directory and derive the explicitly declared file revisions.""" + entry = PurePosixPath(safe_path(metadata["entrypoint"])) + if (not isinstance(bindings, dict) or entry.as_posix() not in bindings + or entry.name != "SKILL.md" or entry.parent.name != metadata["id"]): + raise ValueError("Skill directory must bind its original SKILL.md and identity") + source = origins[entry.as_posix()] + original = PurePosixPath(source["path"]) + if (source != metadata["sources"][0] or original.parts[-len(entry.parts):] != entry.parts + or not roots or source.get("commit") not in roots): + raise ValueError("Skill directory requires its pinned source root") + for name, origin in origins.items(): + if (not PurePosixPath(name).is_relative_to(entry.parent) + or source.get("repo") != origin.get("repo") + or source["commit"] != origin.get("commit") + or original.parent / PurePosixPath(name).relative_to(entry.parent) + != PurePosixPath(origin["path"])): + raise ValueError(f"Skill resource differs from its original relative source: {name}") + root = roots[source["commit"]] + directory = owned_path(root, original.parent.as_posix()) + released = _tree(directory, entry.parent.as_posix(), root=root) + if content != released or metadata["required_resources"] != sorted(released): + raise ValueError("Skill directory bindings must cover the complete original directory") + dependencies = {} + for reference in _effective(directory).get("references", []): + path = (entry.parent / safe_path(reference)).as_posix() + if path not in released: + raise ValueError(f"Missing declared Skill reference: {path}") + dependencies[path] = "sha256:" + digest(released[path]) + _verify_directory_routes(metadata["composition"], bindings, content[entry.as_posix()], + source, material, dependencies) + return dependencies + + +def export_directory_skill(bundle: Bundle) -> tuple[str, dict[str, bytes]]: + name = bundle.metadata["id"] + entry = PurePosixPath(bundle.metadata["entrypoint"]) + header, _ = _frontmatter_parts(BytesIO(bundle.content[entry.as_posix()])) + description = header.get("description") + if (len(name) > 64 or not re.fullmatch(r"[a-z0-9]+(?:-[a-z0-9]+)*", name) + or header.get("name") != name or not isinstance(description, str) + or not 1 <= len(description.strip()) <= 1024): + raise ValueError("Directory Skill must have a valid matching host name and description") + return name, {directory_skill_path(bundle.metadata, path): raw + for path, raw in bundle.content.items()} diff --git a/src/inferrsi/knowledge/atoms/ascend-optimization-casebook.original.json b/src/inferrsi/knowledge/atoms/ascend-optimization-casebook.original.json new file mode 100644 index 000000000..4dca77a65 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/ascend-optimization-casebook.original.json @@ -0,0 +1,95 @@ +{ + "authority": "checkout", + "metadata": { + "id": "ascend-optimization-casebook.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Casebook of NPU optimization cases for Ascend inference systems: symptom → diagnosis → action → evidence records for memory-bound, compute-bound, communication-exposed, graph-compilation, and AI-CPU-fallback bottleneck classes. Use when a bottleneck has been classified and you need prior art for what to try next. Complement to inference-optimization-casebook (which covers the casebook *pattern*; this carries the actual NPU cases).\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Find source-derived prior cases for an already classified Ascend inference bottleneck, including fallback, memory traffic, exposed communication, graph startup and host scheduling gaps.", + "prerequisites": "A bottleneck classification from profiling and a check of the selected case preconditions/mechanism before applying it.", + "input_contract": "Bottleneck symptoms and matching profiler evidence, model/hardware/CANN/configuration context and, for a new case, measured before/after metrics.", + "produced_artifact": "A matching prior-art case and evidence requirements for a later measured application; a new case record requires a verified win or clear failure with a metric comparison.", + "refusal_point": "Do not add an INCONCLUSIVE case or one without a measured metric comparison; a subjective direction is insufficient evidence." + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "byte_range": [ + 0, + 11126 + ], + "sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a" + } + } + }, + "content": { + "guide.md": { + "path": "casebooks/ascend-optimization-casebook.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 499 + ], + "sha256": "a40dca9d4664aabc8ac011a4f8da6f28bdff5575ce552392f81481d14f3d05b2" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 2457 + ], + "sha256": "f9f82337e195fda49cc797f93adb2ee4cf94870b083e5af133908e38124fd5dd" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 2457, + 11126 + ], + "sha256": "44defa3c30609f25afe1aa5077c9f81a080cb5f202490f767349853957243a5b" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/cache_dit.common.diffusion.residual_cache_calibration.original.json b/src/inferrsi/knowledge/atoms/cache_dit.common.diffusion.residual_cache_calibration.original.json new file mode 100644 index 000000000..80170a8d8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/cache_dit.common.diffusion.residual_cache_calibration.original.json @@ -0,0 +1,254 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Cache-DiT residual reuse needs model- and schedule-specific calibration", + "summary": "DBCache skips intermediate transformer work using residual similarity, with computed boundary blocks and warmup controlling approximation.", + "applicability": { + "hardware": [ + "Upstream advertises NVIDIA, AMD and Ascend support; individual model/backend combinations remain unverified here" + ], + "software": [ + "vipshop/cache-dit at a57c826d3527736a0d1f1b0243d47568c350eb5f; later revisions need reinspection" + ], + "conditions": [ + "A supported block adapter/forward pattern and explicit request-local cache state", + "Model, dtype, CFG branches, scheduler, step count and thresholds are fixed for an evaluation" + ] + }, + "limitations": [ + "Residual reuse is approximate; thresholds from example prompts are not portable quality guarantees.", + "Combined README speedup illustrations do not isolate the contribution of caching, and are not imported as local gains.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "cache_dit", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/cache_dit.common.diffusion.residual_cache_calibration.json", + "sha256": "bb9509ad0225a91b52bc6787477581d05f0ecd5e44fa59f08f718eea36a2ac45" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/docs/user_guide/CACHE_API.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "586b1acf878bb997da80dfda18de0b450cbc36a62c66901aef889ab3d8267265" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/README.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "470f81bdae9fedd777eed9fde6a8ccef895fd190252f7503b6d15d36941c8f30" + } + ], + "attribution": [ + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/docs/user_guide/CACHE_API.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "586b1acf878bb997da80dfda18de0b450cbc36a62c66901aef889ab3d8267265" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/README.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "470f81bdae9fedd777eed9fde6a8ccef895fd190252f7503b6d15d36941c8f30" + } + ], + "id": "cache_dit.common.diffusion.residual_cache_calibration.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/cache_dit.common.diffusion.residual_cache_calibration.json", + "byte_range": [ + 0, + 3841 + ], + "sha256": "bb9509ad0225a91b52bc6787477581d05f0ecd5e44fa59f08f718eea36a2ac45" + } + } + }, + "content": { + "record.json": { + "path": "records/cache_dit.common.diffusion.residual_cache_calibration.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 295 + ], + "sha256": "19419979c4a9fb5617f4ec15b0010755349c3cce0b876cb8a8d45332c64c7353" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 299, + 319 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 323, + 474 + ], + "sha256": "57f10000aae902a1f9b459af760c086e76d919cc71368c4b564929f5ae2a801e" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 478, + 615 + ], + "sha256": "79f5622955567b4f72a5ba541ec325fcb51ebfabba574b9da7e9e6a7c33d940a" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 619, + 1341 + ], + "sha256": "5eaff7bfcc95b4b6ad2f207a5ebd5b10d7a2049ca7bb9e8846d94dcd4c4d07be" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1345, + 1860 + ], + "sha256": "36ba629ad17089335c4452069d5ef46277362adf111add63ef5e7d36a725665f" + }, + "claim-0": { + "summary": "DBCache uses computed leading blocks to estimate change and optional trailing blocks to refine approximate hidden states; warmup and residual thresholds alter reuse.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1880, + 2111 + ], + "sha256": "e3575e7baf9f9ac977f289055c57ed3fec6c6fe1ac7898f005e61ef358aa4209" + }, + "claim-1": { + "summary": "The source supports per-transformer settings for multi-transformer models and shows distinct settings for separate block groups.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2117, + 2311 + ], + "sha256": "6a76e133cd195447d0c4c20b86c27e227fa810086f4968e83b16ae6b33339ea1" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2319, + 2758 + ], + "sha256": "62c034b9e50e859c4ea261a235164c316c8029126ede2e35957c39f383768dee" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2762, + 2905 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2909, + 3356 + ], + "sha256": "cfb54fbd724c412c7beac9915c6d10502bc756f3a2ac097ec0ea9643d130266a" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3360, + 3749 + ], + "sha256": "0a0a9afb2cc585ad11d0d22df35d1f38dc03bb1ebea0fdcbc18c422ee7c0d580" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3753, + 3838 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.admission-drain-occupancy.guide.json b/src/inferrsi/knowledge/atoms/case.admission-drain-occupancy.guide.json new file mode 100644 index 000000000..6aad0c381 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.admission-drain-occupancy.guide.json @@ -0,0 +1,68 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.admission-drain-occupancy.guide", + "kind": "knowledge", + "title": "Admission occupancy is not whole-run occupancy", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Continuous admission, mixed prefill/decode and final drain", + "Recorded Drama3 B300 C64 diagnostic only" + ], + "limitations": [ + "Campaign INCONCLUSIVE", + "No new measurement or trace reproduction", + "Selected-phase occupancy is not service throughput", + "Raw evidence remains under its existing owner" + ], + "attribution": "InferRSI issue #10 diagnostic evidence; extraction retains the original observation and its limits", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "sha256": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27" + }, + { + "type": "internal", + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10", + "run": "drama3-mixed-20261016", + "artifact": "vllm-continuous-schedule.json", + "sha256": "29e5cafe329cb85eaba69db7536a28a83fb7e3ac29bc154fc8747f317f6a4b3f", + "request_metadata_sha256": "bd50166976a4753b33c8aeb5a774ebb5711c74ccbba0df1843885f353ecdc996", + "integrity_status": "reported_not_rehashed", + "evidence_url": "https://github.com/InferMatrixLab/InferRSI/blob/c13027983b853fee3700de6aabde52b72e61885a/evidence/drama3-b300-scale150/results/diagnostic-lessons.md#continuous-admission-profile-and-mixed-backbone-2026-10-16" + } + ], + "entrypoint": "admission-drain-occupancy.md", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "byte_range": [ + 0, + 3134 + ], + "sha256": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27" + } + } + }, + "content": { + "admission-drain-occupancy.md": { + "path": "casebooks/admission-drain-occupancy.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.admission-drain-occupancy.original.json b/src/inferrsi/knowledge/atoms/case.admission-drain-occupancy.original.json new file mode 100644 index 000000000..b8fb4a672 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.admission-drain-occupancy.original.json @@ -0,0 +1,180 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.admission-drain-occupancy.original", + "kind": "knowledge", + "title": "Admission occupancy is not whole-run occupancy", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Continuous admission, mixed prefill/decode and final drain", + "Recorded Drama3 B300 C64 diagnostic only" + ], + "limitations": [ + "Campaign INCONCLUSIVE", + "No new measurement or trace reproduction", + "Selected-phase occupancy is not service throughput", + "Raw evidence remains under its existing owner" + ], + "attribution": "InferRSI issue #10 diagnostic evidence; extraction retains the original observation and its limits", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json", + "sha256": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e" + }, + { + "type": "internal", + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10", + "run": "drama3-mixed-20261016", + "artifact": "vllm-continuous-schedule.json", + "sha256": "29e5cafe329cb85eaba69db7536a28a83fb7e3ac29bc154fc8747f317f6a4b3f", + "request_metadata_sha256": "bd50166976a4753b33c8aeb5a774ebb5711c74ccbba0df1843885f353ecdc996", + "integrity_status": "reported_not_rehashed", + "evidence_url": "https://github.com/InferMatrixLab/InferRSI/blob/c13027983b853fee3700de6aabde52b72e61885a/evidence/drama3-b300-scale150/results/diagnostic-lessons.md#continuous-admission-profile-and-mixed-backbone-2026-10-16" + } + ], + "entrypoint": "case.json", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json", + "byte_range": [ + 0, + 3602 + ], + "sha256": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e" + }, + "source_pointers": [ + "" + ] + } + }, + "content": { + "case.json": { + "path": "casebooks/admission-drain-occupancy.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/kind", + "/backend" + ], + "byte_range": [ + 4, + 81 + ], + "sha256": "20229c5fde158feda971aaf38b1083c1224ae85995eb387aea9a3750b1146f81" + }, + "origin-state": { + "layer": "L1", + "pointers": [ + "/origin", + "/state" + ], + "byte_range": [ + 85, + 144 + ], + "sha256": "a0cf30b585b5ae364c5825fc160025f28064be575cedbe123739f8d1331be20f" + }, + "resources": { + "layer": "L2", + "pointers": [ + "/content", + "/required_resources" + ], + "byte_range": [ + 148, + 249 + ], + "sha256": "8b95453271f4ec54318420fda1203a0487460837c1b68530d2a9bb3bf90801ae" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 253, + 935 + ], + "sha256": "43de95f40f46e16a5f716c6774bdbc590cd8e2f1238b17ca1e6d9a09c29998f5" + }, + "applicability": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 939, + 1062 + ], + "sha256": "24ee65c81e2254c74fa5fa179aaf72869e0bc9237ed0952178debb570000cc32" + }, + "limits-attribution": { + "layer": "L1", + "pointers": [ + "/limitations", + "/attribution" + ], + "byte_range": [ + 1066, + 1372 + ], + "sha256": "80ce13bce9ed80b83e0be1a65b4a01ad4870631e35dece019b10efa94f9ef197" + }, + "finding-0": { + "layer": "L1", + "pointers": [ + "/findings/0" + ], + "byte_range": [ + 1394, + 2249 + ], + "sha256": "82a530dd7402fa10f0d445609238cc0451779afa5ebc0b02feb182f8e8c518e4", + "title": "Split admitted traffic from the final drain when reading decode occupancy" + }, + "finding-1": { + "layer": "L1", + "pointers": [ + "/findings/1" + ], + "byte_range": [ + 2255, + 2911 + ], + "sha256": "29844fbb80c01fedfa2d1499f6b647c39624fb23008809870f815c5fbe86b9e9", + "title": "Count scheduler steps using owning CPU annotations" + }, + "finding-2": { + "layer": "L1", + "pointers": [ + "/findings/2" + ], + "byte_range": [ + 2917, + 3595 + ], + "sha256": "a48329e4a1aa6d303ed6bfe65b967f0b0ec4972d66d7e42f339e5d31e078cd16", + "title": "Carry the complete cohort into the service gate" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.drama3-rejected-directions.guide.json b/src/inferrsi/knowledge/atoms/case.drama3-rejected-directions.guide.json new file mode 100644 index 000000000..4ad1b832e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.drama3-rejected-directions.guide.json @@ -0,0 +1,67 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.drama3-rejected-directions.guide", + "kind": "knowledge", + "title": "Drama3 B300: rejected directions and invalid controls", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Drama3 standalone native-computation runtime on one B300", + "Only each cited microbenchmark, fixed-state diagnostic or complete service trial" + ], + "limitations": [ + "Campaign remains INCONCLUSIVE and optimization is paused", + "Individual completed gate failures do not complete the all-concurrency acceptance matrix", + "Repository summary inspected; external raw traces and runtime artifacts not rerun or rehashed", + "No root cause inferred from client accounting or cross-screen timing subtraction" + ], + "attribution": "Issue #10 diagnostic lessons, including runtime 47c3d2ec4e3406d8a71fccc3cb4967783c2650f5; revisit checks are current suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md", + "sha256": "6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/evidence/drama3-b300-scale150/results/diagnostic-lessons.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "evidence/drama3-b300-scale150/results/diagnostic-lessons.md" + ], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10" + } + ], + "entrypoint": "drama3-rejected-directions.md", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md", + "byte_range": [ + 0, + 3557 + ], + "sha256": "6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf" + } + } + }, + "content": { + "drama3-rejected-directions.md": { + "path": "casebooks/drama3-rejected-directions.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.drama3-rejected-directions.original.json b/src/inferrsi/knowledge/atoms/case.drama3-rejected-directions.original.json new file mode 100644 index 000000000..ba8512954 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.drama3-rejected-directions.original.json @@ -0,0 +1,238 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.drama3-rejected-directions.original", + "kind": "knowledge", + "title": "Drama3 B300: rejected directions and invalid controls", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Drama3 standalone native-computation runtime on one B300", + "Only each cited microbenchmark, fixed-state diagnostic or complete service trial" + ], + "limitations": [ + "Campaign remains INCONCLUSIVE and optimization is paused", + "Individual completed gate failures do not complete the all-concurrency acceptance matrix", + "Repository summary inspected; external raw traces and runtime artifacts not rerun or rehashed", + "No root cause inferred from client accounting or cross-screen timing subtraction" + ], + "attribution": "Issue #10 diagnostic lessons, including runtime 47c3d2ec4e3406d8a71fccc3cb4967783c2650f5; revisit checks are current suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json", + "sha256": "a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/evidence/drama3-b300-scale150/results/diagnostic-lessons.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "evidence/drama3-b300-scale150/results/diagnostic-lessons.md" + ], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10" + } + ], + "entrypoint": "case.json", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json", + "byte_range": [ + 0, + 6270 + ], + "sha256": "a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a" + }, + "source_pointers": [ + "" + ] + } + }, + "content": { + "case.json": { + "path": "casebooks/drama3-rejected-directions.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/kind", + "/backend" + ], + "byte_range": [ + 4, + 82 + ], + "sha256": "d4529591039baeaf24838c5ab7cfc09f80490a5c6d4049c989384fb400c16a60" + }, + "origin-state": { + "layer": "L1", + "pointers": [ + "/origin", + "/state" + ], + "byte_range": [ + 86, + 145 + ], + "sha256": "a0cf30b585b5ae364c5825fc160025f28064be575cedbe123739f8d1331be20f" + }, + "resources": { + "layer": "L2", + "pointers": [ + "/content", + "/required_resources" + ], + "byte_range": [ + 149, + 252 + ], + "sha256": "9528a4c7c2bdf0c8e11c14546ac76f9d804a40f76f7ebd8918b348244074fad9" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 256, + 660 + ], + "sha256": "2538ed8c5621060fb1e7dba6dae29a82f41b6899c854c8beade600659e7406db" + }, + "applicability": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 664, + 825 + ], + "sha256": "12332d282309b690073fdc12283d73527fcbff464ea3a79667a76ac98241f593" + }, + "tags": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 829, + 976 + ], + "sha256": "0aa15eaebe4ed478bd29a65100a2d3d0761a46165608dc062a9c469c5850a4db" + }, + "limits-attribution": { + "layer": "L1", + "pointers": [ + "/limitations", + "/attribution" + ], + "byte_range": [ + 980, + 1477 + ], + "sha256": "1cddd6a8a73b86559b45089dccded2bede890141e057e876273c6177daa616ee" + }, + "finding-0": { + "layer": "L1", + "pointers": [ + "/findings/0" + ], + "byte_range": [ + 1499, + 2154 + ], + "sha256": "4cae0fad3460d28e4176d079c1246dcd88af21fefcc1191412c153dc5696e075", + "title": "Qualify fused tower projections and longer decode groups at service scope" + }, + "finding-1": { + "layer": "L1", + "pointers": [ + "/findings/1" + ], + "byte_range": [ + 2160, + 2910 + ], + "sha256": "e02ff5d0a442030bb8a6d8a8a6901670ab0f92ec8d2c841536ea72b63cbaac1a", + "title": "Check ATen cuBLAS workspace sharing when codec capture changes WER" + }, + "finding-2": { + "layer": "L1", + "pointers": [ + "/findings/2" + ], + "byte_range": [ + 2916, + 3583 + ], + "sha256": "0eeabdcdbdaef2a15186186d1b2649be9dcd651f94038c0a5dc4136876a7cd1a", + "title": "Require the complete C64 continuation gate for production prefix reuse" + }, + "finding-3": { + "layer": "L1", + "pointers": [ + "/findings/3" + ], + "byte_range": [ + 3589, + 4342 + ], + "sha256": "d9c5f1ab879b45558322e5ef73833d1a6aad3e8db7eb2c02ba78bd3eff9bb76b", + "title": "Reset private padding rows before an A/A state comparison" + }, + "finding-4": { + "layer": "L1", + "pointers": [ + "/findings/4" + ], + "byte_range": [ + 4348, + 5027 + ], + "sha256": "c687cb2d1b8bfe3d1c5b0c2d192fe9b7f64f8d6a2c5a8421a37a2a1c42914882", + "title": "Require physical traffic and a timing win before enabling transparent VMM compression" + }, + "finding-5": { + "layer": "L1", + "pointers": [ + "/findings/5" + ], + "byte_range": [ + 5033, + 5658 + ], + "sha256": "7964442a9f13413d3d97125b3faece7abc39803dab979900fc6db3bab9fd1f17", + "title": "Measure complete kernels before retaining a producer scale-tile cache" + }, + "finding-6": { + "layer": "L1", + "pointers": [ + "/findings/6" + ], + "byte_range": [ + 5664, + 6263 + ], + "sha256": "d345b2c36452eea31e6ae4a6c530142a6ce543116c86c4cd6be043bad4c08b87", + "title": "Revisit FP8 SIMT only with an improved mapping or cost case" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.qwen-ascend-rejected-directions.guide.json b/src/inferrsi/knowledge/atoms/case.qwen-ascend-rejected-directions.guide.json new file mode 100644 index 000000000..b546c8edc --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.qwen-ascend-rejected-directions.guide.json @@ -0,0 +1,67 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.qwen-ascend-rejected-directions.guide", + "kind": "knowledge", + "title": "Qwen Ascend: reported rejected directions", + "backend": "ascend", + "origin": [ + "external" + ], + "state": "author_reported", + "applicability": [ + "Author-reported single Ascend 910B1 Qwen-Image-2.1-Turbo cohort", + "BF16, eager, TORCH_SDPA, CFG=1, 1280x704, native eight sigmas" + ], + "limitations": [ + "Imported author report; locally_verified=false", + "Raw request timings, RGBA outputs and frozen validator are absent from this import", + "InferRSI acceptance remains INCONCLUSIVE; the source 30 percent target was not met", + "No cross-device or HTTP-serving qualification" + ], + "attribution": "amy-why-3459 source report, retained by the existing Ascend guide; revisit checks are current suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md", + "sha256": "be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-ascend.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "docs/qwen-image-2.1-turbo-ascend.md" + ], + "upstream_head": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + } + ], + "entrypoint": "qwen-ascend-rejected-directions.md", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md", + "byte_range": [ + 0, + 2564 + ], + "sha256": "be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552" + } + } + }, + "content": { + "qwen-ascend-rejected-directions.md": { + "path": "casebooks/qwen-ascend-rejected-directions.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.qwen-ascend-rejected-directions.original.json b/src/inferrsi/knowledge/atoms/case.qwen-ascend-rejected-directions.original.json new file mode 100644 index 000000000..ff6fa184a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.qwen-ascend-rejected-directions.original.json @@ -0,0 +1,226 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.qwen-ascend-rejected-directions.original", + "kind": "knowledge", + "title": "Qwen Ascend: reported rejected directions", + "backend": "ascend", + "origin": [ + "external" + ], + "state": "author_reported", + "applicability": [ + "Author-reported single Ascend 910B1 Qwen-Image-2.1-Turbo cohort", + "BF16, eager, TORCH_SDPA, CFG=1, 1280x704, native eight sigmas" + ], + "limitations": [ + "Imported author report; locally_verified=false", + "Raw request timings, RGBA outputs and frozen validator are absent from this import", + "InferRSI acceptance remains INCONCLUSIVE; the source 30 percent target was not met", + "No cross-device or HTTP-serving qualification" + ], + "attribution": "amy-why-3459 source report, retained by the existing Ascend guide; revisit checks are current suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json", + "sha256": "b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-ascend.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "docs/qwen-image-2.1-turbo-ascend.md" + ], + "upstream_head": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + } + ], + "entrypoint": "case.json", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json", + "byte_range": [ + 0, + 5299 + ], + "sha256": "b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a" + }, + "source_pointers": [ + "" + ] + } + }, + "content": { + "case.json": { + "path": "casebooks/qwen-ascend-rejected-directions.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/kind", + "/backend" + ], + "byte_range": [ + 4, + 89 + ], + "sha256": "5f7bf4057bb01acc35c7c872acfadae0b774837557a19eb62978bd6c35bd0858" + }, + "origin-state": { + "layer": "L1", + "pointers": [ + "/origin", + "/state" + ], + "byte_range": [ + 93, + 145 + ], + "sha256": "df56c2f9fd5086a28c5a15b842132f0b1dfc955e886ffd1305e5d60530c69199" + }, + "resources": { + "layer": "L2", + "pointers": [ + "/content", + "/required_resources" + ], + "byte_range": [ + 149, + 262 + ], + "sha256": "417f242b6e9fc2d203990a8101baa2aaea4d87d34cab2943885f0b17afc1e999" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 266, + 618 + ], + "sha256": "66c96228acf2ced4936a91cdbbdc5a4ed5a246efebc038656f4e50a3641ba398" + }, + "applicability": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 622, + 771 + ], + "sha256": "79ce2ad23b61b043474f3ace058c9104cbd9cd4b2d73d669a8ada982e5ebd0f9" + }, + "tags": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 775, + 897 + ], + "sha256": "47b154d5445efcf3a7e5044de07d9b81290bd5e727acc10120e19664d837e832" + }, + "limits-attribution": { + "layer": "L1", + "pointers": [ + "/limitations", + "/attribution" + ], + "byte_range": [ + 901, + 1313 + ], + "sha256": "e4072e23c0b8126c50dc39c42ab491fd7ad9780a1340c8d774a6846e9d845662" + }, + "finding-0": { + "layer": "L1", + "pointers": [ + "/findings/0" + ], + "byte_range": [ + 1335, + 1963 + ], + "sha256": "23e07b6c577590ee246e90b000b767fde6aa14b348486dc7beb9ccb054c6fa96", + "title": "Check eager RoPE table and expanded SDPA mask retention against recomputation" + }, + "finding-1": { + "layer": "L1", + "pointers": [ + "/findings/1" + ], + "byte_range": [ + 1969, + 2623 + ], + "sha256": "d3cf6b89c6ee8c3dbfe5b9b23e33496b789a4d78cad25a7e7ccbe6f6cbab73cb", + "title": "Budget live NPU memory before retaining per-step masks and prompt tensors" + }, + "finding-2": { + "layer": "L1", + "pointers": [ + "/findings/2" + ], + "byte_range": [ + 2629, + 3269 + ], + "sha256": "3acd18f9972685069e6959936a32fdd47ef2de547cec239f9a4ba73f1c928fb9", + "title": "Qualify fusion attention with the actual mask, dtype and shape" + }, + "finding-3": { + "layer": "L1", + "pointers": [ + "/findings/3" + ], + "byte_range": [ + 3275, + 3867 + ], + "sha256": "504ae42f29f5131a4d3f28781713aa3a3225dc7ea39fcd458619c088fb565901", + "title": "Recheck queueing and graph mode under the target stack" + }, + "finding-4": { + "layer": "L1", + "pointers": [ + "/findings/4" + ], + "byte_range": [ + 3873, + 4602 + ], + "sha256": "8d218fa1850583227973494d0966db8c2e8d2bbe4c7e8317c71c0466c7e8b627", + "title": "Check initialization residency before combining RoPE, VAE and attention fast paths" + }, + "finding-5": { + "layer": "L1", + "pointers": [ + "/findings/5" + ], + "byte_range": [ + 4608, + 5292 + ], + "sha256": "33d1462dd3b2f2b71d0ae352b19eb513d9a83066ffe54f54c2bb253fb581d536", + "title": "Qualify host headroom for the later RoPE and VAE reservation failure" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.qwen-b300-rejected-directions.guide.json b/src/inferrsi/knowledge/atoms/case.qwen-b300-rejected-directions.guide.json new file mode 100644 index 000000000..0953d13ae --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.qwen-b300-rejected-directions.guide.json @@ -0,0 +1,66 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.qwen-b300-rejected-directions.guide", + "kind": "knowledge", + "title": "Qwen B300: rejected directions to check before retrying", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Qwen-Image-2.1-Turbo, four B300, BF16, native eight steps", + "Only the source ledger's individual trials and controls" + ], + "limitations": [ + "The final campaign PASS does not qualify each rejected direction", + "Exploratory trial timings are not additive gains or causal comparisons", + "No experiment was rerun for this extraction" + ], + "attribution": "Historical issue #3 optimization ledger; revisit checks are current diagnostic suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md", + "sha256": "cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-b300.md#optimization-ledger", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "docs/qwen-image-2.1-turbo-b300.md" + ], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/3" + } + ], + "entrypoint": "qwen-b300-rejected-directions.md", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md", + "byte_range": [ + 0, + 2656 + ], + "sha256": "cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738" + } + } + }, + "content": { + "qwen-b300-rejected-directions.md": { + "path": "casebooks/qwen-b300-rejected-directions.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/case.qwen-b300-rejected-directions.original.json b/src/inferrsi/knowledge/atoms/case.qwen-b300-rejected-directions.original.json new file mode 100644 index 000000000..66a7097b0 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/case.qwen-b300-rejected-directions.original.json @@ -0,0 +1,225 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.qwen-b300-rejected-directions.original", + "kind": "knowledge", + "title": "Qwen B300: rejected directions to check before retrying", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Qwen-Image-2.1-Turbo, four B300, BF16, native eight steps", + "Only the source ledger's individual trials and controls" + ], + "limitations": [ + "The final campaign PASS does not qualify each rejected direction", + "Exploratory trial timings are not additive gains or causal comparisons", + "No experiment was rerun for this extraction" + ], + "attribution": "Historical issue #3 optimization ledger; revisit checks are current diagnostic suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json", + "sha256": "90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-b300.md#optimization-ledger", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "docs/qwen-image-2.1-turbo-b300.md" + ], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/3" + } + ], + "entrypoint": "case.json", + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json", + "byte_range": [ + 0, + 5023 + ], + "sha256": "90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122" + }, + "source_pointers": [ + "" + ] + } + }, + "content": { + "case.json": { + "path": "casebooks/qwen-b300-rejected-directions.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/kind", + "/backend" + ], + "byte_range": [ + 4, + 85 + ], + "sha256": "0d44367cf163401d199108f507f028a28b5ed80c16955183e54f30b26fb4d813" + }, + "origin-state": { + "layer": "L1", + "pointers": [ + "/origin", + "/state" + ], + "byte_range": [ + 89, + 148 + ], + "sha256": "a0cf30b585b5ae364c5825fc160025f28064be575cedbe123739f8d1331be20f" + }, + "resources": { + "layer": "L2", + "pointers": [ + "/content", + "/required_resources" + ], + "byte_range": [ + 152, + 261 + ], + "sha256": "6f7d2361a5e679d3a9e4fb4d4f9dc31c453ba615036ae10a43232d16476e7682" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 265, + 636 + ], + "sha256": "724ec712cf03e6d28dd7b22b53ac22ab6a9a7395fb849363a76bc8171355f549" + }, + "applicability": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 640, + 777 + ], + "sha256": "98c4fc9e08308fe68b498818464287eed07fd25a13580fbfb61b1d0e7212f741" + }, + "tags": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 781, + 895 + ], + "sha256": "03142f7dbf363b437bd2bb718cee43ab81d5c74733f69819bb957c9459f96af8" + }, + "limits-attribution": { + "layer": "L1", + "pointers": [ + "/limitations", + "/attribution" + ], + "byte_range": [ + 899, + 1214 + ], + "sha256": "a2a0838509dcea0b54142d955103df0dd73ec170a3986cbca31a85347744556a" + }, + "finding-0": { + "layer": "L1", + "pointers": [ + "/findings/0" + ], + "byte_range": [ + 1236, + 1859 + ], + "sha256": "7d711ac3744ab38a229eee69a1f60da33d7773ef0544b34287cf62f9dc0dfb24", + "title": "Require full-image parity for fused Q/K RMSNorm and complex RoPE" + }, + "finding-1": { + "layer": "L1", + "pointers": [ + "/findings/1" + ], + "byte_range": [ + 1865, + 2458 + ], + "sha256": "76aa1bba6a163af8333859c17cbb9f4b47a5e00d7df4d2bad76dc4ba87af604f", + "title": "Pair a packed Q/K/V 5D layout with full request timing" + }, + "finding-2": { + "layer": "L1", + "pointers": [ + "/findings/2" + ], + "byte_range": [ + 2464, + 3117 + ], + "sha256": "c8ca005cf69d7d0ab0b24e326334fa5d0c24023185d14688cd7d777633e06d94", + "title": "Measure complete graph replay before promoting projection or norm/RoPE changes" + }, + "finding-3": { + "layer": "L1", + "pointers": [ + "/findings/3" + ], + "byte_range": [ + 3123, + 3770 + ], + "sha256": "cbbd0b5045b47d0f02bd4a9f84633475ce97082e26a03f4f33727d599c5a5304", + "title": "Verify critical-path time for broadcast scales and empty concatenation removal" + }, + "finding-4": { + "layer": "L1", + "pointers": [ + "/findings/4" + ], + "byte_range": [ + 3776, + 4389 + ], + "sha256": "a9c171fb370b31e9478754c820efa9c0b6a9403ffeaa4e3710d74a730f1bf18b", + "title": "Treat H17 and the noisy H13 run as host-confounded readings" + }, + "finding-5": { + "layer": "L1", + "pointers": [ + "/findings/5" + ], + "byte_range": [ + 4395, + 5016 + ], + "sha256": "40ea7d9e88d04d550b448d5a68b5f6b3b5bad6ddff198275a97275f2c4380471", + "title": "Carry a compiled launch API probe through full-pipeline integration before judging gain" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/casebooks/admission-drain-occupancy.json b/src/inferrsi/knowledge/atoms/casebooks/admission-drain-occupancy.json new file mode 100644 index 000000000..24c35b4c8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/admission-drain-occupancy.json @@ -0,0 +1,69 @@ +{ + "id": "case.admission-drain-occupancy", + "kind": "case", + "backend": "cuda", + "origin": ["internal"], + "state": "historical_observation", + "content": "admission-drain-occupancy.md", + "required_resources": ["admission-drain-occupancy.json"], + "sources": [ + { + "type": "internal", + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10", + "run": "drama3-mixed-20261016", + "artifact": "vllm-continuous-schedule.json", + "sha256": "29e5cafe329cb85eaba69db7536a28a83fb7e3ac29bc154fc8747f317f6a4b3f", + "request_metadata_sha256": "bd50166976a4753b33c8aeb5a774ebb5711c74ccbba0df1843885f353ecdc996", + "integrity_status": "reported_not_rehashed", + "evidence_url": "https://github.com/InferMatrixLab/InferRSI/blob/c13027983b853fee3700de6aabde52b72e61885a/evidence/drama3-b300-scale150/results/diagnostic-lessons.md#continuous-admission-profile-and-mixed-backbone-2026-10-16" + } + ], + "applicability": ["Continuous admission, mixed prefill/decode and final drain", "Recorded Drama3 B300 C64 diagnostic only"], + "limitations": ["Campaign INCONCLUSIVE", "No new measurement or trace reproduction", "Selected-phase occupancy is not service throughput", "Raw evidence remains under its existing owner"], + "attribution": "InferRSI issue #10 diagnostic evidence; extraction retains the original observation and its limits", + "findings": [ + { + "direction": "Split admitted traffic from the final drain when reading decode occupancy", + "outcome": "caveat", + "reason": "Across the 256-request B300 diagnostic, pure decode averaged 60.718 of 64 active requests during admission, 8.793 in drain and 28.146 over the full trace. The trace-wide mean cannot identify how full decode was while requests were still entering.", + "revisit_when": "Mark the client admission interval and the final drain in the trace before using occupancy to select a scheduling hypothesis.", + "keywords": [ + "active decode batch", + "continuous admission", + "final drain", + "whole-run occupancy", + "C64" + ], + "scope": "local", + "bounds": "Drama3 B300, 256 requests and a C64 continuous-admission diagnostic; approximate CPU/GPU clock alignment." + }, + { + "direction": "Count scheduler steps using owning CPU annotations", + "outcome": "caveat", + "reason": "The owning CPU annotations count 1 prefill, 37 mixed, 762 decode and 2 empty steps, totaling 802. PIECEWISE fragments describe graph execution, and scheduled prompt entries may describe chunks.", + "revisit_when": "Verify annotation ownership, align the clocks and pair the counts with actual generated work when profiling another trace.", + "keywords": [ + "owning CPU annotation", + "PIECEWISE", + "mixed batch", + "prefill chunks", + "scheduler steps" + ], + "scope": "regime_bound" + }, + { + "direction": "Carry the complete cohort into the service gate", + "outcome": "caveat", + "reason": "Near-full decode occupancy in a selected interval is a diagnostic. The service decision still depends on all requests, complete quality and repetition groups, and the end-to-end metric.", + "revisit_when": "Use phase statistics to pick a hypothesis. Evaluate the resulting change with the unchanged complete cohort and matched frozen service controls.", + "keywords": [ + "acceptance gate", + "service throughput", + "request cohort", + "quality groups", + "model-only microbenchmark" + ], + "scope": "general" + } + ] +} diff --git a/src/inferrsi/knowledge/atoms/casebooks/admission-drain-occupancy.md b/src/inferrsi/knowledge/atoms/casebooks/admission-drain-occupancy.md new file mode 100644 index 000000000..6a422888f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/admission-drain-occupancy.md @@ -0,0 +1,55 @@ +# Admission occupancy is not whole-run occupancy + +Campaign INCONCLUSIVE. This extraction adds no performance validation. Kind, +origin, state and source identities belong to the +[typed source and scope record](admission-drain-occupancy.json). + +## Observation + +In the recorded Drama3 B300 C64 continuous-admission diagnostic (256 requests), +the owning CPU annotations counted 802 scheduler steps: 1 prefill, 37 mixed, +762 decode and 2 empty. During the client-admission interval, pure decode averaged +60.718 active requests out of 64; final drain averaged 8.793. The whole-trace +pure-decode average was 28.146. Scheduled prompt entries may be chunks, not +unique requests. These are recorded diagnostic observations, not new measurements. + +## Action + +The original investigation separated the client-admission and drain intervals, +counted scheduler execution annotations rather than PIECEWISE graph fragments, +and retained the full request cohort for acceptance. No measurement is rerun by +reading this case. + +## Interpretation + +A whole-run mean batch can be dominated by drain. Using it as sustained-admission +occupancy can misidentify scheduling headroom. Conversely, a near-full batch in +a selected interval does not establish a service speedup. Client in-flight counts +also include queueing and codec work; CPU/GPU clock alignment was approximate. +This interpretation is narrower than a causal diagnosis of the service limit. + +## Applicability and counter-signals + +Use for finite autoregressive service cohorts with ongoing admission, mixed +prefill/decode and a final drain. Retain phase definitions and actual generated +work. Counter-signals include no ongoing admission, incomparable input/output +lengths, clocks that cannot be aligned and missing owning annotations. Kernel +sums, annotation unions and SM utilization are different quantities. + +Keep all requests and complete quality/repetition groups in the end-to-end +acceptance metric. Do not replace it with a selected-phase rate or a model-only +microbenchmark. Hardware, model and runtime scope comes from the original frozen +plan; another engine or device needs its own evidence. + +## Preserved evidence + +- [Acceptance issue #10](https://github.com/InferMatrixLab/InferRSI/issues/10). +- [Original diagnostic section at the inspected repository snapshot](https://github.com/InferMatrixLab/InferRSI/blob/c13027983b853fee3700de6aabde52b72e61885a/evidence/drama3-b300-scale150/results/diagnostic-lessons.md#continuous-admission-profile-and-mixed-backbone-2026-10-16). +- [Frozen plan](https://github.com/InferMatrixLab/InferRSI/blob/c13027983b853fee3700de6aabde52b72e61885a/evidence/drama3-b300-scale150/plan/plan.json). +- Original artifact identity, recorded raw trace and request metadata SHA256: + the [typed source and scope record](admission-drain-occupancy.json). + Raw bytes were not independently retrieved or rehashed for this extraction. + +The local frozen evidence remains untouched. Observation is carried from its +2026-10-16 report; extraction inspected that section on 2026-10-16. No missing +model pin, runtime revision or repeated acceptance outcome is reconstructed. diff --git a/src/inferrsi/knowledge/atoms/casebooks/ascend-optimization-casebook.md b/src/inferrsi/knowledge/atoms/casebooks/ascend-optimization-casebook.md new file mode 100644 index 000000000..6d701cbbc --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/ascend-optimization-casebook.md @@ -0,0 +1,244 @@ +--- +name: ascend-optimization-casebook +description: 'Casebook of NPU optimization cases for Ascend inference systems: symptom → diagnosis → action → evidence records for memory-bound, compute-bound, communication-exposed, graph-compilation, and AI-CPU-fallback bottleneck classes. Use when a bottleneck has been classified and you need prior art for what to try next. Complement to inference-optimization-casebook (which covers the casebook *pattern*; this carries the actual NPU cases). + + ' +metadata: + inferrsi: | + { + "tags": [ + "ascend", + "npu", + "optimization", + "casebook", + "prior-art" + ], + "status": "candidate", + "profile": "local-skill-v1", + "schema_version": 1, + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." + ], + "provenance_readsets": [], + "consumption_mode": "packaged", + "applicability": { + "scope": "Find source-derived prior cases for an already classified Ascend inference bottleneck, including fallback, memory traffic, exposed communication, graph startup and host scheduling gaps.", + "prerequisites": "A bottleneck classification from profiling and a check of the selected case preconditions/mechanism before applying it.", + "input_contract": "Bottleneck symptoms and matching profiler evidence, model/hardware/CANN/configuration context and, for a new case, measured before/after metrics.", + "produced_artifact": "A matching prior-art case and evidence requirements for a later measured application; a new case record requires a verified win or clear failure with a metric comparison.", + "refusal_point": "Do not add an INCONCLUSIVE case or one without a measured metric comparison; a subjective direction is insufficient evidence." + }, + "recommendations": [ + "Classify first, then check the matching case preconditions and use its owning procedure to apply and measure the candidate; the casebook itself does not perform profiling.", + "Keep profiler mechanism evidence and same-window end-to-end outcomes together, and retain locally_verified=false until the applied case has actually run." + ] + } +--- + +# Ascend NPU Optimization Casebook + +Status: candidate. Cases grounded in MindIE-SD @ 8481d39b and vllm-ascend +@ bc8115ed source evidence. All cases are source-grounded or inferred from +observed patterns; none have been independently re-run on a local NPU. +Mark each applied case as `locally_verified: false` until you run it. + +## How to use this casebook + +1. Classify the bottleneck first (see `ascend-performance-analysis` skill). + Do not consult this casebook before you have a bottleneck class. +2. Find the matching section below by bottleneck class. +3. Read the case: understand the precondition and mechanism before applying. +4. Apply through the relevant skill or reference, then measure. +5. Record the result as a new case entry when you have a verified win or + a clear failure with evidence. + +The casebook does not run profiling or make decisions — it informs them. + +--- + +## Bottleneck class: AI-CPU fallback + +### Case: op falls back to AI_CPU core + +**Symptom:** `kernel_details.csv` shows `Accelerator Core = AI_CPU` on a +hot-path operator. AI_CPU kernels are orders of magnitude slower than +AI_CORE or AI_VECTOR_CORE equivalents. This is almost always the highest- +priority fix when it appears. + +**Diagnosis:** Sort `kernel_details.csv` by `Duration` descending. Any +`AI_CPU` row in the top-10 is a candidate. Cross-check `Accelerator Core ≡ +Task Type` (they are the same field in different table layouts — verify +value-set equivalence before reporting). + +**Common causes:** +- The PyTorch op has no `torch_npu` equivalent registered. +- The op is registered but the input dtype or shape is outside its + supported range. +- A custom op was not compiled with the AscendC kernel. + +**Action:** +1. Identify the op name from the `Type` (or `OP Type`) column. +2. Check `torch_npu.nn` or the CANN op catalog for a supported equivalent. +3. If an equivalent exists: swap the op; rerun profile; confirm `AI_CPU` + rows disappear from the top-10. +4. If no equivalent: file a support issue or implement a custom AscendC + operator. This is a larger task — see `ascend-operator-profiling` for + the development loop. + +**Evidence required for a PASS verdict:** before/after `kernel_details.csv` +showing the target op has moved from `AI_CPU` to `AI_CORE` or `AI_VECTOR_CORE`, +and a same-window A/B comparison showing E2E latency improvement. + +**Source:** MindIE-SD `profiling-analyze` + `dit-perf-opt` @ 8481d39b. + +--- + +## Bottleneck class: memory-bound + +### Case: high mte2_ratio, low mac_ratio — DRAM bandwidth saturated + +**Symptom:** `op_summary*.csv` shows `mte2_ratio / max(mac_ratio, vec_ratio) +> 1` (the derived `memory_bound` heuristic). The kernel is spending more time +moving data than computing. + +**Diagnosis:** Confirm by cross-referencing `step_trace_time.csv` to ensure +`Computing` fraction is below expected. Then identify the memory-traffic +source: weight reads? activation reads? KV cache reads? + +**Actions (in escalating cost order):** +1. **Kernel fusion:** if two adjacent ops both read the same activation tensor, + fuse them so the tensor is read once. Look for elementwise + norm + + activation chains. Check `fusion-scope-analyze` references for fusion + boundary rules before attempting. +2. **Quantization:** reduce bytes-per-element (FP16 → INT8/FP8). For FP8 on + Ascend: dequantize at loading time (see `ascend-model-adaptation` skill); + verify AI Core utilization before and after — if mac_ratio does not improve, + the gain is not materializing at the hardware level. +3. **Tiling / blocking:** increase data reuse by processing in blocks that fit + in the AI Core local buffer (UB). This is an operator-level change requiring + a custom kernel. + +**Evidence required:** same-window A/B comparison of `mte2_ratio` and E2E +latency. A decrease in `mte2_ratio` without E2E improvement suggests the +memory-bound op was not on the critical path. + +**Source:** MindIE-SD `profiling-analyze` @ 8481d39b; `dit-perf-opt` feature +interaction matrix. + +--- + +## Bottleneck class: communication-exposed + +### Case: AllReduce / AllGather blocking compute forward pass + +**Symptom:** `step_trace_time.csv` shows `effective_comm = Communication - +Overlapped` is large relative to `Computing`. The communication is not being +masked by concurrent compute. + +**Diagnosis:** +1. Confirm with `communication.json`: identify which collective dominates. +2. Check `Overlapped` fraction. If `Overlapped` is near 0, the collective + is not pipelined with compute at all. +3. Verify the card group uses intra-domain topology (`npu-smi info -t topo`). + Cross-domain collectives have inherently lower bandwidth ceiling. + +**Actions:** +1. **Communication masking (comm-stream masking):** route the collective to a + separate HCCL stream that runs concurrently with compute kernels. The upper + bound of achievable masking is `1 - 1/n` (where n = TP/SP degree), but only + when compute time ≥ communication time in the same step. If compute is + shorter than communication, masking cannot fully hide the collective even + in theory. +2. **Parallelism strategy change:** if AllReduce dominates, consider moving to + Ulysses Sequence Parallelism (USP/AllToAll) which has lower collective size + for sequence-parallel attention. See `ascend-distributed-parallel` skill. +3. **Topology-aware card selection:** confirm the card group is intra-domain + (UB/HCCS). Switching to an intra-domain group can double effective bandwidth. + +**Evidence required:** `step_trace_time.csv` four-tuple before and after, plus +E2E latency. Specifically: `effective_comm` should decrease; `Overlapped` +fraction should increase if masking was applied. + +**Source:** MindIE-SD `profiling-analyze` Layer 4, `perf-gate`, and +`dit-parallel-opt` @ 8481d39b. + +--- + +## Bottleneck class: graph compilation overhead + +### Case: slow startup with npugraph_ex enabled + +**Symptom:** inference startup takes many minutes with graph mode enabled. +Once serving begins, per-request latency is normal. This is expected behavior, +not a failure. + +**Diagnosis:** startup cost = compile warmup + graph capture rounds + +multimodal encoder profiling. It scales with the number of graph shapes +captured. Excess recapture happens when the serving code presents variable +shapes to a graph configured for fixed shapes. + +**Actions:** +1. Do not treat slow startup as failure unless hard errors appear in the log. + Look for `Replaying aclgraph` — its presence confirms capture succeeded. +2. If startup time is unacceptable, reduce the number of distinct shapes by + padding inputs to fixed sizes, or enable fewer graph features (e.g., disable + static kernel compilation if it is not needed in this deployment). +3. Set `config.aclgraph_config.capture_limit` to bound recapture attempts. + +**Evidence required:** startup timing before and after config change. Confirm +`Replaying aclgraph` still appears in the log after reducing capture scope. + +**Source:** MindIE-SD `ascend-model-adaptation` references and awesome-ascend- +skills `ascend-graph-mode` @ 75ec89ce. + +--- + +## Bottleneck class: scheduling / idle gaps + +### Case: large `Free` fraction in step-trace + +**Symptom:** `step_trace_time.csv` shows `Free` is a significant fraction of +step time (e.g., > 15%). The NPU is idle between compute bursts. + +**Diagnosis:** look at `trace_view.json` for the host-side activity during the +`Free` period. Common causes: Python GIL contention, request batching delay, +or synchronization points in the framework that block the next kernel launch. + +**Action:** this is a host-overhead problem, not an NPU problem. See the +`host-overhead-profiling` and `host-overhead-optimization` skills (RAM/Host +row) for the diagnostic and fix workflow. + +**Source:** MindIE-SD `profiling-analyze` @ 8481d39b; TRT-LLM `perf-host- +analysis` @ f33e0e5f. + +--- + +## Adding a new case + +When you find a verified NPU optimization win, record it here with: + +```yaml +case_id: +bottleneck_class: [memory-bound | compute-bound | comm-exposed | graph-compile | scheduling | ai-cpu-fallback] +symptom: +precondition: +action: +mechanism: +evidence: + run_id: + metric_before: + metric_after: + verdict: [PASS | FAIL | INCONCLUSIVE] + locally_verified: false +generalizes_to: +does_not_apply_when: +``` + +Do not add a case for an INCONCLUSIVE result. Do not add a case without a +measured metric comparison. A direction ("it seemed faster") is not evidence. diff --git a/src/inferrsi/knowledge/atoms/casebooks/drama3-rejected-directions.json b/src/inferrsi/knowledge/atoms/casebooks/drama3-rejected-directions.json new file mode 100644 index 000000000..188f6534d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/drama3-rejected-directions.json @@ -0,0 +1,121 @@ +{ + "id": "case.drama3-rejected-directions", + "kind": "case", + "backend": "cuda", + "origin": ["internal"], + "state": "historical_observation", + "content": "drama3-rejected-directions.md", + "required_resources": ["drama3-rejected-directions.json"], + "sources": [{ + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/evidence/drama3-b300-scale150/results/diagnostic-lessons.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": ["evidence/drama3-b300-scale150/results/diagnostic-lessons.md"], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10" + }], + "applicability": ["Drama3 standalone native-computation runtime on one B300", "Only each cited microbenchmark, fixed-state diagnostic or complete service trial"], + "tags": ["negative-evidence", "service-regression", "quality-rejection", "harness-mismatch", "prefix-reuse", "memory-compression", "analysis-only"], + "limitations": ["Campaign remains INCONCLUSIVE and optimization is paused", "Individual completed gate failures do not complete the all-concurrency acceptance matrix", "Repository summary inspected; external raw traces and runtime artifacts not rerun or rehashed", "No root cause inferred from client accounting or cross-screen timing subtraction"], + "attribution": "Issue #10 diagnostic lessons, including runtime 47c3d2ec4e3406d8a71fccc3cb4967783c2650f5; revisit checks are current suggestions", + "findings": [ + { + "direction": "Qualify fused tower projections and longer decode groups at service scope", + "outcome": "no_gain", + "reason": "The recorded isolated checks could be correct or faster while full-service throughput did not improve. Multi-step decode also deferred new admissions.", + "revisit_when": "Check active batch sizes through admission and drain, then time the complete path with sampling and codec under the same service workload.", + "keywords": [ + "tower projection fusion", + "multi-step decode", + "throughput", + "delayed admission", + "codec" + ], + "scope": "regime_bound" + }, + { + "direction": "Check ATen cuBLAS workspace sharing when codec capture changes WER", + "outcome": "caveat", + "reason": "The fixed-request controls initially passed despite service WER failures in both arms. In a later bounded replay, private codec capture passed the tested service control while shared capture failed; the runtime guarded dedicated capture.", + "revisit_when": "Preserve the private/dedicated capture setup and matched controls. Establish WER and throughput for the proposed overlap and concurrency separately.", + "keywords": [ + "async service", + "codec graph capture", + "WER", + "shared ATen cuBLAS workspace", + "private capture" + ], + "scope": "regime_bound" + }, + { + "direction": "Require the complete C64 continuation gate for production prefix reuse", + "outcome": "rejected", + "reason": "The graph/state checks and both full quality groups passed, while the complete C64 continuation gate failed. The recorded production default stayed off.", + "revisit_when": "Keep all returned work and final drain in the replay. Inspect the actual schedule and GPU critical path before proposing another production setting.", + "keywords": [ + "prefix reuse", + "C64 continuation gate", + "default-off", + "final drain", + "full quality groups" + ], + "scope": "regime_bound" + }, + { + "direction": "Reset private padding rows before an A/A state comparison", + "outcome": "caveat", + "reason": "The initial prefix-reuse comparison paired distinct physical padding histories. The reported discrepancy was in a private slot, and an identical-input control superseded that setup.", + "revisit_when": "Recreate all physical input rows with identical histories and finish A/A before interpreting any later state mismatch.", + "keywords": [ + "prefix reuse control", + "private padding history", + "physical rows", + "identical-input", + "A/A" + ], + "scope": "local", + "bounds": "Initial Drama3 prefix-reuse harness comparison, later replaced by matched-input controls." + }, + { + "direction": "Require physical traffic and a timing win before enabling transparent VMM compression", + "outcome": "no_gain", + "reason": "VMM compression passed native correctness and lifetime checks, yet its fixed three-body screen missed the frozen timing gate. The runtime did not promote it.", + "revisit_when": "Confirm the workload is bandwidth-sensitive and measure physical bytes or effective compression together with the complete timed body.", + "keywords": [ + "transparent VMM", + "weight compression", + "physical traffic", + "native lifetime", + "three-body timing" + ], + "scope": "regime_bound" + }, + { + "direction": "Measure complete kernels before retaining a producer scale-tile cache", + "outcome": "no_gain", + "reason": "The producer scale-tile cache did not meet its complete-body reduction gate. The screen stopped before model or service promotion.", + "revisit_when": "Run a bounded screen for a materially different shape or resource constraint. Include a matched complete kernel as the control.", + "keywords": [ + "producer scale tile cache", + "complete-body", + "source gate", + "kernel timing", + "resource regime" + ], + "scope": "regime_bound" + }, + { + "direction": "Revisit FP8 SIMT only with an improved mapping or cost case", + "outcome": "rejected", + "reason": "The fixed eight-lane mapping was stopped by CPU/AOT analysis before runtime evaluation. No accelerator timing supports a hardware-wide conclusion.", + "revisit_when": "Supply a different lane mapping or a supported cost model before deciding whether a native run is warranted.", + "keywords": [ + "FP8 SIMT", + "eight-lane mapping", + "CPU/AOT", + "cost analysis", + "runtime benchmark" + ], + "scope": "regime_bound" + } + ] +} diff --git a/src/inferrsi/knowledge/atoms/casebooks/drama3-rejected-directions.md b/src/inferrsi/knowledge/atoms/casebooks/drama3-rejected-directions.md new file mode 100644 index 000000000..8ae6e0a8a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/drama3-rejected-directions.md @@ -0,0 +1,24 @@ +# Drama3 B300: rejected directions and invalid controls + +The [pinned diagnostic ledger](https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/evidence/drama3-b300-scale150/results/diagnostic-lessons.md) +and [acceptance issue #10](https://github.com/InferMatrixLab/InferRSI/issues/10) +own the observations and exact runtime/artifact pins. The campaign remains +INCONCLUSIVE and optimization is paused. A completed individual gate failure +does not supply missing concurrency/repetition evidence. No experiment is +reopened and no external raw trace is rehashed here. +Kind, origin, state and source identities belong to the +[typed source and scope record](drama3-rejected-directions.json). + +| Direction | Recorded observation and disposition | Suggested revisit condition and first check | +| --- | --- | --- | +| Fused tower projections / multi-step decode | Faster or correct in isolated checks but no full-service throughput gain; multi-step decode delayed admission. | Measure actual active batches, admission/drain and complete service latency, including sampling and codec. Kernel timing alone cannot select the runtime. | +| Async service / overlap | Early fixed-request controls passed while service WER failed in both arms. Later bounded dynamic replay identified shared ATen cuBLAS workspace interference: dedicated codec capture matched tested states, and fresh private-capture service WER passed while shared capture failed. The runtime added a dedicated-capture guard. | Preserve the required private/dedicated capture setup and unchanged controls. This specific reproducer does not establish one cause for every historical WER failure, or qualify arbitrary overlap/throughput; all-concurrency acceptance remains unmet. | +| Production prefix reuse | Extensive graph/state checks and both full quality groups passed, yet the complete C64 service continuation gate failed; default-off. | Retain final drain and all returned work. Investigate the actual schedule and GPU critical path before retrying; removed MoE rows and intake-only rates cannot replace the failed service score. | +| Initial prefix-reuse harness comparison | Compared different private padding histories; mismatch was confined to a private slot before later states were checked. Corrected identical-input controls reran it. | Reset complete physical input rows and run A/A before blaming production math. Do not reuse this superseded setup failure as evidence of model incompatibility. | +| Transparent VMM weight compression | Native correctness/lifetime checks passed, but the fixed three-body screen missed its frozen timing gate; no runtime promotion. | First measure the current bottleneck and physical traffic/compression where possible. Mapped flags and logical capacity do not prove a bandwidth benefit. | +| Producer scale-tile cache | Complete-body reductions missed the source gate; stopped without model/service promotion. | New shapes or a different resource regime may justify another bounded screen; do not subtract unrelated historical screens to infer a cause. | +| Fixed eight-lane FP8 SIMT proposal | Stopped at CPU/AOT cost analysis for that mapping, before a runtime benchmark. | Revisit only with a changed mapping or supported cost model; this is an analytical rejection, not an empirical GPU failure or universal ceiling. | + +The last column is proposed diagnosis. Preserve native computation, precision +and frozen acceptance rules; none of these cases authorizes a lossy shortcut, +looser validator or a resumed hardware campaign. diff --git a/src/inferrsi/knowledge/atoms/casebooks/inference-optimization-casebook.md b/src/inferrsi/knowledge/atoms/casebooks/inference-optimization-casebook.md new file mode 100644 index 000000000..d67d1a861 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/inference-optimization-casebook.md @@ -0,0 +1,190 @@ +--- +name: inference-optimization-casebook +description: 'How to structure and use a casebook of past optimization decisions as a decision-support tool. Extracts the casebook pattern from TensorRT-LLM''s perf-optimization-casebook skill. Use when building a record of optimization experiments or when deciding which optimization to try next based on prior art. + + ' +metadata: + inferrsi: | + { + "tags": [ + "optimization", + "casebook", + "prior-art", + "decision-support" + ], + "status": "candidate", + "profile": "local-skill-v1", + "schema_version": 1, + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Structuring and querying a casebook of past optimization decisions as decision support, when recording optimization experiments or choosing the next optimization from prior art; the casebook is reference material and neither runs profiling nor makes decisions", + "prerequisites": "Whole-body text access to the case files for free-text search; applying a case first requires reading the nearest checked-in config and the model's deployment guide", + "input_contract": "For a query: natural search terms such as model name, knob, mechanism word or deployment feature, plus the current model and hardware. For a new case: mechanism, applies-when and does-not-apply conditions, procedure, expected effect, accuracy risk, verification, rollback and a real measurement trail with run ID, verdict, exact hardware SKU, model revision, workload and before/after result", + "produced_artifact": "Ranked matching cases read as precedents and diagnostic options, or a new or deprecated case record in the template; a precedent's procedure and expected direction of effect, not a guaranteed configuration or a measured result", + "failure_modes": [ + "The query is pre-translated into canonical vocabulary or bounded by structured fields, so synonyms in the body text are missed", + "A case's specific values, such as batch size, tensor-parallel degree or kernel parameters, are copied instead of re-derived for the current model and hardware", + "The precedent's expected direction of effect stands in for measurement after the change is applied", + "A rejected direction is read as a permanent blacklist, or one discarded implementation as ruling out its mechanism", + "A confounded run, a missing experiment and a failed gate are recorded as the same evidence state", + "Cross-system cases are bootstrapped without re-verifying that the mechanism holds on the target hardware" + ], + "refusal_point": "Adds no case for an INCONCLUSIVE optimization-effect claim, a single-configuration result without plausible generalization, or a result without a real measurement trail, except a scoped diagnostic observation that keeps its verdict and configuration boundary; manufactures no PASS, and reading the records does not reopen a paused campaign" + }, + "recommendations": [ + "Search the full case bodies with free text first, then rank the hits by bottleneck class and signals.", + "Before retrying a rejected direction, state which condition changed or which uncertainty a bounded check resolves, run an unchanged control and choose the least expensive discriminating check.", + "Mark bootstrapped cases source_grounded or author_reported until a local measurement confirms or refutes them.", + "When a case's conditions no longer hold, mark it deprecated with the reason instead of deleting it." + ], + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." + ], + "provenance_readsets": [], + "consumption_mode": "packaged" + } +--- + +# Inference Optimization Casebook Pattern + +Status: candidate. Source-grounded from TensorRT-LLM @ f33e0e5f, +`perf-optimization-casebook/SKILL.md`. + +## What a casebook is + +A casebook is a queryable record of past optimization decisions: what worked, +what failed, under what conditions, at what cost, and with what evidence. +It is reference material, not a coordinator. It does not run profiling or +make decisions — it informs them. + +The casebook pattern is valuable because: +- Optimization search is expensive; prior art prevents re-exploring dead ends. +- Successful patterns generalize across models and hardware generations. +- Failure modes generalize too: knowing that a technique fails under certain + conditions is as valuable as knowing when it succeeds. + +## Case structure + +Each case record should contain: + +```yaml +name: +bottleneck_class: [compute | memory | launch | communication | sync | host] +signals: # conditions that suggest this case applies + - model_arch: + - hardware: + - symptom: + - config: 1, sequence length > 4096"> +mechanism: | # what the optimization does at the hardware/algorithm level +applies_when: | # specific conditions required for the optimization to help +does_not_apply: | # conditions where this case is known to fail or be neutral +how_to_apply: | # step-by-step procedure to apply the optimization +expected_effect: | # direction and rough magnitude of expected improvement +accuracy_risk: # what quality/correctness guarantees may be affected +verification: | # how to confirm the optimization worked +rollback: | # how to undo the change safely +evidence: # what real measurement evidence supports this case + - run_id: + verdict: [PASS | FAIL | INCONCLUSIVE] + hardware: + model: + workload: + result: +``` + +Source: TRT-LLM casebook case-template.md @ f33e0e5f. + +## Query protocol + +**Always use free-text grep first.** The casebook search is recall-complete via +grep over the full case body text. Do not pre-translate the query into canonical +vocabulary before searching — that narrows recall. Search for natural terms: +model name, knob, mechanism word, deployment feature. + +```bash +# Good: natural query, whole-body search +grep -ril "quantization" cases/ +grep -ril "sequence parallel" cases/ +grep -ril "vae decode" cases/ + +# Then rank by frontmatter signals if multiple hits +grep -ril "mte2_ratio" cases/ | xargs grep -l "memory-bound" +``` + +Structured fields (bottleneck_class, signals) are for ranking among hits, +not for bounding the search. A synonym or colloquial term in the body text +would be missed by a structured-field-only query. +Source: perf-optimization-casebook @ f33e0e5f, §how-to-use. + +## Recorded diagnostic options + +Current owner-local records retain rejected directions alongside their limits: + +- [Qwen B300](cases/qwen-b300-rejected-directions.md): full-image rejection, + graph/copy overhead, unintegrated leads and confounded trials. +- [Qwen Ascend](cases/qwen-ascend-rejected-directions.md): reported OOM, + attention/cache alternatives and missing gain on one 910B1 cohort. +- [Drama3 B300](cases/drama3-rejected-directions.md): invalid controls, + correct kernels without service gain, prefix reuse and analytical rejection. + +Each `.json` sibling owns identity, origin, source pins and limitations; the +Markdown owns the observation and suggested revisit check. Read them as +diagnostic options, not a permanent blacklist. A discarded implementation does +not rule out another implementation of the same mechanism. A confounded run, +missing experiment and failed gate are different evidence states. + +Before retrying, state which condition changed or which uncertainty a bounded +check will resolve. Preserve the original result, run an unchanged control and +choose the least expensive discriminating check. Only new complete evidence can +qualify a new scope; reading these records does not reopen a paused campaign. + +## Adapt, do not copy + +A case is a precedent, not a guaranteed config. The procedure and expected +direction are reusable; the specific values (batch size, tensor parallelism +degree, kernel parameters) must be re-derived for the current model and hardware. +Before applying: read the nearest checked-in config and the model's deployment +guide. After applying: measure. The precedent's expected direction of effect +does not substitute for measurement. + +## When to add a new case + +Add a case when: +- A change produced a verified win or a clear, reproducible failure. +- The mechanism generalizes to other models or hardware. +- The prior-art record would have prevented wasted work. + +Do NOT add a case for: +- INCONCLUSIVE optimization-effect claims (not enough evidence to characterize + the effect). Keep the original campaign verdict and do not manufacture a + PASS; a scoped diagnostic observation may still be recorded with its + INCONCLUSIVE verdict and stated configuration boundary. +- Results that only apply to one specific configuration with no plausible + generalization, unless they are scoped diagnostic observations that state + their configuration boundary. +- Results without a real measurement evidence trail. + +## Maintaining the casebook + +The casebook is only valuable if it stays accurate. When a case's conditions +no longer hold (hardware generation changed, the op was fused away, the +optimization was upstreamed), mark the case as deprecated with the reason. +Do not delete deprecated cases — they remain as negative evidence for future +searches. + +## Starting a casebook for a new system + +For a new inference system (e.g., a new NPU inference engine), bootstrap the +casebook from: +1. Existing profiling evidence in the repository (`evidence/` tree). +2. Known bottleneck patterns from vendor documentation. +3. Cross-system cases from TRT-LLM, vLLM, SGLang that have plausible NPU analogs + (re-verify the mechanism holds on the target hardware before including). + +Mark each bootstrapped case's evidence as `source_grounded` or `author_reported` +until a local measurement confirms or refutes it. diff --git a/src/inferrsi/knowledge/atoms/casebooks/qwen-ascend-rejected-directions.json b/src/inferrsi/knowledge/atoms/casebooks/qwen-ascend-rejected-directions.json new file mode 100644 index 000000000..191e319c8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/qwen-ascend-rejected-directions.json @@ -0,0 +1,106 @@ +{ + "id": "case.qwen-ascend-rejected-directions", + "kind": "case", + "backend": "ascend", + "origin": ["external"], + "state": "author_reported", + "content": "qwen-ascend-rejected-directions.md", + "required_resources": ["qwen-ascend-rejected-directions.json"], + "sources": [{ + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-ascend.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": ["docs/qwen-image-2.1-turbo-ascend.md"], + "upstream_head": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + }], + "applicability": ["Author-reported single Ascend 910B1 Qwen-Image-2.1-Turbo cohort", "BF16, eager, TORCH_SDPA, CFG=1, 1280x704, native eight sigmas"], + "tags": ["negative-evidence", "resource-failure", "OOM", "no-demonstrated-gain", "RoPE", "fusion-attention", "task-queue"], + "limitations": ["Imported author report; locally_verified=false", "Raw request timings, RGBA outputs and frozen validator are absent from this import", "InferRSI acceptance remains INCONCLUSIVE; the source 30 percent target was not met", "No cross-device or HTTP-serving qualification"], + "attribution": "amy-why-3459 source report, retained by the existing Ascend guide; revisit checks are current suggestions", + "findings": [ + { + "direction": "Check eager RoPE table and expanded SDPA mask retention against recomputation", + "outcome": "no_gain", + "reason": "The source trials produced identical pixels with retained cos/sin or expanded masks, but those alternatives were slower and were discarded.", + "revisit_when": "On the target shapes, measure the work avoided and the lifetime and cost of the retained tensors in a paired end-to-end run.", + "keywords": [ + "eager RoPE", + "cos sin precompute", + "SDPA mask", + "pixel identical", + "retention cost" + ], + "scope": "regime_bound" + }, + { + "direction": "Budget live NPU memory before retaining per-step masks and prompt tensors", + "outcome": "rejected", + "reason": "That cache configuration exhausted device memory on the reported run. Its feasibility depends on what stays resident alongside the cached tensors.", + "revisit_when": "Inspect tensor lifetimes, allocator headroom and peak residency. Retry a paired test when the request shape or residency policy materially changes.", + "keywords": [ + "cache per-step masks", + "prompt tensors", + "NPU OOM", + "device memory", + "allocator headroom" + ], + "scope": "local" + }, + { + "direction": "Qualify fusion attention with the actual mask, dtype and shape", + "outcome": "no_gain", + "reason": "The recorded fusion-attention runs, including precise=2 and precise=0 and steps without masks, showed either no gain or a gain below the source experiment’s keep criterion.", + "revisit_when": "Verify dispatch and numerical behavior for the present mask and tensor layout. Follow operator checks with a matched pipeline timing.", + "keywords": [ + "fusion attention", + "precise=2", + "precise=0", + "mask-free", + "Ascend" + ], + "scope": "regime_bound" + }, + { + "direction": "Recheck queueing and graph mode under the target stack", + "outcome": "no_gain", + "reason": "TASK_QUEUE_ENABLE=1/2 and enforce_eager=0 failed to improve the recorded eager configuration; some variants were slower.", + "revisit_when": "Confirm the execution route and scheduling overhead after a runtime change, with a fixed workload and equal warmups across arms.", + "keywords": [ + "TASK_QUEUE_ENABLE", + "enforce_eager", + "host dispatch", + "task queue", + "eager execution" + ], + "scope": "regime_bound" + }, + { + "direction": "Check initialization residency before combining RoPE, VAE and attention fast paths", + "outcome": "rejected", + "reason": "The run with RoPE, the VAE fastpath and fusion attention ran out of memory during initialization. This identifies a failure phase for that particular combination.", + "revisit_when": "Measure what each component reserves during initialization before assembling another multi-path configuration.", + "keywords": [ + "RoPE VAE fusion attention", + "triple stack", + "initialization OOM", + "startup memory" + ], + "scope": "local", + "bounds": "Triple-stack initialization, separate from later two-path requests on a busy host." + }, + { + "direction": "Qualify host headroom for the later RoPE and VAE reservation failure", + "outcome": "inconclusive", + "reason": "A later run of the kept two-path stack on a busy host encountered resource-reservation failures. Fusion attention was not part of that stack.", + "revisit_when": "Check available device resources and contention on the target host before judging repeatability or timing.", + "keywords": [ + "kept RoPE VAE fastpath", + "busy host", + "resource reservation", + "outside contention" + ], + "scope": "local", + "bounds": "Later resource-reservation failure for the separate RoPE plus VAE stack." + } + ] +} diff --git a/src/inferrsi/knowledge/atoms/casebooks/qwen-ascend-rejected-directions.md b/src/inferrsi/knowledge/atoms/casebooks/qwen-ascend-rejected-directions.md new file mode 100644 index 000000000..833456407 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/qwen-ascend-rejected-directions.md @@ -0,0 +1,24 @@ +# Qwen Ascend: reported rejected directions + +These observations come from the [pinned Ascend guide](https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-ascend.md), +which attributes them to amy-why-3459 at the upstream head recorded in the +typed record below. +They apply to its one-910B1, BF16, eager, 1280x704, native eight-sigma cohort. +They are author-reported, `locally_verified=false`, with InferRSI acceptance +INCONCLUSIVE. No raw timings, images or frozen validator were imported. +Kind, origin, state and source identities belong to the +[typed source and scope record](qwen-ascend-rejected-directions.json). + +| Direction | Recorded observation and disposition | Suggested revisit condition and first check | +| --- | --- | --- | +| Cache eager RoPE cos/sin or expanded SDPA masks | Pixel-identical, but discarded as slower in the source trials. | Profile current recomputation and retained-tensor costs; qualify a matched timing cohort before attributing a regression. | +| Cache per-step masks and prompt tensors | NPU OOM. | First inventory live tensor lifetimes and allocator headroom. A different residency policy or workload may change feasibility; the report does not establish a universal memory limit. | +| Fusion attention, including precise=2/0 and mask-free steps | No gain or a gain below the source keep criterion. | Check exact mask, dtype, shapes and device support; run operator quality then complete pipeline timing. Do not reuse the source keep threshold as a repository default. | +| TASK_QUEUE_ENABLE=1/2 or enforce_eager=0 | No gain or slower than the source eager configuration. | Inspect the actual execution path and scheduling overhead under the new stack; repeat with unchanged workload and warmups. | +| RoPE + VAE fastpath + fusion attention | Initialization OOM for this triple stack. | Inventory initialization residency before attempting a new combination. | +| Separate kept RoPE + VAE stack on a later busy host | Later requests failed resource reservation; this is a different stack/host cohort from the triple-stack initialization failure. | Qualify current headroom and outside contention before retrying; do not attribute this resource blockage to fusion attention. | + +Revisit checks are new diagnostic suggestions, not reproduced causes or a +performance claim. Pixel identity and a looser quality gate remain separate. +The independently reported 910B3 cohort and CUDA results are different scopes; +neither automatically overturns nor confirms a 910B1 observation. diff --git a/src/inferrsi/knowledge/atoms/casebooks/qwen-b300-rejected-directions.json b/src/inferrsi/knowledge/atoms/casebooks/qwen-b300-rejected-directions.json new file mode 100644 index 000000000..dc608b0bd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/qwen-b300-rejected-directions.json @@ -0,0 +1,109 @@ +{ + "id": "case.qwen-b300-rejected-directions", + "kind": "case", + "backend": "cuda", + "origin": ["internal"], + "state": "historical_observation", + "content": "qwen-b300-rejected-directions.md", + "required_resources": ["qwen-b300-rejected-directions.json"], + "sources": [{ + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-b300.md#optimization-ledger", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": ["docs/qwen-image-2.1-turbo-b300.md"], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/3" + }], + "applicability": ["Qwen-Image-2.1-Turbo, four B300, BF16, native eight steps", "Only the source ledger's individual trials and controls"], + "tags": ["negative-evidence", "quality-rejection", "no-demonstrated-gain", "confounded-run", "RoPE", "CUDA-Graph"], + "limitations": ["The final campaign PASS does not qualify each rejected direction", "Exploratory trial timings are not additive gains or causal comparisons", "No experiment was rerun for this extraction"], + "attribution": "Historical issue #3 optimization ledger; revisit checks are current diagnostic suggestions", + "findings": [ + { + "direction": "Require full-image parity for fused Q/K RMSNorm and complex RoPE", + "outcome": "rejected", + "reason": "The H3 operator checks passed, yet its complete images failed and the change was reverted. The later kept H10/H13 implementations were different.", + "revisit_when": "Reproduce the reduction, complex FMA ordering and BF16 materialization, then check native full images after the operator comparisons.", + "keywords": [ + "H3", + "Q/K RMSNorm", + "complex RoPE", + "BF16 materialization", + "image quality" + ], + "scope": "regime_bound" + }, + { + "direction": "Pair a packed Q/K/V 5D layout with full request timing", + "outcome": "rejected", + "reason": "H1 passed quality but the exploratory exchange was discarded. The ledger’s standalone trial does not resolve the cost of layout staging or copies.", + "revisit_when": "For a changed topology or layout, keep the comparison matched and account for staging, transfers and request time separately.", + "keywords": [ + "H1", + "QKV", + "packed 5D exchange", + "layout staging", + "copies" + ], + "scope": "regime_bound" + }, + { + "direction": "Measure complete graph replay before promoting projection or norm/RoPE changes", + "outcome": "no_gain", + "reason": "H6 and H7 were removed after failing to produce a material end-to-end gain. H7 includes capture/replay and copy costs that matter to the final decision.", + "revisit_when": "Test a materially different capture boundary or buffer lifetime against a paired full request. Account for capture, replay and copies.", + "keywords": [ + "H6", + "H7", + "graph replay", + "norm RoPE", + "capture boundary", + "post-attention" + ], + "scope": "regime_bound" + }, + { + "direction": "Verify critical-path time for broadcast scales and empty concatenation removal", + "outcome": "no_gain", + "reason": "The H14/H16 decode scale/gate broadcast and empty concatenation changes were removed or reverted because the trials did not demonstrate a benefit.", + "revisit_when": "Profile the intended configuration to see whether these operations are on its critical path, and retain the matched service control.", + "keywords": [ + "H14", + "H16", + "decode broadcast", + "scale gate", + "empty concat", + "critical path" + ], + "scope": "regime_bound" + }, + { + "direction": "Treat H17 and the noisy H13 run as host-confounded readings", + "outcome": "inconclusive", + "reason": "Concurrent diagnostics and host load were observed during these attempts, so the timing difference does not isolate the code change.", + "revisit_when": "Repeat the same request on a qualified host without overlapping diagnostics.", + "keywords": [ + "H17", + "H13", + "host load", + "concurrent diagnostics", + "confounded timing" + ], + "scope": "local", + "bounds": "The cited exploratory H17 run and noisy H13 attempt." + }, + { + "direction": "Carry a compiled launch API probe through full-pipeline integration before judging gain", + "outcome": "inconclusive", + "reason": "H18 improved host enqueue in a diagnostic. It never went through the complete pipeline, so the resulting service overhead was not measured.", + "revisit_when": "Confirm actual dispatch and full-image correctness in the integrated candidate, then measure request time.", + "keywords": [ + "H18", + "compiled launch API", + "host enqueue", + "pipeline integration", + "dispatch" + ], + "scope": "regime_bound" + } + ] +} diff --git a/src/inferrsi/knowledge/atoms/casebooks/qwen-b300-rejected-directions.md b/src/inferrsi/knowledge/atoms/casebooks/qwen-b300-rejected-directions.md new file mode 100644 index 000000000..4e7f79b76 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/casebooks/qwen-b300-rejected-directions.md @@ -0,0 +1,23 @@ +# Qwen B300: rejected directions to check before retrying + +Scope: Qwen-Image-2.1-Turbo, four B300, BF16, native eight-step image generation. +The [pinned ledger](https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-b300.md#optimization-ledger) +and [acceptance issue #3](https://github.com/InferMatrixLab/InferRSI/issues/3) +own the observations. The final campaign PASS belongs to its retained stack, +not these rejected alternatives. No source experiment is rerun here. +Kind, origin, state and source identities belong to the +[typed source and scope record](qwen-b300-rejected-directions.json). + +| Direction | Recorded observation and disposition | Suggested revisit condition and first check | +| --- | --- | --- | +| H3: initial Q/K RMSNorm + complex RoPE fusion | Operator tests passed; complete images failed; reverted. This is a quality rejection, not a kernel-speed result. | First match the actual reduction, complex FMA order and BF16 materialization; compare full native images after operator checks. H10/H13 show later, different implementations were retained, so the technique is not permanently excluded. | +| H1: packed Q/K/V 5D exchange | Quality passed but the exploratory trial was discarded. | Changed layouts/topology may justify another trial; measure staging/copies and the complete request against a matched control. Do not infer the cause from the one ledger timing. | +| H6/H7: graph projection/norm/RoPE or post-attention work | Removed for no material E2E gain; H7 records replay/copy costs. | A new capture boundary or buffer lifetime may change the tradeoff; include capture/replay, copies and full request cost. | +| H14/H16: broadcast decode scale/gate or skip empty concatenation | No demonstrated benefit; removed/reverted. | Confirm these operations are on the current critical path before repeating; retain a matched E2E control. | +| H17 and the noisy H13 attempt | Observed host load/concurrent diagnostics invalidate causal attribution. | Repeat on a qualified, uncontended host. Do not classify the numerical timing difference as a confirmed code regression. | +| H18: compiled launch API probe | Host enqueue improved in a diagnostic; no E2E integration was performed. | Treat it as an unintegrated lead; verify actual execution, correctness and complete service overhead before accepting it. | + +The last column is a proposed diagnostic procedure, not an observed root cause +or permission to reopen the campaign. A new revision, workload or hardware +requires its own frozen controls and quality gate. Old helper hashes remain +bound to the original source revision. diff --git a/src/inferrsi/knowledge/atoms/cite-check-downstream-pr.original.json b/src/inferrsi/knowledge/atoms/cite-check-downstream-pr.original.json new file mode 100644 index 000000000..8febb760e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/cite-check-downstream-pr.original.json @@ -0,0 +1,102 @@ +{ + "authority": "checkout", + "metadata": { + "id": "cite-check-downstream-pr.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Review a downstream PR description for correct acceptance issue links, SHA pins, and artifact citations.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/cite-check-downstream-pr/SKILL.md", + "sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Review of a downstream PR description that cites RSI acceptance work for a performance or quality improvement", + "prerequisites": "The PR description, the acceptance issue it cites, and the evidence paths it names; reviewing is read-only and needs no local run", + "input_contract": "One PR description plus the cited acceptance issue and its evidence tree; the reviewer reads claims and citations, not the candidate code", + "produced_artifact": "A per-checklist review result that either accepts the citation or marks the summary unverified, using only PASS/FAIL/INCONCLUSIVE vocabulary", + "failure_modes": [ + "No acceptance issue URL, only a chat thread", + "Branch names instead of full baseline and candidate SHAs", + "Microbenchmark evidence offered for an end-to-end latency claim", + "A threshold restated or invented relative to the acceptance issue", + "Evidence path absent, stale or on a different SHA than the cited candidate" + ], + "refusal_point": "Refuses to restate a performance or quality claim whose artifacts are missing, stale or off-SHA; reports the summary as unverified instead" + }, + "state": "candidate", + "limitations": [ + "Checklist-only procedure; it validates citation discipline, not the measurement behind an artifact.", + "A passing review does not establish that the campaign evidence itself is correct.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/cite-check-downstream-pr/SKILL.md", + "byte_range": [ + 0, + 3534 + ], + "sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/cite-check-downstream-pr.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 153 + ], + "sha256": "92227c444266d55b1db7bceebc95147cbf7c33276e28defe1f084713697f4a3e" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 2598 + ], + "sha256": "834c46f93a46f3e14ef7ce621237bd50f67ac399408cfa8cacb80de2b2911229" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 2598, + 3534 + ], + "sha256": "e6f746627c70affd045c6354a24fd704c64a50d6e7d2502ecc753bb77c09b8f3" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/claim-contract.original.json b/src/inferrsi/knowledge/atoms/claim-contract.original.json new file mode 100644 index 000000000..66a631833 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/claim-contract.original.json @@ -0,0 +1,101 @@ +{ + "authority": "checkout", + "metadata": { + "id": "claim-contract.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Enforce ThinkFlowLab claim contract wording and verdict rules without embedding campaign-specific revision pins.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/claim-contract/SKILL.md", + "sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Wording and verdict rules for any public performance or quality claim produced from an RSI campaign", + "prerequisites": "A completed campaign with pinned baseline and candidate SHAs and an evidence tree; the rules themselves carry no numeric threshold", + "input_contract": "A claim draft, the campaign RunSpec and its evidence tree under evidence//", + "produced_artifact": "A claim sentence in the pinned form, or a refusal when the campaign verdict is not PASS", + "failure_modes": [ + "Claim asserted before the campaign reaches PASS with artifacts", + "Baseline or candidate SHA written into a shared template, skill or default CI environment", + "Microbenchmark result presented as end-to-end completion", + "A lesson transferred across an unverified repo x revision x backend x device x model x scenario tuple" + ], + "refusal_point": "Refuses any public claim lacking a PASS verdict and artifacts under evidence/, and refuses numeric thresholds because thresholds belong to the campaign" + }, + "state": "candidate", + "limitations": [ + "States wording and verdict rules only; it selects no numeric gate and validates no measurement.", + "SIAS plane boundaries constrain where a change belongs, not whether it is correct.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/claim-contract/SKILL.md", + "byte_range": [ + 0, + 3223 + ], + "sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/claim-contract.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 151 + ], + "sha256": "46d88fe6273f99a0c272b9e2df6436942163e07f7539d6b0f7a269518605945b" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 2303 + ], + "sha256": "0a376a7e4fe49222414fba569d765ff35086458b8923cc061e0b2e0f81ff8cd6" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 2303, + 3223 + ], + "sha256": "08294685bbd35070b0a9f1f69c596d347a78591d35a4ff0ef01a6fe9a4b9ce8b" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/competitor-scan.original.json b/src/inferrsi/knowledge/atoms/competitor-scan.original.json new file mode 100644 index 000000000..595d263da --- /dev/null +++ b/src/inferrsi/knowledge/atoms/competitor-scan.original.json @@ -0,0 +1,100 @@ +{ + "authority": "checkout", + "metadata": { + "id": "competitor-scan.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Structure a lightweight competitive scan without inventing benchmark numbers or campaign verdicts.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/competitor-scan/SKILL.md", + "sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Qualitative positioning of a new RSI repository against other projects before acceptance evidence exists", + "prerequisites": "A selected repository and readable public material from the alternatives; no benchmark run is required", + "input_contract": "A target repository plus whatever the alternatives publish about what they optimize and how they prove it", + "produced_artifact": "A short Markdown note covering problem, alternatives, differentiation, limits and open questions", + "failure_modes": [ + "Numeric comparison written without a PASS campaign in our own evidence tree", + "Third-party figure repeated as if reproduced under our RunSpec", + "Scan presented as a substitute for acceptance evidence" + ], + "refusal_point": "Refuses any numeric comparison not sourced from our own evidence//results/ with a PASS verdict" + }, + "state": "candidate", + "limitations": [ + "Produces positioning material only; it establishes no performance or quality result.", + "Third-party claim contracts are read from public material and may be incomplete.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/competitor-scan/SKILL.md", + "byte_range": [ + 0, + 3266 + ], + "sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/competitor-scan.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 138 + ], + "sha256": "0e002b5ac5a3f80312a3bd5a3884600f6be83db9eb528b1899c7a1173447a7f9" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 2320 + ], + "sha256": "3d514c6b2cac513aeb11c2e0f46c9e712f60737a9d38d3150632088e587f9f31" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 2320, + 3266 + ], + "sha256": "593dbe70486408b72174714dc58429e7898bff74df164028081dd3a67381b05b" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/deepinfer.common.llm.bounded_windowed_replay.original.json b/src/inferrsi/knowledge/atoms/deepinfer.common.llm.bounded_windowed_replay.original.json new file mode 100644 index 000000000..0aeee471f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/deepinfer.common.llm.bounded_windowed_replay.original.json @@ -0,0 +1,431 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "DeepInfer bounded replay: compact query rows with a derived dependency closure and separately preserved historical state", + "summary": "A decoder stack split at an explicit producer/consumer boundary can replay only a retained suffix if the boundary captures the full-length state the consumer needs. The retain arithmetic is small and transferable; which layers are safe to shorten is a per-model dependency question and must be derived, not assumed from per-layer windowing.", + "applicability": { + "hardware": [ + "Backend-independent retain rule; the reference asserts support only for NVIDIA SM100 and Ascend 950" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; the model's window sizes and layer boundary come from its config and do not transfer" + ], + "conditions": [ + "The decoder has an explicit boundary: earlier layers run over the full prefix, later consumer layers run compact query rows while reading all required preserved state", + "A dependency closure shows each retained query's inputs are available from retained producer outputs or explicitly preserved historical state", + "Full-length consumer KV is written at the boundary, independent of the compact query", + "The rollback depth is known and floored at the speculation width plus one" + ] + }, + "limitations": [ + "No equivalence run was performed; the metadata argument is from the shared formula, not from a measurement.", + "Applies to architectures with a demonstrated boundary dependency, not to arbitrary sliding-window stacks.", + "Window sizes, boundary-layer index and ring lengths are specific to one model and must not be carried across.", + "Query-row compaction does not imply dropping historical keys.", + "Prompt logprobs are not reconstructable from a clipped region.", + "The truncation path is off by default in the source." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + }, + "repo": "deepinfer", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.bounded_windowed_replay.json", + "sha256": "43613225e9ccdbd34c0f7e3e0767887b9bbfd0f38b2c21684677d99e31a432f0" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/input_metadata/prepare_tensor_input_v4.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "93a6b1dd533db116d2f7540c78d6bb5419bdb8c1d2063b031ab8b1a8cc138fe2" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/input_metadata/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "882a33de3da0fba81644adde9e9e1a90ec3d3ff34a8f3ad4dda18faafebd6460" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "7dc8ad7b6ca4902bcef67b1cbc4804592995c5b6af9ebaa00b59cc338c1aa6ec" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "cb228c8fd4c76200e2ec266c51872107cfe7b384fdc88458b3d1c0ff101f3116" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ca3d80120fe6bc50971b180278dd575d585e1a6c7a3c2174a8a6fd6213454161" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/model_metadata_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "1ef7803d2b0083d025de676c841db9a317235b881fb9ebf6781ec76d49d7b22c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/model_runner.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "9e2e18d136c9e0c9f23905ff994e9d23afaa94aa7a133d425e7fc1fc069033ef" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/decoder_layer.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "2189fa14c0665a3a211b47c5440748273fd92b39a68268a0080530d3c95b7297" + } + ], + "attribution": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/input_metadata/prepare_tensor_input_v4.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "93a6b1dd533db116d2f7540c78d6bb5419bdb8c1d2063b031ab8b1a8cc138fe2" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/input_metadata/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "882a33de3da0fba81644adde9e9e1a90ec3d3ff34a8f3ad4dda18faafebd6460" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "7dc8ad7b6ca4902bcef67b1cbc4804592995c5b6af9ebaa00b59cc338c1aa6ec" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "cb228c8fd4c76200e2ec266c51872107cfe7b384fdc88458b3d1c0ff101f3116" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ca3d80120fe6bc50971b180278dd575d585e1a6c7a3c2174a8a6fd6213454161" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/model_metadata_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "1ef7803d2b0083d025de676c841db9a317235b881fb9ebf6781ec76d49d7b22c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/model_runner.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "9e2e18d136c9e0c9f23905ff994e9d23afaa94aa7a133d425e7fc1fc069033ef" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/decoder_layer.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "2189fa14c0665a3a211b47c5440748273fd92b39a68268a0080530d3c95b7297" + } + ], + "id": "deepinfer.common.llm.bounded_windowed_replay.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.bounded_windowed_replay.json", + "byte_range": [ + 0, + 10959 + ], + "sha256": "43613225e9ccdbd34c0f7e3e0767887b9bbfd0f38b2c21684677d99e31a432f0" + } + } + }, + "content": { + "record.json": { + "path": "records/deepinfer.common.llm.bounded_windowed_replay.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 323 + ], + "sha256": "c6317e890e003f5372295ab271a9c5dcc63887bd0bf957e461dc1defd23c4deb" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 327, + 347 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 351, + 704 + ], + "sha256": "0ba0a34d025f6986990a3fba1d94d086601fd8b787e5d58e591837f735581f87" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 708, + 868 + ], + "sha256": "01ce39aa15b7b22f20137f578213d078cfc4bca3ff37e473bc5c4e11018e3679" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 872, + 4618 + ], + "sha256": "0ad5e7f4281e072da7684c08ead47e780b59cab74026e7e52e2dae294bcfd32a" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 4622, + 5491 + ], + "sha256": "d228b62c44017f79478b22bc4414ae1e159d2d6ce159822e4c87442b3a0effe4" + }, + "claim-0": { + "summary": "The retain length is window plus backtracking depth, and the backtracking depth cannot be configured below the speculative width plus one, so a full-width rollback still leaves a full window.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 5511, + 5766 + ], + "sha256": "af0a0bef50081a32f0814b7d33e469867fe5335f5e2835c7394c51f8ea8ca798" + }, + "claim-1": { + "summary": "The retain check is guarded by the truncation mode: the metadata entrypoint returns early when the mode is off, so the keep-length assertions apply only when truncation is enabled. The keep length has no default value and is not derived from the window, so enabling truncation without setting it fails rather than silently clipping. The same condition is checked at model-metadata construction and at worker setup.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 5772, + 6250 + ], + "sha256": "cea7caa47b5ea278e63b9fbf7316db841cee53bec6644a5dfe939676d9e68416" + }, + "claim-2": { + "summary": "The SWA path's visible keys intersect the sliding window start, retained rectangle and valid-state start; recompute clears SWA state below the last bound. This does not constrain all main/index historical KV to the compact query suffix. An empty SWA visible region is represented explicitly.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 6256, + 6611 + ], + "sha256": "2bd6f01c37aeff6e0723bad3ab4893dbcfceb6dfeef629b955f805bb2d974756" + }, + "claim-3": { + "summary": "Two modes exist: a mask mode that keeps every query and only narrows visibility, and a compact mode that removes clipped rows. Only the second saves compute, and the first is therefore the natural equivalence reference.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 6617, + 6900 + ], + "sha256": "b56c519216f5164b5d24391e1d76fc747fa52735cc1f22f4bed7205e14524ce1" + }, + "claim-4": { + "summary": "The boundary returns both a compact copy and the original full hidden and residual; the caller stores the full one and continues with the compact one. The full-length consumer KV is written from the full hidden in a separate pass, so the persistent cache stays complete while the query is compact.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 6906, + 7267 + ], + "sha256": "224b15cd1cc0ffb05389132adfcc02e9fc8acb04d2b3a24a85b2e87906dd69c7" + }, + "claim-5": { + "summary": "For a positive window the inference ring is window plus rollback; otherwise it is zero. Both kvstore-ring additions are gated by the store-extra-state flag. Within that branch the store-granularity margin is added, plus the keep margin only when truncation mode is not off. The keep margin therefore requires both gates.", + "layer": "L1", + "pointers": [ + "/claims/5" + ], + "byte_range": [ + 7273, + 7657 + ], + "sha256": "8efc3026abce1f45cab85c9e0f733424eac43ca8a4e56e1e9dd1b070d6bf8e00" + }, + "claim-6": { + "summary": "Prompt logprobs are not reconstructable from a clipped region; the engine forces them off with a warning rather than rejecting the request, so the request still runs with per-token prompt logprobs disabled.", + "layer": "L1", + "pointers": [ + "/claims/6" + ], + "byte_range": [ + 7663, + 7933 + ], + "sha256": "5f0fd858a30d549ae899fc6f25b700b80eaa67482fd442cefb6440a0015ab91c" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 7941, + 8759 + ], + "sha256": "caad0c0e82301aa1a2c48d1aaf5b20af02a52ec314cefd556f541e15a387ca34" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 8763, + 9507 + ], + "sha256": "96155cf3f4821c4cab1a4873640e5461f0eef5f5cb0124fe860f639e349c5f1a" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 9511, + 10293 + ], + "sha256": "ada13e749cc824f5d96f66c422edb67911214feafb7fb15a9703d921c58ee4cf" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 10297, + 10860 + ], + "sha256": "c17f5243ac87d11b6ef73da6b8eaa1a9a6344bb61634eb1e40f390c9d73dedcd" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 10864, + 10956 + ], + "sha256": "b1d1fcac8a5efa84b1ff647445000f07850d402ae6f705cb55fdb7bbc5a99ee3" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/deepinfer.common.llm.speculative_verification_budget.original.json b/src/inferrsi/knowledge/atoms/deepinfer.common.llm.speculative_verification_budget.original.json new file mode 100644 index 000000000..1e756a882 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/deepinfer.common.llm.speculative_verification_budget.original.json @@ -0,0 +1,416 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "DeepInfer verification budget: spend verification rows by marginal acceptance, not by fixed draft width", + "summary": "A confidence head predicts per-position acceptance; a cumulative non-increasing rate vector plus a fitted step-cost model selects how many draft rows to verify per step. The objective is expected accepted tokens per unit time, so fewer verified drafts may accept fewer tokens while still raising throughput. Draft compute is unchanged.", + "applicability": { + "hardware": [ + "Backend-independent procedure; the reference implementation targets NVIDIA SM100 and Ascend 950 only" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; requires a model with a trained confidence head" + ], + "conditions": [ + "Multi-token speculative decoding with a draft head", + "Verification cost grows with query rows", + "Acceptance varies materially by request and draft position", + "A measured (rows, step_time) curve is obtainable at warmup", + "The per-position confidence feeding a verification decision at position i is independent of confidence at positions greater than i" + ] + }, + "limitations": [ + "No gain was reproduced; nothing here is a measured speedup.", + "The source's own efficiency figures are deployment documentation, not a controlled experiment.", + "Requires a trained confidence head; a substitute estimate needs its own calibration.", + "Budgeting can lower accepted length, so equal accepted length is not an available correctness criterion.", + "Cross-backend equality of the rejection comparison has no assertion in the source.", + "Numeric acceptance rates and warmup curves are deployment-specific and are not carried in this record." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + }, + "repo": "deepinfer", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.speculative_verification_budget.json", + "sha256": "a729e1fc00be44e1480a5dc65bbcdd58df8599681df74dbc651a5a49f27e9028" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "164f45db4cccd6d6909dd2846e7dfffb57754b108af679443bf4bd71ec33785a" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/sampling_params.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f800034efdebe1b21620660a51fa9122d3d7f138d8e60cd738f33d643c3116f8" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/mtp/dflash.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "12ebfb9c793062844d40e0fab17164d5365d965c318f8b9f0f4adf51b3afb684" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/tilelang_ops/fused_sample.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f43ac934284d15f708a0aa07aaa8fff7daa257984e311ca554bd9dbea89e5e1d" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/sampler.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "81205a12e860041ffa904321b852db2d048bc038bb07d494dbb78b44b522d9a9" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + } + ], + "attribution": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "164f45db4cccd6d6909dd2846e7dfffb57754b108af679443bf4bd71ec33785a" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/sampling_params.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f800034efdebe1b21620660a51fa9122d3d7f138d8e60cd738f33d643c3116f8" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/mtp/dflash.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "12ebfb9c793062844d40e0fab17164d5365d965c318f8b9f0f4adf51b3afb684" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/tilelang_ops/fused_sample.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f43ac934284d15f708a0aa07aaa8fff7daa257984e311ca554bd9dbea89e5e1d" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/sampler.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "81205a12e860041ffa904321b852db2d048bc038bb07d494dbb78b44b522d9a9" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + } + ], + "id": "deepinfer.common.llm.speculative_verification_budget.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.speculative_verification_budget.json", + "byte_range": [ + 0, + 10177 + ], + "sha256": "a729e1fc00be44e1480a5dc65bbcdd58df8599681df74dbc651a5a49f27e9028" + } + } + }, + "content": { + "record.json": { + "path": "records/deepinfer.common.llm.speculative_verification_budget.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 314 + ], + "sha256": "1e408c618a3a1689c216e968f7479d4f91489448c87d619babe716a0c64d5f4e" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 318, + 338 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 342, + 690 + ], + "sha256": "269dc9c15555ad3b396a0ce0ab9740c66c655ccc38305afa2e265b6359c2d564" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 694, + 833 + ], + "sha256": "fa73b46337708916060aa78cba49e82504d68b9dcf5bd2c1d3f9b52802ffac67" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 837, + 3790 + ], + "sha256": "c6510b28e2e49cc19d0e3318190948ed9b6aca195704dc0b9edd69cbd9811d93" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 3794, + 4508 + ], + "sha256": "59bc25b236d3c34151ddab1b19f2514ca0e4ed79a2a35b80cd40b4647bdbb41b" + }, + "claim-0": { + "summary": "Two queues of (accept_rate, request) pairs are sorted descending by rate with index tie-breaking, and rows are granted one at a time, so every grant is a prefix over draft positions.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 4528, + 4774 + ], + "sha256": "f6b32b11b973e232b0f58ce5d831d407dc0f7c3a69e8ebdbea4bbc16519b5204" + }, + "claim-1": { + "summary": "The selection maximizes expected accepted tokens over estimated step time, where step time is a graph-size baseline plus a non-negative fitted slope times graph size plus a sampler term estimated per request count. Because the numerator is an expectation over accepted prefixes, reducing verified rows can reduce accepted tokens while still raising the ratio.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 4780, + 5203 + ], + "sha256": "9e1ac5ff7591e91718c61963d5b02a1fa068b78836ce7ab7fb386e18a0fc6bf8" + }, + "claim-2": { + "summary": "The search starts with one row per scheduled request and asserts best_bsz >= num_seqs. This is a row-allocation contract, not a measured speed comparison with plain decode.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 5209, + 5445 + ], + "sha256": "1f8f92db05af658d3489f9bf005625ad78790ee15c73b5f7d3209be212a26c4e" + }, + "claim-3": { + "summary": "The inspected DFlash decode producer samples its configured full width in both paths; variable-length scheduling budgets verification rows. This conclusion comes from sampler.py and DFlash's fixed-width metadata/forward/sample chain, not the non-budgeted verification-length branch.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 5451, + 5797 + ], + "sha256": "2b142ab135c6d15843ea4d54d63b8a6baaa7cc52536a005cba155409b72f4312" + }, + "claim-4": { + "summary": "The budgeted path is opt-in. DEEPINFER_ENABLE_MTP_VARLEN defaults false while DEEPINFER_USE_NEXTN_DECODE defaults 5, so fixed-width speculation is the default and the budget must be enabled.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 5803, + 6057 + ], + "sha256": "924e22e8da54ea15101ec6bb12e39dd6c7414483f3b40a9147e8d7d1df365027" + }, + "claim-5": { + "summary": "The source requires later-position confidence not to affect earlier verification decisions. CPU scheduling takes the total budget from N-2 and reads the latest CPU accept_rates for per-request lengths; when a forward is in flight those rates lag. The overlapping ZOS worker redistributes fixed total_q using the previous sampler's GPU confidence before the main forward, then synchronizes corrected metadata before sampling. This source design is not a runtime sampling-correctness proof.", + "layer": "L1", + "pointers": [ + "/claims/5" + ], + "byte_range": [ + 6063, + 6615 + ], + "sha256": "f351acf0f63d60571e42328d75aad0808f83bf2d76aa30421053e50f39fa26d1" + }, + "claim-6": { + "summary": "The confidence-head temperature and the request sampling temperature are separate values with separate clamps. The former scales the confidence head's output; the latter is a SamplingParams field. Neither implies the other.", + "layer": "L1", + "pointers": [ + "/claims/6" + ], + "byte_range": [ + 6621, + 6908 + ], + "sha256": "2ea03595b624ebd9c4ae39da047a8ec3f46eb4ae9dfe986411b3d1079d1e4ad0" + }, + "claim-7": { + "summary": "The reject path is gated on draft logprobs being supplied rather than on request temperature, so a request configured as greedy still goes through rejection. This reading is from the gating logic; no run confirmed it end to end.", + "layer": "L1", + "pointers": [ + "/claims/7" + ], + "byte_range": [ + 6914, + 7206 + ], + "sha256": "58dd86f49125bd46dc24f0ea84a4a9697fc6b520727a8b689fbe68996b623d60" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 7214, + 7927 + ], + "sha256": "9a4e14e9fbb0383ed69958bba3bd678a50431dfbd32aa7e352ba9e73517db439" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 7931, + 8734 + ], + "sha256": "d63c64fbddc83fc4ebda08295859ca4fe013a96c8e66897fdec1dc877a3ffe10" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 8738, + 9482 + ], + "sha256": "e98f2b7dd642825419094c15bd0eff10e1f08fd77277071fbdc688d393bad6ef" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 9486, + 10078 + ], + "sha256": "a3e49a09a8279f68cd2d7a414e9146db5a14b70991422940f2696562268bf43b" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 10082, + 10174 + ], + "sha256": "b1d1fcac8a5efa84b1ff647445000f07850d402ae6f705cb55fdb7bbc5a99ee3" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/deepinfer.common.llm.zero_overhead_deferred_scheduling.original.json b/src/inferrsi/knowledge/atoms/deepinfer.common.llm.zero_overhead_deferred_scheduling.original.json new file mode 100644 index 000000000..5fe09c7d8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/deepinfer.common.llm.zero_overhead_deferred_scheduling.original.json @@ -0,0 +1,377 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "DeepInfer zero-overhead scheduling: defer the previous step's post-process to overlap host prep with device work", + "summary": "Move the CPU-only post-process of step N into step N+1 so it overlaps the next forward. The reusable part is the staleness enumeration and the on-device repair, not the scheduler itself.", + "applicability": { + "hardware": [ + "Backend-independent pipelining idea; the reference implementation asserts support only for NVIDIA SM100 and Ascend 950" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; later revisions need reinspection" + ], + "conditions": [ + "Decode-heavy workload where the CPU post-process is exposed between device kernels", + "At least one extra step of retained metadata, state slots and KV blocks is affordable", + "Distributed step-type votes can run on a host-side backend, not a device collective", + "The entrypoint has a drain path, because callers see results one step late" + ] + }, + "limitations": [ + "No DeepInfer build or run was performed; nothing here is a measured gain.", + "The reference is an offline engine for one model; transfer to a serving engine with continuous batching is unproven.", + "Scheduler stale-output guards, sample-event synchronization and deferred metadata release exist. Their presence does not establish complete in-flight KV/state reuse safety; a reachable preemption race was neither proved nor reproduced, so it remains a validation question rather than a known defect.", + "Numeric timer thresholds and any reported throughput belong to the source deployment and are not reproduced." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + }, + "repo": "deepinfer", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json", + "sha256": "ed5426af145f066f6183bd316c4073c46f324f5ee83aa9bd616387c0d0e7149c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L307-L314", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/parallel_utils/parallel_state.py#L89-L94", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "3565b2449abff4df0df2f979061a73364886c93602218b43c2f86c70f2629801" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/zos.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "1cb70e0b4ed7181b95e19ef2cc3cc640d1cd8f24e874ce4bc34fe51d6f031b46" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/arg_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c28c478bd376165c073c6e0722bed8468599a2fd766ffc7aafcd4ef270af52c5" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/engine_type.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "9933d83f500e3cc14c5fef0dd2fbe5c5170dbbf24df217376b0a55c4fb4ab48c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "8a0049b98ea6f7ef98555ad8b38b9e8dac2292c0d2a89c2090bbdb5e5ee7295a" + } + ], + "attribution": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L307-L314", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/parallel_utils/parallel_state.py#L89-L94", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "3565b2449abff4df0df2f979061a73364886c93602218b43c2f86c70f2629801" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/zos.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "1cb70e0b4ed7181b95e19ef2cc3cc640d1cd8f24e874ce4bc34fe51d6f031b46" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/arg_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c28c478bd376165c073c6e0722bed8468599a2fd766ffc7aafcd4ef270af52c5" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/engine_type.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "9933d83f500e3cc14c5fef0dd2fbe5c5170dbbf24df217376b0a55c4fb4ab48c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "8a0049b98ea6f7ef98555ad8b38b9e8dac2292c0d2a89c2090bbdb5e5ee7295a" + } + ], + "id": "deepinfer.common.llm.zero_overhead_deferred_scheduling.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json", + "byte_range": [ + 0, + 8191 + ], + "sha256": "ed5426af145f066f6183bd316c4073c46f324f5ee83aa9bd616387c0d0e7149c" + } + } + }, + "content": { + "record.json": { + "path": "records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 325 + ], + "sha256": "b1fd5b569c93f4596e726c7115cf38fc0fa163b02101fb57120248c740a54911" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 329, + 349 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 353, + 552 + ], + "sha256": "aa1f66c1fe4ffb290c111f427f22f1c24779a05c94b5a4fae296bc85a98ff29e" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 556, + 686 + ], + "sha256": "2d3cf4039a28450f50b382b2a1588d4031005091d94462cb9c60e2f3c5c10f23" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 690, + 3614 + ], + "sha256": "2731e971ce96cc454a09feac862d9729c5c3a99d3c42bd3db6e916d1c01d3fde" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 3618, + 4315 + ], + "sha256": "ce8fcfb7f49d46fa8194c34232bbb165cf233c0d932f1e8340cb844aa6348dc7" + }, + "claim-0": { + "summary": "The reorder is forward(N) -> post-process(N-1) -> sample(N) -> defer post-process(N). Prompt steps never defer; only decode steps, and only when DEEPINFER_ZERO_OVERHEAD_SCHEDULING is set.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 4335, + 4586 + ], + "sha256": "34370c8d912967f9d8189dbad154fa62a6711ae806105f824efb4ed4bcb08f06" + }, + "claim-1": { + "summary": "Three quantities become one step stale: per-request query length under adaptive speculation, per-request key length after rejected drafts, and input token ids for rows continuing from the previous batch. Each is repaired on device from a remap of the previous batch.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 4592, + 4922 + ], + "sha256": "1c4d2ed1a0a1d7153784a6ed96532b2c1d3c6ce77b4afb64cde43399d12fe0cc" + }, + "claim-2": { + "summary": "The scheduler releases the GIL; the standard ZOS engine constructor selects its CPU data-parallel group, created with Gloo, and the scheduler's Gloo vote uses a CPU tensor. This is a constructor/code path observation, not proof that every scheduler branch avoids device synchronization.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 4928, + 5278 + ], + "sha256": "af1da675fd4eb14326ecaf398a8cb4d8ba95beef3ac57b1959da83bddd835e6f" + }, + "claim-3": { + "summary": "The default depends on how the engine object is built. The environment variable defaults false, while EngineArgs sets it with setdefault from a per-engine-type property that is true for NORMAL and COMPLETION and false for PROMPT. A README claim of 'enabled by default' and a false variable default can both be true of different entrypoints.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 5284, + 5688 + ], + "sha256": "c31225ad0002f2bb097b7086471052750f5580b80291a02a33c1ea512d0566d9" + }, + "claim-4": { + "summary": "Forward and sample launches use a torch-visible synchronization debug guard. Event.synchronize is outside its coverage, another thread's allow scope can lift enforcement, and an environment setting disables it. Guard presence alone does not prove synchronization-free execution.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 5694, + 6036 + ], + "sha256": "026a09f2273ac3ce3ef96f4bc59123f045e165f439fbf4b620df64e839a6d761" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 6044, + 6603 + ], + "sha256": "fa460df98e19786625f654799c6c4b3fb45d7c5e099177d23881eb48fc371b75" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 6607, + 7041 + ], + "sha256": "f82e6da894972876f493adaef98e4ecd0d9e3175b84d1d7bc85ef2bec6450829" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 7045, + 7441 + ], + "sha256": "1d10a380a2146a39904358374bb792370a5c3496e34f7afca02533099f94748d" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 7445, + 8092 + ], + "sha256": "dccd4e5878f04b4a58a18765d1af8b54fa4880f4914584ce9e33f864869ec885" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 8096, + 8188 + ], + "sha256": "b1d1fcac8a5efa84b1ff647445000f07850d402ae6f705cb55fdb7bbc5a99ee3" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/diffusers.cuda.diffusion.group_offload_transfer_overlap.original.json b/src/inferrsi/knowledge/atoms/diffusers.cuda.diffusion.group_offload_transfer_overlap.original.json new file mode 100644 index 000000000..3ec8470d1 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/diffusers.cuda.diffusion.group_offload_transfer_overlap.original.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Diffusers group offload exchanges VRAM for host memory and transfer scheduling", + "summary": "Group/leaf offload and asynchronous prefetch offer different memory-latency tradeoffs; hook compatibility and host allocation must be evaluated.", + "applicability": { + "hardware": [ + "CUDA GPU with asynchronous transfer streams, sufficient CPU memory and measured host-device bandwidth" + ], + "software": [ + "huggingface/diffusers at efe46a5b177af67c64b3666da8ddddac7ee12163; later revisions need reinspection" + ], + "conditions": [ + "The model supports the relevant group-offload hooks and its forward device casts do not conflict with them" + ] + }, + "limitations": [ + "The source warns about weight-dependent input device casting and a tiled-VAE warmup requirement; warmup belongs in preparation, not a substituted readiness response.", + "Insufficient CPU RAM or transfer bandwidth can erase latency gains.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "diffusers", + "backend": "cuda", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json", + "sha256": "9bec3d912192efa2f2c853d3fb70bdae21a75875630a02294fcd084b18c30414" + }, + { + "url": "https://github.com/huggingface/diffusers/blob/efe46a5b177af67c64b3666da8ddddac7ee12163/docs/source/en/optimization/memory.md", + "type": "technical_document", + "commit": "efe46a5b177af67c64b3666da8ddddac7ee12163", + "accessed_at": "2026-10-15", + "content_sha256": "fb390aac843bb8b53273f9584832b69299cacc7a805d07552598c017e7d1bae6" + } + ], + "attribution": [ + { + "url": "https://github.com/huggingface/diffusers/blob/efe46a5b177af67c64b3666da8ddddac7ee12163/docs/source/en/optimization/memory.md", + "type": "technical_document", + "commit": "efe46a5b177af67c64b3666da8ddddac7ee12163", + "accessed_at": "2026-10-15", + "content_sha256": "fb390aac843bb8b53273f9584832b69299cacc7a805d07552598c017e7d1bae6" + } + ], + "id": "diffusers.cuda.diffusion.group_offload_transfer_overlap.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json", + "byte_range": [ + 0, + 3277 + ], + "sha256": "9bec3d912192efa2f2c853d3fb70bdae21a75875630a02294fcd084b18c30414" + } + } + }, + "content": { + "record.json": { + "path": "records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 308 + ], + "sha256": "1402e69d57a5157d3e12a8a1d592365b6d4f960888081cf8b62f48a48c6b74d1" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 312, + 332 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 336, + 493 + ], + "sha256": "9d36dce19f92ba67298ed589e308fc0c71fa493513c6606c65930531b8cb3cdc" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 497, + 615 + ], + "sha256": "7cb1204bb3ad34974afb411b4f99495b018ae74045f439347055417d8e8e399c" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 619, + 1010 + ], + "sha256": "505a458ddb0914cb1f8526b0569506c18044c11a3c1355c8e4f62f5942eeaf65" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1014, + 1446 + ], + "sha256": "4c8297582f5f5726ba8093e58c718e4e61c7f6d76448c8682cfcc3792926debf" + }, + "claim-0": { + "summary": "Group offload moves internal module groups or leaves. CUDA streams can prefetch subsequent work while the current layer executes.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1466, + 1661 + ], + "sha256": "4c5fa41de6bd9905f7d31139a0edd4612dac587c093de6765f3d35a119546688" + }, + "claim-1": { + "summary": "Pre-pinning can raise host memory substantially; low_cpu_mem_usage trades on-demand pinning for additional execution time. Block-level streaming requires num_blocks_per_group=1 in this documentation.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1667, + 1932 + ], + "sha256": "67ccfe9f10e254ba9c70b87f21dc79ceaa15ff9f1c327ff7cd3e71531b88b441" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 1940, + 2337 + ], + "sha256": "3f9b321f106ac9df97b87b1631f31151768b1a2a4af10b22534e70ab3f6310a2" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2341, + 2484 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2488, + 2777 + ], + "sha256": "885ca8dc7f659f4bf95c0d723e612e2948cabb313648c7eac785fbac2a8416a8" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2781, + 3185 + ], + "sha256": "ec495f76fcb76ecf83b28c1ce409359dbd2af1b263589430a1df17986251d949" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3189, + 3274 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/draft-acceptance-issue.original.json b/src/inferrsi/knowledge/atoms/draft-acceptance-issue.original.json new file mode 100644 index 000000000..42076f0cc --- /dev/null +++ b/src/inferrsi/knowledge/atoms/draft-acceptance-issue.original.json @@ -0,0 +1,100 @@ +{ + "authority": "checkout", + "metadata": { + "id": "draft-acceptance-issue.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Draft a campaign acceptance issue with checklist, RunSpec, evidence paths, and placeholders for baseline/candidate SHAs.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/draft-acceptance-issue/SKILL.md", + "sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Opening a new acceptance campaign in an RSI-style repository, before any baseline or candidate run", + "prerequisites": "A chosen campaign subject and an empty evidence// tree copied from evidence/_template/; SHAs may still be placeholders", + "input_contract": "A campaign id of the form {model-or-scenario}/{device}x{count}, any user-supplied criteria or accepted plan, and available workload/baseline/calibration evidence for deriving missing targets", + "produced_artifact": "An acceptance issue body with campaign id, pinned baseline and candidate SHAs, RunSpec, criteria source and derivation including gaps and freeze authority, gates, evidence paths, initial verdict and a downstream citation blurb", + "failure_modes": [ + "Gates written after the search loop has already run", + "Campaign SHAs committed into recipes/, benchmarks/, skills or workflow defaults", + "PASS claimed without a validator/ freeze and a results/ rationale" + ], + "refusal_point": "Refuses to state a verdict other than INCONCLUSIVE while the validator freeze or results rationale is absent" + }, + "state": "candidate", + "limitations": [ + "Drafts an issue only; it freezes no gate and runs no measurement.", + "The placeholder SHA convention depends on the campaign owner filling them in later.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/draft-acceptance-issue/SKILL.md", + "byte_range": [ + 0, + 4373 + ], + "sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/draft-acceptance-issue.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 167 + ], + "sha256": "58706d39daa9a09f6ffe2e9fc498095e8431b8bb31bc277d244e334704683c75" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 2861 + ], + "sha256": "8e6793ae5ee565507a43588828c25e66a7fd1d32fac153b5f7be76b72bcf3277" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 2861, + 4373 + ], + "sha256": "fe9aa75697f5223bf61fb31b6eeec4ee8a1983891545398bdeeed8cb5a5e0700" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/flashattention.cuda.attention.generation_specific_dispatch.original.json b/src/inferrsi/knowledge/atoms/flashattention.cuda.attention.generation_specific_dispatch.original.json new file mode 100644 index 000000000..d28d2b3ad --- /dev/null +++ b/src/inferrsi/knowledge/atoms/flashattention.cuda.attention.generation_specific_dispatch.original.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "FlashAttention generations have distinct hardware and API contracts", + "summary": "Select an attention generation using its actual GPU, dtype and interface requirements; package names and installation paths are not interchangeable.", + "applicability": { + "hardware": [ + "FA2 CUDA: Ampere/Ada/Hopper; FA3: H100/H800; FA4 CuTeDSL targets Hopper/Blackwell in the inspected README" + ], + "software": [ + "Dao-AILab/flash-attention at 1fc0221183e799363001394a12dd9e78e15f5dda; later revisions need reinspection" + ], + "conditions": [ + "Qualify exact head dimensions, masks, variable lengths and dtypes on the selected implementation" + ] + }, + "limitations": [ + "Different algorithms and FP8 can change numerical error; mathematical attention equivalence is not bitwise parity.", + "ROCm has separate implementation requirements in the source and is outside this CUDA card.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "flashattention", + "backend": "cuda", + "scenario": "attention.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/flashattention.cuda.attention.generation_specific_dispatch.json", + "sha256": "90290d7bc80b1626863e0520c91bb196d93ebfe08190a450e9de59c6505ae8ad" + }, + { + "url": "https://github.com/Dao-AILab/flash-attention/blob/1fc0221183e799363001394a12dd9e78e15f5dda/README.md", + "type": "technical_document", + "commit": "1fc0221183e799363001394a12dd9e78e15f5dda", + "accessed_at": "2026-10-15", + "content_sha256": "0dbaba56da1c8372d460956e2609bfb89acf8f3aadd65d132b1697d221069619" + } + ], + "attribution": [ + { + "url": "https://github.com/Dao-AILab/flash-attention/blob/1fc0221183e799363001394a12dd9e78e15f5dda/README.md", + "type": "technical_document", + "commit": "1fc0221183e799363001394a12dd9e78e15f5dda", + "accessed_at": "2026-10-15", + "content_sha256": "0dbaba56da1c8372d460956e2609bfb89acf8f3aadd65d132b1697d221069619" + } + ], + "id": "flashattention.cuda.attention.generation_specific_dispatch.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/flashattention.cuda.attention.generation_specific_dispatch.json", + "byte_range": [ + 0, + 3085 + ], + "sha256": "90290d7bc80b1626863e0520c91bb196d93ebfe08190a450e9de59c6505ae8ad" + } + } + }, + "content": { + "record.json": { + "path": "records/flashattention.cuda.attention.generation_specific_dispatch.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 305 + ], + "sha256": "13ef0020620a4ca43a64832bf7f1ee87ae90e21ee31a3e352f77941c0945a6e5" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 309, + 329 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 333, + 494 + ], + "sha256": "4aea013d76649217ad1f9c80640ba506966f8a552df70f8cc27c103ea0299b6a" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 498, + 605 + ], + "sha256": "84e2f695098715184603dc9c13037890507f7f29d643b8fa7581a293f92a8de5" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 609, + 976 + ], + "sha256": "4c88c9975f2df0abdc7368c21fdcd2975400a7aecee53a4eeda1d91ae83d0790" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 980, + 1410 + ], + "sha256": "fb8bd0cef640913e5f9be9aac75b7ecaff59ca234717c81d94bf40109450da72" + }, + "claim-0": { + "summary": "FA3 documents FP16/BF16 forward/backward and FP8 forward, with CUDA >=12.3 and an H100/H800 requirement.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1430, + 1600 + ], + "sha256": "371792ff9840de8c0e6230fb1608f9ee63da8a9fc8a1b538a09a5887d95eadbe" + }, + "claim-1": { + "summary": "FA3 is installed from hopper and imported through flash_attn_3; FA4 uses flash-attn-4 and flash_attn.cute. The source keeps generation-specific installation and capability sections.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1606, + 1853 + ], + "sha256": "c1f1187324a5afb8fd994112741a796048d6d6718c670b6ce0fc99389fa4ce6b" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 1861, + 2151 + ], + "sha256": "fc521fc2c9482e80db7f4cec61d4a11d70d04a87bf06b645dedc634b3df5b1f6" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2155, + 2298 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2302, + 2613 + ], + "sha256": "1cf44f84f5fdbb07d38ca45e87ded7f9913026cc806b73d1f47abd05a872ed75" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2617, + 2993 + ], + "sha256": "7eb71d14e72824523df0ee6e64973799a6c7771d03930c9017e5974b18de945b" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 2997, + 3082 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/flashinfer.cuda.llm.paged_decode_dispatch.original.json b/src/inferrsi/knowledge/atoms/flashinfer.cuda.llm.paged_decode_dispatch.original.json new file mode 100644 index 000000000..a08449b7b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/flashinfer.cuda.llm.paged_decode_dispatch.original.json @@ -0,0 +1,254 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "FlashInfer paged decode: freeze backend selection and graph buffers", + "summary": "Paged attention separates planning from execution; auto dispatch and CUDA graph buffer ownership are part of the reproducibility boundary.", + "applicability": { + "hardware": [ + "NVIDIA CUDA; the inspected auto-cuDNN dispatch specifically distinguishes SM100/SM103 and frontend versions" + ], + "software": [ + "flashinfer-ai/flashinfer at 3637083a3a3d08538cce60937cd876b17779c6f0; later revisions need reinspection" + ], + "conditions": [ + "Paged KV decode with known head dimensions, dtype, page layout and batch shape", + "Caller-owned graph buffers must remain valid across planning and replay" + ] + }, + "limitations": [ + "The library GPU table is not an operator-by-operator support matrix.", + "No downstream dependency bump or universal speedup is recommended from this snapshot.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "flashinfer", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/flashinfer.cuda.llm.paged_decode_dispatch.json", + "sha256": "0f2986494fcc9b751df71e598fd61caa68e28bc4b0ac401e4cc763bc3f75283b" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/README.md", + "type": "technical_document", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "472bc506d8a67ca7d8048650b9fc8f17d75f5adbaa016b505b76bbb48a8b4fbc" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/flashinfer/decode.py", + "type": "source_code", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "85411257e706ffdcb4334d2a8d721268fe236145ac855e4b32bef9109a7bf780" + } + ], + "attribution": [ + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/README.md", + "type": "technical_document", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "472bc506d8a67ca7d8048650b9fc8f17d75f5adbaa016b505b76bbb48a8b4fbc" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/flashinfer/decode.py", + "type": "source_code", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "85411257e706ffdcb4334d2a8d721268fe236145ac855e4b32bef9109a7bf780" + } + ], + "id": "flashinfer.cuda.llm.paged_decode_dispatch.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/flashinfer.cuda.llm.paged_decode_dispatch.json", + "byte_range": [ + 0, + 3745 + ], + "sha256": "0f2986494fcc9b751df71e598fd61caa68e28bc4b0ac401e4cc763bc3f75283b" + } + } + }, + "content": { + "record.json": { + "path": "records/flashinfer.cuda.llm.paged_decode_dispatch.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 272 + ], + "sha256": "9ba41bb4c796351244902551b48bc85e6f6c336ac19f9386aa3de5f65942cd2e" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 276, + 296 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 300, + 451 + ], + "sha256": "309a54bf54c85e7631db3ffc3202cbd7fe7e14a150c15cf0dd6bd48c56d1bd85" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 455, + 558 + ], + "sha256": "800397b7c92eceaca08598eb39c5ad47ee5680ec584f6c43cbf6e34fe9e719b5" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 562, + 1283 + ], + "sha256": "e98986317c0f3e6fcdfbcfda015bf14253f137f3daf22c33a564d9b1fbd122f1" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1287, + 1781 + ], + "sha256": "5d05996dc8d4bf710c7642ad683936d3471d33c32ecee4c8c244f4a8696aad08" + }, + "claim-0": { + "summary": "BatchDecodeWithPagedKVCacheWrapper exposes resolved_backend after planning. Auto selection depends on architecture, kernel availability, shapes and optional cuDNN/CuTe dependencies.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1801, + 2048 + ], + "sha256": "d894c19b1868fbab4d2239e2b71a59795f56d470465ac4959421d588dcc0a33f" + }, + "claim-1": { + "summary": "The inspected cuDNN path accepts a narrower feature set than the whole library; it excludes RoPE, soft-cap and FP8/NVFP4 KV. Captured block tables and backend choice cannot change arbitrarily between re-plans.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2054, + 2329 + ], + "sha256": "b5ec5cc624838b9e5d9d0c0ac266b394b6785891bbdb18fc4d19f8ecc169000b" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2337, + 2843 + ], + "sha256": "f47971b53ac2ffdc0dec5ad780226dff64971956adec53508ff43a36153884c0" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2847, + 2990 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2994, + 3324 + ], + "sha256": "11975d57a6e72d9b939d473083f80f64fb9f6f1f387dfcf85716aea6084804f9" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3328, + 3653 + ], + "sha256": "273c9249654583878b2600fbc7367c4e9754a821793ff5c41664f8a34c87ab0b" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3657, + 3742 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.cross-repository-mechanisms.json b/src/inferrsi/knowledge/atoms/inference-engine-research.cross-repository-mechanisms.json new file mode 100644 index 000000000..8d31bb9f0 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.cross-repository-mechanisms.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.cross-repository-mechanisms", + "kind": "knowledge", + "title": "Cross-repository mechanisms: ownership, validity and completion", + "entrypoint": "cross-repository-mechanisms.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/cross-repository-mechanisms.md", + "sha256": "8eb1b8dd4807cf06df9f6fb1bf88aff9ad6112c408e377631ceada32bc56307a" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/cross-repository-mechanisms.md", + "byte_range": [ + 0, + 17214 + ], + "sha256": "8eb1b8dd4807cf06df9f6fb1bf88aff9ad6112c408e377631ceada32bc56307a" + } + } + }, + "content": { + "cross-repository-mechanisms.md": { + "path": "workflows/inference-engine-research/references/cross-repository-mechanisms.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.import.json b/src/inferrsi/knowledge/atoms/inference-engine-research.import.json new file mode 100644 index 000000000..f4aa7c26a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.import.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.import", + "kind": "knowledge", + "title": "Import scope and verification", + "entrypoint": "import.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/import.md", + "sha256": "c8a57db94768cc6cd4193932def75ba67ec453e56ee0e54f176fb82f1af53091" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/import.md", + "byte_range": [ + 0, + 3463 + ], + "sha256": "c8a57db94768cc6cd4193932def75ba67ec453e56ee0e54f176fb82f1af53091" + } + } + }, + "content": { + "import.md": { + "path": "workflows/inference-engine-research/references/import.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.model-aware-preparation.json b/src/inferrsi/knowledge/atoms/inference-engine-research.model-aware-preparation.json new file mode 100644 index 000000000..99b01dc29 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.model-aware-preparation.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.model-aware-preparation", + "kind": "knowledge", + "title": "Model-aware engine preparation", + "entrypoint": "model-aware-preparation.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/model-aware-preparation.md", + "sha256": "1b117e8f3a35c25dbffc4f7d43bcef1410b2b3f51e98d53933ef3348fb3b070d" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/model-aware-preparation.md", + "byte_range": [ + 0, + 9057 + ], + "sha256": "1b117e8f3a35c25dbffc4f7d43bcef1410b2b3f51e98d53933ef3348fb3b070d" + } + } + }, + "content": { + "model-aware-preparation.md": { + "path": "workflows/inference-engine-research/references/model-aware-preparation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.original.json b/src/inferrsi/knowledge/atoms/inference-engine-research.original.json new file mode 100644 index 000000000..7d5212e98 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.original.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.original", + "kind": "knowledge", + "title": "Inference engine research router", + "entrypoint": "guide.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/SKILL.md", + "sha256": "a94102df1790f51d673f2dfe4b047fa6a70b2ead2a12b1a73393ea3765984b6a" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/SKILL.md", + "byte_range": [ + 0, + 5755 + ], + "sha256": "a94102df1790f51d673f2dfe4b047fa6a70b2ead2a12b1a73393ea3765984b6a" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/inference-engine-research/guide.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.overview.json b/src/inferrsi/knowledge/atoms/inference-engine-research.overview.json new file mode 100644 index 000000000..3e06fa3dd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.overview.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.overview", + "kind": "knowledge", + "title": "Five inference repositories as English skills", + "entrypoint": "overview.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/overview.md", + "sha256": "4e39954ec5cc7ebfe5de1b1041762f75c5c3d381265e3711fd43ee2a7ac3d688" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/overview.md", + "byte_range": [ + 0, + 8153 + ], + "sha256": "4e39954ec5cc7ebfe5de1b1041762f75c5c3d381265e3711fd43ee2a7ac3d688" + } + } + }, + "content": { + "overview.md": { + "path": "workflows/inference-engine-research/references/overview.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.repository-source-scope.json b/src/inferrsi/knowledge/atoms/inference-engine-research.repository-source-scope.json new file mode 100644 index 000000000..8754f4e83 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.repository-source-scope.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.repository-source-scope", + "kind": "knowledge", + "title": "Nine-repository source scope", + "entrypoint": "repository-source-scope.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/repository-source-scope.md", + "sha256": "918e8358b7ef6caa2eb0dea56438c117f0737688d49d06d288ef5bd0cf668b2b" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/repository-source-scope.md", + "byte_range": [ + 0, + 12049 + ], + "sha256": "918e8358b7ef6caa2eb0dea56438c117f0737688d49d06d288ef5bd0cf668b2b" + } + } + }, + "content": { + "repository-source-scope.md": { + "path": "workflows/inference-engine-research/references/repository-source-scope.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-engine-research.source-manifest.json b/src/inferrsi/knowledge/atoms/inference-engine-research.source-manifest.json new file mode 100644 index 000000000..7045cbf0b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-engine-research.source-manifest.json @@ -0,0 +1,64 @@ +{ + "authority": "package", + "metadata": { + "id": "inference-engine-research.source-manifest", + "kind": "knowledge", + "title": "Inference engine research source manifest", + "entrypoint": "source-manifest.json", + "origin": [ + "external" + ], + "applicability": { + "scope": "Model-aware inference-engine research using the source revisions in references/source-manifest.json." + }, + "limitations": [ + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment.", + "No new engine or measured speedup is included." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/source-manifest.json", + "byte_range": [ + 0, + 1613 + ], + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + } + } + }, + "content": { + "source-manifest.json": { + "path": "workflows/inference-engine-research/references/source-manifest.json" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/inference-optimization-casebook.original.json b/src/inferrsi/knowledge/atoms/inference-optimization-casebook.original.json new file mode 100644 index 000000000..878fc38a1 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/inference-optimization-casebook.original.json @@ -0,0 +1,103 @@ +{ + "authority": "checkout", + "metadata": { + "id": "inference-optimization-casebook.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "How to structure and use a casebook of past optimization decisions as a decision-support tool. Extracts the casebook pattern from TensorRT-LLM's perf-optimization-casebook skill. Use when building a record of optimization experiments or when deciding which optimization to try next based on prior art.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/SKILL.md", + "sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Structuring and querying a casebook of past optimization decisions as decision support, when recording optimization experiments or choosing the next optimization from prior art; the casebook is reference material and neither runs profiling nor makes decisions", + "prerequisites": "Whole-body text access to the case files for free-text search; applying a case first requires reading the nearest checked-in config and the model's deployment guide", + "input_contract": "For a query: natural search terms such as model name, knob, mechanism word or deployment feature, plus the current model and hardware. For a new case: mechanism, applies-when and does-not-apply conditions, procedure, expected effect, accuracy risk, verification, rollback and a real measurement trail with run ID, verdict, exact hardware SKU, model revision, workload and before/after result", + "produced_artifact": "Ranked matching cases read as precedents and diagnostic options, or a new or deprecated case record in the template; a precedent's procedure and expected direction of effect, not a guaranteed configuration or a measured result", + "failure_modes": [ + "The query is pre-translated into canonical vocabulary or bounded by structured fields, so synonyms in the body text are missed", + "A case's specific values, such as batch size, tensor-parallel degree or kernel parameters, are copied instead of re-derived for the current model and hardware", + "The precedent's expected direction of effect stands in for measurement after the change is applied", + "A rejected direction is read as a permanent blacklist, or one discarded implementation as ruling out its mechanism", + "A confounded run, a missing experiment and a failed gate are recorded as the same evidence state", + "Cross-system cases are bootstrapped without re-verifying that the mechanism holds on the target hardware" + ], + "refusal_point": "Adds no case for an INCONCLUSIVE optimization-effect claim, a single-configuration result without plausible generalization, or a result without a real measurement trail, except a scoped diagnostic observation that keeps its verdict and configuration boundary; manufactures no PASS, and reading the records does not reopen a paused campaign" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/SKILL.md", + "byte_range": [ + 0, + 10247 + ], + "sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8" + } + } + }, + "content": { + "guide.md": { + "path": "casebooks/inference-optimization-casebook.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 364 + ], + "sha256": "d7a39ada4c606e49658bcb344137e712b3c04106cd927edfca56e6547979c944" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 3971 + ], + "sha256": "1304cde8819482a692d848e0bdf14d3c54c901eaed18da0fb90662c9f25c1a05" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 3971, + 10247 + ], + "sha256": "94211469060abc682da0ce190c47a9f387489671126342a08112fd616407c207" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.json b/src/inferrsi/knowledge/atoms/lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.json new file mode 100644 index 000000000..845086ec6 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "LMDeploy KV quantization: preserve capacity gains and latency counterexamples", + "summary": "KV compression can increase cache capacity yet reduce throughput; distinguish engine-specific quantizers and validate long-context quality.", + "applicability": { + "hardware": [ + "INT4/INT8 source support spans NVIDIA Volta and later; the TurboQuant example is specifically H200" + ], + "software": [ + "InternLM/lmdeploy at 822dddb8b3bc895eaf6cffb45a5514768e7ecb84; later revisions need reinspection" + ], + "conditions": [ + "Record engine, quant_policy, attention architecture, head dimension and quantizer dependencies" + ] + }, + "limitations": [ + "Source quality slogans are not exactness guarantees. INT4/INT8 and TurboQuant are distinct techniques with different engine support.", + "The reported table is not accompanied here by raw request samples or frozen validators; its numbers are neither locally reproduced nor a general gain claim.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "lmdeploy", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json", + "sha256": "873997b38981ccc03ff73e6fb84e96022f293a019843efd8c4aa50f27878ac9a" + }, + { + "url": "https://github.com/InternLM/lmdeploy/blob/822dddb8b3bc895eaf6cffb45a5514768e7ecb84/docs/en/quantization/kv_quant.md", + "type": "technical_document", + "commit": "822dddb8b3bc895eaf6cffb45a5514768e7ecb84", + "accessed_at": "2026-10-15", + "content_sha256": "58d41fe148d80b2b1ee4c8e3210a7ab6cf1d7f51943f1cb61690e6b1dde329e3" + } + ], + "attribution": [ + { + "url": "https://github.com/InternLM/lmdeploy/blob/822dddb8b3bc895eaf6cffb45a5514768e7ecb84/docs/en/quantization/kv_quant.md", + "type": "technical_document", + "commit": "822dddb8b3bc895eaf6cffb45a5514768e7ecb84", + "accessed_at": "2026-10-15", + "content_sha256": "58d41fe148d80b2b1ee4c8e3210a7ab6cf1d7f51943f1cb61690e6b1dde329e3" + } + ], + "id": "lmdeploy.cuda.llm.kv_quantization_capacity_cost.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json", + "byte_range": [ + 0, + 3366 + ], + "sha256": "873997b38981ccc03ff73e6fb84e96022f293a019843efd8c4aa50f27878ac9a" + } + } + }, + "content": { + "record.json": { + "path": "records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 280 + ], + "sha256": "198f91b4f19a137718ae706b6a9e3451f615eefb4c50a7c47f3dd9cbf49f82a7" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 284, + 304 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 308, + 460 + ], + "sha256": "9d1b725b382e7a6690c4977acd80cb4da8ac2d4d60f084a1b69dceafe67c8b2f" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 464, + 601 + ], + "sha256": "5163b9669505b24b9df56e68312df1a3a7bb5bb3b5b41ac679344907f7f86cb0" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 605, + 987 + ], + "sha256": "fa4d21d9c87d9e7d18594c52fc7ddc4ddf06eae0291e451874b5161b3291e592" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 991, + 1404 + ], + "sha256": "5fddf2538c239b7ea8bf82e970ec06bbeccc590d64bdcc74d65098c82d96a8fb" + }, + "claim-0": { + "summary": "INT4/INT8 uses online per-head/per-token asymmetric quantization. The documented TurboQuant K4V2 path is PyTorch-engine-only, excludes MLA and speculative decoding, and requires power-of-two head dimensions.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1424, + 1697 + ], + "sha256": "78e33f75b5e91e1236696f3210a18b0ddc0c0f57b32e977f115357e0a2f8bf2b" + }, + "claim-1": { + "summary": "Upstream unverified counterexample: H200, Qwen3-30B-A3B-Base, ShareGPT, concurrency 64, 5000 requests, quant_policy=42 versus 0 reports output throughput 2186.7 to 2027.0 tokens/s and mean E2E latency 5.888 to 6.348 seconds. Compression did not improve latency in this configuration.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1703, + 2052 + ], + "sha256": "ced9c707f987a7b68bed20a90686281f98e1d5ca8e375d30f977eaa6a5bac6b3" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2060, + 2363 + ], + "sha256": "a7318550dc0506f1ecee141f48e6e73b700aa42aa4a8ea1116a1c060ae6cabc9" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2367, + 2510 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2514, + 2801 + ], + "sha256": "61a6f469779030fcd1d8ef7c0d53ba313924d24cee9d0207135164208f23aa53" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2805, + 3265 + ], + "sha256": "fb2299156bb1980df06ede257dd37dbd15d76bef52fce95e18555447a8e78c65" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3269, + 3363 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.bounded-updates.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.bounded-updates.json new file mode 100644 index 000000000..50cd2995f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.bounded-updates.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Bounded amendments to existing methodology artifacts", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md", + "sha256": "529c363e9c678f33f7c0be0420d26c64d056321f041726362dba69e53e1e375e" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.bounded-updates", + "kind": "knowledge", + "entrypoint": "bounded-updates.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md", + "byte_range": [ + 0, + 7695 + ], + "sha256": "529c363e9c678f33f7c0be0420d26c64d056321f041726362dba69e53e1e375e" + } + } + }, + "content": { + "bounded-updates.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.comparison.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.comparison.json new file mode 100644 index 000000000..d089ced43 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.comparison.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Comparison: choose the artifact before choosing the learning method", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md", + "sha256": "38587678a96581f5c2dc697d982127343565504bffa191352811dffcc165aa23" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.comparison", + "kind": "knowledge", + "entrypoint": "COMPARISON.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md", + "byte_range": [ + 0, + 4267 + ], + "sha256": "38587678a96581f5c2dc697d982127343565504bffa191352811dffcc165aa23" + } + } + }, + "content": { + "COMPARISON.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/COMPARISON.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.evidence-routing.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.evidence-routing.json new file mode 100644 index 000000000..1b59a11c8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.evidence-routing.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Candidate knowledge: evidence-to-artifact admission", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md", + "sha256": "406d5d74c3fef4c1a23d495492e21a084c3c46495a1a84b385703ed104358874" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.evidence-routing", + "kind": "knowledge", + "entrypoint": "evidence-routing.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md", + "byte_range": [ + 0, + 5282 + ], + "sha256": "406d5d74c3fef4c1a23d495492e21a084c3c46495a1a84b385703ed104358874" + } + } + }, + "content": { + "evidence-routing.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.integration_notes.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.integration_notes.json new file mode 100644 index 000000000..686570630 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.integration_notes.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Pack E integration notes", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md", + "sha256": "fbc4a96b6f6c477706eed83eaa4fcc29a14f881637629d6c004601ed049f2523" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.integration_notes", + "kind": "knowledge", + "entrypoint": "INTEGRATION_NOTES.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md", + "byte_range": [ + 0, + 5557 + ], + "sha256": "fbc4a96b6f6c477706eed83eaa4fcc29a14f881637629d6c004601ed049f2523" + } + } + }, + "content": { + "INTEGRATION_NOTES.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.learning-to-commit.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.learning-to-commit.json new file mode 100644 index 000000000..b34c129e9 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.learning-to-commit.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Learning to Commit evidence ledger", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md", + "sha256": "9c2d1d738e896d05c00f53e6adf14c9df2501ecc3f0020e71b5a1c2192547086" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.learning-to-commit", + "kind": "knowledge", + "entrypoint": "learning-to-commit.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md", + "byte_range": [ + 0, + 2847 + ], + "sha256": "9c2d1d738e896d05c00f53e6adf14c9df2501ecc3f0020e71b5a1c2192547086" + } + } + }, + "content": { + "learning-to-commit.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.methodology-counterexamples.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.methodology-counterexamples.json new file mode 100644 index 000000000..5150ce1c1 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.methodology-counterexamples.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Candidate cases: where seemingly useful rules fail", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md", + "sha256": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.methodology-counterexamples", + "kind": "knowledge", + "entrypoint": "methodology-counterexamples.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md", + "byte_range": [ + 0, + 5213 + ], + "sha256": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4" + } + } + }, + "content": { + "methodology-counterexamples.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.original.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.original.json new file mode 100644 index 000000000..dc58eda75 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.original.json @@ -0,0 +1,177 @@ +{ + "authority": "checkout", + "metadata": { + "id": "npu-skill-factory.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Design and operation of the InferRSI NPU skill factory: artifact lifecycle, skill evaluation contract, corpus selection, hide-and-re-distill procedure, and skill evolution cycle. Use when deciding where new skill artifacts belong, how to distill a candidate skill, or how to run the No-Skill vs Human-Skill vs Distilled-Skill comparison.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/SKILL.md", + "sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183" + }, + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "prerequisites": "Current candidate inventory and source/evaluation evidence; historical sibling execution interfaces are not required for read-only artifact admission", + "input_contract": "A candidate inventory plus the source and evaluation evidence for each candidate skill; read-only artifact admission needs no historical sibling execution interface", + "produced_artifact": "An admitted or refused skill candidate with its source, evidence and limitation record, and its stable id and owning path", + "failure_modes": [ + "A candidate admitted on an inventory line without source or evaluation evidence", + "A stable id or path assigned twice across owners", + "Indexing or admission reported as validation or promotion", + "Paper-to-code equivalence asserted without a pinned readset" + ], + "refusal_point": "Refuses admission when a candidate has neither source evidence nor a declared evaluation state, and records the refusal instead of leaving the field blank" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/SKILL.md", + "byte_range": [ + 0, + 11624 + ], + "sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/npu-skill-factory.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 385 + ], + "sha256": "df91dcc575a6ec332c874761c80dc3725ff531ed9ac338ab41c2dad19faa8953" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 5501 + ], + "sha256": "a4cb3276728abb08b2b1aac66c7a353809ce824bf93cb38d8a621d5e46a2bcfc" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 5501, + 11624 + ], + "sha256": "e69b99de5ee65ed9d6289811b3993913961968184c4d8ee234def2bf4364db9a" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.protocol-details.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.protocol-details.json new file mode 100644 index 000000000..f1b74f43e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.protocol-details.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Protocol details and unreported quantities", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md", + "sha256": "41298c6bde3a28f0712fa06a18bbc4ac59aea6d17cc9eb1318744f4121e3bab6" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.protocol-details", + "kind": "knowledge", + "entrypoint": "protocol-details.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md", + "byte_range": [ + 0, + 6520 + ], + "sha256": "41298c6bde3a28f0712fa06a18bbc4ac59aea6d17cc9eb1318744f4121e3bab6" + } + } + }, + "content": { + "protocol-details.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/protocol-details.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.qa.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.qa.json new file mode 100644 index 000000000..0cb9f0e7e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.qa.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Pack E delivery QA", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/QA.md", + "sha256": "3f3785ec39a6938a5d1f2e874e99153fe92c0e666dd3e78a499c8b47d891346a" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.qa", + "kind": "knowledge", + "entrypoint": "QA.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/QA.md", + "byte_range": [ + 0, + 1853 + ], + "sha256": "3f3785ec39a6938a5d1f2e874e99153fe92c0e666dd3e78a499c8b47d891346a" + } + } + }, + "content": { + "QA.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/QA.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.readme.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.readme.json new file mode 100644 index 000000000..b83861994 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.readme.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Pack E — Evidence into repository memory and bounded skills", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/README.md", + "sha256": "221785e91c45588f82b3caab6d52f1ea1d102b16139c20a0802921e2789e6d28" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.readme", + "kind": "knowledge", + "entrypoint": "README.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/README.md", + "byte_range": [ + 0, + 2151 + ], + "sha256": "221785e91c45588f82b3caab6d52f1ea1d102b16139c20a0802921e2789e6d28" + } + } + }, + "content": { + "README.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/README.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.readset.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.readset.json new file mode 100644 index 000000000..4b2a1aef7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.readset.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Exact readset and availability", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md", + "sha256": "6f953d20d8958c68339c9ceeae348604d0fea3e9c6ccb9b64a63d3b210426a22" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.readset", + "kind": "knowledge", + "entrypoint": "readset.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md", + "byte_range": [ + 0, + 7086 + ], + "sha256": "6f953d20d8958c68339c9ceeae348604d0fea3e9c6ccb9b64a63d3b210426a22" + } + } + }, + "content": { + "readset.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/readset.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.repo-to-skill.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.repo-to-skill.json new file mode 100644 index 000000000..06f1302b5 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.repo-to-skill.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Repo-To-Skill evidence ledger", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md", + "sha256": "5ebdac2a2bbbe6614f9d4096bc9895bd685acdf76414e2c3c1fb7b50d57c738d" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.repo-to-skill", + "kind": "knowledge", + "entrypoint": "repo-to-skill.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md", + "byte_range": [ + 0, + 3151 + ], + "sha256": "5ebdac2a2bbbe6614f9d4096bc9895bd685acdf76414e2c3c1fb7b50d57c738d" + } + } + }, + "content": { + "repo-to-skill.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.skill-factory-design-20261014.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.skill-factory-design-20261014.json new file mode 100644 index 000000000..475209496 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.skill-factory-design-20261014.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Skill factory design detail (historical, 2026-10-14/15)", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md", + "sha256": "0b2e05bb6a4a3b3f6df0b04abc40ec125be60714b87f609a390246ee2a292d2d" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.skill-factory-design-20261014", + "kind": "knowledge", + "entrypoint": "skill-factory-design-20261014.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md", + "byte_range": [ + 0, + 9435 + ], + "sha256": "0b2e05bb6a4a3b3f6df0b04abc40ec125be60714b87f609a390246ee2a292d2d" + } + } + }, + "content": { + "skill-factory-design-20261014.md": { + "path": "workflows/npu-skill-factory/references/skill-factory-design-20261014.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.skillopt.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.skillopt.json new file mode 100644 index 000000000..ba72a590d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.skillopt.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "SkillOpt evidence ledger", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md", + "sha256": "148075daa67e19f4b4351710498438d17c279a9bce56b2d01cab26ff3be33e99" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.skillopt", + "kind": "knowledge", + "entrypoint": "skillopt.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md", + "byte_range": [ + 0, + 3040 + ], + "sha256": "148075daa67e19f4b4351710498438d17c279a9bce56b2d01cab26ff3be33e99" + } + } + }, + "content": { + "skillopt.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/skillopt.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.source-manifest.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.source-manifest.json new file mode 100644 index 000000000..3670b8685 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.source-manifest.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Paper and handoff source manifest", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/source-manifest.json", + "sha256": "716cd49ed01824ee9f6b6fc55ebf2b24fdd5d5a3e677f6e28e34a472616bbe25" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.source-manifest", + "kind": "knowledge", + "entrypoint": "source-manifest.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/source-manifest.json", + "byte_range": [ + 0, + 2431 + ], + "sha256": "716cd49ed01824ee9f6b6fc55ebf2b24fdd5d5a3e677f6e28e34a472616bbe25" + } + } + }, + "content": { + "source-manifest.json": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/source-manifest.json" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.trace2skill.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.trace2skill.json new file mode 100644 index 000000000..38da19d3e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.trace2skill.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Trace2Skill evidence ledger", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md", + "sha256": "230d13b77ba819b5e3edee147523e8cad6bfce95afccc140fb4946d6c8747a2e" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.trace2skill", + "kind": "knowledge", + "entrypoint": "trace2skill.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md", + "byte_range": [ + 0, + 2917 + ], + "sha256": "230d13b77ba819b5e3edee147523e8cad6bfce95afccc140fb4946d6c8747a2e" + } + } + }, + "content": { + "trace2skill.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/references/trace2skill.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/npu-skill-factory.unread_leads.json b/src/inferrsi/knowledge/atoms/npu-skill-factory.unread_leads.json new file mode 100644 index 000000000..53a08389b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/npu-skill-factory.unread_leads.json @@ -0,0 +1,96 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Unread literature lead — separate from the approved extraction", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md", + "sha256": "6c1d87ebe491d27666703149eb05ad582c7e5aff77f0ac5c11a7b89c946f96ee" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "workflow": "checkout:npu-skill-factory" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "id": "npu-skill-factory.unread_leads", + "kind": "knowledge", + "entrypoint": "UNREAD_LEADS.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md", + "byte_range": [ + 0, + 1038 + ], + "sha256": "6c1d87ebe491d27666703149eb05ad582c7e5aff77f0ac5c11a7b89c946f96ee" + } + } + }, + "content": { + "UNREAD_LEADS.md": { + "path": "workflows/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/optimization-search-policy.adaptation-interfaces.json b/src/inferrsi/knowledge/atoms/optimization-search-policy.adaptation-interfaces.json new file mode 100644 index 000000000..05df03563 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/optimization-search-policy.adaptation-interfaces.json @@ -0,0 +1,90 @@ +{ + "authority": "checkout", + "metadata": { + "id": "optimization-search-policy.adaptation-interfaces", + "kind": "knowledge", + "title": "Candidate knowledge records: adaptation interfaces", + "entrypoint": "adaptation-interfaces.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Selecting, ordering and stopping optimization experiments: candidate generation, exploration versus exploitation, mechanism diversity, negative experiment memory, cost-aware escalation, budget allocation and stopping criteria, drawn from vllm-evolve, the TRT-LLM casebook and SkillOpt", + "prerequisites": "The useful work, quality contract, allowed approximations, timing boundary and resource budget are frozen before search, and a complete restartable incumbent is preserved; reading the procedures authorizes no execution, framework change, new resource spending or publication", + "input_contract": "Profiling data, existing config, prior experiment and negative records and the casebook for the current bottleneck class, model and hardware; each target stage's fraction of E2E time; the target, locally measured uncertainty and the authorized budget", + "produced_artifact": "An ordered experiment plan: one candidate change per round with an explicit hypothesis and its motivating evidence, a bounded shortlist of distinct mechanisms with assumptions, uncertainty, expected impact and evaluation cost, negative records turned into search constraints, and a stop-or-switch decision; when authorized rounds run, a recorded verdict per round with best-seen and delivered outcomes kept apart", + "failure_modes": [ + "The evaluation protocol, measurement setup or baseline changes in the same round as the candidate", + "Benchmark budget is spent on a candidate that fails correctness", + "A matching keyword in a rejection record is used as a causal diagnosis or automatic veto, or one failed implementation excludes a whole solution family", + "Expensive work starts on a stage without computing its Amdahl contribution, so a large local speedup yields little E2E gain", + "One mechanism family keeps being sampled only because budget remains, without re-profiling after the limiting stage moves", + "Roofline proximity or a utilization threshold is used as a universal stopping rule", + "Screening is allowed to skip the frozen acceptance regimes or required service-level evidence" + ], + "refusal_point": "Discards a correctness-breaking, worse or inconclusive change instead of integrating it, preserves no-change when candidates cannot be separated, does not count a shortcut outside the authorized semantics as an optimization, and does not let a successful probe qualify a broken final state" + }, + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "paper", + "id": "usenix:osdi24:zhong-yinmin", + "version": "OSDI 24 proceedings, July 2024, pages 193-210", + "url": "https://www.usenix.org/conference/osdi24/presentation/zhong-yinmin", + "sections": [ + "3.3", + "4.1-4.2", + "6.1-6.5", + "7", + "Appendices A-C" + ], + "readset": "references/distserve-phase-placement/source-record.json" + }, + { + "type": "unknown", + "scope": "Pre-existing sources remain in their original procedure/readsets; this amendment does not normalize that inventory" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md", + "sha256": "5e761957cb5ecd93926e6ffc13deee7c830c6e8f0ee3c3846e9dd3b50dc74446" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md", + "byte_range": [ + 0, + 3893 + ], + "sha256": "5e761957cb5ecd93926e6ffc13deee7c830c6e8f0ee3c3846e9dd3b50dc74446" + } + } + }, + "content": { + "adaptation-interfaces.md": { + "path": "playbooks/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/optimization-search-policy.source-notes.json b/src/inferrsi/knowledge/atoms/optimization-search-policy.source-notes.json new file mode 100644 index 000000000..2ade22b22 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/optimization-search-policy.source-notes.json @@ -0,0 +1,90 @@ +{ + "authority": "checkout", + "metadata": { + "id": "optimization-search-policy.source-notes", + "kind": "knowledge", + "title": "Pack F — exact readset and evidence ledger", + "entrypoint": "source-notes.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "Selecting, ordering and stopping optimization experiments: candidate generation, exploration versus exploitation, mechanism diversity, negative experiment memory, cost-aware escalation, budget allocation and stopping criteria, drawn from vllm-evolve, the TRT-LLM casebook and SkillOpt", + "prerequisites": "The useful work, quality contract, allowed approximations, timing boundary and resource budget are frozen before search, and a complete restartable incumbent is preserved; reading the procedures authorizes no execution, framework change, new resource spending or publication", + "input_contract": "Profiling data, existing config, prior experiment and negative records and the casebook for the current bottleneck class, model and hardware; each target stage's fraction of E2E time; the target, locally measured uncertainty and the authorized budget", + "produced_artifact": "An ordered experiment plan: one candidate change per round with an explicit hypothesis and its motivating evidence, a bounded shortlist of distinct mechanisms with assumptions, uncertainty, expected impact and evaluation cost, negative records turned into search constraints, and a stop-or-switch decision; when authorized rounds run, a recorded verdict per round with best-seen and delivered outcomes kept apart", + "failure_modes": [ + "The evaluation protocol, measurement setup or baseline changes in the same round as the candidate", + "Benchmark budget is spent on a candidate that fails correctness", + "A matching keyword in a rejection record is used as a causal diagnosis or automatic veto, or one failed implementation excludes a whole solution family", + "Expensive work starts on a stage without computing its Amdahl contribution, so a large local speedup yields little E2E gain", + "One mechanism family keeps being sampled only because budget remains, without re-profiling after the limiting stage moves", + "Roofline proximity or a utilization threshold is used as a universal stopping rule", + "Screening is allowed to skip the frozen acceptance regimes or required service-level evidence" + ], + "refusal_point": "Discards a correctness-breaking, worse or inconclusive change instead of integrating it, preserves no-change when candidates cannot be separated, does not count a shortcut outside the authorized semantics as an optimization, and does not let a successful probe qualify a broken final state" + }, + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "type": "paper", + "id": "usenix:osdi24:zhong-yinmin", + "version": "OSDI 24 proceedings, July 2024, pages 193-210", + "url": "https://www.usenix.org/conference/osdi24/presentation/zhong-yinmin", + "sections": [ + "3.3", + "4.1-4.2", + "6.1-6.5", + "7", + "Appendices A-C" + ], + "readset": "references/distserve-phase-placement/source-record.json" + }, + { + "type": "unknown", + "scope": "Pre-existing sources remain in their original procedure/readsets; this amendment does not normalize that inventory" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/optimization-search-policy/references/papers-20261015/references/source-notes.md", + "sha256": "54d83c3713045d59a48821bcf93598374ba4a630e3891ad39498f919317c4fb8" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/optimization-search-policy/references/papers-20261015/references/source-notes.md", + "byte_range": [ + 0, + 13370 + ], + "sha256": "54d83c3713045d59a48821bcf93598374ba4a630e3891ad39498f919317c4fb8" + } + } + }, + "content": { + "source-notes.md": { + "path": "playbooks/optimization-search-policy/references/papers-20261015/references/source-notes.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/performance-ceiling-analysis.acceptance-criteria.json b/src/inferrsi/knowledge/atoms/performance-ceiling-analysis.acceptance-criteria.json new file mode 100644 index 000000000..c4554452f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/performance-ceiling-analysis.acceptance-criteria.json @@ -0,0 +1,183 @@ +{ + "authority": "checkout", + "metadata": { + "id": "performance-ceiling-analysis.acceptance-criteria", + "kind": "knowledge", + "title": "Establish acceptance criteria before search", + "entrypoint": "acceptance-criteria.md", + "origin": [ + "external" + ], + "applicability": { + "scope": "inference serving systems (LLM, diffusion, audio)", + "hardware": "any; CUDA examples from sources, NPU adaptation required", + "prerequisites": "profiler access (nsys/ncu or NPU equivalent), or willingness to work at L1 analytical only" + }, + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Acceptance-target preparation is agent guidance: the CLI and pure L1 helper do not infer gates, and unsupported estimates cannot replace user criteria or qualify campaign outcomes.", + "Mooncake's prefix-reuse condition is an analytical approximation; current cache validity, placement, effective rates, overlap and SLO outcomes remain unverified.", + "FlexGen's cross-tier feasibility comparison assumes fitted rates and perfect overlap; relaxed placements may OOM, the printed bls wording remains unresolved, and current compatibility, latency and efficacy are unverified.", + "The HuggingArch checkpoint anchor covers stored weights only. KV size and growth, activation traffic, collectives and end-to-end serving performance stay unanchored by it. Per-rank weight bytes stay unanchored until the second gate passes, and that gate checks the declared layout and format, not the placement a framework uses at run time.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "state": "candidate", + "empirical_validation": "not_run", + "attribution": [ + { + "url": "https://github.com/NVIDIA/TensorRT-LLM", + "commit": "f33e0e5fd55b", + "paths": [ + ".claude/skills/perf-analysis/SKILL.md", + ".claude/skills/perf-nsight-compute-analysis/references/roofline-analysis.md", + ".claude/skills/perf-workload-profiling/SKILL.md", + ".claude/skills/perf-optimization/SKILL.md", + ".claude/skills/perf-optimization-casebook/SKILL.md", + ".claude/skills/exec-env-check/SKILL.md", + ".claude/skills/exec-remote-slurm/SKILL.md", + ".claude/agents/perf-profiling-specialist.md" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/hahnyuan/LLM-Viewer", + "commit": "1893e4b5705d", + "paths": [ + "roofline_model.py", + "model_analyzer.py", + "hardwares/hardware_params.py", + "configs/DiT.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/ebugger/Empirical-Roofline-Toolkit", + "commit": "0771fa9621d0", + "paths": [ + "Empirical_Roofline_Tool-1.1.0/README.md", + "Empirical_Roofline_Tool-1.1.0/Drivers/driver1.c", + "Empirical_Roofline_Tool-1.1.0/Kernels/kernel1.c", + "Empirical_Roofline_Tool-1.1.0/Scripts/roofline.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "type": "paper", + "id": "usenix:fast25-qin", + "version": "FAST '25 proceedings, February 25-27, 2025, pp. 155-170", + "url": "https://www.usenix.org/system/files/fast25-qin.pdf", + "content_sha256": "543e56c541523c5e807d2231370f96749b2294bc901266397a7265b18ae2c130", + "sections": [ + "2.2, Table 1, Equations 1-2", + "3.1 and 5.3 (storage-scope limits only)" + ], + "readset": "references/mooncake-prefix-reuse-feasibility.md", + "license": "UNKNOWN" + }, + { + "type": "paper", + "id": "pmlr-v202-sheng23a", + "version": "ICML 2023 official ten-author edition, PMLR 202:31094-31116", + "url": "https://proceedings.mlr.press/v202/sheng23a/sheng23a.pdf", + "content_sha256": "7cd9673c37640011d38ef4b8595f5e1e09a85b1f803a3734f19c97ca66c75b9e", + "sections": [ + "1 and 3; 4.1-4.3, Figures 1-3, Algorithm 1, Equation 1", + "4.4 (scope boundary only); 6 and 6.1, Tables 2-3 (denominators and ablations)", + "Appendix A.3 selected cost/peak-memory formulas, PDF pages 15-17; A.2 ending only (theorem boundary)" + ], + "readset": "references/flexgen-offload-feasibility.md", + "license": "CC-BY-4.0" + }, + { + "type": "git", + "url": "https://github.com/shenh10/HuggingArch", + "commit": "facbbbc96856e558b9084a94a5070b2e2c86cf0b", + "paths": [ + "docs/validation.md", + "backend/arch/validate/_matching.py", + "backend/arch/validate/_weight_ledger.py", + "backend/arch/validate/_ablation.py", + "docs/parallelism.md", + "docs/evaluation_model.md", + "docs/measured_calibration.md", + "docs/known_limitations.md", + "kernel_bench/emit.py", + "backend/inference/op_calibration.py", + "backend/measure/scope.py", + "LICENSE" + ], + "readset": "references/huggingarch-checkpoint-anchor.md", + "identity": "references/huggingarch-source-identity.json", + "license": "MIT" + }, + { + "type": "document", + "url": "https://shenhan.cc/blog/huggingarch", + "displayed_publication_date": "2026-10-08", + "accessed": "2026-11-10", + "sha256": "31d0e0a9bbf9e32723fb6ab09179fbefb2fbba1043863f1475ecc7ea7ce24ed4", + "readset": "references/huggingarch-checkpoint-anchor.md", + "scope": "Live, unversioned companion post; sections 2.5, 2.6, 3.6 and 3.7 read from one retrieval, whose HTML bytes the sha256 identifies. Published before the pinned commit, so not attributable to it; figures absent from the repository are recorded as unverified.", + "license": "UNKNOWN" + }, + { + "type": "git", + "url": "https://github.com/xLLM-AI/xllm", + "commit": "90f6f13ea3d94334d4b5bd73d9fb23fc66bef1e4", + "paths": [ + "LICENSE", + "THIRDPARTYNOTICES.md", + "docs/src/content/docs/en/features/disagg_pd.md", + "docs/src/content/docs/en/hardware/ascend_npu.md", + "tests/core/scheduler/pd_scheduler_test.cpp", + "version.txt", + "xllm/core/disaggregation/pd_scheduler.cpp", + "xllm/core/disaggregation/pd_service_impl.cpp", + "xllm/core/scheduler/scheduler_factory.cpp", + "xllm/core/scheduler/scheduler_factory.h", + "xllm/core/scheduler/scheduler_policy.cpp" + ], + "readset": "references/xllm-pd-handoff.md", + "license": "Apache-2.0 with component-specific notices" + } + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md", + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + } + ], + "atom": { + "layer": "L3", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md", + "byte_range": [ + 0, + 5917 + ], + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + } + } + }, + "content": { + "acceptance-criteria.md": { + "path": "playbooks/performance-ceiling-analysis/references/acceptance-criteria.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/playbooks/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md b/src/inferrsi/knowledge/atoms/playbooks/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md new file mode 100644 index 000000000..fb351eb03 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md @@ -0,0 +1,29 @@ +# Candidate knowledge records: adaptation interfaces + +All records are candidate and empirically unvalidated. F facts are supported in [source notes](../references/source-notes.md); P entries are proposed integration constraints. These records explain when a method can be considered; they do not implement it. + +## K1 — replay controller eligibility + +- **F source:** Dream-RSI v2 §3/Eq.1 and Appendix D.2/Listing2. +- **F required interface:** root/frontier actions; revealed observations; fixed evaluator; replayable parent–child outcomes; bounded workers; prefix-safe history; explicit grid plan within hard caps. The paper's solve/plan_grid signatures belong to its own implementation contract. +- **F benefit/cost:** many supported policy comparisons can reuse recorded outcomes; policy-development cost and unseen online outcomes remain outside a cheap-replay claim. +- **P applicability:** retain as a knowledge record until an actual supplied system exposes equivalent semantics. A plain transcript with no replayable state or action frontier is insufficient. +- **P counter-signal/failure:** reordered observations leak future information; an evaluator changed across histories; unsupported branches receive fabricated rewards; replay score replaces fresh evidence. Escalate any of these before recommending controller adaptation. +- **P verification idea:** audit support/visibility and later compare a candidate on fresh authorized trajectories. Never infer such a comparison was performed by this pack. + +## K2 — executor versus improver evidence + +- **F source:** AIDE² v1 §§2.1,3.3,3.6; Appendix A Tables1–2. +- **F required interface:** fixed-budget inner tasks return solutions; private grading produces aggregate feedback; outer candidate selection is specified separately. Public/private separation is not the same as an outer-held-out benchmark. +- **F counter-evidence:** stronger task checkpoints are not uniformly stronger across domains; the 3-seed/arm ignition experiment is inconclusive about improver superiority. +- **P operational rule:** store executor and improver claims as separate entries within the existing evidence record. Keep score definitions and budget types attached. Do not replace an improver because its offspring is a better executor. +- **P verification idea:** a future improver comparison needs matched initial incumbents, outer budgets, seeds and independent endpoint evaluation. More expensive nesting must be explicitly approved. + +## K3 — advantage-based action adaptation eligibility + +- **F source:** JitRL v4 §§4–5, Appendix C/F/J. +- **F required interface:** normalized state/action identities; action candidates including eligible retrieved actions; measurable or approximated prior action scores; return-bearing memory; valid-action checks; reward evaluator. Frozen weights are compatible with adaptation, but raw logits access is not universally available. +- **F benefit/cost:** no gradient update; additional retrieval, scoring and evaluator work. Consistency depends on coverage, action frequency, regularity and slow drift; it is not guaranteed by merely retaining trajectories. +- **P operational rule:** record which interface is actually available. Verbalized confidence is not a raw-logit guarantee. If only textual skill loading exists, preserve this as knowledge rather than advertise executable JitRL capability. +- **P counter-signal/failure:** state aliasing, stale rewards, incompatible actions, empty-neighborhood behavior not specified by a current implementation, or approximated priors with unknown calibration. Require a defined fallback rather than transcribing the paper's empty-memory pseudocode divisions. +- **P verification idea:** later isolate retrieval from reranking under identical action support and feedback; measure quality plus complete overhead. Current InferRSI support and efficacy remain unknown. diff --git a/src/inferrsi/knowledge/atoms/playbooks/optimization-search-policy/references/papers-20261015/references/source-notes.md b/src/inferrsi/knowledge/atoms/playbooks/optimization-search-policy/references/papers-20261015/references/source-notes.md new file mode 100644 index 000000000..de52eb5bc --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/optimization-search-policy/references/papers-20261015/references/source-notes.md @@ -0,0 +1,57 @@ +# Pack F — exact readset and evidence ledger + +Candidate; empirical_validation: not_run. F = paper fact or author-reported evidence; P = proposed interpretation. Original full-text PDFs were read, not implementations executed. Retrieved 2026-10-15. No source PDF is redistributed. + +## Existing artifacts inspected first + +The uploaded `reference-matrix.md` methodology section records RRSI as constraint-propagation input to `optimization-search-policy`; SkillOpt/Trace2Skill feed `skill-evolution-playbook`. Uploaded `HANDOFF.md` and the session-handoff text describe repository pipeline work. These are prior-work evidence, not current local inventory. Their referenced pipeline-note bodies and current skill bodies were unavailable in the inspected files. This pack adds paper-level adaptation interfaces, models, experiments and counter-signals; it does not re-mine those repositories or claim a textual patch against unseen files. The earlier six-paper pack's integration notes were reused as the systems/methodology boundary, not re-extracted. + +## F1 — RRSI + +**Pin:** Xia et al., [2609.24972v3](https://arxiv.org/pdf/2609.24972v3), revised 2026-10-04. Full readset: §§2–3.3, Eqs.1–7, Fig.2; §§4.1–4.3, Tables1–4; Appendix A; Appendix D.1–D.3, Algorithms1–2, Eqs.8–17; Table5. Numerical evidence below uses readable table entries, not garbled PDF plot text. + +- **F model/interface:** Frozen backbone; mutable harness includes prompts, control flow, tools, memory, skills and context. Eq.1 separates task score from policy-token cost. This is harness search, not weight training. +- **F proposal:** Cosine-annealed cardinality budget over independently attributable edits (Eq.4); history includes hypothesis, diff, score/cost deltas and selection outcome (Eq.10). A stalled search reserves slots for untried components (Eq.13). Bundled edits inherit the same candidate-level measurement; this is not causal component attribution. +- **F selection:** Critic screens candidate diffs before scoring. Best-ever score minus empirically calibrated noise tolerance is a non-compensatory floor (Eq.5). Above-noise gains face a relative-token-cost allowance (Eq.7); within-noise proposals use a separate score/cost/structural-novelty rule (Eq.17). Coding sets the score weight in that latter rule to zero. Recent component gains generate pruning proposals (Eq.14); deleting a component is not automatically beneficial. +- **F evidence:** Table2, agentic-workspace experiment, same base/frozen policy/evolve set/candidate budget: unregularized evolution has evolve score92.8, held-out ID88.9, three-suite OOD average40.3, 3.80M policy tokens/trial; RRSI90.5/89.2/43.6/2.42M. Base39.7 OOD and1.56M tokens/trial remains cheaper than either evolved arm. Removing proposal regularizers gives41.9 OOD; removing acceptance regularizers41.0. These are grouped ablations, not separate proof for every gate. +- **F setup:** §4.1 uses Claude Opus4.8 as frozen policy/proposer/analyst/critic; Harvey LAB120 evolve and40 ID-held-out tasks. Table5 gives20 workspace rounds and2 trials/task; its thresholds are experimental choices, not InferRSI defaults. Tables3–4 distinguish independently evolved backbones from unchanged-harness transfer. +- **F limits:** Appendix A limits claims to frozen-backbone harnesses and finite evolve sets/budgets. L0/L1/L2 are qualitative analogies; the algorithm does not optimize norm-penalized continuous objectives. Policy tokens omit other resource costs. Isolated gate effectiveness and long-horizon cross-tool-ecosystem robustness are unreported here. +- **P use:** Extend the existing search-policy evidence requirements with scoped edit attribution, noise/cost accounting and held-out transfer, without importing numerical thresholds or enabling harness edits. + +## F2 — Dream-RSI + +**Pin:** Zheng et al., [2609.14858v2](https://arxiv.org/pdf/2609.14858v2), revised 2026-10-06. Full readset: §§2–3, Fig.2, Eq.1; §§4.1,4.4,5, Figs.3,5–7 and Table2; Appendix B.1–B.2/Table3; Appendix D.2/Listing2 interface and prefix-observation restrictions. Related-work titles used only for next-gate leads. + +- **F interface:** Fixed discovery agent, evaluator and execution interface; only exploration-policy code changes. Online action selects up to W root/leaf continuations. Offline replay reveals recorded children in parent-before-child order; a root opens its earliest unrevealed child. It cannot generate an unobserved branch outcome. +- **F objective:** Eq.1 combines normalized quality–call-count frontier hypervolume with sequential-rounds-per-call penalty over five budget preferences. Recorded worlds require positive best score and nonzero node count. This rewards discovery calls and parallelism, not measured dollars or wall-clock time. +- **F selection:** Each offline phase includes the incumbent and3 new policies in the reported settings. Best average historical replay score cannot decrease by selection, but no theorem guarantees online performance on unseen outcomes. +- **F interface detail:** Listing2 requires `OptimalPolicy.solve(self, question, budget=None)` and deterministic `plan_grid(context)` returning a non-null bounded GridPlan. Policies may inspect only revealed observations and prefix-safe historical/structural fields. Plans beyond recorded width/depth are out of replay support; current unrevealed scores are forbidden. These names are paper-specific contracts, not interfaces present in InferRSI. +- **F evidence:** §4.1/Fig.3, four KernelBench tasks, Gemini3.1-Pro, L40S (Appendix B.1), same discovery/evaluator/initialization as Recursive Fixed Exploration: VGG16/LayerNorm reach similar final performance with2.43×/1.79× fewer generations; ConvDiv/ConvMax reach2.09×/1.44× performance at comparable budgets. Appendix B.2 caps kernel runs at9 online rounds,10 workers,110 discovery calls/round,4 policy versions/offline phase. No universal total-cost speedup follows. +- **F counter-evidence:** §5/Table2 ConvDiv all-history1.90 inverse-ms at786 calls versus current-history-only1.59 at430: better quality costs more calls. Fig.6's explicit history-as-guidance treatment lowers final ConvDiv performance; it does not establish that all persistent knowledge is harmful. +- **F harness evidence/limits:** §4.4/Fig.5 improves full89-task Terminal-Bench2.1 score0.7247→0.8090 with2 runs/task and Opus4.8. §4 omits the controlled fixed-policy harness comparison because an extra search is estimated above$100,000. Discovery-call accounting does not include all policy-development/evaluation costs. Novel-branch counterfactual validity and independent isolated replay-objective-component ablations are unreported. +- **P use:** Preserve replay support and immutable evaluator boundaries in a knowledge record. Treat replay as a shortlist signal, not permission to deploy an improved controller or a substitute for fresh authorized evidence. + +## F3 — AIDE² + +**Pin:** Srikanth et al., [2609.26457v1](https://arxiv.org/pdf/2609.26457v1), 2026-09-22, *Recursive self-improvement of AI research agents*. Full readset: §§2.1–2.2/Eqs.1–4/Algorithm1; §§3.1–3.6/Figs.2–7; Appendix A/Tables1–2; Appendix D/Table3; §3.5 and Appendix E prompt-compression discussion. + +- **F interface/objective:** Inner agent searches code under a task-visible metric and fixed budget counting tokens plus solution execution. Its selected solution receives private held-out grading; the outer agent sees aggregate grades and edits the incumbent agent. Inner selection is mutable; outer best-grade selection and task budgets are fixed in the formal loop. Private to the inner agent does not mean unseen by the adaptive outer selection process. +- **F design:** Outer AIDEhuman uses Opus4.7; inner evaluations use Gemini3Flash in the selection experiment. The main8-day100-node trajectory accepts7 rewrites, grade0.703→0.778 (§3.2). This selection trace is not itself independent generalization evidence. +- **F evolved mechanisms:** §3.5 describes UCB1 over five strategy arms with30% softmax sampling, every-five-step cross-arm forks, bounded role-specific context, and up-to-three repeated-error signatures only when bug rate≥15%. These are discovered settings, not isolated optimal values. Its median-based robust-selection penalty preserved ordering and never changed selections in replay. A reported evaluator-crash repair is a paper observation, not authorization to change InferRSI's evaluator. +- **F evidence:** Appendix A/Table1: ALE-Bench AIDE0=1536±33, AIDE85=1790±9, AIDEhuman=1511±35 private contest score;10 tasks×10 seeds, $5 primary cap per run, additional200-step/12-hour caps, Gemini3Flash. FML uses18 tasks×3 seeds,100-step primary cap and GPT5.4 instead. Do not combine these as one uniform compute denominator. ALE solutions use128-vCPU/512GB machines; FML/WeatherBench/KernelBench use A100s; MLE uses CPU containers. +- **F generalization/counter-signals:** §3.3/Fig.3: AIDE47 beats AIDE85 on MLE and WeatherBench; later accepted lineage is not monotonically better on every held-out domain. §3.4 measures reward-hacking rates55%→32% on38 held-out(kernel,training-context) pairs,3 seeds,20-step budget; Appendix A defines the proxy/downstream criterion. It does not causally identify the responsible rewrite. +- **F improver boundary:** §3.6/Fig.7 gives3 seeds/arm×50 outer steps, same AIDE47 starting incumbent: mean endpoints0.780 with AIDE47 improver versus0.782 with AIDEhuman. Authors explicitly call superiority/sample-efficiency inconclusive. Better task optimization does not establish a better improver. +- **F rejected cases:** Appendix D/Table3 contains contextual rejected proposals, including ensembles and several small grade declines described as within noise. These do not prove those algorithm families universally ineffective. Isolated causal ablations of each accepted mechanism are unreported. +- **P use:** Keep executor-quality and improver-quality claims separate. Record rejected proposals as scoped cases, not permanent global prohibitions. Require separate authorization before any harness or evaluator change. + +## F4 — JitRL + +**Pin:** Li et al., [2601.18510v4](https://arxiv.org/pdf/2601.18510v4), revised2026-09-27. Full readset: §§4.1–4.4/Eqs.3–12/Theorems4.1–4.3; §§5.1–5.7/Tables1–9; Limitations; Appendices C–D assumptions/proofs, F/Eqs.23–25, H–J/Tables10–14, L, N/Table19, O/Table20 and P; final Algorithm1. + +- **F mechanism/interface:** Completed trajectories receive evaluator-generated step rewards, discounted into(state,action,return) memory. Retrieved neighbors estimate V/Q and advantages; adjusted candidate-action logits are z'=z+β (Eq.10). Appendix F adds remembered actions to generated candidates, gives them neutral initial logits, normalizes action identity and advantage, and constrains valid actions. No weight update is involved. +- **F access boundary:** §5.1 offers index-token log probabilities or verbalized-confidence-derived logits. The latter is an approximation to an accessible action prior, not raw internal model logits. A system lacking a suitable candidate/action-scoring interface cannot obtain this behavior by merely attaching a text skill. +- **F theorem conditions:** Exact KL-regularized optimizer is conditional on the supplied advantage and reference distribution. Appendix C additionally requires state/policy regularity, unbiased bounded-variance return noise, growing covered memory, k→∞ with k/N→0, growing action counts and vanishing local policy drift. These are stronger than finite-k retrieval from an arbitrary evolving workload. Appendix D is consistency toward the induced KL-regularized policy, not unconditional globally optimal behavior. +- **F evidence:** Table8, main Gemini-2.5-flash setting, uses identical retrieval: on WebArena Admin/Reddit, logit update52.31%/57.64% versus prompt update48.35%/54.57% average success rates. Main WebArena protocol is5 repeated attempts/task; Avg averages all attempts, Final uses attempt5 (§5.2). It is not ordinary one-shot held-out evaluation. +- **F matched counter-signal:** Appendix J.1/Table13, same Llama3.1-70B backbone, training tasks excluding165 WebArena-Lite test tasks, no test adaptation: JitRL40.88% versus WebRL46.06%; reported costs$200 versus$9,900. Thus the broad stronger-performance claim does not hold in this matched offline regime. Main Table9 mixes API-billed training-free use with estimated16-H200 training costs (Appendix P), not identical hardware spending. +- **F overhead/limits:** Appendix N/Table19, Library50 episodes: retrieval rises15–22ms at0–500 entries to47ms at2000–2500 entries; this is not arbitrary-scale latency evidence. Misassigned evaluator rewards and textually aliased states are explicit risks. Appendix F's memory-action augmentation qualifies the main Limitations shorthand that candidates come only from the base model. Table11's50-episode WebArena field conflicts with §5.2's5 attempts; Appendix O's53.0 same-backbone shorthand conflicts with Table14's42.1 Qwen3-32B mean. These are unresolved source inconsistencies, not silently harmonized results. +- **P use:** Keep action reranking as a knowledge-level integration prerequisite record. Do not claim current client support, implement a logits wrapper, or promote an unconditional convergence guarantee. diff --git a/src/inferrsi/knowledge/atoms/playbooks/performance-ceiling-analysis/references/acceptance-criteria.md b/src/inferrsi/knowledge/atoms/playbooks/performance-ceiling-analysis/references/acceptance-criteria.md new file mode 100644 index 000000000..9a29ebeda --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/performance-ceiling-analysis/references/acceptance-criteria.md @@ -0,0 +1,94 @@ +# Establish acceptance criteria before search + +Use this procedure when preparing an inference-optimization task. The agent +resolves criteria and writes the campaign contract; the CLI does not invoke a +skill or infer thresholds when a flag is omitted. + +## Select the source + +1. Read the user's request and any referenced acceptance issue or frozen plan. + **Use supplied criteria unchanged:** retain metrics, units, timing boundaries, + statistics, workload coverage, thresholds and quality/resource constraints. + An estimate may flag an infeasible target but must not replace or relax it. + Conflicting requests and frozen records need resolution by their authorized + owner; do not choose whichever target is easier to pass. +2. If criteria are absent, use [performance-ceiling-analysis](../SKILL.md) to + formulate workload-specific acceptance criteria before candidate search. + Retain partial requirements: derive only missing performance targets and + measurement details, labelling each derived field separately. An unspecified + primary objective that cannot be resolved from task context is a missing + input, not permission to optimize a different objective. +3. Reuse the target's existing correctness/quality contract and retain baseline + semantics. Hardware ceilings cannot determine quality tolerances, an + application SLO or permission to change precision, steps or useful work. + Resolve missing quality requirements from the task and reference validators; + if still unknown, record the gap rather than invent a tolerance. + +Do not add a confirmation round when the user has already delegated goal +formulation and campaign preparation. Use the existing freeze authority; record +agent-derived targets as such, never as user-supplied or user-confirmed numbers. + +## Derive a target when none was supplied + +1. Establish the model, exact hardware/resources, workload, objective and timing + boundary. Measure a comparable baseline and its variation; keep profiler runs + separate from acceptance timing. Collect only within the authorized budget. +2. Apply the skill's analytical, empirical-component and end-to-end levels as + needed. Preserve sources, scope, assumptions and unknowns. These ceiling + levels are distinct from the repository's L0–L4 validation ladder. A pure L1 + Roofline result is a conditional bound, not an attainable service target. +3. Estimate an attainable range using matching component measurements and + exposed critical-path costs. For a serial latency decomposition with + nonoverlapping fractions `f_i` and supported stage speedups `s_i`, compute + `S = 1 / sum(f_i / s_i)` across the uncertainty range. Include unchanged + stages with `s_i = 1`. Overlap, queueing and bottleneck migration require the + corresponding critical-path/capacity analysis instead of summing durations. +4. Choose a conservative target supported by that attainable range and separated + from measured baseline noise. Explain the selected point and any margin in + terms of calibration evidence and the task budget; no universal fraction of + peak or fixed improvement percentage applies. For baseline latency `T0` and + a justified target speedup `S_target`, the absolute target is + `T0 / S_target`, and the relative reduction is `100 * (1 - 1 / S_target)`. + State whether the contract requires an absolute target, a relative gain or + both. A throughput target needs evidence for its own workload and load regime; + do not infer it by inverting service latency. +5. Define the per-workload combination rule, quality checks, guard metrics, + repetitions/statistics and stopping conditions. If no positive target can be + distinguished from noise, retain the incumbent and identify the next useful + calibration or report insufficient headroom. Do not turn that into PASS. + +Missing inputs required by the selected analysis or acceptance contract remain +`INSUFFICIENT_EVIDENCE` in the analysis and `INCONCLUSIVE` for campaign acceptance. +For example, analytical work/traffic bounds need model counts; a supported +empirical stage estimate need not. Comparable baseline, calibration, uncertainty +and quality coverage are still needed for a derived acceptance target. List the +missing measurements and their bounded cost. +Continue authorized preparation/calibration, but do not freeze a made-up number +or start candidate search under unresolved gates. Never use a similar SKU, the +CLI's default threshold, a theoretical maximum or a later candidate result to +fill the gap. + +## Record and freeze the contract + +Write the result into the existing acceptance issue and campaign plan, not a +second goal registry. Record: + +- source per criterion: `user` or `ceiling-derived`, with the request/plan + reference; use `mixed` for a contract retaining both; +- metric, unit, direction, statistic, timing boundary and each workload target; +- baseline identity and samples, analysis/skill revision, input sources, + attainable range, uncertainty and the reason for the selected target; +- quality/resource constraints, required validation coverage, evidence gaps, + budget/stop conditions and who has authority to freeze the contract. + +Freeze the resolved contract and validator/input hashes before candidate search. +Existing frozen campaigns retain their criteria. Changing a frozen goal follows +the campaign's revision policy and preserves prior evidence; it cannot +retroactively qualify an earlier result. + +Map a resolved relative primary-metric target to `--metric-key`, `--metric-unit`, +`--direction`, `--comparison-scope` and `--min-improvement-pct`. Put quality and +additional campaign gates in the appropriate validators; the generic evaluator +does not automatically enforce absolute targets or a multi-workload contract. +`plan` is a preview, not a freeze or a full campaign acceptance check. Only +complete measured evidence satisfying the frozen gates can establish PASS. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget.md new file mode 100644 index 000000000..b31c7ee1c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget.md @@ -0,0 +1,177 @@ +--- +name: training-resource-budget +description: 'Choose training offload and resource-budget changes using pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case. Balance accelerator capacity, CPU work, pinned RAM and local storage; keep host/device transfer exposure distinct from collective network bottlenecks. + + ' +metadata: + inferrsi: | + { + "tags": [ + "training", + "offload", + "resource-budget", + "memory", + "cpu", + "numa" + ], + "status": "candidate", + "profile": "local-skill-v1", + "schema_version": 1, + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "recommendations": [ + "Attribute the state and separate a capacity failure from a throughput bottleneck before choosing an offload surface.", + "Verify the consumer of buffer_size before calculating bytes or tuning it, and measure the executing path before claiming a knob ran.", + "Compare the whole step's critical path, not host capacity alone.", + "Use plan-activation-residency, choose-parallel-training-plan and assess-split-backward-schedule for live-range, parallel-plan and backward-ordering questions." + ], + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." + ], + "provenance_readsets": [ + "references/mindspeed-historical.md", + "references/mindspeed-source-readset.md", + "references/papers-20261015/cases/paper-grounded-cases.md", + "references/papers-20261015/INTEGRATION_NOTES.md", + "references/papers-20261015/knowledge/offload-delta.md", + "references/papers-20261015/notes/training-memory-scheduling.md", + "references/papers-20261015/references/source-readset.md", + "references/sources.md", + "references/stas-decision-notes.md" + ], + "consumption_mode": "packaged" + } +--- + +# Training Cross-Resource Budget Decisions + +Status: candidate. No hardware validation, measured gain or current NPU +compatibility claim. [Source boundaries](references/sources.md) identify exactly +what was inspected; no checkpoint implementations are mined by this skill. + +## Start with ownership and one bottleneck + +Attribute state to parameters, optimizer state, gradients or activations; +record its current memory tier, lifetime and next consumer. Distinguish an +allocation-capacity failure from a throughput bottleneck. A change that enables +a model to fit can still slow each training step. + +Keep a per-host budget for input buffers, checkpoint snapshots, offloaded state, +OS cache and CPU workers. Count the actual ranks sharing that host. Record the +host/device link separately from inter-device/inter-node collective traffic. +A tensor copied to CPU does not establish an InfiniBand/RoCE bottleneck. + +SearchSpace: Accelerator and RAM / Host → Diagnose, Configure, Optimize; +SSD / Storage → Configure, Optimize (DeepSpeed NVMe state); OS / System → +Diagnose, Configure (CPU share/locality/garbage-collection attribution). +Network → Observe, Diagnose, Verify only through the scoped expert collective +measurement principles, not through CPU/NVMe offload itself. + +## CR1 — DeepSpeed offload decision surfaces + +| Surface | Inspected contract | Decision consequence | +|---|---|---| +| Parameter offload `device=cpu/nvme` | ZeRO stage 3 only | Establish parameter state residency before spending buffers or CPU RAM | +| Optimizer offload `device=cpu/nvme` | Stages 1/2/3; computation remains on CPU for either target | NVMe placement does not remove CPU optimizer demand | +| Parameter `max_in_cpu` | Parameter **elements** retained in CPU when NVMe is enabled | Convert using actual dtype/storage; this is not a byte or total-host-memory cap | +| Parameter `buffer_count`, `buffer_size` | NVMe buffer-pool count and size | The approved config/doc excerpt does not explicitly define `buffer_size` units; verify its consumer before calculating bytes or tuning it | +| Optimizer `buffer_count` | At least the number of optimizer states per parameter; source illustrates Adam's four | Do not transplant the parameter-pool count or assume all optimizers have identical states | +| `pin_memory` | Defaults True at this pin; page-locked CPU memory supports async transfers/overlap | Budget resident memory and existing memlock allowance; no privileged limit change authorized | +| `pipeline_read` / `pipeline_write` | Next-tile read / previous-tile write overlap with current optimizer tile compute | Applicable to tiled ZeRO-Infinity execution; configuration presence does not prove actual overlap | +| `ratio` | Fraction in [0,1] for CPU Adam, stage 3 only | Not a general placement ratio for parameters or activations | +| `super_offload`, `cpuadam_cores_perc` | Superchip CPU offload; core fraction valid with stage 3 plus `super_offload=True` | Not a universal CPU throttle or generic recommendation on every host | +| `fast_init` | NVMe optimizer initialization | Startup cost and steady-state step time have different denominators | + +A justified overlap proposal needs evidence that compute can hide the relevant +read/write segment, sufficient CPU/pinned-RAM/storage capacity and unchanged +state semantics. Measure the executing path before claiming a knob ran. The +config schema and live documentation are not dispatch/performance evidence. + +## CR6 — Attributed expert diagnosis + +Read [the scoped Stas Bekman note](references/stas-decision-notes.md) for +MFU/HFU denominator checks, transient-versus-sustained compute, collective +measurement semantics, NUMA locality and garbage-collection stragglers. This +note explicitly retains CC BY-SA 4.0 attribution and share-alike conditions; +no upstream runbook commands or automatic-update instructions are adopted. + +Use these principles to form a hypothesis, not to import a platform tuning +constant. Garbage-collection or affinity changes require separate task +approval and memory/correctness evidence; this extraction changes neither. + +## CR5 — Historical NPU case + +[MindSpeed adaptive memory](references/mindspeed-historical.md) illustrates +spending spare NPU memory versus CPU swapping/recomputation. Preserve the +`core_r0.8.0` exclusions and distinguish its validation assertions from the +separate feature-selection guard. The [pinned source readset](references/mindspeed-source-readset.md) +recovers the historical full revision and license, allocator-to-swap callback +and 910A/910B affinity branch. Check compatible allocator symbols, tracked +swappable storage, host capacity and actual device/NUMA/CPU mapping before +separately authorized reuse; `npu-smi` and `lspci` presence alone is insufficient. +One reported comparison changes layer count; its headline gain is not reused. +Current-stack compatibility, whole-model correctness and measured benefit remain +unverified. These historical source observations do not establish current Ascend +support. + +## Paper-derived training decisions + +[ZeRO-Offload ownership and semantics](references/papers-20261015/knowledge/offload-delta.md) +extends the configuration evidence above with CPU optimizer state/compute +colocation, shard ownership and tiled update/return costs. Compare the whole +step's critical path, not host capacity alone. Delayed parameter updates change +training semantics and require explicit approval and quality evidence; ordinary +overlap does not imply permission for staleness. + +Use [activation residency](../plan-activation-residency/SKILL.md) for live-range, +address-packing and rematerialization choices; +[parallel training plans](../choose-parallel-training-plan/SKILL.md) for stage, +mesh and sharding choices; and +[split backward](../assess-split-backward-schedule/SKILL.md) for input-gradient +versus weight-gradient ordering and optimizer post-validation. These are distinct +contracts: activation checkpoints are not restart snapshots, Alpa's conditional +plans are not unrestricted global optima, and Zero Bubble's rollback preserves +semantics rather than authorizing ZeRO-Offload's stale updates. + +The [mechanism comparison](references/papers-20261015/notes/training-memory-scheduling.md), +[readset](references/papers-20261015/references/source-readset.md) and +[hypothetical cases](references/papers-20261015/cases/paper-grounded-cases.md) +retain resource costs, counter-signals and unresolved table discrepancies. +Paper versions are separate from the DeepSpeed implementation pin. No current +runtime, NPU support or measured application outcome follows from these notes. + +## Candidate decision record + +For each proposal, retain: + +1. The observed limiting interval and owning state/resource. +2. The exact source version and enabled execution mode. +3. Capacity released and resources consumed, with units and uncertainty. +4. Overlap readiness/mutation boundaries and expected contention with input, + checkpoint and network activity. +5. Fixed-workload training step/throughput and correctness evidence required + for later validation; initialization and auxiliary metrics separately. + +No broad source expansion, newest-wheel installation, scheduler-priority +changes, benchmarks or failure injection follow from this skill. Source +support and extracted coverage remain separate from measured improvement. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/mindspeed-historical.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/mindspeed-historical.md new file mode 100644 index 000000000..70bc0da5f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/mindspeed-historical.md @@ -0,0 +1,112 @@ +# Historical MindSpeed adaptive-memory case + +Reference entry CR5. Initial documentation inspection: 2026-10-15. Historical +source follow-up: 2026-10-30. This remains a source-derived candidate with no +current runtime or compatibility qualification. + +## Provenance and permitted reuse + +[Original document](https://gitcode.com/Ascend/MindSpeed/blob/core_r0.8.0/docs/features/adaptive-memory.md), +branch `core_r0.8.0`; the 2026-10-15 inspection recorded page history +`53193db8`, 2025-06-04. Full revision, license and implementation were unresolved +at that inspection. Retrieved HTML SHA-256: +`773d702b932534f96d037c07156604d7dd9e4c3b82f4a0a6e6e8ff70e5365eef`. +The document body was readable then; its named implementation was not retrieved. + +The 2026-10-30 follow-up resolved the original page's commit link to +[`53193db8bf5def407c4041a9beb3f4c9e9773daf`](https://gitcode.com/Ascend/MindSpeed/commit/53193db8bf5def407c4041a9beb3f4c9e9773daf). +The official Ascend/MindSpeed [GitHub commit](https://github.com/Ascend/MindSpeed/commit/53193db8bf5def407c4041a9beb3f4c9e9773daf) +has the same identity, the `!2378` README-update message and commit timestamp +`2025-06-04T04:43:14Z`. The pinned document and bounded implementation were read +at that revision; the [source readset](mindspeed-source-readset.md) distinguishes +those new observations from the original HTML snapshot. The snapshot hash is +retained as historical evidence, not claimed to hash the fetched Markdown. + +Historical license evidence is the same pin's [root LICENSE](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/LICENSE): +BSD-3-Clause terms apply by default unless otherwise noted, with separate +third-party terms for identified files. The adaptive-memory document has no +separate license notice; `docs/LICENSE` is absent at this pin. The README's MIT +badge does not replace the root terms, and a later branch's documentation license +does not resolve historical rights. Attribution remains Ascend/MindSpeed, with +Bytedance, Huawei and NVIDIA copyright notices retained in the linked license. +This note independently paraphrases mechanisms; no upstream code or prose is +copied or adapted into an executable helper. + +## Incremental decision + +The documented trigger is **unused NPU memory under full recomputation**. +The document describes lossless tensor swapping, strategy generation/search, +SwapManager and allocator integration to choose how much state to retain versus +move to CPU. The document describes intercepting out-of-memory conditions via +PTA's `NPUPluggableAllocator`, allowing SwapManager to intervene. This is a +source design claim. The bounded source observations below confirm the allocator +callback path, not the complete search algorithm or whole-model losslessness. + +Derived decision: assess retained activation capacity, recomputation work and +NPU↔CPU transfer exposure together. Less recomputation can spend host RAM and +host/device bandwidth. This does not demonstrate a network optimization, nor +a guarantee that OOM interception makes arbitrary workloads safe. + +## Historical configuration boundary + +| Surface documented at this branch | Constraint | +|---|---| +| `--adaptive-memory-optimization` | Historical opt-in flag, not a recommendation for current releases | +| Full recomputation; adaptive selective recomputation; `swap-attention`; `recompute-in-bubble` | Documented incompatible combinations; do not combine policies merely because their memory objectives overlap | +| Memory-fragmentation optimization | Both modify PyTorch memory management; document says an assertion rejects simultaneous enablement | +| CPU affinity | Document names `npu-smi` and `lspci`; the source has additional topology/tool and SoC conditions below | +| Custom `torch.autograd.Function` integration | The document names `adapt_mem_func_wrapper`; its pinned implementation accepts a `torch.autograd.Function` subclass and selects profiling, recomputation, swap or the original `.apply` by phase/action | + +## Pinned implementation decisions + +Use the [exact paths and line ranges](mindspeed-source-readset.md) for these +observations, all inspected 2026-10-30 at the historical revision above. + +1. **Check effective selection before allocator assumptions.** `arguments.py` + rejects adaptive recomputation, configured `recompute_granularity` or + `recompute_method`, `recompute_activation_function`, `swap_attention`, + `recompute_in_bubble`, memory fragmentation and `ampipe_degree > 1`. + Separately, `megatron_adaptor.py` only installs the adaptive-memory wrappers + and allocator when the flag is true and adaptive recomputation, fragmentation, + swap-attention and `smart_swap` are false. The `smart_swap` exclusion is a + dispatch guard, not the same validation assertion. A present flag alone does + not establish that this policy was selected. +2. **Treat the allocator as a process runtime dependency.** That dispatch branch + invokes `change_allocator()`, whose builder loads the historical C++ extension. + It supplies `my_malloc`/`my_free` to TorchNPU's `NPUPluggableAllocator`, changes + the current allocator and installs init/reset/stat callbacks. The builder + depends on PyTorch/TorchNPU headers and links `torch_npu`; API names alone do + not establish compatibility with another wheel or CANN stack. +3. **Bound OOM rescue to its captured state.** After ordinary allocation/cache + attempts fail, the C++ allocator calls `common.swap_out_by_size(size)` and + retries. `common.py` routes to the adaptive-memory manager under this flag. + Its saved-tensor hooks track eligible tensors; rescue moves shared storage + through pinned CPU memory and restores it for unpack. The manager returns + false when no tracked tensor is eligible, and the allocator retains an OOM + error path. This mechanism does not promise recovery for arbitrary allocations + or unlimited host capacity. Charge shared storage once and account for its + return before the backward consumer, rather than counting tensor views as + independent savings. +4. **Check the historical affinity branch and topology.** Setup calls `bind_cpus` + only when `acl.get_soc_name()` contains `910A` or `910B`. The helper queries + `npu-smi`, `lspci` and `lscpu`, then sets process affinity through `psutil`. + It derives NUMA CPU ranges from `lscpu`, uses a contiguous device-ID range, + and assigns CPUs per device from a historical `ratio=0.5` default or + `CPU_BINDING_NUM`. These are source assumptions, not a recommended CPU share. + Before separate authorized reuse, reconcile visible device numbering, parsed + topology and granted CPU affinity; command presence alone is insufficient. + Reading this case authorizes no package installation or affinity change. + +## Evidence quality + +The document reports cropped GPT-175B experiments on eight NPUs. One comparison +uses `NL=8` for adaptive memory and `NL=3` for full recomputation. Its headline +percentage is not a controlled fixed-workload gain and is deliberately not +carried into coverage or performance claims. Other tables remain author reports; +no raw traces, correctness outputs or matched reruns were inspected. + +Still open: current torch/TorchNPU/CANN/MindSpeed compatibility, complete strategy +search and cache behavior, actual transfer exposure, whole-model correctness and +measured end-to-end benefit. The historical full revision and default license +terms are now recoverable; the selected allocator, wrapper and affinity paths +are source observations only. No hardware run or failure injection was performed. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/mindspeed-source-readset.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/mindspeed-source-readset.md new file mode 100644 index 000000000..4ddf367ab --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/mindspeed-source-readset.md @@ -0,0 +1,55 @@ +# MindSpeed historical source readset + +Source: [Ascend/MindSpeed](https://github.com/Ascend/MindSpeed), historical +`core_r0.8.0` document commit +`53193db8bf5def407c4041a9beb3f4c9e9773daf`. Inspected 2026-10-30. +The [historical case](mindspeed-historical.md) retains the separate 2026-10-15 +documentation inspection and original HTML hash. + +## Identity and rights + +- The [original GitCode page](https://gitcode.com/Ascend/MindSpeed/blob/core_r0.8.0/docs/features/adaptive-memory.md) + links its abbreviated history entry to the [full commit](https://gitcode.com/Ascend/MindSpeed/commit/53193db8bf5def407c4041a9beb3f4c9e9773daf). + The official [GitHub commit API](https://api.github.com/repos/Ascend/MindSpeed/commits/53193db8bf5def407c4041a9beb3f4c9e9773daf) + reports that SHA, `!2378` README-update message and timestamp + `2025-06-04T04:43:14Z`. The branch name remains a moving reference; every source + link below uses the recovered full revision. +- [Root LICENSE, lines 1–34](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/LICENSE#L1-L34): + default BSD-3-Clause terms unless otherwise noted, including Bytedance, Huawei + and NVIDIA attribution. The rest of the file supplies identified third-party + exceptions; do not relabel the entire repository with a single guessed license. + No separate license notice appears in the selected adaptive-memory document. + The [historical `docs/LICENSE` path](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/docs/LICENSE) + returned 404. No later license is substituted for this pin. +- [README](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/README.md#L901-L917), + version table only: historical Core/PyTorch and in-development stack entries, + not a complete frozen runtime stack. Its MIT badge near the beginning is not + the inspected root license text. [Package version](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/setup.py#L11-L16) + is `0.8.0`; `setup.py` was read, not executed. + +## Bounded implementation reads + +Paths are relative to that repository. Listed sections support the stated +decision only; surrounding framework internals and the full solver are not +audited. + +| Pinned source | Inspected section | Observation used by the owner | +|---|---|---| +| [docs/features/adaptive-memory.md](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/docs/features/adaptive-memory.md) | Whole short document | Trigger, mechanism attribution, exclusions, wrapper requirement, affinity prerequisites and mismatched-layer performance table | +| [mindspeed/arguments.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/arguments.py#L353-L354) | Flag 353–354; [validation 839–849](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/arguments.py#L839-L849) | Default-off flag; explicit rejection of conflicting configurations, including ampipe and activation recomputation | +| [mindspeed/megatron_adaptor.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/megatron_adaptor.py#L639-L656) | 639–656; adaptation call 1077 | Effective selection guard, including `smart_swap`; allowed layer and setup-wrapper registration; allocator replacement | +| [mindspeed/core/memory/adaptive_recomputing/pluggable_allocator_adpator.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/core/memory/adaptive_recomputing/pluggable_allocator_adpator.py) | Whole 24-line adapter | Shared historical allocator builder, allocation/free symbols and current-allocator/stat callback setup | +| [mindspeed/op_builder/adaptive_recomputing_builder.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/op_builder/adaptive_recomputing_builder.py) | Whole short builder; `op_builder/__init__.py` import mapping | Extension source, PyTorch/TorchNPU includes and `torch_npu` link dependency | +| [mindspeed/ops/csrc/pluggable_allocator/adaptive_recomputing/NpuCachingCustomAllocator.cpp](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/ops/csrc/pluggable_allocator/adaptive_recomputing/NpuCachingCustomAllocator.cpp#L44-L53) | Allocation forwarding 44–53 | Exported allocator reaches the device allocator defined in the header | +| [mindspeed/ops/csrc/pluggable_allocator/adaptive_recomputing/NpuCachingCustomAllocator.h](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/ops/csrc/pluggable_allocator/adaptive_recomputing/NpuCachingCustomAllocator.h#L548-L678) | Allocation/retry/callback/OOM 548–678; exports 1572–1592 | Failed cache/allocation attempts reach Python `common.swap_out_by_size`; false ends rescue; OOM remains possible | +| [mindspeed/core/memory/common.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/core/memory/common.py) | Whole 11-line router | Adaptive flag selects adaptive-memory rather than adaptive-recomputation SwapManager | +| [mindspeed/core/memory/adaptive_memory/adaptive_memory_swap_manager.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/core/memory/adaptive_memory/adaptive_memory_swap_manager.py#L231-L378) | Copy state 25–84; eligibility 120–141; rescue pack/unpack, shared storage and selection 231–378; layer hooks 375–415 | Rescue concerns tracked eligible saved tensors; shared-storage CPU move/restore, pinned allocation and false result when none is eligible | +| [mindspeed/core/memory/adaptive_memory/adaptive_memory_opt.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/core/memory/adaptive_memory/adaptive_memory_opt.py#L189-L213) | Setup 189–213 | Optimizer/profiling hooks; CPU binding conditional on 910A/910B SoC; cache loader identified only | +| [mindspeed/core/memory/adaptive_memory/cpu_binder.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/core/memory/adaptive_memory/cpu_binder.py) | Whole 110-line helper | `npu-smi` → PCIe → `lspci` NUMA → `lscpu` CPU ranges; contiguous-device assumption, historical ratio/env selection and process-affinity mutation | +| [mindspeed/core/memory/adaptive_memory/adaptive_memory_function.py](https://github.com/Ascend/MindSpeed/blob/53193db8bf5def407c4041a9beb3f4c9e9773daf/mindspeed/core/memory/adaptive_memory/adaptive_memory_function.py#L99-L136) | Saved-tensor wrapper and action dispatch 99–136 | Explicit autograd-subclass integration; phase/action-specific profiling, swap, checkpoint or original `.apply` | + +The solver, policy cache, complete prefetch schedule, framework allocator ABI, +device kernels and model training results remain outside this bounded extraction. +The builder and binder are referenced for their prerequisites; neither is copied, +imported or executed by this skill. No current-stack or numerical qualification +follows from source inspection. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md new file mode 100644 index 000000000..69b17c8ba --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md @@ -0,0 +1,60 @@ +> Supplier integration proposal, preserved as historical source context (2026-10-15). The local owner review and current two matrices govern acceptance; suggested follow-ups and permission statements below do not authorize work or describe the current inventory. + +# Pack C integration proposals + +Status: candidate; empirical_validation: not_run. Independent five-paper, fulltext-derived expansion. F = source facts/models/results; P = proposed operational rules. No empirical validation, install, reproduction, framework run, hardware work, InferRSI modification, matrix edit or PR has occurred. Source PDFs/text/render caches are outside this deliverable tree and are not redistributed. + +## Deliverable routes + +- [Compact mechanism notes](notes/training-memory-scheduling.md): twelve mechanism cards with objective, assumptions, variables/constraints, action, benefit/cost, evidence, limits/counter-signals and candidate rule. +- [Exact readset and metric audit](references/source-readset.md): all five version pins, actual sections/equations/figures/tables read, rendered-page checks, author-reported workload/baseline/hardware/denominator and missing evidence. +- [Offload extension](knowledge/offload-delta.md): incremental ZO1–ZO3 knowledge for the existing skill. +- [Review cases](cases/paper-grounded-cases.md): hypothetical failure/decision cases, not executed evaluations. +- [plan-activation-residency](../../../plan-activation-residency/SKILL.md), [choose-parallel-training-plan](../../../choose-parallel-training-plan/SKILL.md), [assess-split-backward-schedule](../../../assess-split-backward-schedule/SKILL.md): three candidate skills, selected by distinct decision boundaries rather than one skill per paper. + +P, grouping rationale: Checkmate and OLLA jointly inform retain/recompute/order/address choices and need one shared feasibility check. Alpa changes partition/mapping/resharding choices, so it remains separate from fixed-pipeline scheduling. Zero Bubble introduces an independent backward-order and optimizer-validation gate. ZeRO-Offload belongs in the earlier training-offload skill instead of duplicating its tensor-tier accounting. None is promoted or empirically validated. + +## Existing artifacts inspected first + +- Offload synthesis (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `notes/offload.md`) +- Offload source audit (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `notes/references/offload-source-notes.md`) +- Training-offload skill (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `diagnose-training-offload/SKILL.md`) +- Training-offload references (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `diagnose-training-offload/references/source-notes.md`) +- Previous integration notes (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `INTEGRATION_NOTES.md`) + +These are semantic paths in the identified prior archive, not local hyperlinks or files bundled again. Resolve them to the approved repository inventory during integration. Existing ZeRO-Infinity coverage is retained: phase/class/tier budgets, prefetch/buffer pipelines, tiling, initialization and tied/external parameters. New evidence concerns CPU optimizer ownership/staleness, legal lifetime shortening, event-level rematerialization, static address packing, heterogeneous parallel plans and split-backward scheduling. + +## P: Only the two official matrix destinations + +The following are repository-relative link proposals, not local matrix edits or invented row IDs. Official paths are docs/reference-matrix.md and docs/searchspace-matrix.md. Any older matrix-path suggestion is superseded by these two official destinations. Live rows/anchors were not inspected. There is no third matrix. + +For docs/reference-matrix.md: +- Add ZeRO-Offload 2101.06840v1 → ZO1–ZO3 → offload extension and readset; mark the old next-gate lead as read only when integration is approved. +- Add Checkmate 1910.02653v3 → CM1–CM2 and OLLA 2210.12924v2 → OL1–OL2 → activation-residency skill/readset. OLLA likewise advances from the earlier unread lead after approved integration. +- Add Alpa 2201.12023v3 → AL1–AL2 → parallel-plan skill/readset. +- Add Zero Bubble 2401.10241v1 → ZB1–ZB3 → split-backward skill/readset. + +For docs/searchspace-matrix.md, propose semantic cross-links using existing taxonomy/row IDs after local reconciliation: +- Accelerator × Observe/Diagnose/Optimize/Verify: live ranges, per-event capacity, rematerialization, reserved-address packing, shard/mesh feasibility, pipeline passes and total device memory. +- RAM/host-compute evidence × Observe/Diagnose/Optimize/Verify: optimizer residency/update/copy and host-resource ownership, extending the existing offload entry. This is not an additional SSD technique. +- Communication/Network × Observe/Diagnose/Optimize/Verify only for actual inter-node reduce-scatter/allgather, cross-mesh resharding or pipeline transfers. Local GPU collectives remain Accelerator topology. H2D/D2H and same-host IPC do not become Network entries. +- Configure, where the existing matrix uses it, must point to a later separately authorized current-implementation gate. These paper plans do not prove current framework/NPU support. No generic OS/VM-tuning or persistent recovery-checkpoint rule follows from this pack. + +## Evidence boundaries that must survive integration + +- Checkmate's headline batch-capacity increase is constrained model evidence; OLLA's runtime saving is estimated over an assumed million iterations. Neither should become a measured end-to-end speed claim. +- Alpa is hierarchical and approximate in important respects: zero compute-cost simplification inside intra-op search, omitted inter-stage transfer, external microbatch count, static shapes/schedules. Do not advertise globally optimal mixed-parallel execution. +- Zero Bubble's calculated bubble rates, ideal formulas and measured throughput are distinct. Similar activation caps do not mean identical total memory. Table 6's fixed-global-batch comparison is preferable to Table 11's ambiguous/changing-batch rows. +- ZeRO-Offload DPU changes update semantics; Zero Bubble post-validation intends to preserve them through validation/rollback. Keep separate gates. +- Source inconsistencies are flagged rather than repaired: ZeRO-Offload Table 1; Alpa Wide-ResNet size rounding; Zero Bubble Table 11 microbatch labels and missing Table 9 time units. + +## Unread next-gate leads + +These are leads named in the five papers' references, not additional reviewed evidence. Stop the current batch at five papers. + +- AutoTM (ZeRO-Offload reference 8): joint tensor movement with heterogeneous memory could address transfer decisions absent from Checkmate/OLLA; no mechanism imported here. +- Capuchin (ZeRO-Offload reference 17): a possible recomputation-plus-movement comparison; not read. +- Reducing Activation Recomputation in Large Transformer Models (Zero Bubble reference list): a possible check on Transformer-specific saved-tensor assumptions; not read. +- Piper (Alpa related work): an alternate mixed-parallel search boundary; not read. + +A later gate may also review author-linked implementation at an explicit revision for compatibility. No such source inspection or validation is implied by this delivery. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md new file mode 100644 index 000000000..15449ba32 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md @@ -0,0 +1,51 @@ +# Paper-grounded review cases + +Status: candidate; empirical_validation: not_run. All scenarios and proposed decisions below are P, hypothetical review cases. Their F evidence is historical and linked. These were not executed as tests and are not claims about an actual user workload. + +## C1. OOM with low live-byte demand but high reserved memory + +Signal: a stable graph's phase-aligned live tensor total is well below the allocator peak, and the requested large allocation cannot fit an available range. + +Decision: distinguish reserved-byte fragmentation from unavoidable live data. Consider legal address reuse after lifetime proof before buying transfer/recomputation overhead. Keep size/alignment/workspace and asynchronous overlap in the accounting. Do not assume a reserved/live difference alone proves external fragmentation; cached free blocks and unaccounted workspaces must be resolved. + +F basis: OLLA §§3.3–3.5, §5.4/Fig. 8. Its fragmentation percentage is (reserved−resident)/reserved at the reserved-memory peak, not a universal multiplier. Acceptance idea: later evidence shows the same graph's peak reserved memory falls without illegal overlapping aliases or a latency regression. Stop if shapes/lifetimes are unstable. [OL2](../notes/training-memory-scheduling.md) + +## C2. Large forward activations remain live across a nearly linear graph + +Signal: activations dominate at large batch, few independent operators can be reordered, and CPU offload would expose transfer waits. + +Decision: propose selective retain/recompute alternatives with event-level peak memory, adding recompute cost to the same critical-path ledger. Do not expect OLLA's small-batch gradient-order savings to carry over. Do not change global batch merely because more input could fit. + +F basis: OLLA §5.3 limits; Checkmate §4/Eqs. 1–9 and Fig. 5. Acceptance idea: same-model/batch/precision proposal preserves dependencies, fits worst-case memory including output-before-release, and has a justified step-time benefit versus supplied offload costs. Missing transfer/operator timing leaves the performance choice unresolved. [CM1/OL1](../notes/training-memory-scheduling.md) + +## C3. Approximate rematerialization has low objective cost but exceeds memory + +Signal: rounded retention plan has dependency-valid recomputations and a favorable FLOP estimate, yet its replayed lifetime ledger exceeds the actual budget. + +Decision: reject feasibility, regardless of closeness to an LP/ILP objective. Record dependency validity and capacity violation separately. A different margin, policy or exact incumbent may be considered on paper; a solver timeout does not establish no feasible plan exists. + +F basis: Checkmate §5.3 explicitly does not preserve capacity under rounding; Table 2 averages ratios only across feasible budgets. Acceptance idea: an actual feasible schedule/capacity proof under the chosen accounting, not a 1.06 mean-cost claim. [CM2](../notes/training-memory-scheduling.md) + +## C4. One pipeline stage is weight-heavy while earlier stages are activation-heavy + +Signal: uniform layer counts create per-rank OOM or a bottleneck despite spare memory elsewhere; the cluster has fast local links and slower inter-node links. + +Decision: compare uneven stages/mesh sizes and varying operator shard axes. Include layout conversion and in-flight activations; prefer a simple uniform fallback if the model is homogeneous or planning cannot amortize. Do not substitute weak-scaling PFLOP/s for fixed-work speed. + +F basis: Alpa §5/Eqs. 2–5, §8.3, §8.6/Fig. 12; 16-GPU Wide-ResNet uses 4/4/8-GPU stages. Acceptance idea: same global batch and total hardware, actual cross-node transfer included, all rank peaks feasible, and useful whole-step improvement. [AL1/AL2](../notes/training-memory-scheduling.md) + +## C5. Lower modeled pipeline bubbles require smaller microbatches + +Signal: a larger activation cap allows ZB-2p-like scheduling only by reducing microbatch size; small kernels lose utilization. + +Decision: compare 1F1B, capped split backward, V placement and b/2 plus 2m at fixed global batch and similar total memory. Choose useful throughput, not zero-idle theory. Do not splice Table 4's different memory budgets with Table 11's changing global batches. + +F basis: Zero Bubble §6.1/Table 6; 6.2B favors ZB-2p* over V while 28.3B's listed base b2,m96 favors V slightly. Table 7 demonstrates microbatch sensitivity but changes global batch. Acceptance idea: matched-workload latency/throughput, per-pass timing and actual peaks; computed bubble rate is supporting model evidence only. [ZB1/ZB2](../notes/training-memory-scheduling.md) + +## C6. "Overlap the optimizer" hides two different semantic choices + +Signal: a plan proposes overlapping next-step forward work with optimizer processing and labels the change a harmless schedule optimization. + +Decision: ask which mechanism is intended. ZeRO-Offload DPU deliberately accepts one-step stale updates; Zero Bubble post-validation intends synchronous semantics with complete global validation and rollback/redo. Neither permits dropping clipping/NaN decisions. Keep ordinary synchronized execution as the fallback until the selected mechanism's semantics and implementation evidence are explicit. + +F basis: ZeRO-Offload §5.2/§6.2.4 versus Zero Bubble §4/Appendix C and Table 10. Acceptance idea: DPU requires separately approved training-semantics/quality criteria; post-validation requires numerical rollback, validation and dependent-work coverage. Historical BERT F1 or fixed-seed loss matching is insufficient for universal approval. [ZO3/ZB3](../notes/training-memory-scheduling.md) diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md new file mode 100644 index 000000000..76ad3fb1a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md @@ -0,0 +1,15 @@ +# Incremental extension to training-offload knowledge + +Status: candidate; empirical_validation: not_run. F = source fact; P = proposal. Local ownership is training-resource-budget. The supplier's earlier diagnose-training-offload archive is unavailable in this integration; its prior coverage is a carried supplier claim, not a locally imported capability. [Exact ZeRO-Offload v1 evidence](../references/source-readset.md), [ZO1–ZO3 cards](../notes/training-memory-scheduling.md). + +## Retain existing coverage + +The previous offload notes (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `notes/offload.md`) and source audit (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `notes/references/offload-source-notes.md`) already explain phase memory, slow-tier pipelines, collective reconstruction, tiling, initialization and external/tied parameters. Do not duplicate these as new discoveries. + +## P: Proposed additions + +- Before choosing tensor offload alone, inspect whether moving the optimizer computation with its FP32 state reduces required traffic. Record CPU/update ownership and avoid redundant per-rank host work. F source: ZO §§3–4. +- Distinguish optimizing CPU update from enabling delayed updates. CPU-Adam vectorization/threading/tile-copy is a system optimization; DPU changes training semantics. F source: ZO §§5.1–5.2 and §6.2.4. +- Include an offload-free fallback when all ranks can fit adequate microbatches. F counterexample: ZeRO-2 surpasses ZeRO-Offload at 64/128 GPUs in the 10B experiment (§6.2.3/Fig. 11). +- Do not carry the Table 1 printed memory figure into a universal byte ledger: its final 4M/8× row conflicts with a 16M baseline. Re-derive actual optimizer/precision/buffer accounting as the existing skill already requires. +- If exact execution is required, leave one-step DPU out. If a user separately accepts changed semantics, propose representative convergence/quality checks; the historical GPT-2/BERT tests do not authorize it. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md new file mode 100644 index 000000000..dd485bd4d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md @@ -0,0 +1,115 @@ +# Training memory and scheduling: incremental mechanisms + +Status: candidate; empirical_validation: not_run. F = pinned-source fact/model/measurement; P = proposed procedure. This is paper-derived planning, not a tested recipe. [Pins, exact readset, metrics and caveats](../references/source-readset.md). The labels ZO/CM/OL/AL/ZB refer to the five source entries there. + +## P: Joint decision boundary + +Start with the existing ZeRO-Infinity offload notes (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `notes/offload.md`) and training-offload procedure (prior archive `omnirsi-paper-intelligence-2026-10-15.zip`, semantic path `diagnose-training-offload/SKILL.md`). They already cover tensor-class/tier accounting, retrieval pipelines, tiling, initialization and nonlocal ownership. This pack adds a decision among changing optimizer residency, tensor lifetimes, recomputation, operator partitions and fine-grained execution order. None of these papers supplies one globally optimal solver for all five choices together. + +Use one phase-aware capacity/critical-path record: model states; live activations and gradients; operator/workspace peaks; simultaneous transfer buffers; host/device capacity; shape/batch/precision; dependency graph; CPU, accelerator, transfer and collective time. Distinguish useful synchronous-step completion from modeled FLOPs or reduced idle fraction. A memory-saving candidate is valuable only if the remaining compute/transfer schedule remains feasible. Do not add separately reported speedups or memory-saving percentages. + +Activation checkpointing is rematerialization within training, not persistent restart/recovery checkpointing. H2D/D2H and same-host IPC are not Network; inter-node transfers and collectives may be. No NPU kernel, collective, compiler or asynchronous-execution compatibility has been established. + +## ZO1. Move the optimizer computation with its state + +- F, objective/assumptions: ZO §§3.1–3.5 seek maximal model-state relief at minimal host/device traffic while excluding compute-heavy CPU forward/backward work. Model: mixed-precision Adam, known parameter count, relatively slow CPU and PCIe; activation offload excluded. +- F, variables/constraints/mechanism: choose placement of data/compute graph nodes; colocate FP32 master weights/moments and update/cast on CPU, keep FP16 weights and F/B on GPU, stream gradients to CPU. Whole-state graph-cut minimum is 4M bytes/iteration in the restricted model. §4.2 first shards gradients/optimizer ownership, then offloads; CPU work and traffic are not duplicated by every data-parallel rank. +- F, benefit/cost/evidence: Table 4's CPU-Adam reduces CPU update latency; Fig. 8 reports 14% average TFLOP/s gain over L2L with matched batch and no DPU. CPU memory bandwidth, thread contention, transfer and updated-weight collective remain costs. +- F, limits/counter-signals: Table 1 has inconsistent memory accounting; the optimality claim excludes activations, different optimizers and partial heterogeneous plans. Fig. 11 shows ZeRO-2 overtaking offload at 64/128 GPUs once capacity no longer forces smaller batches. +- P, rule: extend the existing offload diagnosis with an ownership-and-compute ledger. Compare CPU-update-plus-return against GPU-update-plus-state-transfer under the actual optimizer. Prefer an offload-free candidate when both fit and exposed transfer dominates; never infer benefit from CPU capacity alone. + +## ZO2. Optimize CPU update and copy as one pipeline + +- F, objective/assumptions: ZO §5.1 accelerates O(M) updates where CPU work or weight return delays GPU progress; assumes vectorizable Adam and usable host memory bandwidth. +- F, variables/constraints/mechanism: SIMD width, loop unroll, threads, tile size; fuse vector arithmetic and pipeline tile updates with prior-tile H2D parameter copy. Historical AVX512 and unroll 8 are implementation choices, not portable constants. +- F, benefit/cost/evidence: Table 4 gives 0.22 vs 1.39 s at 1B parameters and 2.57 vs 14.76 s at 10B for CPU-Adam vs PyTorch CPU; GPU Adam is still faster. Tiling/threads/copies can compete for memory bandwidth; isolated component ablations are unreported. +- F, limits/counter-signals: host saturation and small GPU compute windows; adding threads does not create bandwidth. Historical CPU improvements do not establish present optimizer speed. +- P, rule: use supplied per-stage CPU/transfer evidence to identify whether optimizing update, return copy, or neither could affect the step critical path. Keep bounded buffers and pinned-memory accounting from the existing skill; do not prescribe ISA/thread counts from the paper. + +## ZO3. Delayed update is a separate training-semantics branch + +- F, objective/assumptions: ZO §5.2 hides CPU optimizer work at small batch by allowing one-step staleness after a stable warmup. +- F, variables/constraints/mechanism: DPU start iteration and delayed-gradient schedule; one iteration skips update, then CPU updates overlap next GPU F/B using older parameters. +- F, benefit/cost/evidence: §6.2.4/Fig. 9 reports 1.12–1.59× throughput at microbatch 8. Figs. 12–13 check GPT-2 loss and BERT-large/SQuAD F1 92.8, with DPU after 40 iterations. +- F, limits/counter-signals: training dynamics change; the GPT loss initially lags. Two workloads do not bound behavior for other optimizers/models, nor prove a universal warmup length. +- P, rule: do not silently include DPU in an exact-execution offload plan. Mark it a separate consequential proposal requiring explicit acceptance of changed training semantics and representative quality/convergence evidence. Prefer ordinary overlap if exact updates are required. + +## CM1. Pay recomputation cost selectively under event-level memory limits + +- F, objective/assumptions: CM §§4.1–4.10 minimize summed operator-evaluation cost for a static known-size DAG with deterministic/replayable operations and supplied cost estimates. +- F, variables/constraints/mechanism: binary compute R and retention S, FREE and U memory variables; ensure every dependency exists, compute each frontier, and count newly allocated output before freeing consumed inputs. Retain valuable values and rematerialize others. Inputs/parameters and a gradient reserve remain resident. A fixed frontier order bounds the search. +- F, benefit/cost/evidence: §6.3/Fig. 5's U-Net/16-GB profile model improves modeled time 1.20× over linearized greedy; recomputation spends extra compute to avoid memory/transfer pressure. §6.4's 5.1× MobileNet batch-capacity ratio is model-based with a one-extra-forward FLOP constraint. +- F, limits/counter-signals: no joint transfer/parallelism objective; additive layer cost can miss kernel fusion, concurrency and workspace behavior. Stateful/random operations and changed batches need correctness review. A timeout is not infeasibility proof. +- P, rule: compare a selective-rematerialization candidate to retention/offload using supplied costs and lifetime peaks; favor discarding values with low recomputation cost relative to sustained resident burden, while preserving all dependencies. Validate candidate peak memory and equivalent numerical semantics before claiming feasibility. + +## CM2. Approximation quality and memory feasibility are different checks + +- F, objective/assumptions: CM §5 seeks practical schedules when the exact MILP is costly. +- F, variables/constraints/mechanism: relax integrality, round only retention S, reconstruct minimally necessary R to repair dependency constraints, then derive releases. Their 10% budget allowance is empirical; rounding itself does not enforce the capacity cap. +- F, benefit/cost/evidence: §6.5/Table 2's geometric-mean FLOP-cost ratios are 1.00–1.06 across mutually feasible budgets, not a worst-case guarantee. Appendix D shows the allowance can waste capacity. DenseNet161 lacked a feasible ILP result within one day (§5). +- F, limits/counter-signals: computational validity can coexist with OOM; input-specific rounding margin and planning overhead matter. +- P, rule: treat an approximate schedule as a proposal until both dependency replay and exact peak-accounting pass. Record solver status, feasible incumbent, bound/gap and amortization separately; do not report near-optimal compute as memory-safe execution. + +## OL1. Shorten live ranges before buying more capacity + +- F, objective/assumptions: OL §§2–3 minimize memory of a static DAG without deleting/recomputing values. Tensor sizes and all dependencies must be represented. +- F, variables/constraints/mechanism: creation/preservation times select a legal topological order; exactly one tensor creation, shared-consumer lifetimes and multi-output creation are explicit. Reorder eligible work, including safe early weight updates, so large gradients need not remain live unnecessarily. §4.3 adds precedence controls to limit the search. +- F, benefit/cost/evidence: §5.3 measures requested-memory reduction excluding fragmentation: mean 22.5% at batch 1 and 10.1% at batch 32 versus PyTorch 1.11 ordering. No extra recomputation or offload traffic is introduced by the mechanism, but planning and changed execution concurrency can cost time. +- F, limits/counter-signals: activations retained for backward give little forward-pass leverage; large batches reduce gradient-relative savings. Distributed accumulation, global clipping, tied state and shared weights can restrict early updates; the paper does not establish those integrations. +- P, rule: investigate excessive live gradients/outputs before offload. Propose only reorderings proven legal by the full graph, including update/collective barriers. If activations dominate a largely linear order, route to selective rematerialization rather than promise OLLA's average saving. + +## OL2. Pack nonoverlapping lifetimes into reusable addresses + +- F, objective/assumptions: OL §§3.3–3.5 minimize reserved address extent given predictable tensor lifetimes; location means addresses in one memory space. +- F, variables/constraints/mechanism: integer base addresses and pairwise nonoverlap for simultaneously live tensors; reuse addresses across disjoint lifetimes. §4 bounds lifetimes, removes provably unnecessary pair constraints, splits ordering/packing, and preplaces nested activations. A preallocated buffer makes deallocation a no-op. +- F, benefit/cost/evidence: §5.4 removes measured fragmentation in evaluated cases; baseline ratios average 7.9%/26.1% at batch 1/32. §5.7 combined peak reduction is 30.4%/36.1% with two five-minute search caps. The estimated runtime saving is not direct end-to-end timing. +- F, limits/counter-signals: empirical fragmentation elimination does not prove all orderings can pack without loss. Dynamic shapes, overlapping executions, alignment/workspace and aliasing can invalidate fixed addresses. Low fragmentation means less scope. +- P, rule: separate live-byte excess from reserved-byte fragmentation, using the same phase/denominator. Propose address planning only when allocation/lifetime evidence is stable; do not misroute this mechanism as CPU/SSD placement or kernel-VM tuning. + +## AL1. Choose operator shards and pipeline stages together, within a declared search space + +- F, objective/assumptions: AL §§4–5 minimize pipeline latency for static shapes, homogeneous devices inside each logical mesh, a supplied operator order and synchronous 1F1B-style timing. +- F, variables/constraints/mechanism: select operator shardings/resharding edges; then stage boundaries and physical/logical meshes, using stage cost and memory feasibility. Eq. 5 retains multiple in-flight activation sets. Objective includes first-microbatch latency and bottleneck-stage repetition. Operator clustering/pruning reduce planning cost. +- F, benefit/cost/evidence: §8.3/Fig. 9: Wide-ResNet/32-GPU plan outperforms equal-operator/equal-layer restrictions 2.6×/1.6× in PFLOP/s. Fig. 12 uses unequal 4/4/8-GPU stages. Planning costs are material (Table 5: 2393.26 s for one GPT-39B search). +- F, limits/counter-signals: intra-op compute costs are simplified to zero; stage costs include a profiling/modeling path. Inter-stage transfer and overlap are omitted from the optimizer; microbatch count is external; no global optimum over all plans. Equal-layer is already as good on the tested homogeneous GPT case. +- P, rule: consider changing parallel plans when memory/work differs markedly by stage or collective cost dominates. Compare the proposed heterogeneous plan to a simple equal-stage baseline under fixed global batch, actual topology and explicit cross-stage-transfer cost. Report omitted costs and plan-generation amortization rather than adopting solver output uncritically. + +## AL2. Avoid repeated slow-link copies during resharding + +- F, objective/assumptions: AL §6 reduces communication between unequal meshes when receivers need replicated tiles and local bandwidth is better than cross-mesh bandwidth. +- F, variables/constraints/mechanism: tile source/destination correspondence, unique cross-mesh sends, local allgather; ensure all target shardings receive correct elements. Static per-mesh instructions coordinate execution. +- F, benefit/cost/evidence: §8.5/Fig. 11 reports 2.0× PFLOP/s throughput over send/recv-only for 32-GPU Wide-ResNet. Local collectives/staging replace duplicate slow-link traffic; they are not free. +- F, limits/counter-signals: topology may not provide the assumed asymmetry; optimal many-to-many mapping is not solved. One-byte signal baseline is only an upper-bound control. +- P, rule: derive actual required tensor intersections and replication before proposing multicast-like staging. Classify local allgather under Accelerator topology and only the cross-node segment under Network. Reject byte savings that overload local links or increase peak buffers beyond the common ledger. + +## ZB1. Split critical input-gradient work from deferrable weight-gradient work + +- F, objective/assumptions: ZB §§1–3 reduce synchronous pipeline idle time while respecting activation limits, dependencies and measured F/B/W/communication times. +- F, variables/constraints/mechanism: execution order/end times for F, B and W; prioritize B needed by the previous stage, schedule W in gaps or to reclaim memory. Delaying W extends retention of its inputs. The heuristic searches under memory caps; limited-scale ILP provides another route. +- F, benefit/cost/evidence: Table 4's 28.3B/32-GPU/m96 row gives 0.87 versus 0.76 samples/s/GPU for ZB-1p vs 1F1B at 44 vs 43 GB. ZB-2p reaches 0.99 at 74 GB. Table 5's lower bubble rates are calculated from timing inputs; Fig. 6 shows extra real gaps. +- F, limits/counter-signals: equal F/B/W theory does not match actual kernels; fused backward splitting may add overhead; memory is not free. Appendix A's tail parameter grouping for DP overlap has no isolated measured ablation. +- P, rule: require a trace or supplied equivalent showing B blocked behind deferrable W. Propose split schedules only with measured pass costs, retained-byte lifetimes and collective ordering. A smaller bubble fraction alone is not higher useful-step throughput. + +## ZB2. Compare memory-equivalent schedule/microbatch choices + +- F, objective/assumptions: ZB §§5.4–6 trade bubble reduction against activation memory and microbatch kernel efficiency. +- F, variables/constraints/mechanism: activation cap, microbatch size/count, two-chunk V placement. ZB-V starts F/B locally sooner and balances memory; its ideal zero-bubble claim assumes equal pass times. ZB-2p* trades half-size microbatches for twice their count at fixed global batch. +- F, benefit/cost/evidence: Table 6's 28.3B/32-GPU/base b2,m96: V 1.01 at 71 GB, 2p* 1.00 at 72, 1F1B 0.82 at 69 samples/s/GPU. At 6.2B, 2p* instead beats V. Extra boundaries/communication and smaller kernels can offset reduced idle time. +- F, limits/counter-signals: theoretical pMB is activation memory, not total HBM. Tables 7 and 11 change global batch, and Table 11 has ambiguous m labels; do not use them as matched-global-batch proof. Performance can plateau before exact zero bubbles. +- P, rule: compare a small set at the same global batch, precision, model and total-device-memory margin. Include simpler 1F1B, memory-capped split backward, and V/2p* only when legal. Choose useful throughput over the lowest modeled idle fraction. + +## ZB3. Preserve optimizer validation when removing its global barrier + +- F, objective/assumptions: ZB §4 removes an optimizer synchronization bubble assuming numerical exceptions/clipping are uncommon and updates can be validated and repaired. +- F, variables/constraints/mechanism: partial global-state reduction, tentative update, later complete validation, rollback/re-update where required. Appendix C supplies an in-place AdamW inverse to avoid state copies; no stale-gradient semantics are intended. +- F, benefit/cost/evidence: Appendix E/Table 10: 28.3B/32 GPUs/m96 post-validation 0.99 versus synchronized 0.91 samples/s/GPU. Author per-iteration fixed-seed loss checks are bit-identical for tested schedules, not a broad rollback-stress or convergence study. Rollbacks cost work and can perturb scheduling. +- F, limits/counter-signals: frequent clipping/NaNs, noninvertible updates, finite-precision reversibility, stateful side effects, or unverified rollback coverage undermine the benefit/correctness. Failure-rate sensitivity and broad optimizer support are unreported. +- P, rule: treat barrier removal as a separate correctness gate. Retain global clipping/NaN semantics and require evidence of rollback, redo and dependent-work handling on the actual optimizer before proposing enablement. When absent, keep the synchronized fallback. Do not confuse this post-validation with ZeRO-Offload DPU. + +## Candidate destinations + +- [Activation-residency skill](../../../../plan-activation-residency/SKILL.md): CM1–CM2 and OL1–OL2 share one live-range/retain/recompute decision, with separate capacity and correctness checks. +- [Parallel-plan skill](../../../../choose-parallel-training-plan/SKILL.md): AL1–AL2 share one partition, mapping and resharding decision. +- [Split-backward skill](../../../../assess-split-backward-schedule/SKILL.md): ZB1–ZB3 share a pipeline schedule, memory and optimizer-semantics decision. +- ZO1–ZO3 are an [incremental knowledge extension](../knowledge/offload-delta.md) to the existing offload skill, avoiding a duplicate skill. +- [Cases](../cases/paper-grounded-cases.md) are review examples, not executed tests. [Integration proposals](../INTEGRATION_NOTES.md) target only docs/reference-matrix.md and docs/searchspace-matrix.md. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/references/source-readset.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/references/source-readset.md new file mode 100644 index 000000000..4fdf21fec --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/papers-20261015/references/source-readset.md @@ -0,0 +1,98 @@ +# Pack C: pinned sources and actual readset + +Status: candidate; empirical_validation: not_run. F = source-reported design, analysis, or observation. P = proposed application. Research date: 2026-10-15 UTC. These are historical designs, not current implementation or NPU-compatibility claims. Only five assigned papers and their original arXiv records were researched. No implementation source was needed. No installation, benchmark, reproduction, hardware task, framework change, matrix edit, InferRSI change, or PR was performed. PDF extraction/rendering and artifact checks are document operations, not empirical validation. + +Activation checkpoints here retain intermediate tensors for recomputation inside training. They are not persistent recovery checkpoints or durability mechanisms. + +## ZO: ZeRO-Offload + +- Full title: ZeRO-Offload: Democratizing Billion-Scale Model Training. Jie Ren, Samyam Rajbhandari, Reza Yazdani Aminabadi, Olatunji Ruwase, Shuangyan Yang, Minjia Zhang, Dong Li, Yuxiong He. +- [Original metadata](https://arxiv.org/abs/2101.06840), [pinned v1 PDF](https://arxiv.org/pdf/2101.06840v1). Only v1 listed: 2021-01-18 02:11:25 UTC. 14 PDF pages. +- Actual relevant readset: §§2–3.5, including §3 footnotes 1–2 and Fig. 2/Table 1; §§4.1–4.2/Figs. 3–4 and associated schedule discussion; §§5.1–5.2 including displayed CPU-Adam algorithm and Fig. 6; §§6.1–6.2.4, Tables 2–4, Figs. 7–13 and associated prose. Visually checked PDF pp. 5 and 11, especially Table 1, Table 4 and Figs. 11–13. Figure 5's code screenshot was not independently transcribed or implementation-audited. +- SHA256 of downloaded pinned PDF: 361dd58aadd744a79b17268b985034de00b9cf7423c000f9aa1549bfa382146c. + +F, setup: GPT-2-like Transformer models; mixed FP16/FP32 Adam. Single-node capacity/throughput tests use DGX-2 with 16 V100 32-GB GPUs, two Xeon Platinum 8168 CPUs, 1.5-TB DDR4, reported bidirectional PCIe 32 GB/s. Scaling uses eight DGX-2 nodes and an InfiniBand switch. Table 3 changes depth, width, microbatch and model parallelism by model size. Fig. 8 uses total batch 512, matched microbatches and gradient accumulation, with delayed parameter update (DPU) disabled. Fig. 10 uses total batch 512 but the largest feasible microbatch for each system. These are different comparison controls. + +F, evidence ledger: +- §§3.1–3.5: graph cuts minimize host/device bytes after fixing O(MB) forward/backward compute and FP16 weights on GPU; O(M) optimizer operations and FP32 master weights/moments move to CPU, as do FP16 gradients. The stated minimum is 4M bytes per iteration for whole model-state offloads in this model. The analysis excludes activation offload and residual-state costs; it is not an arbitrary-hardware global optimum. +- Table 1 prints the final row as 4M device memory and 8× reduction versus 16M. These entries are mutually inconsistent; the surrounding placement prose leaves FP16 parameters plus transient gradient buffers on GPU. Do not silently replace the printed number or treat the table as a reliable total-peak formula. +- §4.2: reduce-scatter gradients before offloading each owned partition; parallel CPU updates; return updated parameter partitions and allgather. Partitioning prevents duplicated host updates/traffic across data-parallel replicas. Claims about increasing CPU resources apply across compute nodes, not indefinitely across more GPUs sharing a fixed host. +- §5.1/Table 4: CPU-Adam versus PyTorch CPU Adam latency in seconds for 1B/2B/4B/8B/10B parameters: 0.22/0.51/1.03/2.41/2.57 versus 1.39/2.75/5.71/11.93/14.76. PyTorch GPU (L2L) comparator: 0.10/0.26/0.64/0.87/1.00. SIMD/loop-unrolling/OpenMP and tiled copy are combined; isolated attribution for each is unreported. +- §6.2.1/Fig. 7: 13B fits one V100 versus 1.4B PyTorch; L2L fits 17B. Capacity leadership therefore does not imply throughput leadership. §6.2.2/Fig. 8: ZeRO-Offload is 14% faster on average, up to 22%, than L2L in reported TFLOP/s under the matched batch comparison. The paper models L2L traffic as 28M versus 4M bytes; this is historical baseline accounting. +- §6.2.2/Fig. 10: up to 70B on 16 GPUs with model parallelism, over 30 TFLOP/s/GPU; not a same-size speed ratio against a baseline that OOMs. §6.2.3/Fig. 11: 10B model aggregate throughput approximately scales through 128 GPUs, but ZeRO-2 becomes faster at 64/128 GPUs once both can use similar microbatches and offload retains a transfer cost. Do not label this fixed-total-work strong scaling without the missing batch/scaling controls. +- §5.2/§6.2.4/Figs. 9,12,13: one-step DPU intentionally uses stale updates after an initial ordinary-training period. At microbatch 8, throughput ratio with/without DPU is reported 1.12–1.59×. Convergence examples enable DPU after 40 iterations: GPT-2 pretraining for 100K iterations shows initially slower loss then catching up; BERT-large SQuAD fine-tuning reaches F1 92.8 in both variants. These two workloads do not establish universal convergence safety. + +## CM: Checkmate + +- Full title: Checkmate: Breaking the Memory Wall with Optimal Tensor Rematerialization. Paras Jain, Ajay Jain, Aniruddha Nrusimha, Amir Gholami, Pieter Abbeel, Kurt Keutzer, Ion Stoica, Joseph E. Gonzalez. +- [Original metadata](https://arxiv.org/abs/1910.02653), [pinned v3 PDF](https://arxiv.org/pdf/1910.02653v3). v1 2019-10-07; v2 2020-03-12; read v3 2020-05-14 17:46:43 UTC. 15 PDF pages. No revision mixing. +- Actual relevant readset: §§4.1–4.10, Eqs. 1–9, Theorem 4.1 and Lemmas 4.1–4.2; §§5.1–5.3 and Algorithms 1–2; §§6.1–6.5, Eq. 10, Tables 1–2, Figs. 5–6; Appendices A–D, Figs. 7–8. Visually checked PDF pp. 9–10 for Figs. 5–6/Table 2. PDF p. 2 contains a figure with embedded manuscript text; its obsolete equation/section snippets were not used in place of the body formulation. +- SHA256: 8355cc2ecac072863fde2542585f8da0be30924e6181d9b05a36a63b22a1f694. + +F, model and evidence: +- §§4.1–4.10: static DAG; each value has memory Mv and per-evaluation cost Cv. Binary R[t,i] selects evaluation, S[t,i] retention. U[t,k] accounts for memory just after an output exists and before dependencies are freed. Inputs/parameters and parameter-gradient reserve remain resident (Eq. 2). FREE variables require no later user and no retained checkpoint. Objective minimizes summed evaluation costs under per-event memory budget, not transfer time. +- §4.6/Eq. 8 restricts to a supplied topological order and frontier-advancing stages. This narrows the feasible set; optimality is within this formulation, not all possible reordered/parallel executions. Example: an eight-layer linear graph with unit costs and memory budget 4 solves in 0.23 seconds versus 9.4 hours unpartitioned, to the same objective. Appendix A's corresponding integrality-gap example is 1.18 versus 21.56. These are optimization examples, not training throughput. +- §4.10: additive timings from layer profiling on target hardware, shapes and batch; dense tensors use four-byte floats in the evaluated model. §6 implementation is TensorFlow 2.0/Keras/Gurobi. Most ordinary solves use 3600-second limit on at least 24 CPU cores. §5 reports no feasible solution for a DenseNet161 instance within one day; solver timeouts do not prove infeasibility. +- §6.3/Fig. 5: overhead is profile-model time relative to no-rematerialization ideal, using one NVIDIA V100. U-Net batch 32, 416×608 images, 16-GB budget: reported 1.20× speedup over linearized greedy and 1.38× over linearized sqrt(n). This is not directly measured whole-training speedup. VGG16 batch 256 and MobileNet batch 512 use 224×224. +- §6.4/Eq. 10/Fig. 6: maximize feasible batch subject to 16 GB and at most one extra forward pass in statically computed FLOPs. The nonlinear formulation gets a one-day limit; returned batch is a lower bound if optimality is unproved. MobileNet 224×224: 1105 versus 215 checkpoint-all and 640 linearized-greedy; author reports 5.1× and 1.73× respectively. U-Net 416×608: 61 versus 16 checkpoint-all and 35 best plotted heuristic. These are theoretical feasible-batch results, not observed time-to-quality or a guarantee that enlarged batch preserves training behavior. +- §§5.1–5.3/Algorithm 2: round S, then restore minimal necessary R to satisfy computation dependencies. Capacity is not guaranteed by this procedure. The authors empirically use 10% memory allowance; Appendix D says that allowance is overly conservative for MobileNet. +- §6.5/Table 2: two-phase approximation COSTapprox/COSTopt, geometric mean across mutually feasible budgets, in FLOPs: MobileNet 1.06, VGG16 1.01, VGG19 1.00, U-Net 1.03, ResNet50 1.05. It is neither a worst-case 1.06 approximation guarantee nor a whole-job speed ratio. Appendix D/Fig. 8 compares randomized versus deterministic two-phase rounding with profile-cost milliseconds. + +## OL: OLLA + +- Full title: OLLA: Optimizing the Lifetime and Location of Arrays to Reduce the Memory Usage of Neural Networks. Benoit Steiner, Mostafa Elhoushi, Jacob Kahn, James Hegarty. +- [Original metadata](https://arxiv.org/abs/2210.12924), [pinned v2 PDF](https://arxiv.org/pdf/2210.12924v2). v1 2022-10-24; read v2 2022-11-02 19:22:24 UTC. 14 PDF pages. +- Actual relevant readset: §§2.1–2.3/Figs. 3–4; §§3.1–3.5, Eqs. 1–9/Function 1; §§4.1–4.5, Eqs. 10–15/Functions 2–5/Figs. 5–6; §§5.1–5.7/Figs. 7–14; §6's placement/lifetime comparison. Visually checked PDF p. 10 (Figs. 11–14 and §5.7). Individual bar values were not digitized. +- SHA256: 69aebb2c874871e363ccec93e2ea15891e91c793153cde37004d17ea12ddef0b. + +F, model and evidence: +- §3: DAG tensors are edges (possibly multiple consumers), with known sizes. Binary creation C[e,t] and preservation P[e,t] enforce exactly one creation, availability of all inputs, contiguous retention and simultaneous sibling outputs. Integer A[e] is a base address in one preallocated buffer, not GPU/CPU/SSD tier placement. Concurrent live tensors cannot overlap addresses. Objective minimizes maximum A[e]+size[e]. It neither offloads nor recomputes tensors. +- §§4.1–4.5: bound variable ranges using earliest/latest schedules and useful lifetimes; drop pairwise constraints for proven nonoverlapping tensors; add control edges to force safe early weight updates; split lifetime optimization (Eq. 14) from address optimization (Eq. 15); preplace nested activation lifetimes. The split relies on their empirical ability to remove fragmentation, not a universal proof that independently optimized lifetimes always admit ideal packing. +- §§5.1–5.2: PyTorch 1.11, torchtext/torchvision 0.12, torch.FX and Gurobi 9.1.1; Xeon Gold 6138 at 2.0 GHz plus A100 40 GB. Eleven families: AlexNet, EfficientNet, GoogleNet, MNASNet, MobileNet, ResNet, ResNet3D, Transformer, VGG, ViT, XLM-R, at batches 1/32. Graph size ranges from AlexNet 118 to XLM-R 2007 operators. +- §5.3/Fig. 7: node-reordering comparison excludes fragmentation, measuring peak requested operator memory/resident demand rather than allocator-reserved bytes. Maximum reduction 38%; mean 22.5% at batch 1, 10.1% at batch 32. Less leverage at large batch is attributed to forward activations dominating gradients. +- §5.4/Fig. 8: fragmentation defined (MR−RS)/MR at peak reserved memory MR. PyTorch mean fragmentation 7.9% at batch 1, 26.1% at batch 32; OLLA fully removes it in evaluated scenarios. Do not add these percentages to lifetime percentages: denominators differ. +- §§5.5–5.6/Figs. 9–12: median ordering solve 1.4±0.2 s, address generation 5.7±0.6 s; difficult EfficientNet ordering takes 2 min for batch-1 optimum, 5 min to within 1% at batch 32. GoogleNet/EfficientNet packing reaches <1% fragmentation within 5 min. The text's uncertainty notation is retained; no unreported confidence interpretation is added. +- §5.7/Fig. 13: cap each of the two optimizations at five minutes; overall memory reduction averages 30.4% at batch 1 and 36.1% at batch 32 versus PyTorch. §5.7/Fig. 14 estimates about five minutes runtime saved over one million batch-32 iterations by comparing allocator costs with upfront optimization. Total training time under the two schemes was explicitly not directly measured; batch-1 runtime estimate is unreported. +- Isolated ablations of every pruning/early-update/preplacement optimization and distributed-training interactions are unreported. No conclusion about current PyTorch allocator behavior follows from the 1.11 comparison. + +## AL: Alpa + +- Full title: Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep Learning. Lianmin Zheng, Zhuohan Li, Hao Zhang, Yonghao Zhuang, Zhifeng Chen, Yanping Huang, Yida Wang, Yuanzhong Xu, Danyang Zhuo, Eric P. Xing, Joseph E. Gonzalez, Ion Stoica. +- [Original metadata](https://arxiv.org/abs/2201.12023), [pinned v3 PDF](https://arxiv.org/pdf/2201.12023v3). v1 2022-01-28; v2 2022-06-03; read v3 2022-06-28 19:36:44 UTC. 20 PDF pages. A v1 PDF was fetched before metadata resolution but not used as evidence. +- Actual relevant readset: §§2–8.6 including every method, limitation and evaluation subsection; Eqs. 1–6, Algorithm 1, Tables 1–5, Figs. 1–12 and associated prose; Appendix A/Theorem 1/Eq. 7, Appendix B/Tables 6–8, Appendix C/Fig. 13. Visually checked PDF p. 13/Table 5/Figs. 10–11. +- SHA256: cd1dea70769571a5e9298ba0610e04cc514a06ab12018dd7f19a457fd00cd474. + +F, model and evidence: +- §4/Eq. 1: choose one sharding algorithm per operator on a homogeneous 2-D logical device mesh, accounting for operator communication and edge resharding. The evaluated ILP estimates bytes/bandwidth and sets compute costs dv to zero, assuming equal arithmetic work among heavy-op shardings and negligible lightweight work. It does not show all equal-FLOP kernels run equally fast. Post-ILP reduce-scatter/allgather can reduce replicated optimizer work without changing total collective bytes. +- §5/Eqs. 2–5: stages are contiguous in a given operator ordering; corresponding forward/backward ops colocate. Objective sum(stage latency)+(B−1)×max(stage latency) for the chosen static GPipe/1F1B timing model. DP chooses stage boundaries and restricted physical submesh shapes; intra-op choices are evaluated per stage/mesh. 1F1B feasibility uses memstage+s×memact≤memdevice. Infeasible stage/mesh pairs get infinite cost. Shape restriction ensures device coverage, not global-optimal search over arbitrary partitions. +- §5.2 says compile/profile stage plans including fusion and memory planning; §8.4 describes accelerating profiling with a piecewise-linear XLA-operation cost model. Do not present all plan costs as directly timed full stages. Search also clusters operators and prunes DP choices. +- §6/Fig. 6: cross-mesh resharding sends each needed tile across slow links then locally allgathers replicated destinations, avoiding redundant slow transfers. Static per-mesh instruction lists avoid continuous driver coordination. Optimal cross-mesh resharding is left to future work. +- §7: no inter-stage communication cost in the plan objective; microbatch count is an external hyperparameter, not internally optimized; static shapes/graphs and linear schedules; no optimization of computation/communication overlap. Two-level solution is not guaranteed globally optimal. +- §8: eight AWS p3.16xlarge nodes, eight V100 16-GB GPUs/node, intra-node NVLink, 25-Gbps cross-node bandwidth; 64 vCPU and 488-GB host memory/node. Metric is aggregate PFLOP/s on warmed-up dummy-data batches; model size grows with GPU count (weak scaling). Global batches: GPT and MoE 1024/FP16; Wide-ResNet 1536/FP32. GPT/MoE sequence 1024; image input 224×224×3. Microbatch tuned per configuration. +- §8.1/Fig. 7: GPT roughly matches grid-searched Megatron-LM v2; MoE beats DeepSpeed 3.5× on 16 GPUs (10B model) and 9.7× on 32 GPUs (27B), where the historical DeepSpeed baseline has no inter-op pipeline and slow network communication dominates. Wide-ResNet achieves author-reported 80% linear-scaling efficiency on 32 GPUs. These are not time-to-quality or equal-model strong-scaling results. +- §8.2/Fig. 8: isolate intra-op search on one eight-GPU node, disabling pipeline and gradient accumulation, with altered model shapes/batches versus §8.1. ILP is compared with data parallel, ZeRO-2/3 and largest-axis sharding heuristic. It cannot be merged numerically with the end-to-end setup. +- §8.3/Fig. 9: at 32 GPUs, Wide-ResNet DP plan is 2.6×/1.6× faster in PFLOP/s than equal-operator/equal-layer restrictions; equal-layer equals DP on homogeneous GPT. §8.5/Fig. 11: local-allgather resharding gives 2.0× throughput over send/recv-only on 32-GPU Wide-ResNet. One-byte signal control is a synthetic upper bound, not executable model semantics. +- §8.4/Table 5: GPT-39B/64-GPU compilation 1582.66 s, profiling 804.48 s, stage DP 1.65 s, other 4.47 s, total 2393.26 s versus >40 h without optimizations. This is one supplied microbatch-count run, not cost of searching all B. +- §8.6/Fig. 12: Wide-ResNet/16 GPUs chooses three stages on 4/4/8 GPUs, with early activation-heavy layers preferring batch partitioning and later weight-heavy work different sharding. Table 4 rounds the 32-GPU Wide-ResNet model to 6.7B while Table 8 says 6.8B; do not silently reconcile. + +## ZB: Zero Bubble Pipeline Parallelism + +- Full title: Zero Bubble Pipeline Parallelism. Penghui Qi, Xinyi Wan, Guangxing Huang, Min Lin. +- [Original version record](https://arxiv.org/abs/2401.10241v1), [pinned v1 PDF](https://arxiv.org/pdf/2401.10241v1), [same-version HTML](https://arxiv.org/html/2401.10241v1). The original record and PDF both give v1 as 2023-11-30 10:40:34 UTC despite the 2401 identifier; retain that source metadata. 19 PDF pages. arXiv's link boilerplate says "and 2 other authors" while its author list and PDF contain four; use the actual list. +- Actual relevant readset: §§1–7 (all subsections), Tables 1–8/Figs. 1–9; Appendices A–H including Figs. 10–11, Appendix B Eqs. 1–2, Appendix C Algorithm 1 (AdamW rollback), Appendix G Eqs. 3–7, Tables 9–12. Visually checked PDF pp. 7, 11 and 18 for Tables 4,6–8,11 and associated plots/text. The v1 HTML served as an additional same-version methods check. +- SHA256: 0de7cd6efd52eaa3f216129cd186ab755b1045bca1f6ddc422216295a7e9fee9. + +F, model and evidence: +- §§1–2: split backward into B (input gradient, critical across stages) and W (parameter gradient, movable after B). Delaying W retains its needed activations/gradients. Table 2's ideal comparison: 1F1B bubble (p−1)(TF+TB+TW), ZB-H1 (p−1)(TF+TB−TW), both peak activations pMB; ZB-H2 bubble (p−1)(TF+TB−2TW), peak (2p−1)MB. Zero-bubble equality depends on timing assumptions and removing the optimizer barrier; it is not a universal empirical zero-idle guarantee. +- §3/Appendix G: schedule ordering/end times with inter-stage F/B dependencies, device sequencing and cumulative activation-memory limits; input p,m, memory cap, profiled TF/TB/TW/Tcomm. Heuristic schedules W into gaps or when memory needs release; ILP is feasible only at limited problem scale. Appendix A proposes parameter-grouped tail W work for overlapping data-parallel allreduce; an isolated measured ablation of that proposal is unreported. +- §4/Appendix C: partial reductions followed by post-update validation; invalid speculative updates roll back and redo using global clipping/NaN state. AdamW arithmetic inverse is supplied to avoid a full historical state copy. This is not permission to omit clipping or accept stale-gradient training. Finite-precision rollback stability, rare-event failure frequency and broad optimizer support are not established by the reported throughput table. +- §5.1: Megatron-LM-based GPT-like models, up to 32 A100 SXM 80-GB GPUs on four RoCE RDMA nodes; sequence 1024; end stages have one fewer Transformer layer to offset embedding/loss work. Hardware bandwidth value is unreported. Table 3: 1.5B/6.2B/14.6B/28.3B on 8/8/16/32 pipeline GPUs, microbatch size 6/3/1/1 and microbatch counts 3p,4p,8p. 1F1B-I uses each Transformer layer as a chunk. Author correctness check uses identical fixed-seed per-iteration losses, without training to convergence; the reported number of correctness-check iterations is unreported. +- §5.2/Table 4, representative measured row: 28.3B, 32 GPUs, b=1,m=96: ZB-2p 0.99 samples/s/GPU at 74 GB, ZB-1p 0.87 at 44 GB, 1F1B 0.76 at 43 GB, 1F1B-I 0.82 at 58 GB. Doubling an activation budget does not double total memory. Same-activation-cap ZB-1p still has modestly higher measured total memory than 1F1B. +- §5.3/Table 5: bubble rates are schedule calculations using measured timing inputs, not directly measured idle percentages. For the above row: 1F1B 0.2646; ZB-H2 0.0641; ZB-1p 0.1421; ZB-2p 0.0038. Fig. 6 contrasts generated and profiled timelines and acknowledges extra real bubbles. Appendix D/Table 9 supplies timing inputs; its table does not explicitly label time units, so no unit is invented here. +- §5.4/Fig. 7/Appendix B: memory/idle tradeoff plateaus near 2pMB when TF≈TB and Tcomm is small. More memory can have diminishing returns; communication and first-B dependency chains remain. +- §6/Fig. 8: ZB-V maps two chunks/device in a forward-and-reverse V order, enabling earlier local backward and balanced activation demand. Ideal TF=TB=TW permits zero bubble at pMB; actual profiled schedules remain nonzero. Additional chunk boundaries introduce communication and computation-granularity tradeoffs. +- §6.1/Table 6 is the stronger approximately matched-memory/global-batch comparison: ZB-2p* halves b and doubles m, keeping global batch. 28.3B, 32 GPUs, base b=2,m=96: ZB-V 1.01 samples/s/GPU at 71 GB; ZB-2p* 1.00 at 72; ZB-1p 0.94 at 73; 1F1B 0.82 at 69. 6.2B/16 GPUs/base b=6,m=48: ZB-2p* 4.36 at 63 GB versus ZB-V 4.15 at 64; V is not universally fastest. +- Table 7 varies b with fixed m, changing global batch; the b=1→2 14.6B ZB-V row is 1.75→1.88 samples/s/GPU (7.43%). Do not present it as matched-global-batch isolation. Table 8's V bubble rates are calculated, like Table 5. +- Appendix E/Table 10: optimizer post-validation versus allreduce synchronization, samples/s/GPU: 1.5B/8 GPUs/m24 14.5 vs 13.11; 6.2B/8/m24 4.32 vs 4.00; 14.6B/16/m48 1.81 vs 1.68; 28.3B/32/m96 0.99 vs 0.91. No measured rollback-rate sensitivity curve is reported. +- Appendix F/Table 11 keeps listed m while changing b, so global batch differs. It also prints middle m=32 for the 14.6B and 28.3B blocks, inconsistent with the main setup's 64/128. Preserve as a source ambiguity; use Table 6 for fixed-global-batch evidence. Table 11 includes cases where larger-b ZB-1p exceeds ZB-2p, a useful counter-signal. +- Appendix H/Table 12: at m≤p benefits persist but bubbles remain. Example 14.6B,p16,m4,b1: 0.39→0.52 samples/s/GPU, 19→20 GB, 1F1B→ZB-2p. This is throughput at small microbatch count, not elimination of all bubbles. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/sources.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/sources.md new file mode 100644 index 000000000..2ef6f4e1c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/sources.md @@ -0,0 +1,61 @@ +# Cross-resource reference evidence + +Initial scoped inspection: 2026-10-15. CR5 historical-source follow-up: +2026-10-30. No hardware, dependency installation, benchmark or checkpoint +implementation investigation was performed. + +## CR1 — DeepSpeed + +- Implementation: [offload_config.py](https://github.com/deepspeedai/DeepSpeed/blob/5f266e26d216a705d9c64cac88fb813cefdbac4b/deepspeed/runtime/zero/offload_config.py), + whole short configuration file (parameter config 20–51, optimizer config + 54–111). Revision `5f266e26d216a705d9c64cac88fb813cefdbac4b`. +- License: Apache-2.0, confirmed by file header and downloaded root LICENSE. + Mechanisms are paraphrased; no source code copied. +- [Official ZeRO-3 docs](https://deepspeed.readthedocs.io/en/latest/zero3.html), + offload overview and parameter/optimizer configuration fields only. Live + `latest` HTML SHA-256: + `56beb8cdf148ace7a279518e1abe8256fa767038b471b273aa8650e55b295f46`. + Retrieved fields match the inspected config, including `pin_memory=True`; + this is not a claim that the entire docs build matches the source SHA. +- `max_in_cpu` is explicitly parameter elements. `buffer_size` units are not + defined in this approved config excerpt or its live field description; + no runtime consumer was inspected, so no byte-budget formula or unsupported + element-unit assertion is supplied for that field. +- `pipeline_read/write` descriptions establish intended tiled optimizer overlap, + not dispatch or measured overlap. CPU Adam core share is gated by stage 3 and + super-offload. No NVMe/pinned-memory support is inferred for NPU hardware. + +## CR6 — Stas ML Engineering + +Revision `ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7`; approved skill and targeted +performance sections only. Exact citations, adaptation license and limitations +are in the sibling Stas decision note linked directly from SKILL.md. +The source skill declares CC BY-SA 4.0; root `LICENSE` URL returned 404, so +that declaration, not a guessed root file, supplies attribution evidence. +Compute/network scripts were identified but not fetched or executed. + +## CR5 — MindSpeed + +The 2026-10-15 inspection was historical GitCode documentation only, with short +history ID `53193db8` and unresolved full pin/license. The 2026-10-30 follow-up +resolved `53193db8bf5def407c4041a9beb3f4c9e9773daf` through the original commit +link and official Ascend/MindSpeed GitHub source. Its root LICENSE supplies +default BSD-3-Clause terms with identified third-party exceptions; no later +documentation license replaces that historical evidence. + +The [historical case](mindspeed-historical.md) preserves the original date and +HTML hash. The [new bounded readset](mindspeed-source-readset.md) supports +selection versus validation, allocator/callback ownership, eligible shared-storage +rescue, explicit autograd-wrapper integration and conditional CPU-affinity +prerequisites. Complete search/cache behavior, current compatibility, numerical +correctness and measured benefit remain unqualified. Only independent mechanism +paraphrases are included; no upstream implementation or headline percentage is +copied. + +## Evidence distinctions + +DeepSpeed configuration is source code plus matched field documentation. +Stas material is attributed expert methodology. MindSpeed combines a historical +author-described case with bounded source observations at the recovered pin. +None is a measured InferRSI gain, a runtime qualification or an automatic +authorization to execute the original runbooks. diff --git a/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/stas-decision-notes.md b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/stas-decision-notes.md new file mode 100644 index 000000000..d23929590 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/playbooks/training-resource-budget/references/stas-decision-notes.md @@ -0,0 +1,41 @@ +# Stas Bekman scoped decision notes + +**Attribution:** Stas Bekman, *Machine Learning Engineering Open Book*, +[stas00/ml-engineering](https://github.com/stas00/ml-engineering/tree/ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7), +revision `ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7`. +The source skill explicitly declares **CC BY-SA 4.0**. This file is a shortened, +reorganized, paraphrased adaptation and is distributed under +[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Retain attribution, +the license link and change indication in downstream adaptations; apply +share-alike to adapted material. This notice does not relicense independent +DeepSpeed/MindSpeed materials or the repository as a whole. No endorsement by +Stas Bekman is implied. + +Inspected 2026-10-15. No source commands were executed and no numerical gains +were transferred. These are practitioner decision principles, not local tests. + +## Incremental rules and their limits + +| Signal or choice | Decision principle | Evidence boundary | +|---|---|---| +| MFU/HFU changed after recomputation or precision changes | Retain the FLOP-count convention, theoretical denominator and timed interval. HFU can count recomputation that MFU excludes. Pair ratios with useful workload throughput. | Different operation counts or forward/backward-only versus full-step timing invalidate direct comparison; mixed precision complicates a single peak denominator. | +| High short-burst matmul result | Separate a transient attainable ceiling from sustained compute under the node's shared power/cooling load. | Maximum-achievable and maximum-sustainable concepts are source methodology; no ceiling benchmark was run here. | +| Slow collective or confusing bandwidth figure | Retain collective kind, payload size, participating ranks and intra-node versus inter-node path. Keep algorithm bandwidth and bus bandwidth distinct. | The benchmark script is only a source entry point, not an audited or executed implementation. Host/device copies and shared-memory IPC do not qualify this network cell. | +| CPU-heavy offload slows a rank | Relate process and memory locality to the actual accelerator/NUMA topology; rank-local CPU work can expose cross-socket cost. | Source notes small effect for CPU-light work. Never copy example CPU IDs or claim universal improvement. No affinity was changed. | +| Intermittent synchronized-step stalls | Correlate per-rank garbage-collection events with collective arrival/step spikes before attributing them to the fabric. | Source proposes scheduled manual collection when automatic collection creates stragglers. That is an experiment lead, not permission to disable collection or proof of cause; track memory if later authorized. | + +## Exact readset + +- [skills/ml-engineering/SKILL.md](https://github.com/stas00/ml-engineering/blob/ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7/skills/ml-engineering/SKILL.md#L21-L79): + attribution, bottleneck-first principles, compute/memory/network/NUMA/GC routing. +- [skills/evaluate-cluster/SKILL.md, first 100 lines](https://github.com/stas00/ml-engineering/blob/ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7/skills/evaluate-cluster/SKILL.md#L1-L100): + compute ceiling and collective-bandwidth definitions only. Ignore its + instructions to update to latest, install tools or run a cluster campaign. +- [training/performance/README.md, 129–180](https://github.com/stas00/ml-engineering/blob/ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7/training/performance/README.md#L129-L180): + MFU/HFU and comparison caveats. +- [NUMA, 748–789](https://github.com/stas00/ml-engineering/blob/ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7/training/performance/README.md#L748-L789) + and [garbage collection, 1030–1047](https://github.com/stas00/ml-engineering/blob/ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7/training/performance/README.md#L1030-L1047). + +Source fio, input-pipeline, recovery and other runbook sections were not mined. +No original benchmark script, raw experiment or historical model result was +validated. Concepts transfer only after workload/mode-specific qualification. diff --git a/src/inferrsi/knowledge/atoms/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.json b/src/inferrsi/knowledge/atoms/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.json new file mode 100644 index 000000000..ed594a29d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.json @@ -0,0 +1,254 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Inductor CUDA graphs: distinguish compile guards, capture shapes and tensor lifetime", + "summary": "CUDA graph replay can reduce host launch overhead, but shape specialization, pointer stability and output lifetime remain independent constraints.", + "applicability": { + "hardware": [ + "CUDA devices supported by the pinned PyTorch/compiler stack" + ], + "software": [ + "pytorch/pytorch at f15b476814ebc5eade36fb40512e379ebf79dd60; later revisions need reinspection" + ], + "conditions": [ + "A torch.compile/Inductor path with launch overhead worth measuring", + "Representative shape distribution and input/output mutation behavior are known" + ] + }, + "limitations": [ + "A single warm fixed-shape run cannot establish service improvement or dynamic-shape stability.", + "Changing graph/compiler knobs may change memory use; no global mode is declared optimal.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "pytorch", + "backend": "cuda", + "scenario": "compiler.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json", + "sha256": "7fef4122ff794967e61f55d02a4a6b558d7e498d9513607f5ca86db6386928a8" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/torch.compiler_cudagraph_trees.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0dbfcef13ad6baea52c6e989eaf6561440c02a26a6ef667da850439d3a88c6a5" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/compile/programming_model.recompilation.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0240bbc4fc9ead047c5039d4bcab93e201c65bd7768c8995e09ee3eb654eaf59" + } + ], + "attribution": [ + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/torch.compiler_cudagraph_trees.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0dbfcef13ad6baea52c6e989eaf6561440c02a26a6ef667da850439d3a88c6a5" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/compile/programming_model.recompilation.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0240bbc4fc9ead047c5039d4bcab93e201c65bd7768c8995e09ee3eb654eaf59" + } + ], + "id": "pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json", + "byte_range": [ + 0, + 3623 + ], + "sha256": "7fef4122ff794967e61f55d02a4a6b558d7e498d9513607f5ca86db6386928a8" + } + } + }, + "content": { + "record.json": { + "path": "records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 307 + ], + "sha256": "7ef13d0f527619cffddfed3a2faa377a25f34ee3e9fc3fb1b57f5f1d363db260" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 311, + 331 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 335, + 494 + ], + "sha256": "a1adaa6fef8c5d47729bc7d5361d132d7a8cdbcd0ba72325f63fe833c8de6a04" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 498, + 609 + ], + "sha256": "53ec1a1f0b79a654a018a1041016cc07e6b5fe8f348c18281ba6c52e0341dd53" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 613, + 1445 + ], + "sha256": "62bf7aa3c3323ffad1b9b0237d7f060819e71de0b040a55169c7239e6ab728db" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1449, + 1881 + ], + "sha256": "5af9ef83ad11df7d10b31e594f88b0aef8b5d216d7c88101dbbf4182f58c20d6" + }, + "claim-0": { + "summary": "CUDA graphs replay fixed kernel arguments and addresses. CUDAGraph Trees manage shared pools subject to tensor-liveness and invocation constraints; eager-input mutation can cause capture to be skipped.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1901, + 2168 + ], + "sha256": "42b28d5970298977d5d54fe1c94a30993e60a645efd23a3fab558ab42af59e85" + }, + "claim-1": { + "summary": "Shape or Python scalar guards can trigger recompilation. TORCH_LOGS=recompiles exposes causes; dynamic compilation and CUDA graph recording are not the same mechanism.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2174, + 2407 + ], + "sha256": "a4b077f8cd109a089e701d328b3fe9cb2bf90cb3fc797f796f6869bb02051391" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2415, + 2742 + ], + "sha256": "b0dbe03409adb9893c7087a14402f2c0ed11ad3d471e5782a43d22595c004092" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2746, + 2889 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2893, + 3173 + ], + "sha256": "79b0946c39d9c0d87ebbea544910935dd9355813cb90f6a4de7fa7ec6824e2f3" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3177, + 3531 + ], + "sha256": "af83de30db24386334dd73576eafbdaddbd728da5553711157a01c41553c1984" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3535, + 3620 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.json b/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.json new file mode 100644 index 000000000..882f97c00 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.json @@ -0,0 +1,281 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen3-TTS codec: cache fixed codebooks and retain request-owned causal state", + "summary": "Avoid repeated codec normalization and history reconstruction under fixed evaluation weights; preserve per-request convolution and attention state.", + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "Frozen evaluation weights and a stable model/device/dtype for the cache lifetime.", + "Streaming decoder semantics and history window must match the reference model." + ] + }, + "limitations": [ + "The source helper assumes immutable evaluation weights and does not implement general cache invalidation.", + "Codec fusion can lose to eager execution for some shapes; do not infer an operator gain from whole-engine throughput.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "qwen3_tts_engine", + "backend": "ascend", + "scenario": "audio.tts", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json", + "sha256": "1cecd7905fef5af3ef8952a4d803900a7df91d662ebae34db47cc0dbf352d4e7" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/cached_quantizer.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "75207d415dbe425f677c4974880b56a066785e10a1715e058a9e790507c0498a" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/incremental_codec.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "cb555a40604f06981db409f5fc0773b39a556eb87930aababb56299e37e7acc4" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "attribution": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/cached_quantizer.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "75207d415dbe425f677c4974880b56a066785e10a1715e058a9e790507c0498a" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/incremental_codec.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "cb555a40604f06981db409f5fc0773b39a556eb87930aababb56299e37e7acc4" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "id": "qwen3_tts_engine.ascend.audio.codec_constants_and_state.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json", + "byte_range": [ + 0, + 4250 + ], + "sha256": "1cecd7905fef5af3ef8952a4d803900a7df91d662ebae34db47cc0dbf352d4e7" + } + } + }, + "content": { + "record.json": { + "path": "records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 303 + ], + "sha256": "f9dbc215bbdf798814be2d98ca6394ff44d52e31de0539b70d097cfb73ec2668" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 307, + 327 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 331, + 491 + ], + "sha256": "d43bb6582f6551010d20a7c8fba9fa5c1fba8a3005aa2f5c09236c3351a0ca72" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 495, + 579 + ], + "sha256": "5ff2c3eef3090499e494ccb89a7e20df7d5b6efae62b09ce343699f085a40af1" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 583, + 1728 + ], + "sha256": "a75c22475d19ed5bd8d77c6d9964f271cf4e047c4df995de1d4fb266e95af996" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1732, + 2244 + ], + "sha256": "1c5487ad3fec4b60f41a1ffdebf306eae0cd96eea57d22b2c0273102ea940d05" + }, + "claim-0": { + "summary": "CachedQuantizer materializes normalized codebooks once and preserves the sequential residual-quantizer accumulation order.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 2264, + 2452 + ], + "sha256": "af320e01c164b653ac0e7e208b2286f47dfdfeabf41cd40dc76cb7566b61c358" + }, + "claim-1": { + "summary": "IncrementalCodec retains causal convolution history and attention cache; CodecSlots supplies separate arena indices and frame positions for active streams.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2458, + 2679 + ], + "sha256": "5962f35ceab9b72a4a14b157d48df6f2a01febe99afb599cda457167212f625a" + }, + "claim-2": { + "summary": "Optional Snake constants and a BF16 contiguous Triton activation path are present. Their presence does not establish an isolated speedup.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2685, + 2888 + ], + "sha256": "62f253c7b8de00d5f3117992a12ea2510a58c59085c778ecac934dfd6aeb0f46" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2896, + 3269 + ], + "sha256": "9915b07eafe089b08a3236a0352627f348455fdc001c8c3c86e4cd707cbea23b" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 3273, + 3409 + ], + "sha256": "cc7e6426856daae754431a6cd2d0bec573e9e09ec614c91e0829ac8ae27d9637" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 3413, + 3792 + ], + "sha256": "73fc6fa2efdd095c3b32c28a567480b380d68a810c22e635f439169b975a6929" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3796, + 4158 + ], + "sha256": "c078cf7f34c57a9a644d111eb8576d99003c7d1b173cc9da083a87488d45ae8f" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 4162, + 4247 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.json b/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.json new file mode 100644 index 000000000..5c5ae45e7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.json @@ -0,0 +1,255 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen3-TTS CustomVoice: cache only model-fixed prompt embeddings", + "summary": "Prepare CustomVoice prompt embeddings directly, reusing fixed special-token and speaker/language prefixes while recomputing request-dependent text and instruction projections.", + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "CustomVoice template and tokenizer behavior must match the inspected wrapper.", + "Model weights, device, dtype and speaker/language configuration stay fixed for the cache lifetime." + ] + }, + "limitations": [ + "This is a CustomVoice-specific template optimization, not a generic Qwen3-TTS task adapter.", + "Fixed-weight cache lifetime and hard-coded template slicing require revalidation after tokenizer or model updates.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "qwen3_tts_engine", + "backend": "ascend", + "scenario": "audio.tts", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json", + "sha256": "ea5e8fdf54cb731b255b73aa0cf47ef53fac103baa2bd5246be45f95d54cb593" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/custom_voice_prompt.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "3c3b2d6a3c948159c85b0073d678b831b860f7c65aa68e6de43b7c3b9e64177c" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + } + ], + "attribution": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/custom_voice_prompt.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "3c3b2d6a3c948159c85b0073d678b831b860f7c65aa68e6de43b7c3b9e64177c" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + } + ], + "id": "qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json", + "byte_range": [ + 0, + 3660 + ], + "sha256": "ea5e8fdf54cb731b255b73aa0cf47ef53fac103baa2bd5246be45f95d54cb593" + } + } + }, + "content": { + "record.json": { + "path": "records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 289 + ], + "sha256": "82a65489c497ea17ad8be7494af3418401f17078113112e4543ac570ff2744d6" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 293, + 313 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 317, + 505 + ], + "sha256": "ff73d7c26be264afcbf03e3710f13fe278d4ae5e5fdb9a698667545538758fd5" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 509, + 592 + ], + "sha256": "cdf731669a1005912f55756e7a8f5792a3f753f675b8bd7997dca2bf160f9156" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 596, + 1364 + ], + "sha256": "c20566a52b803f3148e00733eb18b9e6f0dd4a8b5f667dc312eb0e98bde84e68" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1368, + 1896 + ], + "sha256": "f110d17eca979ae2c637843f9d1b5243e1480593ab33d6cb6c864a9137238768" + }, + "claim-0": { + "summary": "CustomVoicePrompt caches special embeddings and prefixes keyed by normalized speaker and resolved language; it validates supported speakers/languages.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1916, + 2132 + ], + "sha256": "4dbd11406526de0d685e3234f81ac514814713678aa9b84465dadfbc09d897a4" + }, + "claim-1": { + "summary": "Request text and instruction projections are computed per call; returned trailing-text and pad embeddings are cloned.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2138, + 2321 + ], + "sha256": "cc1e6cff60f4929a06e220d38ca9ebcdd9833a4135a7de77a09b3dbfb0012fc3" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2329, + 2633 + ], + "sha256": "e5f1b79624228e4089fbf51cba7d25efaf77ba3deb502962aab2d1fea3645c84" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2637, + 2773 + ], + "sha256": "cc7e6426856daae754431a6cd2d0bec573e9e09ec614c91e0829ac8ae27d9637" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2777, + 3219 + ], + "sha256": "8a169e95debdda6014c0427b6d615db3d0f05af0dfa7d3089932fcdd7a17c3a9" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3223, + 3568 + ], + "sha256": "b37a8a7392133ab8f3370caa9e3224f8c101ff233b1a94cba99b08e4c2f07482" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3572, + 3657 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.json b/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.json new file mode 100644 index 000000000..88574d12c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.json @@ -0,0 +1,270 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen3-TTS NPU graphs: batch prefill while preserving request state", + "summary": "Amortize host dispatch with captured prefill/decode and codec graphs, bounded admission and reusable request slots.", + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "Ascend graph support and prepared buffers for supported shapes.", + "Decode capacity, prefill admission and codec batching must be tuned under the actual workload." + ] + }, + "limitations": [ + "Unseen shapes can incur capture work during service.", + "Larger admission batches may improve throughput while delaying first audio.", + "Standalone combined-stack measurements do not isolate graph or scheduler contributions.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "qwen3_tts_engine", + "backend": "ascend", + "scenario": "audio.tts", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json", + "sha256": "130741a9f7ac9d366784d6c4dd42860262235caff0c277de1e8a8f8ec933b37f" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/prefill_graph.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "7d2941dcf74e73168b3f6d4ecbda913532572a2b710c65053d08f1a32304fd2e" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "attribution": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/prefill_graph.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "7d2941dcf74e73168b3f6d4ecbda913532572a2b710c65053d08f1a32304fd2e" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "id": "qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json", + "byte_range": [ + 0, + 3950 + ], + "sha256": "130741a9f7ac9d366784d6c4dd42860262235caff0c277de1e8a8f8ec933b37f" + } + } + }, + "content": { + "record.json": { + "path": "records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 298 + ], + "sha256": "2e792c94070162b13eac59ddbea264f69c645b8ae445e46f69fe4ac461507fd7" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 302, + 322 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 326, + 454 + ], + "sha256": "d55fe7fb7d283eb375ccc75f46c244e42ae29eadb1ab9ae066292bb70326ae40" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 458, + 557 + ], + "sha256": "6acc1df53b674d5e773ad356ced336030b712cce43064cbee44348a0a1d6f718" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 561, + 1696 + ], + "sha256": "1955b77dce6b940c06063c31eb7d08aff35f479e89a855821779002f9926178f" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1700, + 2210 + ], + "sha256": "7f595417d3f47adf3b2cf6d3d40ca5e4b598bb0b1fb863fa07e8cb290beef232" + }, + "claim-0": { + "summary": "The runtime combines iteration-level scheduling, slot-owned KV, batched prefill and graph-captured codec state.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 2230, + 2407 + ], + "sha256": "d748b7d2a90ceb0742e6fd66753f38f781124f5b32797ea2592eb35dc6603d17" + }, + "claim-1": { + "summary": "Prefill bucket padding appends dummy rows whose outputs are not admitted as real requests; attention masks and real lengths remain part of the computation.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2413, + 2634 + ], + "sha256": "e355f1f8d690b81533f632313de3386dbed7ffe03240417d30dea334308a6c29" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2642, + 2952 + ], + "sha256": "0762ce7ad4c4dafa3bb10b820b32b25ca84ff2dc88e16664932fec0d51b91a66" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2956, + 3092 + ], + "sha256": "cc7e6426856daae754431a6cd2d0bec573e9e09ec614c91e0829ac8ae27d9637" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 3096, + 3492 + ], + "sha256": "d5b474e96b4d34d324181378fdbb7f324a50810db39c3f0b0674cc2f13dece16" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3496, + 3858 + ], + "sha256": "b623532cb9b07b37af065df7c931916a7817ae0fe46392e28deca23fcc5ffe6f" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3862, + 3947 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/records/cache_dit.common.diffusion.residual_cache_calibration.json b/src/inferrsi/knowledge/atoms/records/cache_dit.common.diffusion.residual_cache_calibration.json new file mode 100644 index 000000000..bb92c4f1f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/cache_dit.common.diffusion.residual_cache_calibration.json @@ -0,0 +1,80 @@ +{ + "schema_version": 1, + "id": "cache_dit.common.diffusion.residual_cache_calibration", + "tier": "peer", + "repo": "cache_dit", + "backend": "common", + "component": "diffusion", + "scenario": "diffusion.*", + "title": "Cache-DiT residual reuse needs model- and schedule-specific calibration", + "status": "imported", + "summary": "DBCache skips intermediate transformer work using residual similarity, with computed boundary blocks and warmup controlling approximation.", + "tags": [ + "dbcache", + "residual_reuse", + "approximation", + "calibration", + "request_state", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/docs/user_guide/CACHE_API.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "586b1acf878bb997da80dfda18de0b450cbc36a62c66901aef889ab3d8267265" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/README.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "470f81bdae9fedd777eed9fde6a8ccef895fd190252f7503b6d15d36941c8f30" + } + ], + "applicability": { + "hardware": [ + "Upstream advertises NVIDIA, AMD and Ascend support; individual model/backend combinations remain unverified here" + ], + "software": [ + "vipshop/cache-dit at a57c826d3527736a0d1f1b0243d47568c350eb5f; later revisions need reinspection" + ], + "conditions": [ + "A supported block adapter/forward pattern and explicit request-local cache state", + "Model, dtype, CFG branches, scheduler, step count and thresholds are fixed for an evaluation" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "DBCache uses computed leading blocks to estimate change and optional trailing blocks to refine approximate hidden states; warmup and residual thresholds alter reuse." + }, + { + "kind": "upstream_reported", + "description": "The source supports per-transformer settings for multi-transformer models and shows distinct settings for separate block groups." + } + ], + "downstream_impact": [ + "vLLM-Omni: use its existing integration when compatible; freeze cache configuration and compare against cache disabled before adding compile or parallelism.", + "Cache-DiT is a peer technique source in this import but can also be a direct dependency. Role changes do not create new performance evidence.", + "vllm-ascend: calibrate with the NPU dtype/kernel stack instead of inheriting CUDA thresholds." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Evaluate diverse prompts/seeds/resolutions and short/long schedules; retain final image/video quality and intermediate residual/cache-hit diagnostics.", + "Reset state between requests, CFG branches and transformers; test cancellation and a subsequent uncached request.", + "Measure denoise and end-to-end latency separately; isolate cache, compile, quantization and parallelism before testing a combined recipe." + ], + "limitations": [ + "Residual reuse is approximate; thresholds from example prompts are not portable quality guarantees.", + "Combined README speedup illustrations do not isolate the contribution of caching, and are not imported as local gains.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.bounded_windowed_replay.json b/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.bounded_windowed_replay.json new file mode 100644 index 000000000..eaf659ee7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.bounded_windowed_replay.json @@ -0,0 +1,171 @@ +{ + "schema_version": 1, + "id": "deepinfer.common.llm.bounded_windowed_replay", + "tier": "peer", + "repo": "deepinfer", + "backend": "common", + "component": "llm", + "scenario": "llm.*", + "title": "DeepInfer bounded replay: compact query rows with a derived dependency closure and separately preserved historical state", + "status": "imported", + "summary": "A decoder stack split at an explicit producer/consumer boundary can replay only a retained suffix if the boundary captures the full-length state the consumer needs. The retain arithmetic is small and transferable; which layers are safe to shorten is a per-model dependency question and must be derived, not assumed from per-layer windowing.", + "tags": [ + "deepinfer", + "sliding_window_attention", + "prefix_replay", + "kv_cache", + "metadata", + "correctness", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/input_metadata/prepare_tensor_input_v4.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "93a6b1dd533db116d2f7540c78d6bb5419bdb8c1d2063b031ab8b1a8cc138fe2" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/input_metadata/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "882a33de3da0fba81644adde9e9e1a90ec3d3ff34a8f3ad4dda18faafebd6460" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "7dc8ad7b6ca4902bcef67b1cbc4804592995c5b6af9ebaa00b59cc338c1aa6ec" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "cb228c8fd4c76200e2ec266c51872107cfe7b384fdc88458b3d1c0ff101f3116" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ca3d80120fe6bc50971b180278dd575d585e1a6c7a3c2174a8a6fd6213454161" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/model_metadata_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "1ef7803d2b0083d025de676c841db9a317235b881fb9ebf6781ec76d49d7b22c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/model_runner.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "9e2e18d136c9e0c9f23905ff994e9d23afaa94aa7a133d425e7fc1fc069033ef" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/decoder_layer.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "2189fa14c0665a3a211b47c5440748273fd92b39a68268a0080530d3c95b7297" + } + ], + "applicability": { + "hardware": [ + "Backend-independent retain rule; the reference asserts support only for NVIDIA SM100 and Ascend 950" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; the model's window sizes and layer boundary come from its config and do not transfer" + ], + "conditions": [ + "The decoder has an explicit boundary: earlier layers run over the full prefix, later consumer layers run compact query rows while reading all required preserved state", + "A dependency closure shows each retained query's inputs are available from retained producer outputs or explicitly preserved historical state", + "Full-length consumer KV is written at the boundary, independent of the compact query", + "The rollback depth is known and floored at the speculation width plus one" + ] + }, + "claims": [ + { + "kind": "source_observed", + "description": "The retain length is window plus backtracking depth, and the backtracking depth cannot be configured below the speculative width plus one, so a full-width rollback still leaves a full window." + }, + { + "kind": "source_observed", + "description": "The retain check is guarded by the truncation mode: the metadata entrypoint returns early when the mode is off, so the keep-length assertions apply only when truncation is enabled. The keep length has no default value and is not derived from the window, so enabling truncation without setting it fails rather than silently clipping. The same condition is checked at model-metadata construction and at worker setup." + }, + { + "kind": "source_observed", + "description": "The SWA path's visible keys intersect the sliding window start, retained rectangle and valid-state start; recompute clears SWA state below the last bound. This does not constrain all main/index historical KV to the compact query suffix. An empty SWA visible region is represented explicitly." + }, + { + "kind": "source_observed", + "description": "Two modes exist: a mask mode that keeps every query and only narrows visibility, and a compact mode that removes clipped rows. Only the second saves compute, and the first is therefore the natural equivalence reference." + }, + { + "kind": "source_observed", + "description": "The boundary returns both a compact copy and the original full hidden and residual; the caller stores the full one and continues with the compact one. The full-length consumer KV is written from the full hidden in a separate pass, so the persistent cache stays complete while the query is compact." + }, + { + "kind": "source_observed", + "description": "For a positive window the inference ring is window plus rollback; otherwise it is zero. Both kvstore-ring additions are gated by the store-extra-state flag. Within that branch the store-granularity margin is added, plus the keep margin only when truncation mode is not off. The keep margin therefore requires both gates." + }, + { + "kind": "source_observed", + "description": "Prompt logprobs are not reconstructable from a clipped region; the engine forces them off with a warning rather than rejecting the request, so the request still runs with per-token prompt logprobs disabled." + } + ], + "downstream_impact": [ + "The retain arithmetic and the visible-region formula are reusable in any decoder that can derive the same boundary dependency; the boundary index, window sizes and ring lengths must be re-derived per model.", + "Query-row compaction and historical-key retention are separate decisions. A consumer may keep full-layout keys in a compressed or shared index while computing over fewer query rows, so compaction is not evidence that historical keys were dropped.", + "Prompt logprobs become unavailable for the clipped region, whether by being forced off or by rejection; which of the two is a policy choice, not a consequence of the mechanism.", + "The mask/compact split is a reusable testing pattern: a compute-neutral diagnostic mode isolates the visibility math from the gather." + ], + "recommendations": [ + "Derive the producer/consumer dependency closure before applying window arithmetic; one layer's finite window does not determine the whole stack's dependency horizon. Preserved historical state remains a valid input.", + "Enforce the retain length at every entry, not once, because the value can arrive through an environment variable.", + "Do not report the diagnostic mode as an optimization; it is compute-neutral by construction.", + "State whether historical keys are preserved, compacted or compressed, separately from the query-compaction decision.", + "State the anchor explicitly. Preemption-and-recompute moves the retained rectangle, so bit-identical results across preemption are not available." + ], + "validation_plan": [ + "Dependency closure: for every consumer layer, list what it reads and where it was produced.", + "Full-length KV write exists at the boundary and is independent of the compact query.", + "Metadata equivalence between the two modes at chunk boundaries: visible-key sets, store slots and compressed-key ranges.", + "End-to-end equivalence on a fixed teacher-forcing trajectory, comparing logprobs and top-k element-wise.", + "A dependency-probe run that keeps all historical keys and shortens only the query, to separate the two decisions.", + "Chunk sizes that do and do not align with store granularity, including a fully clipped chunk.", + "Preemption count during the comparison run, which must be zero for the result to be interpretable." + ], + "limitations": [ + "No equivalence run was performed; the metadata argument is from the shared formula, not from a measurement.", + "Applies to architectures with a demonstrated boundary dependency, not to arbitrary sliding-window stacks.", + "Window sizes, boundary-layer index and ring lengths are specific to one model and must not be carried across.", + "Query-row compaction does not imply dropping historical keys.", + "Prompt logprobs are not reconstructable from a clipped region.", + "The truncation path is off by default in the source." + ], + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.speculative_verification_budget.json b/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.speculative_verification_budget.json new file mode 100644 index 000000000..2cbfc776a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.speculative_verification_budget.json @@ -0,0 +1,160 @@ +{ + "schema_version": 1, + "id": "deepinfer.common.llm.speculative_verification_budget", + "tier": "peer", + "repo": "deepinfer", + "backend": "common", + "component": "llm", + "scenario": "llm.*", + "title": "DeepInfer verification budget: spend verification rows by marginal acceptance, not by fixed draft width", + "status": "imported", + "summary": "A confidence head predicts per-position acceptance; a cumulative non-increasing rate vector plus a fitted step-cost model selects how many draft rows to verify per step. The objective is expected accepted tokens per unit time, so fewer verified drafts may accept fewer tokens while still raising throughput. Draft compute is unchanged.", + "tags": [ + "speculative_decoding", + "mtp", + "verification", + "cost_model", + "acceptance_rate", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "164f45db4cccd6d6909dd2846e7dfffb57754b108af679443bf4bd71ec33785a" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/sampling_params.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f800034efdebe1b21620660a51fa9122d3d7f138d8e60cd738f33d643c3116f8" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/mtp/dflash.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "12ebfb9c793062844d40e0fab17164d5365d965c318f8b9f0f4adf51b3afb684" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/tilelang_ops/fused_sample.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f43ac934284d15f708a0aa07aaa8fff7daa257984e311ca554bd9dbea89e5e1d" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/sampler.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "81205a12e860041ffa904321b852db2d048bc038bb07d494dbb78b44b522d9a9" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + } + ], + "applicability": { + "hardware": [ + "Backend-independent procedure; the reference implementation targets NVIDIA SM100 and Ascend 950 only" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; requires a model with a trained confidence head" + ], + "conditions": [ + "Multi-token speculative decoding with a draft head", + "Verification cost grows with query rows", + "Acceptance varies materially by request and draft position", + "A measured (rows, step_time) curve is obtainable at warmup", + "The per-position confidence feeding a verification decision at position i is independent of confidence at positions greater than i" + ] + }, + "claims": [ + { + "kind": "source_observed", + "description": "Two queues of (accept_rate, request) pairs are sorted descending by rate with index tie-breaking, and rows are granted one at a time, so every grant is a prefix over draft positions." + }, + { + "kind": "source_observed", + "description": "The selection maximizes expected accepted tokens over estimated step time, where step time is a graph-size baseline plus a non-negative fitted slope times graph size plus a sampler term estimated per request count. Because the numerator is an expectation over accepted prefixes, reducing verified rows can reduce accepted tokens while still raising the ratio." + }, + { + "kind": "source_observed", + "description": "The search starts with one row per scheduled request and asserts best_bsz >= num_seqs. This is a row-allocation contract, not a measured speed comparison with plain decode." + }, + { + "kind": "source_observed", + "description": "The inspected DFlash decode producer samples its configured full width in both paths; variable-length scheduling budgets verification rows. This conclusion comes from sampler.py and DFlash's fixed-width metadata/forward/sample chain, not the non-budgeted verification-length branch." + }, + { + "kind": "source_observed", + "description": "The budgeted path is opt-in. DEEPINFER_ENABLE_MTP_VARLEN defaults false while DEEPINFER_USE_NEXTN_DECODE defaults 5, so fixed-width speculation is the default and the budget must be enabled." + }, + { + "kind": "source_observed", + "description": "The source requires later-position confidence not to affect earlier verification decisions. CPU scheduling takes the total budget from N-2 and reads the latest CPU accept_rates for per-request lengths; when a forward is in flight those rates lag. The overlapping ZOS worker redistributes fixed total_q using the previous sampler's GPU confidence before the main forward, then synchronizes corrected metadata before sampling. This source design is not a runtime sampling-correctness proof." + }, + { + "kind": "source_observed", + "description": "The confidence-head temperature and the request sampling temperature are separate values with separate clamps. The former scales the confidence head's output; the latter is a SamplingParams field. Neither implies the other." + }, + { + "kind": "source_observed", + "description": "The reject path is gated on draft logprobs being supplied rather than on request temperature, so a request configured as greedy still goes through rejection. This reading is from the gating logic; no run confirmed it end to end." + } + ], + "downstream_impact": [ + "vLLM-family engines with EAGLE-style multi-token verification could adopt the cumulative-rate plus cost-model framing; whether their verification cost has the same shape is unverified.", + "The per-position independence requirement is the part most likely to be lost in transfer: any alternative confidence timing must be justified against it, not merely measured for speed.", + "The two-round lag is a consequence of that requirement under a pipelined scheduler, so it cannot be simplified away by reading an earlier round without re-deriving the property.", + "Ascend: no separate arithmetic is established; cross-backend rejection parity is unproven in the source itself." + ], + "recommendations": [ + "Report verification rows and accepted tokens as separate measurements. A lower accepted length is an expected outcome of budgeting, not a defect.", + "Validate sampling correctness against an independently specified rejection rule rather than by comparing budget-on and budget-off token streams, which do not have to agree.", + "Include the draft forward in any throughput number, or the reported gain overstates the effect.", + "Do not apply this to a separate draft model whose forward cost scales with the number of drafts; the budget would need to throttle drafting too.", + "Do not use acceptance uniformity alone as a stop condition. Near-zero acceptance can still favour a one-row budget by avoiding wasted verification; decide from the measured cost model." + ], + "validation_plan": [ + "Allocation invariants: every grant is a prefix over draft positions and at least one row per request.", + "Sampling correctness against a separately implemented rejection rule, on synthetic distributions with known acceptance probabilities.", + "Per-position independence probe: perturb confidence at positions after i and confirm the verify decision at i is unchanged.", + "Verification rows per step, accepted tokens per step, total step time and end-to-end throughput, each reported separately.", + "Acceptance-uniformity sweep including all-low, to test the cost model rather than to exclude the case.", + "Peak memory at fixed concurrency, because wide top-k verification pools can dominate memory." + ], + "limitations": [ + "No gain was reproduced; nothing here is a measured speedup.", + "The source's own efficiency figures are deployment documentation, not a controlled experiment.", + "Requires a trained confidence head; a substitute estimate needs its own calibration.", + "Budgeting can lower accepted length, so equal accepted length is not an available correctness criterion.", + "Cross-backend equality of the rejection comparison has no assertion in the source.", + "Numeric acceptance rates and warmup curves are deployment-specific and are not carried in this record." + ], + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json b/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json new file mode 100644 index 000000000..f381dd0f3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json @@ -0,0 +1,140 @@ +{ + "schema_version": 1, + "id": "deepinfer.common.llm.zero_overhead_deferred_scheduling", + "tier": "peer", + "repo": "deepinfer", + "backend": "common", + "component": "llm", + "scenario": "llm.*", + "title": "DeepInfer zero-overhead scheduling: defer the previous step's post-process to overlap host prep with device work", + "status": "imported", + "summary": "Move the CPU-only post-process of step N into step N+1 so it overlaps the next forward. The reusable part is the staleness enumeration and the on-device repair, not the scheduler itself.", + "tags": [ + "scheduling", + "host_overhead", + "overlap", + "pipelining", + "stale_state", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L307-L314", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/parallel_utils/parallel_state.py#L89-L94", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "3565b2449abff4df0df2f979061a73364886c93602218b43c2f86c70f2629801" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/zos.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "1cb70e0b4ed7181b95e19ef2cc3cc640d1cd8f24e874ce4bc34fe51d6f031b46" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/arg_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c28c478bd376165c073c6e0722bed8468599a2fd766ffc7aafcd4ef270af52c5" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/engine_type.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "9933d83f500e3cc14c5fef0dd2fbe5c5170dbbf24df217376b0a55c4fb4ab48c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "8a0049b98ea6f7ef98555ad8b38b9e8dac2292c0d2a89c2090bbdb5e5ee7295a" + } + ], + "applicability": { + "hardware": [ + "Backend-independent pipelining idea; the reference implementation asserts support only for NVIDIA SM100 and Ascend 950" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; later revisions need reinspection" + ], + "conditions": [ + "Decode-heavy workload where the CPU post-process is exposed between device kernels", + "At least one extra step of retained metadata, state slots and KV blocks is affordable", + "Distributed step-type votes can run on a host-side backend, not a device collective", + "The entrypoint has a drain path, because callers see results one step late" + ] + }, + "claims": [ + { + "kind": "source_observed", + "description": "The reorder is forward(N) -> post-process(N-1) -> sample(N) -> defer post-process(N). Prompt steps never defer; only decode steps, and only when DEEPINFER_ZERO_OVERHEAD_SCHEDULING is set." + }, + { + "kind": "source_observed", + "description": "Three quantities become one step stale: per-request query length under adaptive speculation, per-request key length after rejected drafts, and input token ids for rows continuing from the previous batch. Each is repaired on device from a remap of the previous batch." + }, + { + "kind": "source_observed", + "description": "The scheduler releases the GIL; the standard ZOS engine constructor selects its CPU data-parallel group, created with Gloo, and the scheduler's Gloo vote uses a CPU tensor. This is a constructor/code path observation, not proof that every scheduler branch avoids device synchronization." + }, + { + "kind": "source_observed", + "description": "The default depends on how the engine object is built. The environment variable defaults false, while EngineArgs sets it with setdefault from a per-engine-type property that is true for NORMAL and COMPLETION and false for PROMPT. A README claim of 'enabled by default' and a false variable default can both be true of different entrypoints." + }, + { + "kind": "source_observed", + "description": "Forward and sample launches use a torch-visible synchronization debug guard. Event.synchronize is outside its coverage, another thread's allow scope can lift enforcement, and an environment setting disables it. Guard presence alone does not prove synchronization-free execution." + } + ], + "downstream_impact": [ + "The host-overhead profiling procedure measures exposed preparation; this source case illustrates moving that preparation rather than shrinking it, without a reproduced gain.", + "A vLLM or vLLM-family engine could adopt the reorder only if its scheduler is device-free and it can enumerate the stale quantities; neither is established here.", + "Ascend: the mechanism is arithmetic and metadata, but the reference asserts unsupported combinations rather than degrading, so the transfer hypothesis needs its own gate check." + ], + "recommendations": [ + "Treat the staleness list as the deliverable, not the code. An engine that cannot enumerate what becomes stale cannot safely pipeline.", + "Confirm the drain path before measuring anything; without it tokens are silently lost at the end of a request.", + "Preserve the standard ZOS constructor's host DP-group ordering, or re-establish the ordering for a custom construction before measuring overlap." + ], + "validation_plan": [ + "Profile with named regions before and after, reporting the idle window separately from kernel time.", + "Compare a fixed-seed single request token-for-token between the pipelined and direct orders.", + "Report the fraction of steps where the remap found overlap, split by prompt and decode.", + "Measure peak memory, since one extra step of state is retained." + ], + "limitations": [ + "No DeepInfer build or run was performed; nothing here is a measured gain.", + "The reference is an offline engine for one model; transfer to a serving engine with continuous batching is unproven.", + "Scheduler stale-output guards, sample-event synchronization and deferred metadata release exist. Their presence does not establish complete in-flight KV/state reuse safety; a reachable preemption race was neither proved nor reproduced, so it remains a validation question rather than a known defect.", + "Numeric timer thresholds and any reported throughput belong to the source deployment and are not reproduced." + ], + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json b/src/inferrsi/knowledge/atoms/records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json new file mode 100644 index 000000000..3341b69a7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json @@ -0,0 +1,71 @@ +{ + "schema_version": 1, + "id": "diffusers.cuda.diffusion.group_offload_transfer_overlap", + "tier": "dependency", + "repo": "diffusers", + "backend": "cuda", + "component": "diffusion", + "scenario": "diffusion.*", + "title": "Diffusers group offload exchanges VRAM for host memory and transfer scheduling", + "status": "imported", + "summary": "Group/leaf offload and asynchronous prefetch offer different memory-latency tradeoffs; hook compatibility and host allocation must be evaluated.", + "tags": [ + "offload", + "prefetch", + "cpu_memory", + "stream", + "vae", + "dependency_compatibility" + ], + "sources": [ + { + "url": "https://github.com/huggingface/diffusers/blob/efe46a5b177af67c64b3666da8ddddac7ee12163/docs/source/en/optimization/memory.md", + "type": "technical_document", + "commit": "efe46a5b177af67c64b3666da8ddddac7ee12163", + "accessed_at": "2026-10-15", + "content_sha256": "fb390aac843bb8b53273f9584832b69299cacc7a805d07552598c017e7d1bae6" + } + ], + "applicability": { + "hardware": [ + "CUDA GPU with asynchronous transfer streams, sufficient CPU memory and measured host-device bandwidth" + ], + "software": [ + "huggingface/diffusers at efe46a5b177af67c64b3666da8ddddac7ee12163; later revisions need reinspection" + ], + "conditions": [ + "The model supports the relevant group-offload hooks and its forward device casts do not conflict with them" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Group offload moves internal module groups or leaves. CUDA streams can prefetch subsequent work while the current layer executes." + }, + { + "kind": "upstream_reported", + "description": "Pre-pinning can raise host memory substantially; low_cpu_mem_usage trades on-demand pinning for additional execution time. Block-level streaming requires num_blocks_per_group=1 in this documentation." + } + ], + "downstream_impact": [ + "vLLM-Omni: check whether upstream offload hooks are used or replaced before copying configuration; track both host PSS and device peak.", + "Keep loading, first real request, denoise and VAE timings separate when estimating overlap benefits.", + "vllm-ascend: revalidate transfer/event semantics with its own backend; a CUDA stream recipe is not an NPU result." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Compare resident, group-offload and streamed variants with fixed model/dtype/shape and report preparation, first request and warm requests.", + "Exercise VAE tiling, cancellation and repeated requests; retain output parity and allocator/host-memory traces." + ], + "limitations": [ + "The source warns about weight-dependent input device casting and a tiled-VAE warmup requirement; warmup belongs in preparation, not a substituted readiness response.", + "Insufficient CPU RAM or transfer bandwidth can erase latency gains.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/flashattention.cuda.attention.generation_specific_dispatch.json b/src/inferrsi/knowledge/atoms/records/flashattention.cuda.attention.generation_specific_dispatch.json new file mode 100644 index 000000000..4aa071ac0 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/flashattention.cuda.attention.generation_specific_dispatch.json @@ -0,0 +1,69 @@ +{ + "schema_version": 1, + "id": "flashattention.cuda.attention.generation_specific_dispatch", + "tier": "dependency", + "repo": "flashattention", + "backend": "cuda", + "component": "attention", + "scenario": "attention.*", + "title": "FlashAttention generations have distinct hardware and API contracts", + "status": "imported", + "summary": "Select an attention generation using its actual GPU, dtype and interface requirements; package names and installation paths are not interchangeable.", + "tags": [ + "attention", + "flashattention", + "hopper", + "blackwell", + "api_compatibility" + ], + "sources": [ + { + "url": "https://github.com/Dao-AILab/flash-attention/blob/1fc0221183e799363001394a12dd9e78e15f5dda/README.md", + "type": "technical_document", + "commit": "1fc0221183e799363001394a12dd9e78e15f5dda", + "accessed_at": "2026-10-15", + "content_sha256": "0dbaba56da1c8372d460956e2609bfb89acf8f3aadd65d132b1697d221069619" + } + ], + "applicability": { + "hardware": [ + "FA2 CUDA: Ampere/Ada/Hopper; FA3: H100/H800; FA4 CuTeDSL targets Hopper/Blackwell in the inspected README" + ], + "software": [ + "Dao-AILab/flash-attention at 1fc0221183e799363001394a12dd9e78e15f5dda; later revisions need reinspection" + ], + "conditions": [ + "Qualify exact head dimensions, masks, variable lengths and dtypes on the selected implementation" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "FA3 documents FP16/BF16 forward/backward and FP8 forward, with CUDA >=12.3 and an H100/H800 requirement." + }, + { + "kind": "upstream_reported", + "description": "FA3 is installed from hopper and imported through flash_attn_3; FA4 uses flash-attn-4 and flash_attn.cute. The source keeps generation-specific installation and capability sections." + } + ], + "downstream_impact": [ + "vLLM and vLLM-Omni: audit optional imports and dispatch during dependency upgrades, especially where Hopper and Blackwell share a configuration.", + "vllm-ascend: use a separately qualified NPU implementation; this CUDA card supplies no compatible kernel." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Test supported and unsupported dtype/head-size/mask combinations against the same reference before benchmarking prefill or diffusion attention.", + "Measure kernel and full pipeline latency independently; include compilation/import cost and record the exact selected generation." + ], + "limitations": [ + "Different algorithms and FP8 can change numerical error; mathematical attention equivalence is not bitwise parity.", + "ROCm has separate implementation requirements in the source and is outside this CUDA card.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/flashinfer.cuda.llm.paged_decode_dispatch.json b/src/inferrsi/knowledge/atoms/records/flashinfer.cuda.llm.paged_decode_dispatch.json new file mode 100644 index 000000000..c1ae9d209 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/flashinfer.cuda.llm.paged_decode_dispatch.json @@ -0,0 +1,78 @@ +{ + "schema_version": 1, + "id": "flashinfer.cuda.llm.paged_decode_dispatch", + "tier": "dependency", + "repo": "flashinfer", + "backend": "cuda", + "component": "llm", + "scenario": "llm.*", + "title": "FlashInfer paged decode: freeze backend selection and graph buffers", + "status": "imported", + "summary": "Paged attention separates planning from execution; auto dispatch and CUDA graph buffer ownership are part of the reproducibility boundary.", + "tags": [ + "attention", + "paged_kv", + "cuda_graph", + "dispatch", + "dependency_drift" + ], + "sources": [ + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/README.md", + "type": "technical_document", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "472bc506d8a67ca7d8048650b9fc8f17d75f5adbaa016b505b76bbb48a8b4fbc" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/flashinfer/decode.py", + "type": "source_code", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "85411257e706ffdcb4334d2a8d721268fe236145ac855e4b32bef9109a7bf780" + } + ], + "applicability": { + "hardware": [ + "NVIDIA CUDA; the inspected auto-cuDNN dispatch specifically distinguishes SM100/SM103 and frontend versions" + ], + "software": [ + "flashinfer-ai/flashinfer at 3637083a3a3d08538cce60937cd876b17779c6f0; later revisions need reinspection" + ], + "conditions": [ + "Paged KV decode with known head dimensions, dtype, page layout and batch shape", + "Caller-owned graph buffers must remain valid across planning and replay" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "BatchDecodeWithPagedKVCacheWrapper exposes resolved_backend after planning. Auto selection depends on architecture, kernel availability, shapes and optional cuDNN/CuTe dependencies." + }, + { + "kind": "upstream_reported", + "description": "The inspected cuDNN path accepts a narrower feature set than the whole library; it excludes RoPE, soft-cap and FP8/NVFP4 KV. Captured block tables and backend choice cannot change arbitrarily between re-plans." + } + ], + "downstream_impact": [ + "vLLM: record the resolved attention backend and dependency tuple when comparing upgrades; an unchanged backend=auto argument does not freeze the implementation.", + "vLLM-Omni: transfer the dispatch/buffer-ownership checks only to adapters actually calling these APIs; this LLM decode card does not establish diffusion attention support.", + "vllm-ascend: the CUDA kernels are not portable; only the explicit-dispatch and lifetime checks are candidate review practices." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Compare numerical outputs with a reference over supported dtype/head/layout/masking combinations and require a defined fallback for unsupported inputs.", + "Measure cold planning/JIT, warm run, graph capture and replay separately; vary batch and sequence shapes and test caller-owned buffer reuse." + ], + "limitations": [ + "The library GPU table is not an operator-by-operator support matrix.", + "No downstream dependency bump or universal speedup is recommended from this snapshot.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json b/src/inferrsi/knowledge/atoms/records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json new file mode 100644 index 000000000..a9e13da46 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json @@ -0,0 +1,70 @@ +{ + "schema_version": 1, + "id": "lmdeploy.cuda.llm.kv_quantization_capacity_cost", + "tier": "peer", + "repo": "lmdeploy", + "backend": "cuda", + "component": "llm", + "scenario": "llm.*", + "title": "LMDeploy KV quantization: preserve capacity gains and latency counterexamples", + "status": "imported", + "summary": "KV compression can increase cache capacity yet reduce throughput; distinguish engine-specific quantizers and validate long-context quality.", + "tags": [ + "kv_quantization", + "turboquant", + "capacity", + "latency_regression", + "quality", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/InternLM/lmdeploy/blob/822dddb8b3bc895eaf6cffb45a5514768e7ecb84/docs/en/quantization/kv_quant.md", + "type": "technical_document", + "commit": "822dddb8b3bc895eaf6cffb45a5514768e7ecb84", + "accessed_at": "2026-10-15", + "content_sha256": "58d41fe148d80b2b1ee4c8e3210a7ab6cf1d7f51943f1cb61690e6b1dde329e3" + } + ], + "applicability": { + "hardware": [ + "INT4/INT8 source support spans NVIDIA Volta and later; the TurboQuant example is specifically H200" + ], + "software": [ + "InternLM/lmdeploy at 822dddb8b3bc895eaf6cffb45a5514768e7ecb84; later revisions need reinspection" + ], + "conditions": [ + "Record engine, quant_policy, attention architecture, head dimension and quantizer dependencies" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "INT4/INT8 uses online per-head/per-token asymmetric quantization. The documented TurboQuant K4V2 path is PyTorch-engine-only, excludes MLA and speculative decoding, and requires power-of-two head dimensions." + }, + { + "kind": "upstream_reported", + "description": "Upstream unverified counterexample: H200, Qwen3-30B-A3B-Base, ShareGPT, concurrency 64, 5000 requests, quant_policy=42 versus 0 reports output throughput 2186.7 to 2027.0 tokens/s and mean E2E latency 5.888 to 6.348 seconds. Compression did not improve latency in this configuration." + } + ], + "downstream_impact": [ + "vLLM and vllm-ascend: candidate capacity experiment under memory pressure; do not transplant LMDeploy quant_policy values into another engine.", + "Compare achievable concurrency and quality as well as per-request latency; preserve regressions when ranking candidates." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Measure actual KV bytes including scales/metadata, peak allocation and concurrency under equal total memory.", + "Test long-context retrieval and generation quality, then serving throughput/latency with both ample-memory and constrained-memory workloads." + ], + "limitations": [ + "Source quality slogans are not exactness guarantees. INT4/INT8 and TurboQuant are distinct techniques with different engine support.", + "The reported table is not accompanied here by raw request samples or frozen validators; its numbers are neither locally reproduced nor a general gain claim.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json b/src/inferrsi/knowledge/atoms/records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json new file mode 100644 index 000000000..1f1d697b9 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json @@ -0,0 +1,77 @@ +{ + "schema_version": 1, + "id": "pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes", + "tier": "dependency", + "repo": "pytorch", + "backend": "cuda", + "component": "compiler", + "scenario": "compiler.*", + "title": "Inductor CUDA graphs: distinguish compile guards, capture shapes and tensor lifetime", + "status": "imported", + "summary": "CUDA graph replay can reduce host launch overhead, but shape specialization, pointer stability and output lifetime remain independent constraints.", + "tags": [ + "torch_compile", + "inductor", + "cuda_graph", + "recompilation", + "tensor_lifetime" + ], + "sources": [ + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/torch.compiler_cudagraph_trees.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0dbfcef13ad6baea52c6e989eaf6561440c02a26a6ef667da850439d3a88c6a5" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/compile/programming_model.recompilation.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0240bbc4fc9ead047c5039d4bcab93e201c65bd7768c8995e09ee3eb654eaf59" + } + ], + "applicability": { + "hardware": [ + "CUDA devices supported by the pinned PyTorch/compiler stack" + ], + "software": [ + "pytorch/pytorch at f15b476814ebc5eade36fb40512e379ebf79dd60; later revisions need reinspection" + ], + "conditions": [ + "A torch.compile/Inductor path with launch overhead worth measuring", + "Representative shape distribution and input/output mutation behavior are known" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "CUDA graphs replay fixed kernel arguments and addresses. CUDAGraph Trees manage shared pools subject to tensor-liveness and invocation constraints; eager-input mutation can cause capture to be skipped." + }, + { + "kind": "upstream_reported", + "description": "Shape or Python scalar guards can trigger recompilation. TORCH_LOGS=recompiles exposes causes; dynamic compilation and CUDA graph recording are not the same mechanism." + } + ], + "downstream_impact": [ + "vLLM and vLLM-Omni: record compile/recompile/capture events separately from steady-state latency and include diverse request shapes in the evaluation.", + "vllm-ascend: compiler diagnosis may transfer conceptually; CUDA graph memory and capture guarantees do not establish torch_npu behavior." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Freeze a workload shape histogram and compare eager with compile-only and graph replay under identical inputs.", + "Retain outputs across subsequent calls, exercise input mutation, and measure cold cost, graph-pool memory and recompilation counts." + ], + "limitations": [ + "A single warm fixed-shape run cannot establish service improvement or dynamic-shape stability.", + "Changing graph/compiler knobs may change memory use; no global mode is declared optimal.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json b/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json new file mode 100644 index 000000000..feaaef271 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json @@ -0,0 +1,90 @@ +{ + "schema_version": 1, + "id": "qwen3_tts_engine.ascend.audio.codec_constants_and_state", + "tier": "peer", + "repo": "qwen3_tts_engine", + "backend": "ascend", + "component": "audio", + "scenario": "audio.tts", + "title": "Qwen3-TTS codec: cache fixed codebooks and retain request-owned causal state", + "status": "imported", + "summary": "Avoid repeated codec normalization and history reconstruction under fixed evaluation weights; preserve per-request convolution and attention state.", + "tags": [ + "codebook", + "codec", + "streaming", + "snake", + "state" + ], + "sources": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/cached_quantizer.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "75207d415dbe425f677c4974880b56a066785e10a1715e058a9e790507c0498a" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/incremental_codec.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "cb555a40604f06981db409f5fc0773b39a556eb87930aababb56299e37e7acc4" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "Frozen evaluation weights and a stable model/device/dtype for the cache lifetime.", + "Streaming decoder semantics and history window must match the reference model." + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "CachedQuantizer materializes normalized codebooks once and preserves the sequential residual-quantizer accumulation order." + }, + { + "kind": "upstream_reported", + "description": "IncrementalCodec retains causal convolution history and attention cache; CodecSlots supplies separate arena indices and frame positions for active streams." + }, + { + "kind": "upstream_reported", + "description": "Optional Snake constants and a BF16 contiguous Triton activation path are present. Their presence does not establish an isolated speedup." + } + ], + "downstream_impact": [ + "vLLM-Omni: cache immutable codebook normalization inside the owning decoder; retain its existing stream ownership instead of copying the standalone scheduler.", + "A downstream cache needs explicit invalidation on weight reload, device/dtype conversion and training; the standalone fixed-weight helper is not a general reload-safe module." + ], + "recommendations": [ + "Treat each mechanism as a separate transfer experiment; do not multiply isolated or combined-stack gains." + ], + "validation_plan": [ + "Compare quantizer and waveform outputs over multiple chunk partitions, first/last chunks and residual-codebook counts.", + "Interleave streams, cancel/reuse slots, poison old history and replay graph buffers to detect cross-request leakage.", + "Measure eager and captured activation paths separately; keep unfused fallback if fusion regresses." + ], + "limitations": [ + "The source helper assumes immutable evaluation weights and does not implement general cache invalidation.", + "Codec fusion can lose to eager execution for some shapes; do not infer an operator gain from whole-engine throughput.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json b/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json new file mode 100644 index 000000000..44c179084 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json @@ -0,0 +1,78 @@ +{ + "schema_version": 1, + "id": "qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt", + "tier": "peer", + "repo": "qwen3_tts_engine", + "backend": "ascend", + "component": "audio", + "scenario": "audio.tts", + "title": "Qwen3-TTS CustomVoice: cache only model-fixed prompt embeddings", + "status": "imported", + "summary": "Prepare CustomVoice prompt embeddings directly, reusing fixed special-token and speaker/language prefixes while recomputing request-dependent text and instruction projections.", + "tags": [ + "customvoice", + "prompt", + "embedding_cache", + "prefill" + ], + "sources": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/custom_voice_prompt.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "3c3b2d6a3c948159c85b0073d678b831b860f7c65aa68e6de43b7c3b9e64177c" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + } + ], + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "CustomVoice template and tokenizer behavior must match the inspected wrapper.", + "Model weights, device, dtype and speaker/language configuration stay fixed for the cache lifetime." + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "CustomVoicePrompt caches special embeddings and prefixes keyed by normalized speaker and resolved language; it validates supported speakers/languages." + }, + { + "kind": "upstream_reported", + "description": "Request text and instruction projections are computed per call; returned trailing-text and pad embeddings are cloned." + } + ], + "downstream_impact": [ + "vLLM-Omni: first compare its processor output with the reference prompt builder. Reuse only fixed embeddings at the correct model owner.", + "Do not cache arbitrary request text or reuse prefixes across different models/adapters without identity and invalidation rules." + ], + "recommendations": [ + "Treat each mechanism as a separate transfer experiment; do not multiply isolated or combined-stack gains." + ], + "validation_plan": [ + "Compare full inputs_embeds, masks and generation kwargs against the reference for English, Chinese, auto language, dialect speakers and nonempty instructions.", + "Test repeated and changed text, mixed speakers and model reload; include unsupported-language and empty-input behavior.", + "Then validate generated audio and service TTFA under the frozen workload; prompt parity alone is not a service result." + ], + "limitations": [ + "This is a CustomVoice-specific template optimization, not a generic Qwen3-TTS task adapter.", + "Fixed-weight cache lifetime and hard-coded template slicing require revalidation after tokenizer or model updates.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json b/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json new file mode 100644 index 000000000..15504d91f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json @@ -0,0 +1,87 @@ +{ + "schema_version": 1, + "id": "qwen3_tts_engine.ascend.audio.graph_batching_state_ownership", + "tier": "peer", + "repo": "qwen3_tts_engine", + "backend": "ascend", + "component": "audio", + "scenario": "audio.tts", + "title": "Qwen3-TTS NPU graphs: batch prefill while preserving request state", + "status": "imported", + "summary": "Amortize host dispatch with captured prefill/decode and codec graphs, bounded admission and reusable request slots.", + "tags": [ + "npu_graph", + "prefill", + "continuous_batching", + "kv_cache", + "ttfa" + ], + "sources": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/prefill_graph.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "7d2941dcf74e73168b3f6d4ecbda913532572a2b710c65053d08f1a32304fd2e" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "Ascend graph support and prepared buffers for supported shapes.", + "Decode capacity, prefill admission and codec batching must be tuned under the actual workload." + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "The runtime combines iteration-level scheduling, slot-owned KV, batched prefill and graph-captured codec state." + }, + { + "kind": "upstream_reported", + "description": "Prefill bucket padding appends dummy rows whose outputs are not admitted as real requests; attention masks and real lengths remain part of the computation." + } + ], + "downstream_impact": [ + "vLLM-Omni: reuse its scheduler, request identities and graph ownership; copying the standalone arena is not a drop-in optimization.", + "Graph capture and batch policy are separate hypotheses. Measure first-audio latency as well as throughput before choosing admission sizes." + ], + "recommendations": [ + "Treat each mechanism as a separate transfer experiment; do not multiply isolated or combined-stack gains." + ], + "validation_plan": [ + "Exercise changing batch sizes, mixed prompt lengths, graph misses, cancellation, slot reuse and capacity growth.", + "Verify retained outputs are not overwritten by subsequent replays and dummy rows cannot become requests.", + "Separate startup capture and warmup from timed service; repeat paired baseline/candidate workloads with lifecycle and quality checks." + ], + "limitations": [ + "Unseen shapes can incur capture work during service.", + "Larger admission batches may improve throughput while delaying first audio.", + "Standalone combined-stack measurements do not isolate graph or scheduler contributions.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/sglang.cuda.llm.hierarchical_prefix_cache.json b/src/inferrsi/knowledge/atoms/records/sglang.cuda.llm.hierarchical_prefix_cache.json new file mode 100644 index 000000000..aab5d3afd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/sglang.cuda.llm.hierarchical_prefix_cache.json @@ -0,0 +1,79 @@ +{ + "schema_version": 1, + "id": "sglang.cuda.llm.hierarchical_prefix_cache", + "tier": "peer", + "repo": "sglang", + "backend": "cuda", + "component": "llm", + "scenario": "llm.*", + "title": "SGLang HiCache: reuse prefixes only when transfer beats recomputation", + "status": "imported", + "summary": "Move reusable prefix KV across device, host and storage tiers while accounting for sharing scope, layout conversion and prefetch policy.", + "tags": [ + "prefix_cache", + "kv_cache", + "hicache", + "prefetch", + "storage", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_design.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "ea9e7896aeeba4f648c3484b382780ce735bba74e0a74dd5403bf7a0438305b5" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_best_practices.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "1b23cd3668a11a1dce0f8be6104afdc9c8b735d14b86c3c36387f303c2daf31b" + } + ], + "applicability": { + "hardware": [ + "GPU plus CPU memory and optional storage/network backend; CUDA transfer path is the scope of this candidate" + ], + "software": [ + "sgl-project/sglang at f7ad4345b86d147a1c3095a3cebabca9a33ebaa1; later revisions need reinspection" + ], + "conditions": [ + "Repeated prefixes or long contexts with measurable reuse", + "Model/cache identity and distributed-rank agreement must be maintained" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "HiCache keeps L1 device and L2 host caches private to an inference instance; only appropriately configured L3 storage enables cross-instance reuse." + }, + { + "kind": "upstream_reported", + "description": "Page-oriented layouts, selective write-through and prefetch termination policies trade I/O overhead against useful cache hits. Multi-rank consensus constrains usable prefix lengths." + } + ], + "downstream_impact": [ + "vLLM: candidate experiment for long-context or repeated-prefix serving; compare transfer cost with recomputation under the actual hit-rate distribution.", + "vLLM-Omni: consider only stages with genuinely reusable prefix KV; diffusion residual caching is a different technique.", + "vllm-ascend: the hierarchy is a design hypothesis, with NPU I/O and layout behavior requiring separate validation." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Compare cold cache, warm device cache, host hits and storage hits with identical request order; report TTFT, throughput, transfer bytes and hit rates.", + "Test cache keys for model/revision/adapter differences, eviction, partial prefetch and rank disagreement." + ], + "limitations": [ + "No SGLang benchmark gain is imported as an InferRSI result.", + "Larger private host caches do not create a shared distributed cache; low reuse or slow storage can regress latency.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json b/src/inferrsi/knowledge/atoms/records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json new file mode 100644 index 000000000..120877aaa --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json @@ -0,0 +1,70 @@ +{ + "schema_version": 1, + "id": "tensorrt_llm.cuda.llm.prefill_decode_disaggregation", + "tier": "peer", + "repo": "tensorrt_llm", + "backend": "cuda", + "component": "llm", + "scenario": "llm.*", + "title": "TensorRT-LLM disaggregation trades phase interference for KV transfer", + "status": "imported", + "summary": "Separate prefill and decode resources when workload interference dominates the added transfer, queueing and layout-conversion costs.", + "tags": [ + "disaggregation", + "prefill", + "decode", + "kv_transfer", + "slo", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/NVIDIA/TensorRT-LLM/blob/c9b18eefa731dc59b0091bdfff6d890aa9d1e98e/docs/source/features/disagg-serving.md", + "type": "technical_document", + "commit": "c9b18eefa731dc59b0091bdfff6d890aa9d1e98e", + "accessed_at": "2026-10-15", + "content_sha256": "8b86780c4896ef07c597ec7ab0266fb491030f1d5cdc02adfe2db260973c39d8" + } + ], + "applicability": { + "hardware": [ + "Separate NVIDIA GPU resources with a qualified KV transport such as RDMA or NVLink" + ], + "software": [ + "NVIDIA/TensorRT-LLM at c9b18eefa731dc59b0091bdfff6d890aa9d1e98e; later revisions need reinspection" + ], + "conditions": [ + "Serving workload has measured prefill/decode interference and compatible KV layouts" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Separate context and generation pools permit different resource and parallelism choices, while adding KV transfer between them." + }, + { + "kind": "upstream_reported", + "description": "The inspected design overlaps transfers with other requests and handles mapping between different parallel layouts; these are performance-critical operations." + } + ], + "downstream_impact": [ + "vLLM: test disaggregated serving against colocated serving using the same total device budget and SLO workload.", + "vLLM-Omni: stage disaggregation is a hypothesis, but a diffusion pipeline does not share the same autoregressive prefill/decode cost model." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Freeze input/output-length and arrival distributions; report queue time, TTFT, TPOT, tail latency, goodput and total GPU/network resources.", + "Include cache transfer bytes, layout conversion, backpressure, cancellation and failed-worker recovery." + ], + "limitations": [ + "No numeric speedup or cost reduction is transferable from architecture alone.", + "Short prompts, weak interconnects or imbalanced pools can make disaggregation slower.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/transformers.common.llm.kv_cache_strategy_contracts.json b/src/inferrsi/knowledge/atoms/records/transformers.common.llm.kv_cache_strategy_contracts.json new file mode 100644 index 000000000..0be41b9d3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/transformers.common.llm.kv_cache_strategy_contracts.json @@ -0,0 +1,70 @@ +{ + "schema_version": 1, + "id": "transformers.common.llm.kv_cache_strategy_contracts", + "tier": "dependency", + "repo": "transformers", + "backend": "common", + "component": "llm", + "scenario": "llm.*", + "title": "Transformers cache strategies trade compilation, capacity and latency", + "status": "imported", + "summary": "Dynamic, static, offloaded and quantized KV caches have different contracts; select by workload and API support rather than a universal ranking.", + "tags": [ + "kv_cache", + "static_cache", + "quantization", + "offload", + "torch_compile", + "api_compatibility" + ], + "sources": [ + { + "url": "https://github.com/huggingface/transformers/blob/2126f65b0ab267e113e78a002447fc7094de83d5/docs/source/en/kv_cache.md", + "type": "technical_document", + "commit": "2126f65b0ab267e113e78a002447fc7094de83d5", + "accessed_at": "2026-10-15", + "content_sha256": "70b4f34a7a10862ac48a697f998f65ecf446f423ab9adbd9d23137a259ba7dd0" + } + ], + "applicability": { + "hardware": [ + "Device and quantization-backend support must be checked for the chosen model; this is API guidance" + ], + "software": [ + "huggingface/transformers at 2126f65b0ab267e113e78a002447fc7094de83d5; later revisions need reinspection" + ], + "conditions": [ + "Autoregressive generation with known length distribution, attention type and memory budget" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "StaticCache reserves a maximum size and supports compilation, at the cost of reserved capacity and work on masked positions for shorter sequences." + }, + { + "kind": "upstream_reported", + "description": "The inspected table distinguishes sliding-layer, offloading and torch.compile support. Quantized cache can hurt latency on short contexts with sufficient GPU memory; offload adds transfer work." + } + ], + "downstream_impact": [ + "vLLM and vLLM-Omni: audit model/cache adapters when Transformers changes; its generate cache_implementation flags do not configure vLLM paged KV managers.", + "vllm-ascend: test supported cache backends independently and retain model-specific sliding/chunked-attention behavior." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Test mixed prompt lengths, prefix reuse and sliding/chunked layers with separate per-request cache state.", + "Measure memory, TTFT and decode latency along with long-context output quality and compile behavior." + ], + "limitations": [ + "Memory reduction alone is not throughput evidence.", + "This source documents Transformers interfaces; downstream serving-cache compatibility remains an unverified transfer hypothesis.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/triton.common.kernel.bandwidth_fusion_resource_limits.json b/src/inferrsi/knowledge/atoms/records/triton.common.kernel.bandwidth_fusion_resource_limits.json new file mode 100644 index 000000000..6f4d57e88 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/triton.common.kernel.bandwidth_fusion_resource_limits.json @@ -0,0 +1,69 @@ +{ + "schema_version": 1, + "id": "triton.common.kernel.bandwidth_fusion_resource_limits", + "tier": "dependency", + "repo": "triton", + "backend": "common", + "component": "kernel", + "scenario": "kernel.*", + "title": "Triton fusion trades memory traffic for register and shared-memory pressure", + "status": "imported", + "summary": "Fuse a bandwidth-bound reduction when its working set fits on chip; choose launch geometry using the compiled resource footprint.", + "tags": [ + "fusion", + "softmax", + "bandwidth", + "register_pressure", + "numerical_parity" + ], + "sources": [ + { + "url": "https://github.com/triton-lang/triton/blob/4eda6cc91e86553a2517d1c764ea2967985553ad/python/tutorials/02-fused-softmax.py", + "type": "source_code", + "commit": "4eda6cc91e86553a2517d1c764ea2967985553ad", + "accessed_at": "2026-10-15", + "content_sha256": "4dbf82027df6149efaec19569e5b10b4c7600f53d4041dedc315a86c75b9141e" + } + ], + "applicability": { + "hardware": [ + "The tutorial includes CUDA and HIP target-specific occupancy calculations; each device still needs qualification" + ], + "software": [ + "triton-lang/triton at 4eda6cc91e86553a2517d1c764ea2967985553ad; later revisions need reinspection" + ], + "conditions": [ + "Rows fit the kernel resource envelope; the input stride and masked padded width are accounted for" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "The fused softmax tutorial avoids intermediate global-memory passes and masks power-of-two padding." + }, + { + "kind": "upstream_reported", + "description": "Its launch calculation uses compiled register/shared-memory usage and distinguishes HIP occupancy. tl.exp is approximate." + } + ], + "downstream_impact": [ + "vLLM and vLLM-Omni: use profiler evidence to nominate elementwise/reduction chains for fusion; retain eager dtype/rounding contracts.", + "vllm-ascend: this CUDA/HIP tutorial is design input, not proof that its kernel runs on an NPU backend." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Test irregular widths, row strides and numerical extremes against the original operation sequence.", + "Sweep widths and measure traffic, occupancy/spills and latency before checking end-to-end effects." + ], + "limitations": [ + "Tutorial speedups are tied to its reference implementations and shapes; they are not predictions for current torch.compile or a service.", + "Fusion can regress when register pressure, padding or shared-memory demand reduces occupancy.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json new file mode 100644 index 000000000..744828520 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json @@ -0,0 +1,85 @@ +{ + "id": "vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse", + "title": "MiniMax-H3 reference KV reuse must balance ownership after Ulysses", + "backend": "ascend", + "scenario": "diffusion.video_generation", + "summary": "A reference-KV reuse candidate fixes a slower pre-Ulysses prototype by caching full reference sequences per local head shard after All-to-All; reuse remains quality-sensitive and evidence is one-shot.", + "tags": [ + "minimax_h3", + "ref2va", + "kv_cache", + "ulysses", + "pinned_memory", + "approximation", + "counterexample" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "6de9a18572ba3211fc33f47c8e5beaea8d895e98", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "4× Ascend 910B3, 64 GiB HBM/device" + ], + "software": [ + "Hardware environment vLLM 0.28.0, vllm-omni abbreviated validation commit 85d63868", + "Rebased source revision at import 6de9a18572ba3211fc33f47c8e5beaea8d895e98 targets vLLM 0.30 APIs; local rebase environment was incompatible" + ], + "models": [ + "MiniMax-H3" + ], + "conditions": [ + "USP4/Ring1, 1344×768, 5-second output, 24 FPS, 50 steps", + "Tier2, refresh interval 8, ring size 2, unquantized BF16 host cache", + "4 images / 2-second reference video / 5-second reference video; one warmup then one measured request each" + ] + }, + "claims": [ + { + "kind": "counterexample", + "description": "Pre-Ulysses prototype worsened E2E: 4 images 878321→913491 ms; 2s video 477610→675020 ms; 5s video 925693→1270051 ms. Sequence shards gave uneven reference ownership/H2D critical paths." + }, + { + "kind": "upstream_reported", + "description": "Post-Ulysses E2E: 739566 ms (4 images), 441096 ms (2s video), 846829 ms (5s video), reported reductions 15.80%, 7.65%, 8.52% against disabled baselines. Peak HBM rises slightly." + }, + { + "kind": "source_inspected", + "description": "Post-All-to-All cache keeps the full reference sequence for each rank's local head shard; pinned host storage is staged through a 2–3-slot device ring with ready/consumed events." + }, + { + "kind": "quality_limit", + "description": "Outputs were manually inspected with no obvious difference on tested prompts/seeds; no objective quality metric or repeated variance. INT8/FP8 host-cache modes have unit coverage but no Ascend E2E benchmark." + } + ], + "recommendations": [ + "Treat periodic reference reuse as approximate unless timestep invariance is proven; BF16 storage alone does not make cached values exact.", + "Audit token/head ownership before choosing cache placement. Balance H2D and cache synchronization across SP ranks.", + "Separate unquantized reuse from INT8/FP8 host-cache quality/performance rows." + ], + "validation_plan": [ + "Use a dependency-compatible exact branch; do not mix the vLLM 0.28 hardware environment with rebased vLLM 0.30 APIs without revalidation.", + "Run targeted reference-KV and parallel tests, including disabled, refresh, ring staging, fallback and SP boundary handling.", + "Repeat each matched reference workload at least three times and capture per-rank H2D, memory, latency and balance.", + "Compare trajectory/video/audio/temporal metrics, varied prompts/references and refresh policies before promotion." + ], + "limitations": [ + "Unmerged candidate at import; hardware validation source differs from rebased Source revision.", + "One-shot measurements after warmup cannot establish variance or production tail latency.", + "Objective quality, host quantization E2E, remote reliability and cross-backend portability remain unverified." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json new file mode 100644 index 000000000..477b7717b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json @@ -0,0 +1,83 @@ +{ + "id": "vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets", + "title": "MiniMax-H3 SP head buckets reduce exposed All-to-All with quality still pending", + "backend": "ascend", + "scenario": "diffusion.video_generation", + "summary": "An open Ascend head-bucket pipeline overlaps projection/attention with communication; reported latency improves against the same-round chunk path, but full-model output equivalence remains unproven.", + "tags": [ + "minimax_h3", + "ulysses", + "communication_overlap", + "head_buckets", + "quality_gate" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f9e5d544d33428e17b818be3a01cb7d0956e4ead", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "4× Ascend 910B" + ], + "software": [ + "vLLM 0.29.0, CANN 9.0.0", + "Reported E2E source c36a9b6979a890c4ec9c3e8bf54000174134bea9; imported source revision f9e5d544d33428e17b818be3a01cb7d0956e4ead" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "SP4, 1344×768, 124 frames, 24 FPS, 8 steps, seed 3100, guidance 1, flow shift 12", + "Chunk size 64 MiB unchanged; head buckets 0→4", + "Each arm: 2 warmups + formal + profile + formal; only unprofiled formal requests underpin latency comparison" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Same-round chunk mean 88906±4 ms to head-split 85195±574 ms (sample SD, n=2 per arm), reported 4.174% client E2E reduction." + }, + { + "kind": "upstream_reported", + "description": "Diagnostic per-block exposed All-to-All falls 16.359→2.455 ms while compute kernels rise 145.323→147.346 ms; reported benefit is overlap/critical-path shortening, not faster compute kernels." + }, + { + "kind": "quality_limit", + "description": "Author self-review says cross-arm video hashes differ; operator/refactor equivalence checks do not establish full-model quality equivalence. E2E data precedes the current refactor." + }, + { + "kind": "source_version_limit", + "description": "A previous-round baseline appears only as reference and must not be used as a matched control for the current 4.17% claim." + } + ], + "recommendations": [ + "Compare against a matched same-revision control and report exposed communication separately from aggregate collective/kernel duration.", + "Tune bucket count as a workload/topology experiment; stream ownership, workspace lifetime and collective ordering are part of correctness.", + "Do not adopt a generic no-regression claim from an illustrative scheduling diagram." + ], + "validation_plan": [ + "Run current-head multi-rank parity with uneven buckets, padding, bias, RoPE and workspace reuse.", + "Repeat current-head same-source HTTP A/B with at least three unprofiled warm samples and identical placement.", + "Evaluate intermediate latents plus video/audio/temporal metrics across prompt/reference sets, using an explicit quality gate.", + "Test collective failure/cancellation, memory growth and CLI-to-runtime bucket/chunk propagation." + ], + "limitations": [ + "Unmerged candidate at import, not a main-supported feature declaration.", + "Only two unprofiled formal samples per arm; current-head E2E and full-model quality need revalidation.", + "Ascend910B/CANN evidence does not validate NVIDIA or ROCm transport." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json new file mode 100644 index 000000000..d4646a831 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json @@ -0,0 +1,104 @@ +{ + "id": "vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i", + "title": "Qwen-Image-2.1 eager text-to-image on one 910B1: reuse plus interleaved RoPE, 30% not met", + "backend": "ascend", + "scenario": "diffusion.image_generation", + "summary": "The author reports: On one Ascend 910B1, conditioning reuse plus npu_rotary_mul interleaved RoPE cuts the eager BF16 1280×704 eight-step mean from 3111.5 ms to 2459.6 ms with identical RGBA. Opt-in VAE fastpath reaches 2425.5 ms and passes the quality gate without pixel identity. A 30% line at 2178 ms was not met.", + "tags": [ + "qwen_image_21", + "text_to_image", + "rope", + "npu_rotary_mul", + "vae", + "counterexample", + "quality_gate" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-12", + "authors": [ + "amy-why-3459" + ] + } + ], + "applicability": { + "hardware": [ + "1× Ascend 910B1, 64 GiB HBM" + ], + "software": [ + "vLLM 0.31.0", + "vllm-omni branch amy/qwen-image-21-conditioning-reuse at 399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + ], + "models": [ + "Qwen-Image-2.1-Turbo" + ], + "conditions": [ + "BF16, eager, TORCH_SDPA, CFG=1, 1280×704, checkpoint native 8 sigmas", + "Two warmup rounds, then three repeated prompts with seeds 42/43/44", + "Unoptimized baseline mean 3111.5 ms; 30% line is 2178 ms", + "QWEN21_NPU_ROPE defaults to fused; QWEN21_NPU_ROPE=eager restores the unflatten/stack path", + "QWEN21_VAE_FASTPATH, QWEN21_ATTN and QWEN21_CACHE_STEP_INPUTS stay off unless set" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Conditioning reuse only: mean 2654.3 ms, −14.7% vs 3111.5 ms, decoded RGBA identical. An earlier same-patch cohort on this host was 2658.2 ms (−14.6%)." + }, + { + "kind": "upstream_reported", + "description": "Reuse plus npu_rotary_mul interleaved RoPE: mean 2459.6 ms, −21.0%, RGBA identical. Atlas A2 npu_apply_rotary_pos_emb has no interleave mode. The fp32 cos/sin table follows the current freqs object; decode slices a longer table to the target-token tail." + }, + { + "kind": "upstream_reported", + "description": "Reuse plus NPU RoPE plus QWEN21_VAE_FASTPATH=1: mean 2425.5 ms, −22.0%. Quality gate passed (SSIM≥0.99, PSNR≥35 dB) and pixels were not identical. A later rerun of the same stack was 2431.9 ms (−21.8%)." + }, + { + "kind": "upstream_reported", + "description": "A timed first request on the RoPE plus VAE stack spent about 550 ms in prompt encode, 1.5 s in the eight-step denoise, and 190 ms in the VAE." + }, + { + "kind": "counterexample", + "description": "Rejected without changing steps, resolution, or the sampler: eager RoPE cos/sin cache 2657.2 ms; expanded SDPA mask cache 2667.5 ms; npu_fusion_attention precise=2 at 2655.2 ms and precise=0 at 2623.7 ms; decode-only fusion 2631.7 ms; TASK_QUEUE_ENABLE=1 at 2654.4 ms and =2 at 2661.1 ms; enforce_eager=0 at 2718.8 ms; dropping the prompt-cache autograd guard at 2474.7 ms." + }, + { + "kind": "counterexample", + "description": "Per-step mask/prompt tensor cache, and RoPE plus VAE fastpath plus fusion attention, failed with NPU out-of-memory during allocation or initialization." + }, + { + "kind": "quality_limit", + "description": "The 2425.5 ms stack is not pixel-identical. Do not describe it as the B300 384.16→266.60 ms five-group HTTP PASS." + } + ], + "recommendations": [ + "Keep npu_rotary_mul interleaved RoPE as the NPU default for this complex-pair layout, with QWEN21_NPU_ROPE=eager as the fallback.", + "Treat QWEN21_VAE_FASTPATH as opt-in until a pixel-identical VAE path exists.", + "Do not enable npu_fusion_attention or per-step input caching on a 64 GiB 910B1 that is already near a 30 GiB allocator watermark.", + "Budget the next hypothesis on the eight-step denoise, which remains the largest timed piece." + ], + "validation_plan": [ + "Repeat the three-seed warm cohort on a quiet 910B1 before quoting a new mean.", + "Keep pixel identity and the SSIM/PSNR gate as separate columns.", + "Re-time prompt encode, denoise, and VAE on a warm cache hit before claiming another stage win." + ], + "limitations": [ + "Single 910B1 eager cohort. Not a four-card B300 HTTP result and not a 30% PASS.", + "Three measured requests after warmup. No production tail claim.", + "Later repeats were blocked when the allocator could not reserve a small extra block and the NPU runtime reported insufficient compute resources.", + "Ascend 910B1 evidence does not transfer to CUDA, ROCm, or other Ascend SKUs.", + "Imported from amy-why-3459's report; raw per-request timings, RGBA outputs and a frozen validator are not included. No NPU rerun was performed for this import; InferRSI acceptance remains INCONCLUSIVE." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.measurement_and_profiling.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.measurement_and_profiling.json new file mode 100644 index 000000000..6da0b5faa --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.measurement_and_profiling.json @@ -0,0 +1,84 @@ +{ + "id": "vllm_omni.common.diffusion.measurement_and_profiling", + "title": "Diffusion measurement and profiling discipline", + "backend": "common", + "scenario": "diffusion.*", + "summary": "Freeze the serving, single-request and benchmark commands; measure performance without diagnostic profiler overhead, then use targeted traces to choose one-variable experiments.", + "tags": [ + "baseline", + "profiling", + "parallelism", + "warmup", + "quality_gate" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/references/optimization-playbook.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [], + "software": [ + "vllm-omni guidance snapshot ee81f33001922f8d91dd09da0a57ee1531a8df82; parser flags and model capabilities must be checked at the target revision" + ], + "models": [ + "Wan/Qwen/Flux-style image and video pipelines; adapt to other diffusion models" + ], + "conditions": [ + "Named device SKU/count/topology, model revision, assets, seed, shape, frames, schedule, dtype, attention backend and compile state are frozen", + "Backend-native profiler and low-overhead stage timings are available or their absence is recorded" + ] + }, + "claims": [ + { + "kind": "guidance", + "description": "Performance baseline and operator/host-stack diagnostic traces serve different purposes. PyTorch profiler, shape recording and stack collection can distort measured latency." + }, + { + "kind": "guidance", + "description": "Compare client E2E, server inference, encode, denoise, decode and peak memory independently. A kernel or denoise win can be offset by decode, communication or transport." + }, + { + "kind": "guidance", + "description": "For CFG-enabled models, compare CFG2×USP(world/2) with USP(world); treat HSDP primarily as capacity until an A/B demonstrates speed; tune VAE patch parallel only where its stage share is material." + }, + { + "kind": "guidance", + "description": "Every optimization, including intended math-preserving layout/cache changes, needs artifact and numerical evidence. Quantization, sparse/approximate attention and reduced steps are quality-sensitive hypotheses." + } + ], + "recommendations": [ + "Freeze explicit CLI argument vectors for server startup, single request, benchmark and diagnostic collection separately; retain raw responses and exit statuses.", + "Run an explicit warmup policy and at least three measured repetitions for shortlisted fixed-work candidates; retain every sample and report median/mean plus spread in milliseconds.", + "Collect operator+shape and host-stack traces as separate diagnostic runs. Start at rank 0; expand when imbalance/communication hypotheses justify it.", + "Choose candidates from measured dominant stages and trace evidence; include both a latency objective and memory/quality constraints." + ], + "validation_plan": [ + "Confirm A/B source, assets, random seed, schedule, attention backend, precision, compile warmup and resource placement differ only in the tested variable.", + "Run unprofiled baseline and candidate, validate output artifacts, measure stage and client timings, and compare against baseline self-run variance.", + "Validate per-rank device memory and host memory; do not derive p95/p99 from three fixed-work repeats.", + "On ROCm/Ascend use their appropriate profiling workflow; CUDA kernel/profiler evidence does not establish another backend." + ], + "limitations": [ + "This is imported methodological guidance, not a performance result.", + "Parallelism and compiler benefits depend on model implementation, shapes, topology and target software.", + "No remote device run or upstream tool execution was performed by InferRSI during this import." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.production_integration_gates.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.production_integration_gates.json new file mode 100644 index 000000000..a6c00f161 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.production_integration_gates.json @@ -0,0 +1,109 @@ +{ + "id": "vllm_omni.common.diffusion.production_integration_gates", + "title": "Production diffusion integration and compatibility gates", + "backend": "common", + "scenario": "diffusion.*", + "summary": "Separate Day-0 loading support from production readiness; qualify exact task/backend/hardware combinations through API parity, strict loading, quality, offload/cache lifecycle, cancellation and load stability.", + "tags": [ + "model_integration", + "compatibility", + "loader", + "offload", + "request_state", + "reliability" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/api-and-recipes.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/feature-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/performance-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/production-validation.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [], + "software": [ + "vllm-omni source snapshot ee81f33001922f8d91dd09da0a57ee1531a8df82; online FP8/DLO/cache/batching support must be qualified at target commit" + ], + "models": [ + "New or existing diffusion integrations, including MiniMax-H3" + ], + "conditions": [ + "The initial pipeline/registry/loader vertical slice already works", + "Official implementation, checkpoint and target repository revisions are pinned independently" + ] + }, + "claims": [ + { + "kind": "guidance", + "description": "A compatibility row includes task, API/execution mode, shape/schedule, backend, packed layout, cache, quantization, offload, topology, hardware, dtype and output transport. Unproven combinations default to not tested." + }, + { + "kind": "guidance", + "description": "Strict loading must account for every retained tensor and all source shards of fused QKV/gate-up destinations. Shared layers must use their platform dispatcher, with explicit guarded fast paths and native fallbacks." + }, + { + "kind": "guidance", + "description": "Online quantization, pre-quantized/pruned/rotated checkpoints, fixed adapter fusion and DLO are distinct evidence lanes; resident and cold/materialization memory peaks must be recorded." + }, + { + "kind": "guidance", + "description": "Mutable scheduler, RNG, latent and cache state belongs to each request. Structural request-batch/step-execution interfaces do not establish model throughput, quality or cancellation safety." + }, + { + "kind": "guidance", + "description": "Function, Accuracy, Performance and Reliability are independent readiness tracks. They must not be equated automatically with InferRSI's conceptual L0–L4 validation levels or upstream CI's numbered taxonomy." + } + ], + "recommendations": [ + "Normalize offline/sync/async task inputs through one validated contract and test invalid boundaries before engine submission or persistent side effects.", + "Maintain scoped states validated/limited/unsupported/not tested in experiment evidence; keep imported guidance status separate from remote validation.", + "Prefer shared fast primitives and preserve dtype/rounding/materialization boundaries; measure and qualify each vendor/card/topology independently.", + "Build per-request cache keys and lifecycle tests covering success, error, abort, disconnect and the next uncached request.", + "Retain exact deployment CLI arguments and generated environment snapshots; any upstream YAML examples remain source references rather than InferRSI run input." + ], + "validation_plan": [ + "Compare the official dense reference with component, block, intermediate latent and final media outputs under fixed assets/seed/schedule.", + "Run strict-load and negative-task tests, uneven packed samples, group nonmember tests, and one output per request.", + "Validate FP8, cache, DLO, TP/SP and compile separately before testing combinations; measure cold peak, resident peak, per-stage memory and host PSS.", + "Test cancellation at queue/encode/denoise/decode/output boundaries, late worker results, OOM and worker failure, then issue a known-good request.", + "Run declared below/near/above-saturation arrival loads and report success/errors, queue time, resource slope and enough samples for claimed percentiles." + ], + "limitations": [ + "The source describes a target readiness process; it does not prove that every model or hardware satisfies the gates.", + "CUDA/ROCm/Ascend support, sparse attention, HWR/mmap, quantization and offload are independent scoped qualifications.", + "No local GPU/NPU, generated-media quality, real serving or soak validation was performed for this knowledge import." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.upstream_review_gates.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.upstream_review_gates.json new file mode 100644 index 000000000..ef086e19b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.common.diffusion.upstream_review_gates.json @@ -0,0 +1,143 @@ +{ + "schema_version": 1, + "id": "vllm_omni.common.diffusion.upstream_review_gates", + "title": "Upstream review gates for optional acceleration and evidence ownership", + "repo": "vllm_omni", + "backend": "common", + "component": "diffusion", + "scenario": "diffusion.*", + "status": "imported", + "summary": "Review framework policy boundaries, all shared-component consumers, optional backend prerequisites, request-state lifetime, portable reproduction, and independent artifact provenance before promoting an optimization.", + "tags": [ + "review", + "request_state", + "shared_kernels", + "reproducibility", + "source_integrity", + "artifact_provenance", + "framework_boundaries", + "cross_model_regression" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "443b3e97c09af3f5bd9399ef3b3ec8e7b0215852", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "d57480f5054e6c377a04225840b24e6355244dd9", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "6550e3f626e5c38fb7bf8a487f397797447fde33", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "e36d48ba47eef4b4954b6c4d97fd42471525fd30", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + } + ], + "applicability": { + "hardware": [], + "software": [ + "Diffusion frameworks with optional extensions and singleton model state" + ], + "models": [ + "Models sharing numerical operator contracts" + ], + "conditions": [ + "A candidate is being prepared for upstream review", + "Benchmarks emit per-trial artifact manifests" + ] + }, + "claims": [ + { + "kind": "guidance", + "description": "A hardware/dtype match does not establish compiler, header, library or collective availability. Keep optional acceleration opt-in, or coordinate one initialization decision across all ranks." + }, + { + "kind": "guidance", + "description": "Singleton model state must not extend request prefix-KV lifetime. Use request ownership or weak identity and cleanup on success, error, cancellation and dropped step-mode requests; keep graph buffers separate." + }, + { + "kind": "guidance", + "description": "Reusable math belongs in the target common operator layer; model-specific dispatch and approximation policy stay in adapters. Preserve reduction order, casts and dtype/compile/autograd fallbacks." + }, + { + "kind": "guidance", + "description": "Tracked source changes remain in the fingerprint even if output directories overlap source. Exclude only the active run untracked artifact directory." + }, + { + "kind": "guidance", + "description": "Generated files resolve beneath their own trial; references and duplicate/cross-trial paths cannot substitute for independent outputs. Final integrity or cleanup errors still produce failed records." + }, + { + "kind": "guidance", + "description": "Published evidence uses portable paths, complete before/after timings, image checksums and frozen validators. Historical source-pair claims are distinct from rebased-head comparisons." + }, + { + "kind": "guidance", + "description": "Framework dispatch and framework tests remain model-neutral. Reuse explicit common configuration; keep model policy in adapters and topology/build prerequisites in the owning backend instead of duplicating model/device/version condition chains." + }, + { + "kind": "guidance", + "description": "Shared component or script changes require a direct and transitive consumer inventory, regression evidence for other affected models, and explicit coverage gaps. One model E2E result cannot establish another model quality or performance." + }, + { + "kind": "guidance", + "description": "Keep benchmark code and acceptance criteria outside the candidate optimization change. Pin the same independently reviewed evaluator for both arms; archive historical results without treating them as validation of a later revision." + }, + { + "kind": "guidance", + "description": "Prefer full-model E2E coverage for normal model behavior. Add focused tests for cache invalidation, errors, fallback selection and shared consumers only where E2E does not exercise the contract; avoid repeated production-shape matrices." + }, + { + "kind": "guidance", + "description": "Prefer module-level imports for ordinary dependencies; retain documented lazy imports where transitive optional kernels or backend libraries would otherwise become unconditional platform requirements." + }, + { + "kind": "guidance", + "description": "Share identical kernel eligibility predicates across consumers. Colocate small ownership-only types with their consumer instead of adding modules for speculative growth. Explain low-precision round trips that reproduce eager intermediate rounding." + } + ], + "recommendations": [ + "Demonstrate each correctness issue with existing E2E coverage or a focused regression for a boundary the E2E suite does not exercise.", + "Use a benchmark and quality evaluator reviewed and frozen independently of the candidate optimization; changes to the evaluator require a separate review and campaign.", + "Publish complete campaign archives and hash manifests, while preserving legacy records.", + "Remove obsolete selection knobs and their model-specific framework tests when consolidating configuration.", + "Attach a consumer-to-test coverage map, including fast/fallback paths, layouts, dtypes, hooks, gradients and applicable encoder/decoder integration." + ], + "validation_plan": [ + "Exercise unavailable-extension default selection without CUDA.", + "Drop a populated request cache and check weak references after success/error/interrupt and step-mode cancellation.", + "Run all consumers of moved shared operators, including their numeric CUDA contracts.", + "Reject output aliasing and source changes under overlapping output roots.", + "Re-run native full-service quality and comparable current-base/current-head measurements after rebase.", + "Verify default dispatch does not load optional extensions and explicit common settings reach the selected backend without model or device-name predicates.", + "Record source/environment/test commands and all skips or failures for every affected consumer; mark missing coverage INCONCLUSIVE rather than generalizing target-model E2E evidence.", + "Verify that the candidate diff cannot edit its scoring benchmark or frozen quality criteria.", + "Map added tests to failure modes missing from existing E2E coverage and remove duplicated successful-path checks.", + "Exercise imports with optional backend modules unavailable; preserve eager intermediate roundings and dropped-request weak-reference cleanup when consolidating helpers or ownership types." + ], + "limitations": [ + "This record imports review guidance; it is not a benchmark or an accelerator support claim.", + "Local regression and E2E results belong to the review-response report and its pinned evidence, not this portable record." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json new file mode 100644 index 000000000..05ac74078 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json @@ -0,0 +1,175 @@ +{ + "schema_version": 1, + "id": "vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap", + "title": "Audio concurrency scaling: mixed prefill, state ownership and codec overlap", + "repo": "vllm_omni", + "backend": "cuda", + "component": "audio", + "scenario": "audio.*", + "status": "imported", + "summary": "Diagnose audio scaling with scheduler-step counts, admission/drain phases, mixed prefill/decode and codec overlap; isolate state, label and RNG ownership before qualifying same-source service throughput and complete audio quality.", + "translations": { + "zh-CN": { + "title": "\u97f3\u9891\u5e76\u53d1\u6269\u5c55\uff1a\u6df7\u5408\u9884\u586b\u5145\u3001\u72b6\u6001\u5f52\u5c5e\u548c codec \u91cd\u53e0", + "summary": "\u6309\u8c03\u5ea6\u8f6e\u800c\u975e\u56fe\u788e\u7247\u8ba1\u6570\uff0c\u5206\u5f00\u521d\u59cb\u586b\u5145\u3001\u6301\u7eed\u63a5\u7eb3\u4e0e\u6392\u7a7a\u9636\u6bb5\uff0c\u5206\u6790\u6df7\u5408\u9884\u586b\u5145/\u89e3\u7801\u548c codec \u91cd\u53e0\uff1b\u5206\u522b\u68c0\u67e5\u72b6\u6001\u3001\u6807\u7b7e\u53ca\u968f\u673a\u6570\u5f52\u5c5e\uff0c\u518d\u4ee5\u540c\u6e90\u670d\u52a1\u5bf9\u7167\u548c\u5b8c\u6574\u97f3\u9891\u8d28\u91cf\u9a8c\u6536\u3002" + } + }, + "tags": [ + "audio", + "concurrency", + "prefill", + "decode", + "gdn", + "cuda_graph", + "codec", + "state_ownership", + "control_run", + "layer_parity", + "fixed_request_replay", + "scheduler_step", + "piecewise_graph", + "admission_phase", + "mixed_backbone", + "rng_ownership", + "hardware_counters", + "static_sequence_bound", + "output_length_control", + "codec_batch_fragmentation", + "contention_control", + "reference_throughput", + "private_padding" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/deploy/fish_omni.yaml#L1-L100", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/gdn.py#L144-L246", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L1-L28", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/model_state.py#L264-L379", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L425-L478", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + } + ], + "applicability": { + "hardware": [ + "CUDA GPUs supported by the pinned runtime and operators; qualify the actual SKU separately" + ], + "software": [ + "vllm-project/vllm-omni source snapshot d6ed4f4844fbc41573ffc03247e5b2ff0a38d322" + ], + "conditions": [ + "The model uses autoregressive acoustic frames, a codebook tower, recurrent GDN state and a streaming codec.", + "Resolve effective stage settings, CUDA graph buckets, precision and dependencies from the selected revision; deployment comments are not local benchmark evidence." + ] + }, + "recommendations": [ + "Measure low and high concurrency independently. Attribute pure decode, prompt work, admission gaps and codec work using actual active batch sizes, not the configured capacity alone.", + "Count scheduler steps from the owning CPU execution annotation or scheduler metadata. A PIECEWISE step can launch many graph fragments; grouping kernel names or graph launches is not a step count. Correlate optional GPU spans explicitly and preserve their scope.", + "Separate initial fill, ongoing request admission and final drain before interpreting batch occupancy. Retain whole-run statistics and phase definitions; client in-flight counts include queueing and codec work and are not direct active-model counts or proof of a steady state.", + "A mixed backbone can share projection and MoE execution across prompt and decode rows while keeping causal attention and recurrent updates segmented. Measure whether joint rows amortize work on the real workload; preserving the expert count alone does not preserve backend dispatch or rounding.", + "The source deployment combines chunked prefill, asynchronous CPU scheduling, FULL decode graphs, PIECEWISE mixed graphs, and a stateful codec on overlapping CUDA execution. Test these mechanisms individually when porting the design.", + "Preserve decode-first ordering and per-request state indices in a mixed step. Each convolution and recurrent state must advance exactly once; fresh state rows must be reset without affecting other requests.", + "Keep acoustic prompt rows in cache identity: the source disables prefix caching because token-ID hashing does not cover their code values.", + "Retain the codec chunk ramp, left context, complete emitted audio and preparation costs while comparing schedules. Do not substitute a kernel timing or text-token rate for playable-audio service throughput.", + "Use hardware counters on actual routed inputs to distinguish tensor arithmetic from expert-weight traffic. Report profiler replay policy, measured DRAM bytes and peak fraction, layer/input coverage and routing-count provenance; low tensor activity is not a directly recoverable speedup.", + "Inspect static maximum sequence lengths separately from real packed token counts. Tighter graph bounds can remove inactive recurrent chunks and attention work without changing rows; validate every real and padding sequence fits, preserve a larger-bound fallback, and compare all state and outputs before service.", + "For stochastic service A/B trials, retain generated-frame counts and request-length differences alongside frames/s and drain duration. Capture warmups and scheduling can change random draws, so a faster makespan alone does not prove a fixed-work kernel gain.", + "Separate replay streams and graph memory pools do not by themselves prove BLAS scratch isolation. Inspect the installed runtime capture/workspace ownership; where buffers are keyed by capture stream, test dedicated capture streams and record actual address ranges. Compare identical dynamic admissions, RNG, slot reuse and full mutable state before attributing a failure to workspace sharing.", + "An achieved isolated full-batch decode rate is a workload-specific reference, not a hardware upper bound or a service lower bound. Account for real prompt work, partial batches, codec interference and complete drain before judging the service target.", + "For asynchronous timelines, compute model/codec interval unions and their intersection before attributing elapsed time. Record actual decode steps, active rows, mixed token capacity and exact codec grouping rather than inferring GPU work from client concurrency.", + "Distinguish codec frame-bucket diversity from same-bucket partitioning. Log each ready group, chosen partition, actual request count and actual captured graph size; a planned oversized batch can be rounded differently by the graph dispatcher.", + "Compact packed recurrent chunk descriptors once per replay, preserve the original per-sequence recurrence ordering and arithmetic, and guard kernels that otherwise execute matrix work on invalid chunks. Recheck empty sequences, dynamic descriptor updates and larger-span fallback.", + "Reserved decode padding can use a shorter runtime attention context while preserving the largest capture plan, provided the graph explicitly identifies its private slots. Verify real outputs and all nonparticipating slots; do not infer a reserved range for arbitrary request-state callers.", + "Test stream contention on identical inputs and full restored state, comparing model-only, codec-only, serial and concurrent pair completion. A higher launch-stream priority is only a scheduling hint; query graph instantiation flags before interpreting priority trials.", + "For cross-stream model pipelines, establish both execution dependencies and allocation lifetimes. Retain a producer tensor until every consumer stream has finished; an event wait alone does not stop the allocator from reusing callback-local storage.", + "Derive inter-frame dependencies from the actual embedding and sampled-code paths before declaring a whole tower serial. Keep next-frame positions, attention workspaces, recurrent states and sampling counters independent until their required joins.", + "When changing codec resource allocation, verify actual captured kernel assignments and preserve the normal partition policy. If its measured cost table changes partitions, report that feedback explicitly rather than claiming a fixed-partition comparison.", + "Estimate temporal batching eligibility from observed chunk phases, admission and completion boundaries. Requests can have correlated emission phases; an independent per-row probability model can badly misestimate useful coverage.", + "Separate queued work from runnable admission when deciding whether to launch a bounded multi-step graph. Reuse the actual capacity, minimum-batch, minimum-running and oldest-age predicate; preserve pending-arrival and audio/completion boundaries. Record mutually exclusive decisions separately from overlapping context counters, and measure any extra admission delay.", + "Inspect compiled codec graphs for repeated casts of immutable Linear weights. Caching the existing autocast result can remove traffic without changing GEMM precision, but retain original reference/encoding modules and native norm/layer-scale precision. A compiler option alone is not proof that casts disappeared; inspect dispatched kernels and validate full codec state.", + "Inspect production-specialization register/shared-memory allocation when fusing recurrent operations. A debug output can change allocation, and removing launches can lose throughput through reduced residency or added synchronization; compile and measure the actual deployed specialization.", + "Control native algorithm-plan caches when comparing autotuning modes. Verify the installed cache key and lookup order: a flag change after control warmup may reuse the same plan. Isolate per-thread caches using fresh host threads where the implementation supports that scope, retain compilation/preparation costs, and do not clear shared system caches.", + "Use final SASS and actual launch resource attributes to audit register and shared-memory use. Source or intermediate-code register hints may not reach machine code; their sum cannot establish resident-block counts or an occupancy improvement.", + "Treat native routing metadata as a per-call ownership map: physical rows can be permuted legally. Validate bounds, token/expert bijection and valid-row prefixes using each implementation's own current map before comparing logical values; never infer a permutation from output values.", + "Compare complete calls at the same input/output boundary while retaining the baseline's production features, including programmatic dependent launch (PDL). Record candidate limitations explicitly; exact components, fewer global buffers or a faster fused kernel do not establish complete-call or service gains.", + "Moving a dependency wait requires proof that every earlier metadata read is ready. Record all metadata producers from actual capture provenance, add full-memory dependencies only where required, preserve consumer-side programmatic dependencies, and instantiate only after validating the complete graph and retained storage.", + "Audit the actual loaded shared-library path, version and binary identity before interpreting capability queries or cross-language comparisons. Loader search paths can override intended build linkage; preserve the original mismatch and keep unresolved precision capabilities unqualified even when finite fixtures match.", + "Record candidate eligibility and the number of calls actually replaced. If filtering selects no candidate or no replacement is chosen, the final comparison may execute the same implementation in both arms; its timing difference is control variation, not an optimization gain.", + "Separate measured resident CTAs and active warps from eligible warps and instruction issue. Increased occupancy without more issuable work does not establish more useful latency hiding; inspect weight traffic and dependency evidence before attributing a speedup.", + "Interpret stall-counter normalization explicitly. An aggregate long-scoreboard ratio per issue-active cycle is neither a wall-time fraction nor proof that TMA is the cause. Instruction attribution needs report-owned loaded-function identity and exact PC mapping; retain missing or out-of-function samples and unresolved replay-pass metadata.", + "Separate causal-prefix identity, compact operator parity and full graph timing. Identity must include acoustic code columns, conditioning, exact position and initial state; retain decode and private padding rows, preserve current routing ownership and count gather/expand and retained-buffer costs.", + "Before judging a candidate against an opaque native operator, validate the native control against an independently archived output and inspect the exact installed ABI. A wrong routing-scale flag can invalidate the control before any candidate comparison.", + "Build fusion budgets from the elapsed dependency path and required operations, not kernel counts or summed overlapping durations. Account for direct matrix operations outside intercepted helper calls, and distinguish arithmetic that remains required from removable boundaries.", + "Before discarding a reuse strategy, account for its adapters. A consumer can sometimes use an inverse ownership map directly instead of materializing expanded components; preserve the original residual rows, arithmetic and rounding, and include all gathers and copies in the same graph boundary.", + "Keep offline compilation and actual JIT binary identities separate. Resource counts and spill claims must refer to the deployed specialization, with the real strides, flags and launch configuration.", + "For transparent compressed allocations, query hardware support and verify each actual allocation property. Retain original tensor bytes, layout, scales, native kernels and captured owners; test both consumed and unconsumed ownership paths before native use. CPU entropy, requested flags and virtual capacity do not establish GPU compression ratio or speed.", + "Bound graph specialization by activation coverage and total readiness/memory cost. Keep unsupported shapes on the original graph, include CPU mapping and transfer costs in service timing, and validate shared graph-pool lifetimes separately from artifact-private buffers.", + "When a graph-shape comparison fails in private state, compare full physical input histories, including padding left by earlier replays. Preserve the failure, verify an unchanged A/A control and align inputs without filtering state or relaxing arithmetic gates." + ], + "validation_plan": [ + "L0: exercise partial batches, variable prompt boundaries, slot reuse, request cancellation and untouched-state checks before any service comparison.", + "For mixed execution, check state slots, teacher-forced labels and sampling/RNG ownership separately. Compare each changed layer on identical inputs, snapshot untouched slots before replay, exercise prompt boundaries and slot reuse, and preserve sampling-row and counter ordering in deterministic controls.", + "Record the model batch, prompt token budget and admission phase for every diagnosed scheduler step. Use a continuously replenished workload when investigating sustained scheduling; distinguish scheduled prompt chunks from unique requests and retain the final drain rather than silently filtering it.", + "When batched and single-request outputs differ, preserve the failed comparison and run the unchanged implementation through the same check. Isolate each changed operator on identical layer inputs to separate new errors from accumulated floating-point and routing differences; never silently relax its numeric threshold.", + "For stream overlap, hold request ordering, initial model/codec state and sampling counters fixed; compare generated codes, PCM, completion order and reused-slot state. Exact fixed-request replay does not replace quality under dynamic service admission.", + "L1/L2: replay heterogeneous real prompts; inspect routing occupancy and graph kernels, and distinguish summed kernel time from elapsed time when streams overlap.", + "L3/L4: score every output in the frozen corpus and repeated concurrency sweep; report acoustic frames/s, first playable audio latency, RTF, errors, WER and speaker similarity. Preserve rejected runs and source/environment provenance.", + "Promote a scheduling or kernel change only after a same-source end-to-end control/candidate comparison and complete repeated quality coverage meet the frozen gates. Operator checks, graph replay and a phase-selected trace cannot substitute for the full service result.", + "Preserve an original bit-exact failure when investigating a changed batch shape or numerical backend. Identify real versus private scratch slots, quantify PCM and state errors, and use an independent higher-precision reference or causal isolation. A later diagnostic does not rewrite the failed gate and does not replace full WER/SIM.", + "When an isolated kernel improvement fails the full service throughput score, retain frame-count, length and drain differences and the failed score. Use fixed-input timing to test the operator hypothesis; do not rescue acceptance by discarding tails or substituting a selected-phase rate.", + "A capture-versus-eager validator must retain references to the captured buffers: replay updates captured storage, while eager Python execution can rebind object attributes. Preserve any failing run and prove a validator-handle mistake before replacing its result.", + "Check compiler FMA contraction and intermediate rounding when fusing native arithmetic. A source-level cast sequence need not imply separate machine operations. Keep original failures and distinguish an explicit correction from a separately declared higher-precision numerical diagnostic.", + "Expand numerical checks across independently prepared real fixtures, layers and partial batches before timing. A single fixture can pass while another exposes small-magnitude per-head errors or a worse independent-reference error; retain both outcomes and preserve the predeclared gate.", + "For empty-work graph checks, retain mutable device sources and capture their metadata copies so the same executable can transition from empty to positive work and back. Check full dependency coverage, output guards, read-only inputs, RNG and restored state; do not silently include operations without a defined empty-work contract.", + "For compact prefix execution, reconstruct real full-row inputs and verify their hashes; compare native quantization, scales, routing and all output components before checking complete model state, unchanged slots, teacher outputs and RNG in one reused mixed graph.", + "For fixed-work graph timing, restore the same complete initial state before every measured replay in both arms. Record whether restore, host preparation and postgraph work are inside the timed boundary; repeated in-place state advancement is a different workload.", + "For an ownership map, reject stale same-length conditioning, preserve all acoustic columns and original padding/decode owners, and test changed slots and no-reuse fallback. Artifact-private storage does not qualify production graph-pool lifetimes.", + "Preserve an initial continuation failure when testing a separately frozen adapter. Distinguish same-capture timing rounds from independent process repetitions, and retain every pair plus complete restored-state checks.", + "After qualifying compact/reused graphs, measure complete service with actual activation counts, CPU preparation, memory/readiness, all output quality and full drain. A local repeated gain cannot override a failed predeclared service continuation gate." + ], + "limitations": [ + "This record describes source-grounded mechanisms, not a reproduced speedup or a portable set of tuned constants.", + "A low-concurrency improvement does not imply high-concurrency improvement; reducing admission wait can also increase costly mixed steps.", + "Changing state precision, codec precision or FP8 execution can affect generated samples. Operator parity alone does not establish end-to-end audio quality.", + "A faster isolated operation can still regress service throughput. Recheck the unchanged serving configuration and complete audio quality before choosing a fused kernel or a different batch policy.", + "CUDA event spans can include host-submission gaps. Do not label their union as SM utilization, or count overlapped codec duration again as an available end-to-end speedup.", + "Qualification of another engine or a different GPU requires its own acceptance issue and complete evidence.", + "A whole-run average batch can be dominated by drain steps; a high batch in an admission subset does not establish an end-to-end speedup. Phase cuts are diagnostic scope, not permission to remove requests from acceptance metrics.", + "A shared-execution prototype may change GEMM shapes, MoE implementation or random-number consumption. Keep those changes explicit, and keep timing from a device with observed external work unqualified even when numerical checks pass.", + "A kernel reading nearly one active-expert weight footprint can remain bandwidth-limited despite low tensor activity; row padding or inactive experts must not be converted directly into a speedup claim.", + "A dedicated capture stream is a workspace-isolation hypothesis, not proof that prior quality failures were races. Require a fixed dynamic schedule and full service quality before attributing a cause or selecting overlap.", + "Configured or logged SM reservations may apply to a routing subkernel rather than expert GEMMs; inspect the actual dispatched branch before using such a setting as a resource-allocation explanation.", + "Native codec re-batching can change floating-point rounding. An error confined to a private scratch slot differs from a live-state error, but neither scratch analysis nor a high PCM SNR establishes full service quality.", + "A selected-phase delivery rate can explain a changing service score but is not GPU effective batch or a replacement acceptance metric. High client occupancy only rules out client starvation within its measured scope.", + "Repository-local issue evidence for the machine-code, live-metadata and complete-call lessons is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#complete-call-evidence-rejects-both-initial-native-moe-candidates. Its scoped results do not promote this imported guidance to a locally verified optimization.", + "Repository-local issue evidence for metadata-readiness graphs, loaded-library identity and zero-replacement comparisons is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#metadata-readiness-and-loaded-library-identity. Correctness evidence and a bounded feasibility screen do not establish a service gain or change this imported guidance status.", + "Repository-local issue evidence for occupancy versus issue, unresolved PC sampling, reference-ABI checks and staged causal-prefix reuse is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#measured-residency-and-staged-prefix-reuse. These diagnostic outcomes do not promote the imported guidance to a verified service optimization.", + "Repository-local issue evidence for inverse-row adapters and transparent compressed allocation is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#inverse-row-consumption-and-transparent-compressed-allocation. The scoped graph result and failed native allocation screen do not establish a service gain or change imported/unverified status.", + "Repository-local production-prefix and pause evidence is in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#production-prefix-reuse-correct-graphs-can-still-lose-at-service-level. Historical workload tables and single later observations are not a matched three-framework acceptance matrix; imported guidance remains unverified." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json new file mode 100644 index 000000000..a107bbd3a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json @@ -0,0 +1,84 @@ +{ + "id": "vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache", + "title": "MiniMax-H3 exact AdaLN schedule cache: capacity benefit can exceed latency benefit", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "summary": "A schedule-cache candidate precomputes finite-schedule AdaLN tables and can release projection weights; production-shape compiled measurements show capacity savings without a distinguishable speed gain.", + "tags": [ + "minimax_h3", + "adaln", + "schedule_cache", + "memory", + "offload", + "counterexample" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "635215a96d3eaf6b5bac66020feae51b34daa5c9", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "2× NVIDIA H20 98 GB for TP2; one H20 for the separately reported layerwise run" + ], + "software": [ + "Source/hardware revision 635215a96d3eaf6b5bac66020feae51b34daa5c9", + "Python 3.12, PyTorch 2.11.0+cu128, vLLM 0.26.0, FlashAttention" + ], + "models": [ + "MiniMax-H3 FL2VA / T2VA" + ], + "conditions": [ + "Small eager row: 448×256, 29 requested/39 aligned frames, 50 sigma points/49 forwards, seed 42, TP2/text-encoder TP2, flow shifts 12/3", + "Production regional-compile row: 1248×768, 209 frames, 50 steps, seed 2101, TP2", + "Single request in flight; schedule hits and cold misses measured separately" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Small eager row: five steady requests after warmup; wall mean 15285.8 ms disabled, 14987.9 ms cache retained, 15029.4 ms cache+weight-offload. These are roughly 1.95% and 1.68% reductions for that row." + }, + { + "kind": "upstream_reported", + "description": "Per TP rank, 12.144 GiB projection weights replaced by 0.885 GiB tables yields 11.259 GiB net device-memory reduction by accounting. First-build peak still includes coexisting weights and tables." + }, + { + "kind": "counterexample", + "description": "Production compiled row: one measured steady sample per mode; retained cache changed client wall 1298497→1298456 ms, effectively no distinguishable speed benefit. Weight offload increased client wall to 1305133 ms (~0.51% slower) while lowering residency ~11.256 GiB/device." + }, + { + "kind": "upstream_reported", + "description": "Fixed steady outputs were reported byte-identical across the three modes. Schedule changes require restore/build/atomic replace/re-offload and can add substantial miss latency; cold-to-steady audio differences also exist in the disabled control." + } + ], + "recommendations": [ + "Treat weight release as a capacity optimization with a latency/memory frontier, not an additional automatic speedup.", + "Key exact schedules and all dependent configuration/adapter/device/dtype identities; bound cache size and preserve distributed ownership.", + "Reserve memory for cold build and schedule replacement; a lower steady footprint cannot solve an unfit first-build phase." + ], + "validation_plan": [ + "Use the pinned source implementation or first verify an equivalent path exists in target source; it was open at import.", + "A/B cache off, cache retained and cache+offload with fixed workload and compile state, at least three warm repeats.", + "Measure cold miss, same-schedule hit and changed-schedule rebuild independently; capture NVML/device and allocator peaks.", + "Compare steady output hashes plus decoded video/audio and test layerwise/HSDP/quantized ownership separately." + ], + "limitations": [ + "Source candidate unmerged at import; target main support is not implied.", + "Production-shape deltas are one-sample observations and sub-1% values do not establish statistically meaningful speed changes.", + "H20 and specific versions/schedules only; H200/B200 or another backend needs new validation." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json new file mode 100644 index 000000000..f4cc1964d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json @@ -0,0 +1,90 @@ +{ + "id": "vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8", + "title": "MiniMax-H3 online CUDA MXFP8 is an opt-in approximate deployment lane", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "summary": "A Blackwell MXFP8 candidate quantizes selected DiT projections after loading/fixed-adapter fusion and preserves sensitive components; small/shared-host observations do not establish stable speed or quality equivalence.", + "tags": [ + "minimax_h3", + "mxfp8", + "quantization", + "swiglu", + "blackwell", + "quality_tradeoff", + "memory_peak" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0c248c848b5dfadef7066d54cfeae1d78c898757", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "NVIDIA device reported as NVIDIA Graphics Device, compute capability 12.0, approximately 71.12 GiB/device; exact SKU unspecified" + ], + "software": [ + "vLLM 0.29.0 wheel overlay, PyTorch 2.13.0+cu132, Python 3.12.13, driver 580.95.05", + "Source revision 0c248c848b5dfadef7066d54cfeae1d78c898757 based on c7cd37b61e44fb51c61212ac9a317f2be26fe638", + "Public PyTorch block-scaled scaled_mm; CUDA/partition capability guards" + ], + "models": [ + "Native FastH3 checkpoint with fixed vsa-datafree adapter" + ], + "conditions": [ + "TP2/USP2/text-encoder TP4, eager, VAE tiling, 448×256, 4.4 seconds, seed 1101, four denoise steps", + "Main DiT QKV/output/MLP quantized; conditioning/refiner/AdaLN/gates/output projections retain original precision", + "Runtime adapter switching after conversion is unqualified" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "12 new CUDA tests and 30 regression tests passed (3 skipped). Three full-model requests produced decodable 107-frame/24-FPS MP4s with stereo 32-kHz audio; TP2 uses reduction-compatible fallback rather than TP1 fused activation path." + }, + { + "kind": "upstream_reported", + "description": "Two warm shared-host client observations: branch 3018/2968 ms versus BF16/FastVideo 3419/3419 ms. Source explicitly disclaims a stable performance claim." + }, + { + "kind": "quality_limit", + "description": "Single-prompt decoded-media drift: RGB PSNR 22.92 dB and audio MSE 0.00080053. These are not perceptual acceptance, byte equality or quality-equivalence evidence." + }, + { + "kind": "counterexample", + "description": "Checkpoint-scale TP1/USP4 resident attempt exceeded ~71.12 GiB/device during fixed-adapter fusion. Lower post-quantization residency does not qualify the loading/fusion peak." + }, + { + "kind": "upstream_reported", + "description": "Separate shared-host microbenchmark M=2048/K=14336/N=5376: median 0.8818→0.8491 ms after five warmups/30 CUDA-event samples, final GEMM output byte-identical. This is a kernel observation only." + } + ], + "recommendations": [ + "Keep opt-in quantization and explicit component routing; validate actual runtime prefixes and loading/fusion order.", + "Record raw hardware identity rather than mapping SM12.0 to an assumed product name.", + "Maintain separate TP1 fusion and TP>1 reduction paths, cold loading peaks and fixed-adapter/runtime-adapter policies." + ], + "validation_plan": [ + "Run pinned-source tests/diffusion/quantization/test_cuda_mxfp8.py with registered GPU markers and the linear microbenchmark.", + "On the intended H200/B200 check hardware/API capability; reject or use a known supported alternative instead of inferring support from Blackwell branding.", + "Measure exact-source cold peak and at least three isolated warm E2E samples.", + "Run broad task/prompt/resolution/media quality evaluation and trajectory metrics against a same-base control before acceptance." + ], + "limitations": [ + "Unmerged candidate at import; broad quality/performance coverage and human review remain pending.", + "Reported SM12.0 hardware is not evidence for H200 or B200.", + "Shared-host observations, one prompt and a microbenchmark do not support production speed/quality claims." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json new file mode 100644 index 000000000..2d3b61edb --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json @@ -0,0 +1,79 @@ +{ + "id": "vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation", + "title": "MiniMax-H3 modulation fusion changes rounding and requires platform guards", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "summary": "Merged FP32-accumulating modulation fusion reduces launch count but removes intermediate BF16 rounding; its numerical drift and historical non-CUDA dispatch finding must remain visible.", + "tags": [ + "minimax_h3", + "operator_fusion", + "modulation", + "rounding", + "platform_dispatch", + "counterexample" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "7d74126f0723d355d82b47e98f820394320e1a4a", + "merge_commit": "14f2c16fb28e1e0c8615372675f2757466260ad8", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "CUDA GPU SKU not stated in source benchmark; do not substitute H200/B200" + ], + "software": [ + "Source revision 7d74126f0723d355d82b47e98f820394320e1a4a; merged 14f2c16fb28e1e0c8615372675f2757466260ad8", + "Triton modulation path, eager, USP4" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "5-second output, 49 denoise iterations; both configurations warmed up", + "Report hardware/driver/runtime identity before reproduction" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Engine E2E fell from 136961 ms to 134707 ms (1.65%); a single DiT profile reports 1969→1234 CUDA kernels (37.33% fewer). Profiled wall time is diagnostic and not interchangeable with unprofiled engine E2E." + }, + { + "kind": "upstream_reported", + "description": "FP32 accumulation removes intermediate BF16 rounding. Reported output PSNR is 39.55 dB and SSIM 0.9750; the author explicitly says outputs are not bit-exact." + }, + { + "kind": "review_finding", + "description": "Review identified x.is_cpu-only gating, which could launch Triton on NPU/XPU/MUSA, and noted row-major contiguity assumptions. The fetched source patch still contains that historical guard; verify subsequent target-source fixes rather than inferring safe non-CUDA support." + } + ], + "recommendations": [ + "Classify this as a numerically changed implementation and require an explicit quality tolerance.", + "Preserve original BF16 materialization boundaries when designing an exact fusion; otherwise report the changed rounding.", + "Gate fast paths by platform, device, dtype, shape and layout; retain backend-native norm/eager fallbacks." + ], + "validation_plan": [ + "Verify current source platform guards and contiguity contract before remote use.", + "Compare operator outputs, trajectory drift and decoded video/audio against a same-seed reference and baseline self-run variance.", + "Repeat unprofiled E2E measurements with exact device/runtime identity; retain profile evidence separately.", + "Run fallback checks on each advertised backend; CPU tests alone do not validate CUDA/NPU numerical paths." + ], + "limitations": [ + "Hardware SKU, repeat count and broader prompt coverage are not stated in the source report.", + "Merged code is not proof of quality equivalence or safe support on every backend.", + "Historical review findings may have changed later; source revision must be rechecked." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json new file mode 100644 index 000000000..e169bcb1f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json @@ -0,0 +1,80 @@ +{ + "id": "vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope", + "title": "MiniMax-H3 guarded Q/K RMSNorm and packed RoPE fusion", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "summary": "A merged CUDA fusion avoids normalized-Q/K and rotary intermediates for a specific packed BF16 geometry; reported denoise benefit is small and limited to a B300 workload.", + "tags": [ + "minimax_h3", + "operator_fusion", + "rmsnorm", + "rope", + "packed_tokens" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd", + "merge_commit": "596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "4× NVIDIA B300 SXM6" + ], + "software": [ + "Source revision 0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd; merged as 596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "CUDA/Triton BF16 fast path; head_dim=128, rotary_dim=96; TP1, Ulysses4, Ring1, TRTLLM_ATTN" + ], + "models": [ + "MiniMax-H3" + ], + "conditions": [ + "Packed [tokens, heads, head_dim] with compatible non-interleaved [cos|sin] frequencies", + "1344×768, 243 frames, 50 configured steps, seed 0", + "One warmup followed by one measured request per revision" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Steady denoise latency fell from 109687 ms to 106205 ms, a reported 3.18% reduction. This is denoise timing, not client E2E or a statistical performance guarantee.", + "reported_on": "Source accessed 2026-10-09" + }, + { + "kind": "upstream_reported", + "description": "Three CUDA unit cases tested sequence lengths 1, 257 and 1024. Author comment reports max absolute operator error 0.0625, mean absolute error 0.00072–0.00077; qualitative near-identical E2E video is reported without objective media metrics." + }, + { + "kind": "source_inspected", + "description": "The patch dispatches fusion only with HAS_TRITON, CUDA platform/tensors, BF16 and supported geometry; other valid inputs use the eager reference. It preserves a BF16 normalization materialization before RoPE but still tests tolerance rather than byte identity." + } + ], + "recommendations": [ + "Treat the optimization as intended math-preserving with measured numerical tolerance, not universal bit-exactness.", + "Verify selected geometry, RoPE convention and actual fast-path execution before attributing a gain.", + "Reuse the existing guarded shared operator rather than copying a CUDA kernel into a platform-neutral model." + ], + "validation_plan": [ + "Run the target revision's tests/diffusion/layers/test_fused_qk_norm_rope.py with its registered GPU test markers.", + "Compare native and fused operator/block/trajectory outputs including empty, ragged and strided Q/K cases.", + "Run at least three unprofiled warm A/B requests on the target H200/B200 or other GPU; record client E2E, denoise, memory and same-seed video/audio metrics.", + "Exercise unsupported dtype/geometry/platform fallbacks separately." + ], + "limitations": [ + "The reported benchmark is B300, not H200/B200, ROCm or Ascend evidence.", + "Only one measured request per arm was reported.", + "No objective full-model quality metric appears in the reviewed report; imported status does not mean locally verified." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json new file mode 100644 index 000000000..2997f4de5 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json @@ -0,0 +1,85 @@ +{ + "id": "vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache", + "title": "MiniMax-H3 Ref2VA TeaCache needs task-specific calibration and step defaults", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "summary": "A Ref2VA TeaCache candidate calibrates a conservative late-step budget; quality and speed depend on task/step policy, and some cases produce zero hits and no gain.", + "tags": [ + "minimax_h3", + "ref2va", + "teacache", + "approximation", + "quality", + "request_isolation", + "counterexample" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "1× NVIDIA B300" + ], + "software": [ + "Unmerged source revision at import f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "BF16, CUDNN_ATTN, task-specific TeaCache coefficients" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "448×256, 107 output frames, 50 configured steps; fixed-seed comparison", + "Calibration uses 15 full-compute Ref2VA cases: 6 image, 6 image+audio, 3 video+audio", + "35 initial full-compute denoise calls, then at most five cache hits; other step counts remain uncached" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "Video+audio example: 5/49 cache hits; latency 244190→221240 ms, video SSIM 0.9795/PSNR 41.60 dB and audio PSNR 168.8 dB. This demonstrates a speed/quality tradeoff, not exact equivalence." + }, + { + "kind": "counterexample", + "description": "Image-only example: 0/49 hits; 53340→53260 ms, SSIM 1.000 and sample-identical audio. No meaningful speed gain was observed." + }, + { + "kind": "upstream_reported", + "description": "Both video+audio runs peak at 140972 MiB; caching reduces compute and is not a weight-memory solution." + }, + { + "kind": "review_finding", + "description": "An omitted num_inference_steps initially resolved to 0 in cache refresh while the pipeline used 50, bypassing calibrated warmup. Author reports a fix at 0d9594f21 preserved in f86bd6ad7, with shared effective defaults and regressions." + } + ], + "recommendations": [ + "Treat residual reuse as approximate; keep task-specific calibrated policies and explicit step fallback.", + "Maintain separate hooks/request state for FL2VA and Ref2VA; do not copy residuals across tasks or concurrent requests.", + "Record actual cache hits and effective step schedule, not just an enabled flag; validate custom thresholds across video and audio." + ], + "validation_plan": [ + "Use the exact source revision or verify target-source task support; the candidate was unmerged at import.", + "Test explicit 50 steps, omitted steps, non-50 steps, task alternation and error/abort reset behavior.", + "Same-seed A/B across multiple prompt/media types; measure video, temporal and audio metrics with an explicit acceptance threshold.", + "Run at least three unprofiled warm repetitions and measure device/host memory separately from compute reduction." + ], + "limitations": [ + "Unmerged candidate at import; no claim of main support or InferRSI reproduction.", + "Reported quality results are a small same-seed sample set; full perception/temporal quality acceptance remains user-specific.", + "TeaCache and Cache-DiT are separate mutually exclusive backend choices in the reviewed branch." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json new file mode 100644 index 000000000..65dae9fd7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json @@ -0,0 +1,81 @@ +{ + "id": "vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling", + "title": "MiniMax-H3 stacked VAE tiling trades activation memory for fewer decode calls", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "summary": "A stacked-tiling candidate batches rank-local spatial tiles into one decoder call per temporal window; measured decode gains are exact for the reported latent but PP1 memory rises.", + "tags": [ + "minimax_h3", + "vae", + "tiling", + "memory", + "patch_parallel", + "counterexample" + ], + "sources": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "b188874539903ecc04a8874b782d7d1a898d191c", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "applicability": { + "hardware": [ + "NVIDIA B300 SXM6, SM103; PP4 uses GPUs 0–3" + ], + "software": [ + "vLLM 0.28.0 benchmark environment", + "Base dff28e686711add0e929ce0c5660b09ef26c8c88 + Source revision b188874539903ecc04a8874b782d7d1a898d191c", + "Exact decoder kernels from #6607; FP16 CUDA autocast" + ], + "models": [ + "MiniMax-H3 video VAE" + ], + "conditions": [ + "Fixed latent (1,24,62,48,84), 768×1344 decode, same latent broadcast to ranks", + "One warmup + three measured decodes; PP latency is max rank wall-clock", + "Remote VAE implements native stack_tiling; auto requires at least two global tiles per VAE rank" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "PP1 sequential→stacked median decode: 4387→3838 ms, peak allocated 11.83→16.73 GiB. PP4: 1198→1055 ms, peak 12.49 GiB unchanged; reported torch.equal=True and max abs diff 0 for both comparisons." + }, + { + "kind": "source_inspected", + "description": "Default false keeps sequential behavior; auto checks global tile count relative to parallel size. The model's previous stack_tiling state is restored in finally." + }, + { + "kind": "counterexample", + "description": "Fewer decoder calls improve stage latency while PP1 activations consume about 4.90 GiB more. A decode microbenchmark does not establish complete generation or HTTP speedup." + } + ], + "recommendations": [ + "Keep the default conservative until target capacity permits tile batching.", + "Evaluate sequential/stacked/auto at target PP sizes and shapes rather than assuming all parallel sizes scale.", + "Prioritize this work only when VAE decode is a material E2E stage." + ], + "validation_plan": [ + "Run pinned-branch tiling, registry and CLI forwarding tests before using --vae-stack-tiling; the option may not exist on target main.", + "Repeat decode using identical latent and record maximum-rank wall time and per-rank peaks.", + "Compare decoded tensor identity/seams/order, then full same-seed video/audio and HTTP E2E.", + "Qualify PP2/PP8, smaller tile grids and OOM/fallback cases separately." + ], + "limitations": [ + "Unmerged candidate at import; branch/default/options may differ from current main.", + "Clean current-branch PP2/PP8 latency is reported pending.", + "Reported exactness applies to this latent, autocast mode and decoder revision; portability is unverified." + ], + "schema_version": 1, + "repo": "vllm_omni", + "component": "diffusion", + "status": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + } +} diff --git a/src/inferrsi/knowledge/atoms/records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json b/src/inferrsi/knowledge/atoms/records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json new file mode 100644 index 000000000..5a8bcba57 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json @@ -0,0 +1,73 @@ +{ + "schema_version": 1, + "id": "xdit.cuda.diffusion.parallelism_freshness_and_topology", + "tier": "peer", + "repo": "xdit", + "backend": "cuda", + "component": "diffusion", + "scenario": "diffusion.*", + "title": "xDiT parallelism: separate current-state attention from stale-state pipelines", + "status": "imported", + "summary": "USP, CFG splitting and PipeFusion have different topology, memory and quality tradeoffs; qualify each before combining them.", + "tags": [ + "sequence_parallel", + "ulysses", + "ring", + "pipefusion", + "cfg", + "quality", + "transfer_hypothesis" + ], + "sources": [ + { + "url": "https://github.com/xdit-project/xDiT/blob/f7c16aa958379a9f0a0302350fe0e1bfcec5f23c/README.md", + "type": "technical_document", + "commit": "f7c16aa958379a9f0a0302350fe0e1bfcec5f23c", + "accessed_at": "2026-10-15", + "content_sha256": "07bfd6874db892623db179ca9cc7e51d3b7c2036bf624e50b7a6e314081979e9" + } + ], + "applicability": { + "hardware": [ + "Multiple CUDA GPUs with recorded interconnect topology; model support is method-specific" + ], + "software": [ + "xdit-project/xDiT at f7c16aa958379a9f0a0302350fe0e1bfcec5f23c; later revisions need reinspection" + ], + "conditions": [ + "A supported diffusion pipeline and compatible sequence/head partitioning", + "Record CFG setting, denoising schedule and all parallel degrees" + ] + }, + "claims": [ + { + "kind": "upstream_reported", + "description": "USP combines Ulysses and Ring sequence parallelism. CFG parallelism splits the two guidance branches when CFG is active." + }, + { + "kind": "upstream_reported", + "description": "The source cost table labels Ulysses/Ring attention data as fresh and PipeFusion as using stale information. PipeFusion requires serial warmup steps that affect its benefit." + } + ], + "downstream_impact": [ + "vLLM-Omni: compare sequence partition choices using exposed communication and memory, not only rank count.", + "Treat PipeFusion as a separate quality-sensitive experiment, particularly for few-step/distilled models where warmup consumes much of the schedule.", + "vllm-ascend: transfer topology reasoning only after independently checking collectives, rank ownership and numerical behavior." + ], + "recommendations": [ + "Treat downstream impact as an InferRSI transfer hypothesis, not an upstream compatibility or performance result." + ], + "validation_plan": [ + "Measure denoise and whole-generation latency, communication overlap, per-rank memory and scaling under fixed model/seed/shape/steps.", + "Evaluate output quality for each method and combination; test uneven token/head layouts and disabled CFG." + ], + "limitations": [ + "Backend-specific implementations and model matrices do not transfer with the high-level method.", + "Current-state attention still requires numerical validation; stale-state methods must not be advertised as lossless from a speed benchmark.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + } +} diff --git a/src/inferrsi/knowledge/atoms/repository-evolution-analysis.capability-presence-audit.json b/src/inferrsi/knowledge/atoms/repository-evolution-analysis.capability-presence-audit.json new file mode 100644 index 000000000..e01bd2983 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/repository-evolution-analysis.capability-presence-audit.json @@ -0,0 +1,128 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Capability presence audit", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/references/capability-presence-audit.md", + "sha256": "c21eb4a6aabe811a49a6540a34c54dbcfdcf7efae3052a79b54034c7838026a5" + } + ], + "origin": [ + "external" + ], + "attribution": [ + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "applicability": { + "scope": "any software repository with a recoverable git history", + "prerequisites": "git history access, optionally LearningToCommit-style benchmark for evaluation" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "The RTK transition is a learning example, not an independent heldout task; upstream tests were inspected, not executed.", + "Existing audit and synthetic KV comparison adapters are not a generic historical coding-task evaluator.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "empirical_validation": "not_run", + "id": "repository-evolution-analysis.capability-presence-audit", + "kind": "knowledge", + "entrypoint": "capability-presence-audit.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/references/capability-presence-audit.md", + "byte_range": [ + 0, + 11461 + ], + "sha256": "c21eb4a6aabe811a49a6540a34c54dbcfdcf7efae3052a79b54034c7838026a5" + } + } + }, + "content": { + "capability-presence-audit.md": { + "path": "workflows/repository-evolution-analysis/references/capability-presence-audit.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/repository-evolution-analysis.original.json b/src/inferrsi/knowledge/atoms/repository-evolution-analysis.original.json new file mode 100644 index 000000000..c3e1fa78c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/repository-evolution-analysis.original.json @@ -0,0 +1,224 @@ +{ + "authority": "checkout", + "metadata": { + "id": "repository-evolution-analysis.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Analyze a repository's commit history to build a capability-evolution model: what the system can do, how it got there, and what patterns allow it to iterate quickly. Use to produce history-derived knowledge for agent skill conditioning, and to design temporal-split benchmarks for skill evaluation.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md", + "sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e" + }, + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "applicability": { + "scope": "any software repository with a recoverable git history", + "prerequisites": "git history access, optionally LearningToCommit-style benchmark for evaluation" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "The RTK transition is a learning example, not an independent heldout task; upstream tests were inspected, not executed.", + "Existing audit and synthetic KV comparison adapters are not a generic historical coding-task evaluator.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [ + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md", + "byte_range": [ + 0, + 22892 + ], + "sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/repository-evolution-analysis.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 359 + ], + "sha256": "7d51fa6362de3f3fe6da29fddbb4825077593ae7e8167f66fb93767ebd9117b6" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 4449 + ], + "sha256": "7ced3a4f8df07fdea06e5e8a379fe2ec6491eb739f50368384fdb45ef08a7e4c" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 4449, + 22892 + ], + "sha256": "b4b1e3f25edee40978060a3cc1613af09d5e0b8d3854d08545619f60f04990ef" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/repository-evolution-analysis.rtk-consumer-path-transition.json b/src/inferrsi/knowledge/atoms/repository-evolution-analysis.rtk-consumer-path-transition.json new file mode 100644 index 000000000..8fad6446c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/repository-evolution-analysis.rtk-consumer-path-transition.json @@ -0,0 +1,128 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Worked transition: manager discovery is not consumer reachability", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md", + "sha256": "a70b1d128fb5e0ac12292a290d624f218a0831d7581fe8980b62661473e0f2b7" + } + ], + "origin": [ + "external" + ], + "attribution": [ + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "applicability": { + "scope": "any software repository with a recoverable git history", + "prerequisites": "git history access, optionally LearningToCommit-style benchmark for evaluation" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "The RTK transition is a learning example, not an independent heldout task; upstream tests were inspected, not executed.", + "Existing audit and synthetic KV comparison adapters are not a generic historical coding-task evaluator.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "empirical_validation": "not_run", + "id": "repository-evolution-analysis.rtk-consumer-path-transition", + "kind": "knowledge", + "entrypoint": "rtk-consumer-path-transition.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md", + "byte_range": [ + 0, + 13701 + ], + "sha256": "a70b1d128fb5e0ac12292a290d624f218a0831d7581fe8980b62661473e0f2b7" + } + } + }, + "content": { + "rtk-consumer-path-transition.md": { + "path": "workflows/repository-evolution-analysis/references/rtk-consumer-path-transition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.decision-cases.json b/src/inferrsi/knowledge/atoms/rsi-evidence.decision-cases.json new file mode 100644 index 000000000..16673255e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.decision-cases.json @@ -0,0 +1,85 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Decision cases", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/decision-cases.md", + "sha256": "c2c1d3d75c4fcb515dd36ff84d8dc940c25d54c5757a29a80d1af88eb8b66115" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "origin": [ + "first-party" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.decision-cases", + "kind": "knowledge", + "entrypoint": "decision-cases.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/decision-cases.md", + "byte_range": [ + 0, + 7035 + ], + "sha256": "c2c1d3d75c4fcb515dd36ff84d8dc940c25d54c5757a29a80d1af88eb8b66115" + } + } + }, + "content": { + "decision-cases.md": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/decision-cases.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.license-mit.json b/src/inferrsi/knowledge/atoms/rsi-evidence.license-mit.json new file mode 100644 index 000000000..5f9fce924 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.license-mit.json @@ -0,0 +1,89 @@ +{ + "authority": "checkout", + "metadata": { + "title": "LoopX historical MIT license", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md", + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "path": "LICENSE-MIT", + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3" + } + ], + "origin": [ + "external" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "path": "LICENSE-MIT", + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.license-mit", + "kind": "knowledge", + "entrypoint": "LICENSE-MIT.md", + "atom": { + "when": {}, + "license": "MIT", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md", + "byte_range": [ + 0, + 1075 + ], + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3" + } + } + }, + "content": { + "LICENSE-MIT.md": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.license.json b/src/inferrsi/knowledge/atoms/rsi-evidence.license.json new file mode 100644 index 000000000..76a7f7354 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.license.json @@ -0,0 +1,89 @@ +{ + "authority": "checkout", + "metadata": { + "title": "LoopX Apache License 2.0", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "path": "LICENSE", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + } + ], + "origin": [ + "external" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "path": "LICENSE", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.license", + "kind": "knowledge", + "entrypoint": "LICENSE", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE", + "byte_range": [ + 0, + 11358 + ], + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + } + } + }, + "content": { + "LICENSE": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/LICENSE" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.mechanisms.json b/src/inferrsi/knowledge/atoms/rsi-evidence.mechanisms.json new file mode 100644 index 000000000..ae3090b92 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.mechanisms.json @@ -0,0 +1,85 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Mechanisms and operating boundaries", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/mechanisms.md", + "sha256": "4fa09099d362a8088fdb0e6a767f72aae6218b92fe5fd75b6fb78c2bb2a318fb" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "origin": [ + "first-party" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.mechanisms", + "kind": "knowledge", + "entrypoint": "mechanisms.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/mechanisms.md", + "byte_range": [ + 0, + 16696 + ], + "sha256": "4fa09099d362a8088fdb0e6a767f72aae6218b92fe5fd75b6fb78c2bb2a318fb" + } + } + }, + "content": { + "mechanisms.md": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/mechanisms.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.notice.json b/src/inferrsi/knowledge/atoms/rsi-evidence.notice.json new file mode 100644 index 000000000..04a430b85 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.notice.json @@ -0,0 +1,89 @@ +{ + "authority": "checkout", + "metadata": { + "title": "LoopX copyright and contributor notice", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/NOTICE.md", + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "path": "NOTICE", + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d" + } + ], + "origin": [ + "external" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "path": "NOTICE", + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.notice", + "kind": "knowledge", + "entrypoint": "NOTICE.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/NOTICE.md", + "byte_range": [ + 0, + 308 + ], + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d" + } + } + }, + "content": { + "NOTICE.md": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/NOTICE.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.omni-experiments.json b/src/inferrsi/knowledge/atoms/rsi-evidence.omni-experiments.json new file mode 100644 index 000000000..1d704bced --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.omni-experiments.json @@ -0,0 +1,70 @@ +{ + "authority": "checkout", + "metadata": { + "title": "Qualifying Omni optimization experiments", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/omni-experiments.md", + "sha256": "8fafc1e05ef21ab60158fc626c73ca1b8c615ada59f90fd23199496daa46ac48" + } + ], + "origin": [ + "first-party" + ], + "attribution": [], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.omni-experiments", + "kind": "knowledge", + "entrypoint": "omni-experiments.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/omni-experiments.md", + "byte_range": [ + 0, + 5380 + ], + "sha256": "8fafc1e05ef21ab60158fc626c73ca1b8c615ada59f90fd23199496daa46ac48" + } + } + }, + "content": { + "omni-experiments.md": { + "path": "workflows/rsi-evidence/references/omni-experiments.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.original.json b/src/inferrsi/knowledge/atoms/rsi-evidence.original.json new file mode 100644 index 000000000..3926472db --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.original.json @@ -0,0 +1,103 @@ +{ + "authority": "checkout", + "metadata": { + "id": "rsi-evidence.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Guide agents to establish acceptance criteria, freeze and cite RSI evidence using plan/results/patch/validator paths and PASS/FAIL/INCONCLUSIVE verdicts.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/SKILL.md", + "sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/SKILL.md", + "byte_range": [ + 0, + 8927 + ], + "sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/rsi-evidence.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 190 + ], + "sha256": "1ddee4264095fa092d0b18c31699b9ffa746a9fab278e48e29cfc960e68969bb" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 3393 + ], + "sha256": "d4e538e3a4081737a2110aa9c9e4b9aae5ef6cd0af9073433a2e22f16007c69e" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 3393, + 8927 + ], + "sha256": "f4e849f901ce9eff3f0f6fab396095da45e2859124626c8dc478c1b696b5398b" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.readme.json b/src/inferrsi/knowledge/atoms/rsi-evidence.readme.json new file mode 100644 index 000000000..b80996d4a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.readme.json @@ -0,0 +1,85 @@ +{ + "authority": "checkout", + "metadata": { + "title": "LoopX Goal authority and quota boundaries", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md", + "sha256": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "origin": [ + "first-party" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.readme", + "kind": "knowledge", + "entrypoint": "README.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md", + "byte_range": [ + 0, + 4701 + ], + "sha256": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + } + } + }, + "content": { + "README.md": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/README.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/rsi-evidence.source-ledger.json b/src/inferrsi/knowledge/atoms/rsi-evidence.source-ledger.json new file mode 100644 index 000000000..4b030afc7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/rsi-evidence.source-ledger.json @@ -0,0 +1,85 @@ +{ + "authority": "checkout", + "metadata": { + "title": "LoopX source ledger", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/source-ledger.json", + "sha256": "4a0f1f02134af5b7d54a1f13e104b8066372d3d4a1a4a9e717514632fff05893" + }, + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "origin": [ + "first-party" + ], + "attribution": [ + { + "type": "git", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store.", + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ], + "empirical_validation": "not_run", + "id": "rsi-evidence.source-ledger", + "kind": "knowledge", + "entrypoint": "source-ledger.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/references/loopx-goal-governance/source-ledger.json", + "byte_range": [ + 0, + 20966 + ], + "sha256": "4a0f1f02134af5b7d54a1f13e104b8066372d3d4a1a4a9e717514632fff05893" + } + } + }, + "content": { + "source-ledger.json": { + "path": "workflows/rsi-evidence/references/loopx-goal-governance/source-ledger.json" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/sglang.cuda.llm.hierarchical_prefix_cache.original.json b/src/inferrsi/knowledge/atoms/sglang.cuda.llm.hierarchical_prefix_cache.original.json new file mode 100644 index 000000000..535a846e7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/sglang.cuda.llm.hierarchical_prefix_cache.original.json @@ -0,0 +1,254 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "SGLang HiCache: reuse prefixes only when transfer beats recomputation", + "summary": "Move reusable prefix KV across device, host and storage tiers while accounting for sharing scope, layout conversion and prefetch policy.", + "applicability": { + "hardware": [ + "GPU plus CPU memory and optional storage/network backend; CUDA transfer path is the scope of this candidate" + ], + "software": [ + "sgl-project/sglang at f7ad4345b86d147a1c3095a3cebabca9a33ebaa1; later revisions need reinspection" + ], + "conditions": [ + "Repeated prefixes or long contexts with measurable reuse", + "Model/cache identity and distributed-rank agreement must be maintained" + ] + }, + "limitations": [ + "No SGLang benchmark gain is imported as an InferRSI result.", + "Larger private host caches do not create a shared distributed cache; low reuse or slow storage can regress latency.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "sglang", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/sglang.cuda.llm.hierarchical_prefix_cache.json", + "sha256": "b50ca58df28d4343545d07adf0da23f8f181297b30aba7870e5690630e7d7315" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_design.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "ea9e7896aeeba4f648c3484b382780ce735bba74e0a74dd5403bf7a0438305b5" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_best_practices.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "1b23cd3668a11a1dce0f8be6104afdc9c8b735d14b86c3c36387f303c2daf31b" + } + ], + "attribution": [ + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_design.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "ea9e7896aeeba4f648c3484b382780ce735bba74e0a74dd5403bf7a0438305b5" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_best_practices.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "1b23cd3668a11a1dce0f8be6104afdc9c8b735d14b86c3c36387f303c2daf31b" + } + ], + "id": "sglang.cuda.llm.hierarchical_prefix_cache.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/sglang.cuda.llm.hierarchical_prefix_cache.json", + "byte_range": [ + 0, + 3641 + ], + "sha256": "b50ca58df28d4343545d07adf0da23f8f181297b30aba7870e5690630e7d7315" + } + } + }, + "content": { + "record.json": { + "path": "records/sglang.cuda.llm.hierarchical_prefix_cache.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 264 + ], + "sha256": "a719ed3c586294a07e0260e183a7ea518b9cd6d35064a5f63b3d0bd1a0eb0d21" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 268, + 288 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 292, + 441 + ], + "sha256": "2f2077045e3ebac97c9a213f24cfa7d9c49d8bbbd120e76cd7eea91f4f4bd1a5" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 445, + 566 + ], + "sha256": "ad298b78e3ee316f9512cb1c8c013a60c6927847b0ab4fa8c8a3ea87164500ae" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 570, + 1357 + ], + "sha256": "6c764cd2865f289bace27efbad5f97d3dba6cd8463017df059d4056467468bf2" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1361, + 1826 + ], + "sha256": "f887a62ca04dd025ba487d2624e13b3ced43088dcf65dd965c26240f76607005" + }, + "claim-0": { + "summary": "HiCache keeps L1 device and L2 host caches private to an inference instance; only appropriately configured L3 storage enables cross-instance reuse.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1846, + 2059 + ], + "sha256": "70fca8d33f68551cc536a2be8e0066a0b99b38692b90340e3acd29865b81182d" + }, + "claim-1": { + "summary": "Page-oriented layouts, selective write-through and prefetch termination policies trade I/O overhead against useful cache hits. Multi-rank consensus constrains usable prefix lengths.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2065, + 2312 + ], + "sha256": "ed8a8025668074cbec4d74d78516e3ae395b55ce8306f3f28b1f96b47b246e31" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 2320, + 2754 + ], + "sha256": "176d9dd683f649248f00a37041cbcf6600297e7c057fe24740bbf73c2587d070" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2758, + 2901 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2905, + 3199 + ], + "sha256": "3fb3c22d16ecba89de97d06ade8deb20287722e95e11ceb625b7aa19b76c0ca9" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3203, + 3549 + ], + "sha256": "a101e3be99134a297b45db0f19e38d8b566d8eab54b700a8c34a0ca8b99d9b47" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3553, + 3638 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/skill-evolution-playbook.original.json b/src/inferrsi/knowledge/atoms/skill-evolution-playbook.original.json new file mode 100644 index 000000000..70e1a88fb --- /dev/null +++ b/src/inferrsi/knowledge/atoms/skill-evolution-playbook.original.json @@ -0,0 +1,104 @@ +{ + "authority": "checkout", + "metadata": { + "id": "skill-evolution-playbook.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Practical design choices for evolving agent skills from execution traces: when one trajectory should update a skill, how conflicting lessons are handled, how negative evidence is preserved, how large an edit should be, and when skills should split or merge. Drawn from Trace2Skill and SkillOpt. Use when designing or operating a skill evolution pipeline.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md", + "sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Design choices for evolving agent skills from execution traces, drawn from Trace2Skill and SkillOpt: when a trajectory should update a skill, how conflicting lessons are handled, how negative evidence is preserved, how large an edit should be and when skills split or merge; for designing or operating a skill evolution pipeline", + "prerequisites": "A final-test partition kept outside edit selection and the incumbent skill retained for rollback; changing a skill's scope first needs explicit review of its identity and consumers", + "input_contract": "Execution trajectories or trace IDs with the diagnosed causal failure and the successful behavior an amendment must preserve; the incumbent skill and its revision lineage; held-out evaluation results for candidate edits", + "produced_artifact": "A scoped case or amendment proposal, or a consolidated candidate edit, with rejection records and the versioned revision lineage; a candidate for independently evaluated acceptance, not a replacement decision or an efficacy claim", + "failure_modes": [ + "An anecdote, or agreement among analysts, is taken as efficacy", + "Consolidation output is treated as a replacement decision instead of a candidate awaiting independent acceptance", + "A tie or uncertain result is reported as improvement", + "A conflict is resolved by voting for whichever outcome appeared more often in the pool", + "A rejection is applied to every future use of an idea instead of the comparison it constrains", + "Paper-specific section counts or length budgets are used as universal defaults, or a skill is split on length alone", + "A stronger task solver is assumed to be a stronger improver, or replay rankings and private inner scores are read as outer generalization" + ], + "refusal_point": "Records a conflict that conditioning cannot resolve, where the same context produces different outcomes across runs, as INCONCLUSIVE and flags it for human review instead of choosing a lesson; claims no universal minimum trace count, paper-to-code equivalence or local efficacy" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md", + "byte_range": [ + 0, + 13082 + ], + "sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6" + } + } + }, + "content": { + "guide.md": { + "path": "workflows/skill-evolution-playbook.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 409 + ], + "sha256": "2cdfb63f21cf1ea6060e06f9f09da75f5f4dea7ee06cf71a7f01f29751f1b658" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 4074 + ], + "sha256": "646c40f2c81f52b664edf678b60bbc340223daa5127540db15ee0dae6a60af06" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 4074, + 13082 + ], + "sha256": "9c508cb8a510cf055dc298d575f8a06be11fc1eac131e73f8d0a26b1ee46d2ce" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-acceptance.json b/src/inferrsi/knowledge/atoms/task-accuracy-acceptance.json new file mode 100644 index 000000000..181417a30 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-accuracy-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-accuracy" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "byte_range": [ + 4261, + 4767 + ], + "sha256": "142403a4ec7eb056ee229f3cd153e64a37cc8f44a97eec4aedab53d81bbf1837" + } + } + }, + "content": { + "body.md": { + "path": "task-accuracy-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-acceptance.md b/src/inferrsi/knowledge/atoms/task-accuracy-acceptance.md new file mode 100644 index 000000000..f4301735b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when the first divergence is explained, the original and held-out end-to-end outputs meet the user's tolerance on the actual target, and trade-offs are reported. If only an analogue exists (for example Ascend evidence for Windows TTS), identify the missing target sample and the smallest stage replay that tests transfer. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-condition.json b/src/inferrsi/knowledge/atoms/task-accuracy-condition.json new file mode 100644 index 000000000..1fd6586f3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-accuracy-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Inference completes but output violates a reference, quality metric or tolerance.", + "state": "candidate", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/accuracy.json", + "sha256": "5a672842ec26262d8827f7ce8d92de9bd956859ff5244189c0519b8f0dd188e3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-accuracy" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/accuracy.json", + "byte_range": [ + 92, + 173 + ], + "sha256": "d9bad2e989c2bfa1463001c8a0eac3a6ea9bb88f1d88df1b5d20669d26f16753" + } + } + }, + "content": { + "body.md": { + "path": "task-accuracy-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-condition.md b/src/inferrsi/knowledge/atoms/task-accuracy-condition.md new file mode 100644 index 000000000..a676ac3ea --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-condition.md @@ -0,0 +1 @@ +Inference completes but output violates a reference, quality metric or tolerance. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-navigation.json b/src/inferrsi/knowledge/atoms/task-accuracy-navigation.json new file mode 100644 index 000000000..d94b0728a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-accuracy-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Repair a numerical or output-quality regression", + "state": "candidate", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "byte_range": [ + 1346, + 1397 + ], + "sha256": "10477fc3d5e6501291a3cd48b91857681a5c15a829743b4617335baf97939cf6" + } + } + }, + "content": { + "body.md": { + "path": "task-accuracy-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-navigation.md b/src/inferrsi/knowledge/atoms/task-accuracy-navigation.md new file mode 100644 index 000000000..ad16aa592 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-navigation.md @@ -0,0 +1,2 @@ +# Repair a numerical or output-quality regression + diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-procedure.json b/src/inferrsi/knowledge/atoms/task-accuracy-procedure.json new file mode 100644 index 000000000..c29f3a124 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-accuracy-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-accuracy" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "byte_range": [ + 1899, + 2905 + ], + "sha256": "222d4b2c6c9ac9d09aad49980e2ffd163645514e6e8ac20fef4e28de52734322" + } + } + }, + "content": { + "body.md": { + "path": "task-accuracy-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-procedure.md b/src/inferrsi/knowledge/atoms/task-accuracy-procedure.md new file mode 100644 index 000000000..64c0efaa3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Freeze the model revision, reference outputs, inputs, seeds, preprocessing, dtype and sampling flags. Define the user's end-to-end tolerance and how the oracle handles ordinary variation. Replay both the reference and failing target with the supplied script. +2. Compare aligned stage outputs, then the first divergent token, frame or tensor. For TTS, distinguish text normalization, codec tokens and decoded audio. Feed a saved reference intermediate to the target stage to distinguish an upstream handoff error from a local math error. +3. If quality changed after an upgrade, replay the last-good and current combinations on identical inputs. Add version alignment as a secondary task if only the target combination fails. If both fail, continue tracing the divergence against the reference. +4. Change one in-scope implementation or configuration. Re-run the original and held-out inputs, including the complete postprocessing path, and report any latency or resource trade-off. + diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-route-card.json b/src/inferrsi/knowledge/atoms/task-accuracy-route-card.json new file mode 100644 index 000000000..b990521d5 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-accuracy-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Restore numerical or output quality", + "state": "candidate", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/accuracy.json", + "sha256": "5a672842ec26262d8827f7ce8d92de9bd956859ff5244189c0519b8f0dd188e3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-accuracy" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/accuracy.json", + "byte_range": [ + 0, + 1411 + ], + "sha256": "5a672842ec26262d8827f7ce8d92de9bd956859ff5244189c0519b8f0dd188e3" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"accuracy\",\n \"title\": \"Restore numerical or output quality\",\n \"choose_when\": \"Inference completes but output violates a reference, quality metric or tolerance.\",\n \"required_inputs\": [\n \"fixed inputs, weights and reference implementation\",\n \"quality metric and tolerance\",\n \"seed, dtype and preprocessing\",\n \"modality-specific outputs\"\n ],\n \"steps\": [\n \"Confirm preprocessing, sampling and evaluation parity.\",\n \"For a post-upgrade regression, compare the last-good and current revisions on identical inputs. If only the upgraded combination fails, add version-align and bisect the changed boundary. If both fail against the reference, keep tracing the quality divergence.\",\n \"Find the first diverging stage, tensor, frame or token.\",\n \"For TTS, collect reference audio or codec tokens at the target revision. Report target-matched evidence separately from observations on other devices. When target evidence is missing, record where you searched, the missing owner and the smallest target parity check.\",\n \"Verify the correction on the reproducer and held-out inputs before rechecking speed.\"\n ],\n \"acceptance_evidence\": \"A localized divergence, reproducible quality recovery and held-out results; include any latency cost.\",\n \"candidate_skill_ids\": [\n \"audit-fixed-workload-claim\",\n \"diffusers-invocation-state\",\n \"torch-npu\",\n \"claim-contract\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-support.json b/src/inferrsi/knowledge/atoms/task-accuracy-support.json new file mode 100644 index 000000000..74441d87a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-accuracy-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-accuracy" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "byte_range": [ + 2905, + 4261 + ], + "sha256": "479cfe5a22d0cc5d26ca279a659d05a864ddc1d34b1b647e186ddd3a552088b6" + } + } + }, + "content": { + "body.md": { + "path": "task-accuracy-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-accuracy-support.md b/src/inferrsi/knowledge/atoms/task-accuracy-support.md new file mode 100644 index 000000000..8ab353162 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-accuracy-support.md @@ -0,0 +1,13 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| A fixed-workload report aggregates the quality or completion results differently between runs. | `audit-fixed-workload-claim` | Audit retained observations, declared quality evidence and comparability. Align the reports before attributing a regression to model math. | +| A Flux pipeline or FlowMatch scheduler differs only on repeated calls. | `diffusers-invocation-state` | Get the call-state and schedule trace. Compare fresh versus reused wrappers at the first differing timestep. | +| The first differing tensor is on an Ascend TorchNPU dispatch or dtype boundary. | `torch-npu` | Identify the actual dispatch path and precision behavior. Replay that operator with fixed inputs and verify on the installed device. | +| The reported tolerance passes for only a subset of requested outputs or targets. | `claim-contract` | Get the supported verdict and evidence gaps. State the covered scope and obtain the missing target result before declaring recovery. | + diff --git a/src/inferrsi/knowledge/atoms/task-capture-run.json b/src/inferrsi/knowledge/atoms/task-capture-run.json new file mode 100644 index 000000000..b57927533 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-capture-run.json @@ -0,0 +1,134 @@ +{ + "metadata": { + "id": "task-capture-run", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Capture the actual run", + "state": "candidate", + "applicability": { + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3" + }, + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3" + }, + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0" + }, + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942" + }, + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e" + }, + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b" + }, + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "byte_range": [ + 1397, + 1899 + ], + "sha256": "41efed7aa96e9a9c72a53a5164501dc8b8e9d688780e6f6084c32acc9d13266a" + }, + "other_occurrences": [ + { + "source_index": 1, + "byte_range": [ + 1385, + 1887 + ] + }, + { + "source_index": 2, + "byte_range": [ + 1393, + 1895 + ] + }, + { + "source_index": 3, + "byte_range": [ + 1424, + 1926 + ] + }, + { + "source_index": 4, + "byte_range": [ + 1438, + 1940 + ] + }, + { + "source_index": 5, + "byte_range": [ + 1405, + 1907 + ] + }, + { + "source_index": 6, + "byte_range": [ + 1424, + 1926 + ] + } + ] + } + }, + "content": { + "body.md": { + "path": "task-capture-run.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-capture-run.md b/src/inferrsi/knowledge/atoms/task-capture-run.md new file mode 100644 index 000000000..872abb8aa --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-capture-run.md @@ -0,0 +1,9 @@ +## Capture the actual run + +Record the hardware vendor, device SKU, backend and driver, OS, model family and +checkpoint revision, engine and plugin versions, and the exact run script and +flags. Attach the benchmark inputs, workload shape, dtype, reference or quality +oracle, and the user's acceptance criteria. Write down the current diagnosis +and its supporting observation, allowed search space, and remaining budget. +Mark missing fields as unknown and request the first one that affects a decision. + diff --git a/src/inferrsi/knowledge/atoms/task-day-0-acceptance.json b/src/inferrsi/knowledge/atoms/task-day-0-acceptance.json new file mode 100644 index 000000000..082d76b16 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-day-0-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-day-0" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "byte_range": [ + 4009, + 4496 + ], + "sha256": "2c8620c1d6ace8743a53ce5ee8356b70bd2c7fca1ac50048058661f69747fa28" + } + } + }, + "content": { + "body.md": { + "path": "task-day-0-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-day-0-acceptance.md b/src/inferrsi/knowledge/atoms/task-day-0-acceptance.md new file mode 100644 index 000000000..72191166e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when each requested stage meets its reference check, the full model returns the accepted result on the specified target, and the saved fixture reproduces it. If a stage still fails, name its first mismatching input/output pair and the single replay that separates a loader error from an operator error. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-day-0-condition.json b/src/inferrsi/knowledge/atoms/task-day-0-condition.json new file mode 100644 index 000000000..80591d818 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-day-0-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "First usable support for a new checkpoint or model architecture in an existing engine.", + "state": "candidate", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/day0-model.json", + "sha256": "77b26d1300e5535d8b595cef95c6c803ea1322e92f38b68ae2905f69355a814f" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-day-0" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/day0-model.json", + "byte_range": [ + 91, + 177 + ], + "sha256": "254ed9783464222ada47f205281c63014c7bd7740a9cf5908cc91855dafedc79" + } + } + }, + "content": { + "body.md": { + "path": "task-day-0-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-day-0-condition.md b/src/inferrsi/knowledge/atoms/task-day-0-condition.md new file mode 100644 index 000000000..882b7867b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-condition.md @@ -0,0 +1 @@ +First usable support for a new checkpoint or model architecture in an existing engine. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-day-0-navigation.json b/src/inferrsi/knowledge/atoms/task-day-0-navigation.json new file mode 100644 index 000000000..3e27d7939 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-day-0-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Bring up a new model in an existing engine", + "state": "candidate", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "byte_range": [ + 1339, + 1385 + ], + "sha256": "94321a7eef751bf1fbaf721fc98aaf7916e178d8cda0cd4fb3f8f567c0e1a5ea" + } + } + }, + "content": { + "body.md": { + "path": "task-day-0-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-day-0-navigation.md b/src/inferrsi/knowledge/atoms/task-day-0-navigation.md new file mode 100644 index 000000000..46699a527 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-navigation.md @@ -0,0 +1,2 @@ +# Bring up a new model in an existing engine + diff --git a/src/inferrsi/knowledge/atoms/task-day-0-procedure.json b/src/inferrsi/knowledge/atoms/task-day-0-procedure.json new file mode 100644 index 000000000..9aa2e35b5 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-day-0-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-day-0" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "byte_range": [ + 1887, + 2911 + ], + "sha256": "643ed05ac29007e34dd92e1a977fa1aa661df37d37442c027d6a1816a4c237a9" + } + } + }, + "content": { + "body.md": { + "path": "task-day-0-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-day-0-procedure.md b/src/inferrsi/knowledge/atoms/task-day-0-procedure.md new file mode 100644 index 000000000..7c146a5b9 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Pin the upstream reference implementation, model revision, weights, tokenizer/processor, input and decoding settings. Save the exact reference command and expected output for each requested modality. Record any stochastic comparison rule before changing the adapter. +2. Map the checkpoint and I/O contract onto the engine's loader, preprocessing, stage boundaries, operators and postprocessing. On the target device, start with the smallest real-weight input. Compare each stage against the pinned reference in execution order. +3. At the first failing stage, replay its saved reference inputs through the target stage alone. If those pass, inspect the previous stage's handoff. Otherwise inspect the implementation or weights at that stage. Change one allowed adaptation at a time. +4. Run the complete user script with the agreed features and flags. Save inputs, revisions, stage checks, output and tolerance as a replayable regression fixture. State which features and devices the fixture covers. + diff --git a/src/inferrsi/knowledge/atoms/task-day-0-route-card.json b/src/inferrsi/knowledge/atoms/task-day-0-route-card.json new file mode 100644 index 000000000..e92360507 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-day-0-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Integrate a newly released model", + "state": "candidate", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/day0-model.json", + "sha256": "77b26d1300e5535d8b595cef95c6c803ea1322e92f38b68ae2905f69355a814f" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-day-0" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/day0-model.json", + "byte_range": [ + 0, + 871 + ], + "sha256": "77b26d1300e5535d8b595cef95c6c803ea1322e92f38b68ae2905f69355a814f" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"day0-model\",\n \"title\": \"Integrate a newly released model\",\n \"choose_when\": \"First usable support for a new checkpoint or model architecture in an existing engine.\",\n \"required_inputs\": [\n \"checkpoint revision and tokenizer or processor\",\n \"model family and supported modalities\",\n \"upstream reference outputs\",\n \"device, backend and engine revisions\"\n ],\n \"steps\": [\n \"Map the model config and I/O contract to the host engine.\",\n \"Run the smallest reference-parity test for each requested modality.\",\n \"List missing operators or unsupported features before benchmarking.\"\n ],\n \"acceptance_evidence\": \"A reproducible load and generation smoke, parity checks and a supported-feature matrix on the named target.\",\n \"candidate_skill_ids\": [\n \"ascend-model-adaptation\",\n \"diffusers-invocation-state\",\n \"claim-contract\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-day-0-support.json b/src/inferrsi/knowledge/atoms/task-day-0-support.json new file mode 100644 index 000000000..2e87c10b7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-day-0-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-day-0" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "byte_range": [ + 2911, + 4009 + ], + "sha256": "51b8018e5c27cec47b81a85935569d9f62242995679441f7acfa80b4f97c8230" + } + } + }, + "content": { + "body.md": { + "path": "task-day-0-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-day-0-support.md b/src/inferrsi/knowledge/atoms/task-day-0-support.md new file mode 100644 index 000000000..4f4cb1cb9 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-day-0-support.md @@ -0,0 +1,12 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| The target is Ascend and weight scales, KV replication or a multimodal adapter prevent a real-weight run. | `ascend-model-adaptation` | Get the checkpoint and feature report. Replay the first unsupported load or stage with real weights before progressing. | +| A Flux diffusion stage agrees on the first call but diverges on reuse. | `diffusers-invocation-state` | Get the wrapper/scheduler state trace. Replay with a fresh pipeline and compare the first differing timestep. | +| The request includes a support claim and some features have only source or smoke evidence. | `claim-contract` | Map observations to the declared gates. Publish the supported subset and leave the uncovered features open. | + diff --git a/src/inferrsi/knowledge/atoms/task-debug-acceptance.json b/src/inferrsi/knowledge/atoms/task-debug-acceptance.json new file mode 100644 index 000000000..cc8ad8dfd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-debug-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-debug" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "byte_range": [ + 4165, + 4686 + ], + "sha256": "65d1fc97fb0a8c0eafd9f7f3902b2300389a5316ecb61ac06f639a18969cd1d3" + } + } + }, + "content": { + "body.md": { + "path": "task-debug-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-debug-acceptance.md b/src/inferrsi/knowledge/atoms/task-debug-acceptance.md new file mode 100644 index 000000000..8b14e39f2 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when the original failure is reproducible before the fix, its earliest implicated boundary is supported by evidence, and both the original script and the unaffected control pass after the fix. For an intermittent failure, record the attempted repeats and propose the narrowest additional trace that can distinguish the remaining causes. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-debug-condition.json b/src/inferrsi/knowledge/atoms/task-debug-condition.json new file mode 100644 index 000000000..d566e7a07 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-debug-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "A hang, crash, OOM or execution-path failure needs a reproducible cause.", + "state": "candidate", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/debug.json", + "sha256": "75241e43d12fb961d3f48d1b683e4df321c0f18e683959aedca9722e78a8b78f" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-debug" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/debug.json", + "byte_range": [ + 81, + 153 + ], + "sha256": "7bccb87127ab06a0c0963e48c4919df0ab1985e9da6236e85d811bedddf0fac9" + } + } + }, + "content": { + "body.md": { + "path": "task-debug-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-debug-condition.md b/src/inferrsi/knowledge/atoms/task-debug-condition.md new file mode 100644 index 000000000..6c81123f2 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-condition.md @@ -0,0 +1 @@ +A hang, crash, OOM or execution-path failure needs a reproducible cause. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-debug-navigation.json b/src/inferrsi/knowledge/atoms/task-debug-navigation.json new file mode 100644 index 000000000..423767a9d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-debug-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Isolate and repair an execution failure", + "state": "candidate", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "byte_range": [ + 1350, + 1393 + ], + "sha256": "1c33f39d398a29d15a74b4430c532e2e0c18a43c9236a83015e254fe04d5efde" + } + } + }, + "content": { + "body.md": { + "path": "task-debug-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-debug-navigation.md b/src/inferrsi/knowledge/atoms/task-debug-navigation.md new file mode 100644 index 000000000..7cb3b28b6 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-navigation.md @@ -0,0 +1,2 @@ +# Isolate and repair an execution failure + diff --git a/src/inferrsi/knowledge/atoms/task-debug-procedure.json b/src/inferrsi/knowledge/atoms/task-debug-procedure.json new file mode 100644 index 000000000..67ef21d05 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-debug-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-debug" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "byte_range": [ + 1895, + 2839 + ], + "sha256": "18b0a3c5c4d0df01977c44aeeeaac5261f94f4e42af64b1d59b76f9a005e39e4" + } + } + }, + "content": { + "body.md": { + "path": "task-debug-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-debug-procedure.md b/src/inferrsi/knowledge/atoms/task-debug-procedure.md new file mode 100644 index 000000000..3eaee20b9 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Replay the supplied script with its original flags and capture the first observable error, stage, device, rank and timestamps. Keep a last-working revision or configuration as a control. For a hang, capture progress at each boundary before attributing a cause. +2. Minimize the input or configuration one variable at a time. Preserve the original signature and a closely matched passing control. Follow ownership across stages to locate the earliest difference. +3. State two explanations that predict different observations. Probe the smallest boundary that distinguishes them, such as a recorded handoff with a known-good producer or consumer. Apply one in-scope fix only when the observation implicates that boundary. +4. Repeat the minimal reproducer, then the original unmodified script and an unaffected control. Retain logs tying the original failure and recovery to the same boundary and save a regression check. + diff --git a/src/inferrsi/knowledge/atoms/task-debug-route-card.json b/src/inferrsi/knowledge/atoms/task-debug-route-card.json new file mode 100644 index 000000000..c8d9bafdd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-debug-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Diagnose execution failures", + "state": "candidate", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/debug.json", + "sha256": "75241e43d12fb961d3f48d1b683e4df321c0f18e683959aedca9722e78a8b78f" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-debug" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/debug.json", + "byte_range": [ + 0, + 782 + ], + "sha256": "75241e43d12fb961d3f48d1b683e4df321c0f18e683959aedca9722e78a8b78f" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"debug\",\n \"title\": \"Diagnose execution failures\",\n \"choose_when\": \"A hang, crash, OOM or execution-path failure needs a reproducible cause.\",\n \"required_inputs\": [\n \"symptom, phase and logs\",\n \"minimal reproducer\",\n \"last working version or configuration\",\n \"hardware and system context\"\n ],\n \"steps\": [\n \"Reduce to a failing and a working control.\",\n \"Localize the first failing boundary and test competing causes.\",\n \"Verify the fix against the reproducer and an unaffected control.\"\n ],\n \"acceptance_evidence\": \"A minimal reproducer, cause with evidence and regression check.\",\n \"candidate_skill_ids\": [\n \"inference-optimization-casebook\",\n \"ascend-device-health\",\n \"audit-vllm-kv-lifetimes\",\n \"audit-afd-p2p-exchanges\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-debug-support.json b/src/inferrsi/knowledge/atoms/task-debug-support.json new file mode 100644 index 000000000..12aaa1d92 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-debug-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-debug" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "byte_range": [ + 2839, + 4165 + ], + "sha256": "c2bdb7f270de0f3dce9c57506687d6aec559f8eb13b227d744631b403c35910f" + } + } + }, + "content": { + "body.md": { + "path": "task-debug-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-debug-support.md b/src/inferrsi/knowledge/atoms/task-debug-support.md new file mode 100644 index 000000000..315a18c0d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-debug-support.md @@ -0,0 +1,13 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| The failure resembles a prior trial or appears only with a particular optimization. | `inference-optimization-casebook` | Get the prior failure conditions and retry rule. Test whether the same switch reproduces the signature on this target. | +| Ascend timing or device behavior changed after a killed job or card-group change. | `ascend-device-health` | Collect device health, occupancy and timing checks. Establish a clean matched control before blaming the engine. | +| A vLLM V1 request stalls during asynchronous KV transfer, preemption or block reuse. | `audit-vllm-kv-lifetimes` | Build the scheduler/connector ownership trace. Probe the earliest missing completion or block-release edge. | +| A CUDA AFD dense FFN P2P exchange hangs or returns the wrong slice. | `audit-afd-p2p-exchanges` | Build the rank and per-peer payload ledger. Check the first mismatched assignment against caller traces before testing transport. | + diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-acceptance.json b/src/inferrsi/knowledge/atoms/task-derived-engine-acceptance.json new file mode 100644 index 000000000..522a1ed57 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-derived-engine-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-derived-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "byte_range": [ + 4145, + 4606 + ], + "sha256": "7f38bd547e9f51601c7f064ff11eb3637e9cbc1096a3d6f9343555ee038efb4d" + } + } + }, + "content": { + "body.md": { + "path": "task-derived-engine-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-acceptance.md b/src/inferrsi/knowledge/atoms/task-derived-engine-acceptance.md new file mode 100644 index 000000000..2073d07eb --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when the inherited-path checks pass, the intended delta is demonstrated by a distinct test, and both are reproducible on the named target under the user's gates. If both paths regress, isolate the first common initialization or dispatch boundary before changing the extension. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-condition.json b/src/inferrsi/knowledge/atoms/task-derived-engine-condition.json new file mode 100644 index 000000000..896b0caa8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-derived-engine-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "The deliverable reuses the execution core of vLLM, vLLM-Omni or another pinned parent, as in a DeepInfer-like extension.", + "state": "candidate", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/derived-engine.json", + "sha256": "3ab030bcd04db76781d20dccb27b62963b4fd996e05edfb0c38e2680018d8222" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-derived-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/derived-engine.json", + "byte_range": [ + 111, + 231 + ], + "sha256": "ae59e0929772223f890c1b43a0558646fb5df14a5e8b5dc5b52814bdb7d9cfc6" + } + } + }, + "content": { + "body.md": { + "path": "task-derived-engine-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-condition.md b/src/inferrsi/knowledge/atoms/task-derived-engine-condition.md new file mode 100644 index 000000000..1a4a26120 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-condition.md @@ -0,0 +1 @@ +The deliverable reuses the execution core of vLLM, vLLM-Omni or another pinned parent, as in a DeepInfer-like extension. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-navigation.json b/src/inferrsi/knowledge/atoms/task-derived-engine-navigation.json new file mode 100644 index 000000000..7a4e73164 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-derived-engine-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Deliver an engine derived from a pinned parent", + "state": "candidate", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "byte_range": [ + 1374, + 1424 + ], + "sha256": "e4a4488b15b00f3ba3f8510f240b5eca8117ee76fb9233ff40495eb37284ab7a" + } + } + }, + "content": { + "body.md": { + "path": "task-derived-engine-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-navigation.md b/src/inferrsi/knowledge/atoms/task-derived-engine-navigation.md new file mode 100644 index 000000000..9445e8bbf --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-navigation.md @@ -0,0 +1,2 @@ +# Deliver an engine derived from a pinned parent + diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-procedure.json b/src/inferrsi/knowledge/atoms/task-derived-engine-procedure.json new file mode 100644 index 000000000..9ed56c379 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-derived-engine-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-derived-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "byte_range": [ + 1926, + 2784 + ], + "sha256": "8bd14385d000cf2e03e9220bf833b44a5ab30bf87522e4407c7df0033696da75" + } + } + }, + "content": { + "body.md": { + "path": "task-derived-engine-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-procedure.md b/src/inferrsi/knowledge/atoms/task-derived-engine-procedure.md new file mode 100644 index 000000000..e53c66ab7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Pin the parent repository, revision, build and known-good run. Identify inherited modules and the fork-owned seam. State what API, model behavior and state ownership must be preserved and what observable behavior should change. +2. Run the actual model, script and flags on the parent. Capture outputs, state transitions and benchmark results. Build the smallest fork slice at the chosen seam on the same target. +3. Run a matched inherited-path check with the extension disabled or bypassed where supported. Run a separate case that exercises the intended delta. At the first mismatch, replay the same input at the parent/fork boundary before extending the change. +4. Repeat end to end with the user's flags and acceptance workload. Report inherited-path regressions, delta behavior, and performance or memory trade-offs separately. + diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-route-card.json b/src/inferrsi/knowledge/atoms/task-derived-engine-route-card.json new file mode 100644 index 000000000..58f9500e4 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-derived-engine-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Build an engine derived from an existing runtime", + "state": "candidate", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/derived-engine.json", + "sha256": "3ab030bcd04db76781d20dccb27b62963b4fd996e05edfb0c38e2680018d8222" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-derived-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/derived-engine.json", + "byte_range": [ + 0, + 983 + ], + "sha256": "3ab030bcd04db76781d20dccb27b62963b4fd996e05edfb0c38e2680018d8222" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"derived-engine\",\n \"title\": \"Build an engine derived from an existing runtime\",\n \"choose_when\": \"The deliverable reuses the execution core of vLLM, vLLM-Omni or another pinned parent, as in a DeepInfer-like extension.\",\n \"required_inputs\": [\n \"parent repository, revision and retained modules\",\n \"delta in model or scheduling contract\",\n \"target hardware and workload\",\n \"reference parent behavior\"\n ],\n \"steps\": [\n \"Identify inherited execution paths and replacement seams.\",\n \"Define compatibility for configuration, responses and state ownership.\",\n \"Compare outputs and performance to the pinned parent on the same inputs.\"\n ],\n \"acceptance_evidence\": \"A runnable derived-engine slice, a parent-versus-fork delta and reproducible parity/benchmark results.\",\n \"candidate_skill_ids\": [\n \"repository-evolution-analysis\",\n \"bound-windowed-attention-replay\",\n \"budget-speculative-verification\",\n \"inference-benchmark-design\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-support.json b/src/inferrsi/knowledge/atoms/task-derived-engine-support.json new file mode 100644 index 000000000..efea34987 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-derived-engine-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-derived-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "byte_range": [ + 2784, + 4145 + ], + "sha256": "5d2c5ff5e42aac53675b389441ea52e330e9983327710f3baaa0cb9b917efc31" + } + } + }, + "content": { + "body.md": { + "path": "task-derived-engine-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-derived-engine-support.md b/src/inferrsi/knowledge/atoms/task-derived-engine-support.md new file mode 100644 index 000000000..ef1c01666 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-derived-engine-support.md @@ -0,0 +1,13 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| The parent and fork changed the same subsystem at different revisions. | `repository-evolution-analysis` | Locate the inherited contract and divergence point in history. Test the last shared behavior and then the fork-owned change. | +| The fork compacts replay or prefill rows across a windowed-attention state boundary. | `bound-windowed-attention-replay` | Derive the retain/dependency rule. Test at the rollback and window boundaries before accepting the reduced state. | +| The fork changes speculative verification and draft acceptance varies by position. | `budget-speculative-verification` | Obtain a per-position acceptance and cost model. Test the proposed row budget against the parent at matched quality. | +| The new path changes scheduling or outputs and current benchmarks exercise only parent behavior. | `inference-benchmark-design` | Define matched controls and a delta-exercising workload. Run both on the same device before accepting the fork. | + diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-acceptance.json b/src/inferrsi/knowledge/atoms/task-independent-engine-acceptance.json new file mode 100644 index 000000000..37726fdb1 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-independent-engine-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-independent-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "byte_range": [ + 4562, + 5045 + ], + "sha256": "56242f0b13a89c715d167aa0d949973daa3e171488f32215a77e18c2878b4ad9" + } + } + }, + "content": { + "body.md": { + "path": "task-independent-engine-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-acceptance.md b/src/inferrsi/knowledge/atoms/task-independent-engine-acceptance.md new file mode 100644 index 000000000..4849c6b1d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when a target-native end-to-end run meets the agreed correctness and resource gates, with native dispatch or permitted fallback accounted for. If a backend or device is unavailable, record the missing access and propose the first on-target operator or allocation check that can resolve the blocker. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-condition.json b/src/inferrsi/knowledge/atoms/task-independent-engine-condition.json new file mode 100644 index 000000000..53f9e0e13 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-independent-engine-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "A new runtime must own execution, memory and device integration on a distinct OS, model or hardware stack.", + "state": "candidate", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/independent-engine.json", + "sha256": "f2208c40871306fe4be21f84a099c551013eda26e55bff02d95ba60739b8fade" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-independent-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/independent-engine.json", + "byte_range": [ + 104, + 210 + ], + "sha256": "daf5fcb41433a998b84025c14d4f508f8ab1d4c3081d58d6da89e3df4216f3e0" + } + } + }, + "content": { + "body.md": { + "path": "task-independent-engine-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-condition.md b/src/inferrsi/knowledge/atoms/task-independent-engine-condition.md new file mode 100644 index 000000000..28f11113b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-condition.md @@ -0,0 +1 @@ +A new runtime must own execution, memory and device integration on a distinct OS, model or hardware stack. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-navigation.json b/src/inferrsi/knowledge/atoms/task-independent-engine-navigation.json new file mode 100644 index 000000000..c23286632 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-independent-engine-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Bring up an independent inference engine", + "state": "candidate", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "byte_range": [ + 1394, + 1438 + ], + "sha256": "30a63c2292a8b5bc46f4f94bdbcfcd7b745f87e083ad5cb2d04c2f6679ec4bbb" + } + } + }, + "content": { + "body.md": { + "path": "task-independent-engine-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-navigation.md b/src/inferrsi/knowledge/atoms/task-independent-engine-navigation.md new file mode 100644 index 000000000..cad12cdca --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-navigation.md @@ -0,0 +1,2 @@ +# Bring up an independent inference engine + diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-procedure.json b/src/inferrsi/knowledge/atoms/task-independent-engine-procedure.json new file mode 100644 index 000000000..19e5bdb56 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-independent-engine-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-independent-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "byte_range": [ + 1940, + 2926 + ], + "sha256": "0cc92998bb971b6efadb26abb5ad8e0fc8bb509faffe8e3ccf6ccbf126a03f59" + } + } + }, + "content": { + "body.md": { + "path": "task-independent-engine-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-procedure.md b/src/inferrsi/knowledge/atoms/task-independent-engine-procedure.md new file mode 100644 index 000000000..61fe7cfa9 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Pin model format, reference inputs and outputs, target OS/ABI, device/driver, available runtime APIs and resource limits. Map required operators, dtypes, layouts and memory lifetimes to target capabilities. Mark fallback, missing implementations and unverified capabilities. +2. On the actual target, load the model and run one reference-checked operator with a dispatch trace. Extend to the shortest connected path that produces an output. Test the first missing operator or allocation boundary before expanding coverage. +3. Run the complete input through preprocessing, execution and postprocessing. Verify device placement or any explicitly permitted fallback. Exercise repeated requests and teardown to expose ownership or retained-memory errors. +4. Replay the user's script on the target OS/device. Check end-to-end output, resident or peak memory, cold/warm behavior and the user-specified resource gates. Record unsupported operators and model features. + diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-route-card.json b/src/inferrsi/knowledge/atoms/task-independent-engine-route-card.json new file mode 100644 index 000000000..daeccaea3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-independent-engine-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Build an independent inference engine", + "state": "candidate", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/independent-engine.json", + "sha256": "f2208c40871306fe4be21f84a099c551013eda26e55bff02d95ba60739b8fade" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-independent-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/independent-engine.json", + "byte_range": [ + 0, + 960 + ], + "sha256": "f2208c40871306fe4be21f84a099c551013eda26e55bff02d95ba60739b8fade" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"independent-engine\",\n \"title\": \"Build an independent inference engine\",\n \"choose_when\": \"A new runtime must own execution, memory and device integration on a distinct OS, model or hardware stack.\",\n \"required_inputs\": [\n \"target OS and device\",\n \"runtime API and driver/toolchain availability\",\n \"model format and memory budget\",\n \"reference inputs and expected outputs\"\n ],\n \"steps\": [\n \"Prove model loading and one operation on the target device.\",\n \"Complete one end-to-end output, including fallback and lifecycle checks.\",\n \"Measure resident memory, correctness and cold/warm behavior on the actual OS and hardware.\"\n ],\n \"acceptance_evidence\": \"An independently runnable target-native engine, adapter boundaries and target-device validation results.\",\n \"candidate_skill_ids\": [\n \"mlc-llm\",\n \"local-dream\",\n \"audit-llama-runtime-state\",\n \"os-process-placement\",\n \"inference-benchmark-design\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-support.json b/src/inferrsi/knowledge/atoms/task-independent-engine-support.json new file mode 100644 index 000000000..9c0947d34 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-independent-engine-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-independent-engine" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "byte_range": [ + 2926, + 4562 + ], + "sha256": "f7f9b7e1ffd58a91749581415f9f2be874d90498d14f6afbc2ab72b9dddbd389" + } + } + }, + "content": { + "body.md": { + "path": "task-independent-engine-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-independent-engine-support.md b/src/inferrsi/knowledge/atoms/task-independent-engine-support.md new file mode 100644 index 000000000..918b67a79 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-independent-engine-support.md @@ -0,0 +1,14 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| An MLC-derived artifact, Metal dispatch or KV-capacity estimate is relevant to the proposed target. | `mlc-llm` | Obtain the pinned artifact/runtime contract and native discriminator. Verify the operator or allocation locally before using it as target evidence. | +| An Android diffusion path exhibits a process, DiT packaging, ABI or backend mismatch. | `local-dream` | Get the declared-versus-serving state trace. Run the minimal packaged path on the named Android device and verify dispatch. | +| A repeated request retains state and the design uses a llama.cpp-compatible context. | `audit-llama-runtime-state` | Obtain a state ownership ledger. Probe the earliest unmatched allocation, progress or release event on the target runtime. | +| Timings vary on a shared host and CPU affinity or accelerator contention is observable. | `os-process-placement` | Record supported placement, occupancy and thread controls. Repeat the workload under matched conditions using target-native tooling. | +| The engine runs end to end but quality, cold/warm timings or the resource envelope are undefined. | `inference-benchmark-design` | Define reference checks and a target workload. Collect quality and resource measurements on the actual device. | + diff --git a/src/inferrsi/knowledge/atoms/task-performance-acceptance.json b/src/inferrsi/knowledge/atoms/task-performance-acceptance.json new file mode 100644 index 000000000..3c95be80c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-performance-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-performance" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "byte_range": [ + 4334, + 4809 + ], + "sha256": "f7133ee21b9f8ede1fb9b51171c031d8670108f72eb4756416548a296b1fde09" + } + } + }, + "content": { + "body.md": { + "path": "task-performance-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-performance-acceptance.md b/src/inferrsi/knowledge/atoms/task-performance-acceptance.md new file mode 100644 index 000000000..e05f60ff4 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when the selected candidate meets the user's metric and quality criteria on an independent end-to-end replay. If trials disagree, identify a targeted control such as an unchanged repeat to separate run variance from the candidate effect. Retain the best verified baseline if budget expires. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-performance-condition.json b/src/inferrsi/knowledge/atoms/task-performance-condition.json new file mode 100644 index 000000000..4ef0f637f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-performance-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "A correct baseline misses a specified latency, throughput, memory or cost objective.", + "state": "candidate", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/performance.json", + "sha256": "4904e6b403f8390ddc6d11c962491ec42683ec7e29eb4a2be4075bb052bd31fa" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-performance" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/performance.json", + "byte_range": [ + 90, + 174 + ], + "sha256": "7953e915d72f06abc87154db5555b435b7ff0db94d12087321276aaf7379e1ec" + } + } + }, + "content": { + "body.md": { + "path": "task-performance-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-performance-condition.md b/src/inferrsi/knowledge/atoms/task-performance-condition.md new file mode 100644 index 000000000..4ffa184b4 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-condition.md @@ -0,0 +1 @@ +A correct baseline misses a specified latency, throughput, memory or cost objective. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-performance-navigation.json b/src/inferrsi/knowledge/atoms/task-performance-navigation.json new file mode 100644 index 000000000..b8f9d56ed --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-performance-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Optimize a measured inference bottleneck", + "state": "candidate", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "byte_range": [ + 1361, + 1405 + ], + "sha256": "f87804ff7d31dc1ec3d1e4761f88e24a956b684e4c6aa0c653dad0f5336d52b7" + } + } + }, + "content": { + "body.md": { + "path": "task-performance-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-performance-navigation.md b/src/inferrsi/knowledge/atoms/task-performance-navigation.md new file mode 100644 index 000000000..0f3da3c5e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-navigation.md @@ -0,0 +1,2 @@ +# Optimize a measured inference bottleneck + diff --git a/src/inferrsi/knowledge/atoms/task-performance-procedure.json b/src/inferrsi/knowledge/atoms/task-performance-procedure.json new file mode 100644 index 000000000..1ac64bba5 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-performance-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-performance" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "byte_range": [ + 1907, + 2941 + ], + "sha256": "8b18e4f7ac481d8fd70c7d27416cf73a74a8151fb137eda22a6a28927772260b" + } + } + }, + "content": { + "body.md": { + "path": "task-performance-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-performance-procedure.md b/src/inferrsi/knowledge/atoms/task-performance-procedure.md new file mode 100644 index 000000000..ad19a4dbc --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Replay the supplied benchmark unchanged. Pin requests, shape/batch mix, concurrency, warmup, timing boundary, repetitions, aggregation rule and quality oracle. Capture the baseline distribution and end-to-end output on the actual engine and device. +2. Profile the stage dominating the target metric. Separate queueing, prefill, decode, transfer or modality generation where observable. Estimate how much changing that stage can move the end-to-end metric. +3. Choose one change inside the allowed search space whose mechanism matches the measured bottleneck and the installed hardware/engine. Record the predicted profile signature. Alternate unchanged baseline and candidate trials with the same workload, quality evaluation and resource conditions. +4. After each change, compare the target metric, uncertainty and quality gate. Restore the incumbent if quality fails or the benefit is indistinguishable. Re-profile when the bottleneck moves. Recheck the selected change end to end with the original script. + diff --git a/src/inferrsi/knowledge/atoms/task-performance-route-card.json b/src/inferrsi/knowledge/atoms/task-performance-route-card.json new file mode 100644 index 000000000..98e0e67fe --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-performance-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Optimize inference performance", + "state": "candidate", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/performance.json", + "sha256": "4904e6b403f8390ddc6d11c962491ec42683ec7e29eb4a2be4075bb052bd31fa" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-performance" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/performance.json", + "byte_range": [ + 0, + 843 + ], + "sha256": "4904e6b403f8390ddc6d11c962491ec42683ec7e29eb4a2be4075bb052bd31fa" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"performance\",\n \"title\": \"Optimize inference performance\",\n \"choose_when\": \"A correct baseline misses a specified latency, throughput, memory or cost objective.\",\n \"required_inputs\": [\n \"fixed workload, quality oracle and baseline\",\n \"target metric and budget\",\n \"device and concurrency\",\n \"phase timings or profile\"\n ],\n \"steps\": [\n \"Pin the workload and verify baseline quality.\",\n \"Locate the limiting stage and estimate headroom.\",\n \"Measure candidates against the same control and report end-to-end trade-offs.\"\n ],\n \"acceptance_evidence\": \"Paired measurements with the quality gate, uncertainty and workload conditions.\",\n \"candidate_skill_ids\": [\n \"inference-benchmark-design\",\n \"performance-ceiling-analysis\",\n \"optimization-search-policy\",\n \"inference-optimization-casebook\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-performance-support.json b/src/inferrsi/knowledge/atoms/task-performance-support.json new file mode 100644 index 000000000..379ea6983 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-performance-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-performance" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "byte_range": [ + 2941, + 4334 + ], + "sha256": "6c3cdd804106a70c67ad2c33f54624231f4d03428ff43892064c99e29b6c98b6" + } + } + }, + "content": { + "body.md": { + "path": "task-performance-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-performance-support.md b/src/inferrsi/knowledge/atoms/task-performance-support.md new file mode 100644 index 000000000..d21753a5e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-performance-support.md @@ -0,0 +1,13 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| The supplied benchmark lacks an agreed workload boundary or modality quality oracle. | `inference-benchmark-design` | Obtain a workload and parity protocol. Resolve the missing gate and measure the baseline before comparing candidates. | +| A slow stage is visible but its contribution to the requested metric is unclear. | `performance-ceiling-analysis` | Estimate stage share and achievable headroom. Profile the next limiting stage if even eliminating this one cannot meet the target. | +| Several legal changes could address the profiled limit. | `optimization-search-policy` | Obtain a ranked shortlist with mechanisms, expected signals and cost. Test one bounded candidate, then retain or revert it using the paired evidence. | +| A prior trial appears to match the bottleneck or an earlier candidate failed. | `inference-optimization-casebook` | Retrieve the prior workload, decision and retry condition. Reuse its hypothesis only after comparing target conditions and retest on this run. | + diff --git a/src/inferrsi/knowledge/atoms/task-router-conditions.json b/src/inferrsi/knowledge/atoms/task-router-conditions.json new file mode 100644 index 000000000..775e4898e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-router-conditions.json @@ -0,0 +1,53 @@ +{ + "metadata": { + "id": "task-router-conditions", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Target conditions", + "state": "candidate", + "applicability": { + "scope": "Classifying an inference engineering request and identifying reusable procedures.", + "input_contract": "Goal, deliverable, known model, backend, OS, engine and workload constraints.", + "produced_artifact": "Selected task cards, scoped references, unknowns and acceptance evidence.", + "refusal_point": "If the execution owner, reference behavior or target compatibility is unknown, record the gap before making a target-specific recommendation." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "sha256": "3dae791f61b26810332e05fbabe6fd7113abf9ed8609aef663535a267525849c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "byte_range": [ + 3169, + 4746 + ], + "sha256": "ba86dd5d3143dd483a217e4a27d2d0acf78d047cfa12cb9a77fa39ebf8234e79" + } + } + }, + "content": { + "body.md": { + "path": "task-router-conditions.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-router-conditions.md b/src/inferrsi/knowledge/atoms/task-router-conditions.md new file mode 100644 index 000000000..c1b7f37d7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-router-conditions.md @@ -0,0 +1,26 @@ +## Target conditions + +Record model family as a list (LLM, Omni, TTS, Diffusion, RLT or another +specified family), model/checkpoint revision, hardware backend (CUDA, ROCm, +Ascend NPU, XPU or another specified target), device SKU, OS (Linux, Windows, +Android, iOS or another specified target), engine and revision, dtype, shape, +concurrency and constraints. An Omni pipeline may additionally include its TTS +or diffusion stages. Keep deployment form such as mobile/edge separate from OS. +An absent field is unknown. A routing label or a common-backend registration +does not establish device support. Check the selected owner's source and scope. + +Failures that interrupt execution begin in debug. Correct execution with +unacceptable output begins in accuracy. A regression first observed after an +upgrade may use version-align as the primary route and either as a secondary +route. For engine work, decide who owns the execution core: an upstream fork +uses derived-engine; a new runtime owning its own execution and memory model +uses independent-engine, including on Windows or mobile. OS alone cannot +decide between them. + +For a Windows vLLM fork with a TTS quality regression after an upgrade, +choose accuracy if the requested delivery is restored speech quality, or +version-align if the requested delivery is a validated upgrade matrix. Link +the other route and pin both revisions, the same audio input, and reference +output. Record fork lineage as context unless creating the fork is a deliverable. +If the delivery is unclear, state both routes and ask what must be accepted. + diff --git a/src/inferrsi/knowledge/atoms/task-router-handoff.json b/src/inferrsi/knowledge/atoms/task-router-handoff.json new file mode 100644 index 000000000..6a0756068 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-router-handoff.json @@ -0,0 +1,53 @@ +{ + "metadata": { + "id": "task-router-handoff", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Use and handoff", + "state": "candidate", + "applicability": { + "scope": "Classifying an inference engineering request and identifying reusable procedures.", + "input_contract": "Goal, deliverable, known model, backend, OS, engine and workload constraints.", + "produced_artifact": "Selected task cards, scoped references, unknowns and acceptance evidence.", + "refusal_point": "If the execution owner, reference behavior or target compatibility is unknown, record the gap before making a target-specific recommendation." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "sha256": "3dae791f61b26810332e05fbabe6fd7113abf9ed8609aef663535a267525849c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "byte_range": [ + 4746, + 6199 + ], + "sha256": "de6b8cfd4e7f628c5b53eee85150f9f4e0cb896db7650ef24bab3d0a70ee8215" + } + } + }, + "content": { + "body.md": { + "path": "task-router-handoff.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-router-handoff.md b/src/inferrsi/knowledge/atoms/task-router-handoff.md new file mode 100644 index 000000000..dd97bc8fe --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-router-handoff.md @@ -0,0 +1,22 @@ +## Use and handoff + +1. Load the selected primary procedure, for example + `inferrsi skills enter task-version-alignment`. The compatibility card for + machine readers is available through + `inferrsi skills resource inference-task-router references/routes/version-align.json`. +2. Capture the actual run as the primary skill directs. Use observed triggers + to choose supporting skills. Search for the named component or symptom with + `inferrsi find`. Resolve candidate skill IDs via `skills show`, read their + applicability, and retain only the source-backed matches. An exact owner + or resource can also be opened directly. If only cross-platform methodology + matches, return it as such, and list the missing target-specific evidence. +3. Record primary and secondary tasks, target conditions, fixed source references, + gaps and acceptance evidence. A candidate skill is a starting point for + inspection. Execution and promotion require the normal workbench contracts. + +The cards contain seed IDs. For each affected stage and component, search the +full catalog as well. Report a target-validated owner, a methodological analogue +with its limits, or a missing owner. For a missing Windows/TTS or XPU match, +state the missing evidence and the smallest target check that would establish +it. Keep a general benchmarking procedure available as methodology. A project +policy or an unreviewed learning does not establish runtime compatibility. diff --git a/src/inferrsi/knowledge/atoms/task-router-navigation.json b/src/inferrsi/knowledge/atoms/task-router-navigation.json new file mode 100644 index 000000000..e7dd6d505 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-router-navigation.json @@ -0,0 +1,53 @@ +{ + "metadata": { + "id": "task-router-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Choose an inference task", + "state": "candidate", + "applicability": { + "scope": "Classifying an inference engineering request and identifying reusable procedures.", + "input_contract": "Goal, deliverable, known model, backend, OS, engine and workload constraints.", + "produced_artifact": "Selected task cards, scoped references, unknowns and acceptance evidence.", + "refusal_point": "If the execution owner, reference behavior or target compatibility is unknown, record the gap before making a target-specific recommendation." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "sha256": "3dae791f61b26810332e05fbabe6fd7113abf9ed8609aef663535a267525849c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "byte_range": [ + 1633, + 3169 + ], + "sha256": "669654ec66111fcc6b1faa20f62d051dce73fc4c925d7aa8ce5999c7c161732a" + } + } + }, + "content": { + "body.md": { + "path": "task-router-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-router-navigation.md b/src/inferrsi/knowledge/atoms/task-router-navigation.md new file mode 100644 index 000000000..352e5ff76 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-router-navigation.md @@ -0,0 +1,16 @@ +# Choose an inference task + +Choose one primary skill by the requested deliverable. Load its full procedure +before the first supporting evidence search. Record secondary tasks for follow-up. +The route cards remain available to callers that consume the JSON summaries. + +| Primary skill | Choose it when | Route card | +| --- | --- | --- | +| `task-day-0` | First usable support for a new checkpoint or model architecture in an existing engine. | [day0-model](references/routes/day0-model.json) | +| `task-performance` | A correct baseline misses a specified latency, throughput, memory or cost objective. | [performance](references/routes/performance.json) | +| `task-debug` | A hang, crash, OOM or execution-path failure needs a reproducible cause. | [debug](references/routes/debug.json) | +| `task-accuracy` | Inference completes but output violates a reference, quality metric or tolerance. | [accuracy](references/routes/accuracy.json) | +| `task-version-alignment` | A dependency or engine upgrade must preserve API, ABI, operator or runtime behavior across a stack. | [version-align](references/routes/version-align.json) | +| `task-derived-engine` | The deliverable reuses the execution core of vLLM, vLLM-Omni or another pinned parent, as in a DeepInfer-like extension. | [derived-engine](references/routes/derived-engine.json) | +| `task-independent-engine` | A new runtime must own execution, memory and device integration on a distinct OS, model or hardware stack. | [independent-engine](references/routes/independent-engine.json) | + diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-acceptance.json b/src/inferrsi/knowledge/atoms/task-version-alignment-acceptance.json new file mode 100644 index 000000000..3d8d4aa38 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-acceptance.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-version-alignment-acceptance", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Acceptance and handoff", + "state": "candidate", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-version-alignment" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "byte_range": [ + 4122, + 4568 + ], + "sha256": "a3fce65c489abb8e198f996aa291e9b26c5457cf916e785cdb8ff354b1236ed1" + } + } + }, + "content": { + "body.md": { + "path": "task-version-alignment-acceptance.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-acceptance.md b/src/inferrsi/knowledge/atoms/task-version-alignment-acceptance.md new file mode 100644 index 000000000..26b56141f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-acceptance.md @@ -0,0 +1,5 @@ +## Acceptance and handoff + +Finish when the requested target combination passes the user's original workload and gates, the changed boundary is documented, and the rollback point is verified. If only a coupled upgrade fails, state the next API or dispatch check that separates the two components. +If the allowed search space or budget is exhausted, record the blocker, the +evidence already obtained and the smallest remaining discriminating test. diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-condition.json b/src/inferrsi/knowledge/atoms/task-version-alignment-condition.json new file mode 100644 index 000000000..bbe399ba2 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-condition.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-version-alignment-condition", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "A dependency or engine upgrade must preserve API, ABI, operator or runtime behavior across a stack.", + "state": "candidate", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/version-align.json", + "sha256": "4243e305578e50ddc88bf4465447e716bbe9d22e4a0122189ad58a50e2267bf1" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-version-alignment" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/version-align.json", + "byte_range": [ + 95, + 194 + ], + "sha256": "091d18f3b17c56be2f97f5a025641366891f341253febe9f3d602dd5d68237b8" + } + } + }, + "content": { + "body.md": { + "path": "task-version-alignment-condition.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-condition.md b/src/inferrsi/knowledge/atoms/task-version-alignment-condition.md new file mode 100644 index 000000000..1b8738959 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-condition.md @@ -0,0 +1 @@ +A dependency or engine upgrade must preserve API, ABI, operator or runtime behavior across a stack. \ No newline at end of file diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-navigation.json b/src/inferrsi/knowledge/atoms/task-version-alignment-navigation.json new file mode 100644 index 000000000..555fa2adf --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-navigation.json @@ -0,0 +1,51 @@ +{ + "metadata": { + "id": "task-version-alignment-navigation", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Validate an engine or plugin stack upgrade", + "state": "candidate", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L0", + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "byte_range": [ + 1378, + 1424 + ], + "sha256": "4c15a2b480fe5f480177f8b5fb8e2255cf0f106ca50844c154aa9ba264003be5" + } + } + }, + "content": { + "body.md": { + "path": "task-version-alignment-navigation.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-navigation.md b/src/inferrsi/knowledge/atoms/task-version-alignment-navigation.md new file mode 100644 index 000000000..1b5d39b7f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-navigation.md @@ -0,0 +1,2 @@ +# Validate an engine or plugin stack upgrade + diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-procedure.json b/src/inferrsi/knowledge/atoms/task-version-alignment-procedure.json new file mode 100644 index 000000000..cda7e91fd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-procedure.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-version-alignment-procedure", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Run the procedure", + "state": "candidate", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L2", + "when": { + "task": [ + "task-version-alignment" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "byte_range": [ + 1926, + 2805 + ], + "sha256": "accfd8bc951d16a6cccbe80b511e7bb6b2f774ee2a3e2bba9b4d3e87e308c5d6" + } + } + }, + "content": { + "body.md": { + "path": "task-version-alignment-procedure.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-procedure.md b/src/inferrsi/knowledge/atoms/task-version-alignment-procedure.md new file mode 100644 index 000000000..944532c23 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-procedure.md @@ -0,0 +1,7 @@ +## Run the procedure + +1. Inventory the known-good and requested versions of the engine, plugin, operator library, backend and driver. Include vLLM, vLLM-Omni, vLLM-Ascend and AFD Plugin where used. Keep build options, model, device and run script constant. +2. Replay the known-good and complete target stacks on the same workload. Record import/build, operator dispatch, integration and output/parity results for each supported combination. +3. Change one compatible dependency boundary at a time, or bisect a coupled pair when the components must travel together. Record unbuildable combinations explicitly. Compare effective APIs, ABI, flags and dispatch at the earliest failing step. +4. Apply the smallest in-scope pin or adapter, replay the complete target stack, and verify the rollback combination with the same script and quality/performance checks requested by the user. + diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-route-card.json b/src/inferrsi/knowledge/atoms/task-version-alignment-route-card.json new file mode 100644 index 000000000..f09817af8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-route-card.json @@ -0,0 +1,57 @@ +{ + "metadata": { + "id": "task-version-alignment-route-card", + "kind": "knowledge", + "entrypoint": "body.json", + "title": "Align engine and plugin revisions", + "state": "candidate", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/version-align.json", + "sha256": "4243e305578e50ddc88bf4465447e716bbe9d22e4a0122189ad58a50e2267bf1" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L3", + "when": { + "task": [ + "task-version-alignment" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/references/routes/version-align.json", + "byte_range": [ + 0, + 919 + ], + "sha256": "4243e305578e50ddc88bf4465447e716bbe9d22e4a0122189ad58a50e2267bf1" + } + } + }, + "content": { + "body.json": { + "text": "{\n \"task\": \"version-align\",\n \"title\": \"Align engine and plugin revisions\",\n \"choose_when\": \"A dependency or engine upgrade must preserve API, ABI, operator or runtime behavior across a stack.\",\n \"required_inputs\": [\n \"current and target revisions for each component\",\n \"compatibility or ABI contracts\",\n \"known-good configuration\",\n \"affected integration tests\"\n ],\n \"steps\": [\n \"Build a before/after matrix for vLLM, vLLM-Omni, vLLM-Ascend and AFD Plugin as applicable.\",\n \"Change one boundary at a time; record required pins or adaptations.\",\n \"Run import, operator, integration and parity checks for the requested combination.\"\n ],\n \"acceptance_evidence\": \"A pinned compatibility matrix, failing and passing combinations, and a rollback point.\",\n \"candidate_skill_ids\": [\n \"repository-evolution-analysis\",\n \"vllm-ascend\",\n \"audit-afd-p2p-exchanges\",\n \"claim-contract\"\n ]\n}\n" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-support.json b/src/inferrsi/knowledge/atoms/task-version-alignment-support.json new file mode 100644 index 000000000..392e97af0 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-support.json @@ -0,0 +1,55 @@ +{ + "metadata": { + "id": "task-version-alignment-support", + "kind": "knowledge", + "entrypoint": "body.md", + "title": "Select supporting skills from observed evidence", + "state": "candidate", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c" + } + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "atom": { + "layer": "L1", + "when": { + "task": [ + "task-version-alignment" + ] + }, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "byte_range": [ + 2805, + 4122 + ], + "sha256": "cdd7c6f9caecd1e6b5f8d1ae12457f012ac526ed828a83b8982181a9bff222b8" + } + } + }, + "content": { + "body.md": { + "path": "task-version-alignment-support.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/task-version-alignment-support.md b/src/inferrsi/knowledge/atoms/task-version-alignment-support.md new file mode 100644 index 000000000..235aaa987 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/task-version-alignment-support.md @@ -0,0 +1,13 @@ +## Select supporting skills from observed evidence + +Load the skill whose trigger is observed. Check its revision, prerequisites and +scope before using its output. If none fits, search the observed component and +symptom, then verify any result against the actual model, engine, OS and device. + +| Observation in this run | Load skill ID | Returned evidence and next decision | +| --- | --- | --- | +| Several upstream revisions changed a boundary and the first incompatible change is unknown. | `repository-evolution-analysis` | Trace the history to a candidate transition. Run the same contract test immediately before and after it. | +| The changed component is vLLM-Ascend and its release, role or effective dispatch differs. | `vllm-ascend` | Get the version-specific dispatch and first failing boundary. Verify applicability against the installed stack before choosing a pin or adapter. | +| An AFD Plugin upgrade changes a CUDA P2P rank map or per-peer split. | `audit-afd-p2p-exchanges` | Compare the old and new payload ledgers. Test the first changed rank or slice with the same worker configuration. | +| A release claim spans combinations with missing hardware or parity evidence. | `claim-contract` | Map each tested combination to its gates. Publish the observed matrix and retain untested cells as unknown. | + diff --git a/src/inferrsi/knowledge/atoms/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.json b/src/inferrsi/knowledge/atoms/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.json new file mode 100644 index 000000000..1ac89bf11 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "TensorRT-LLM disaggregation trades phase interference for KV transfer", + "summary": "Separate prefill and decode resources when workload interference dominates the added transfer, queueing and layout-conversion costs.", + "applicability": { + "hardware": [ + "Separate NVIDIA GPU resources with a qualified KV transport such as RDMA or NVLink" + ], + "software": [ + "NVIDIA/TensorRT-LLM at c9b18eefa731dc59b0091bdfff6d890aa9d1e98e; later revisions need reinspection" + ], + "conditions": [ + "Serving workload has measured prefill/decode interference and compatible KV layouts" + ] + }, + "limitations": [ + "No numeric speedup or cost reduction is transferable from architecture alone.", + "Short prompts, weak interconnects or imbalanced pools can make disaggregation slower.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "tensorrt_llm", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json", + "sha256": "349856dd98628f94987e014889cd1b15d0e3ae6ab6c576cdde917f28fbafb102" + }, + { + "url": "https://github.com/NVIDIA/TensorRT-LLM/blob/c9b18eefa731dc59b0091bdfff6d890aa9d1e98e/docs/source/features/disagg-serving.md", + "type": "technical_document", + "commit": "c9b18eefa731dc59b0091bdfff6d890aa9d1e98e", + "accessed_at": "2026-10-15", + "content_sha256": "8b86780c4896ef07c597ec7ab0266fb491030f1d5cdc02adfe2db260973c39d8" + } + ], + "attribution": [ + { + "url": "https://github.com/NVIDIA/TensorRT-LLM/blob/c9b18eefa731dc59b0091bdfff6d890aa9d1e98e/docs/source/features/disagg-serving.md", + "type": "technical_document", + "commit": "c9b18eefa731dc59b0091bdfff6d890aa9d1e98e", + "accessed_at": "2026-10-15", + "content_sha256": "8b86780c4896ef07c597ec7ab0266fb491030f1d5cdc02adfe2db260973c39d8" + } + ], + "id": "tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json", + "byte_range": [ + 0, + 2967 + ], + "sha256": "349856dd98628f94987e014889cd1b15d0e3ae6ab6c576cdde917f28fbafb102" + } + } + }, + "content": { + "record.json": { + "path": "records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 280 + ], + "sha256": "c1f1ac63d532d4c837a6915b9a5e3a1b3d5427f48c39636dc0fe877ef7ea506c" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 284, + 304 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 308, + 453 + ], + "sha256": "f43e9733ed1ef0f658d9e5de8208e174b305791eea02b8cbb6d2ed28cac11dc2" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 457, + 577 + ], + "sha256": "c1eb23f0b48ec6bbaf0baf3e290392a0a9ee4ac3de48b75a20c6a0eb8a8e6a13" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 581, + 971 + ], + "sha256": "36778a22b3bffbfc1ecaa5bca448239e766e06a4c11215a2766eaa16cd90e732" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 975, + 1363 + ], + "sha256": "884c30838695358ce6ef3094f560d3c70d6e8dd81f596fdfd46d1e282487d33e" + }, + "claim-0": { + "summary": "Separate context and generation pools permit different resource and parallelism choices, while adding KV transfer between them.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1383, + 1576 + ], + "sha256": "dfc5c8e3c7e333021abb35cc4d1f0f6c7529142b0f7d1e718423c2b0c8d7a484" + }, + "claim-1": { + "summary": "The inspected design overlaps transfers with other requests and handles mapping between different parallel layouts; these are performance-critical operations.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1582, + 1806 + ], + "sha256": "829a09cb89f0c548939107e0d3c5a9e1fd48b1aeda2519f35599d266099bf71a" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 1814, + 2105 + ], + "sha256": "536b9cc84f7c418f3491a8b8fc75df201f62ef14588ba3b13e55b2585e6a2ec2" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2109, + 2252 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2256, + 2537 + ], + "sha256": "6a097ed4221da2f97ab359a74c8c130006023e0974a5d52a3ec9c5d708f30f43" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2541, + 2875 + ], + "sha256": "306fa4066d03159b7f893b703ce0ffb2172159f56a50cc05168ca8f275cb6a4f" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 2879, + 2964 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.integration-notes.json b/src/inferrsi/knowledge/atoms/training-resource-budget.integration-notes.json new file mode 100644 index 000000000..e87eaed7d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.integration-notes.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Pack C integration proposals", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md", + "sha256": "c55c6ad2131ef788866411dcc7056f221420ebff30c95c6bc919b09a4818cb73" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.integration-notes", + "kind": "knowledge", + "entrypoint": "INTEGRATION_NOTES.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md", + "byte_range": [ + 0, + 7368 + ], + "sha256": "c55c6ad2131ef788866411dcc7056f221420ebff30c95c6bc919b09a4818cb73" + } + } + }, + "content": { + "INTEGRATION_NOTES.md": { + "path": "playbooks/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.mindspeed-historical.json b/src/inferrsi/knowledge/atoms/training-resource-budget.mindspeed-historical.json new file mode 100644 index 000000000..b9d1f9c4a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.mindspeed-historical.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Historical MindSpeed adaptive-memory case", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/mindspeed-historical.md", + "sha256": "ad65c27f278c3d0ca3599a7630c02d3e529477a05b71b7703bd2d75f0d8fdd2c" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.mindspeed-historical", + "kind": "knowledge", + "entrypoint": "mindspeed-historical.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/mindspeed-historical.md", + "byte_range": [ + 0, + 7580 + ], + "sha256": "ad65c27f278c3d0ca3599a7630c02d3e529477a05b71b7703bd2d75f0d8fdd2c" + } + } + }, + "content": { + "mindspeed-historical.md": { + "path": "playbooks/training-resource-budget/references/mindspeed-historical.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.mindspeed-source-readset.json b/src/inferrsi/knowledge/atoms/training-resource-budget.mindspeed-source-readset.json new file mode 100644 index 000000000..5279be998 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.mindspeed-source-readset.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "MindSpeed historical source readset", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md", + "sha256": "4462d69ed6a941a03639c756968be3ce54f947e51f6ca618f4fb1cd43b643b35" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.mindspeed-source-readset", + "kind": "knowledge", + "entrypoint": "mindspeed-source-readset.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md", + "byte_range": [ + 0, + 7158 + ], + "sha256": "4462d69ed6a941a03639c756968be3ce54f947e51f6ca618f4fb1cd43b643b35" + } + } + }, + "content": { + "mindspeed-source-readset.md": { + "path": "playbooks/training-resource-budget/references/mindspeed-source-readset.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.offload-delta.json b/src/inferrsi/knowledge/atoms/training-resource-budget.offload-delta.json new file mode 100644 index 000000000..3d25c44d6 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.offload-delta.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Incremental extension to training-offload knowledge", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md", + "sha256": "f8740fc5c8bbbe5ac13ff1cfec7ca499569d0b46e8cd56cf1f5a44c3a5e72242" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.offload-delta", + "kind": "knowledge", + "entrypoint": "offload-delta.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md", + "byte_range": [ + 0, + 2026 + ], + "sha256": "f8740fc5c8bbbe5ac13ff1cfec7ca499569d0b46e8cd56cf1f5a44c3a5e72242" + } + } + }, + "content": { + "offload-delta.md": { + "path": "playbooks/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.original.json b/src/inferrsi/knowledge/atoms/training-resource-budget.original.json new file mode 100644 index 000000000..9c0d226b2 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.original.json @@ -0,0 +1,104 @@ +{ + "authority": "checkout", + "metadata": { + "id": "training-resource-budget.original", + "kind": "knowledge", + "entrypoint": "guide.md", + "title": "Choose training offload and resource-budget changes using pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case. Balance accelerator capacity, CPU work, pinned RAM and local storage; keep host/device transfer exposure distinct from collective network bottlenecks.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/SKILL.md", + "sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/SKILL.md", + "byte_range": [ + 0, + 12306 + ], + "sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2" + } + } + }, + "content": { + "guide.md": { + "path": "playbooks/training-resource-budget.md" + } + }, + "parts": { + "navigation": { + "skill_section": "navigation", + "layer": "L0", + "byte_range": [ + 0, + 356 + ], + "sha256": "9c1682e170d92bea942cf3e7dcd886634df374d36a96a795b85be90e2deefd4b" + }, + "decision": { + "skill_section": "decision", + "layer": "L1", + "byte_range": [ + 0, + 4973 + ], + "sha256": "c430e1e846bb7aec1a91b42a4588f05cc44816233cb1832c9c3fa106c2848dc4" + }, + "procedure": { + "skill_section": "procedure", + "layer": "L2", + "byte_range": [ + 4973, + 12306 + ], + "sha256": "7a7316954032fb9cd4b6506f9f7b63ef72afc2a34ac5d55448850d18e020097a" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.paper-grounded-cases.json b/src/inferrsi/knowledge/atoms/training-resource-budget.paper-grounded-cases.json new file mode 100644 index 000000000..7e70b19a2 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.paper-grounded-cases.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Paper-grounded review cases", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md", + "sha256": "19bd25b1a944adb2351ebc6b1d795150ea033041a44f6cc261e881677812a101" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.paper-grounded-cases", + "kind": "knowledge", + "entrypoint": "paper-grounded-cases.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md", + "byte_range": [ + 0, + 5649 + ], + "sha256": "19bd25b1a944adb2351ebc6b1d795150ea033041a44f6cc261e881677812a101" + } + } + }, + "content": { + "paper-grounded-cases.md": { + "path": "playbooks/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.source-readset.json b/src/inferrsi/knowledge/atoms/training-resource-budget.source-readset.json new file mode 100644 index 000000000..d02496ce0 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.source-readset.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Pack C: pinned sources and actual readset", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md", + "sha256": "2a5c166767f56fa47e7eba7386f1f36da8cb73702e5b5bbe14d6a456ca9ebfae" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.source-readset", + "kind": "knowledge", + "entrypoint": "source-readset.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md", + "byte_range": [ + 0, + 22946 + ], + "sha256": "2a5c166767f56fa47e7eba7386f1f36da8cb73702e5b5bbe14d6a456ca9ebfae" + } + } + }, + "content": { + "source-readset.md": { + "path": "playbooks/training-resource-budget/references/papers-20261015/references/source-readset.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.sources.json b/src/inferrsi/knowledge/atoms/training-resource-budget.sources.json new file mode 100644 index 000000000..c730102a7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.sources.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Cross-resource reference evidence", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/sources.md", + "sha256": "53d70671a183de4aaa3369f9caf2383a23b6f8a0a7b04464a8d8a639150afc6a" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.sources", + "kind": "knowledge", + "entrypoint": "sources.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/sources.md", + "byte_range": [ + 0, + 3502 + ], + "sha256": "53d70671a183de4aaa3369f9caf2383a23b6f8a0a7b04464a8d8a639150afc6a" + } + } + }, + "content": { + "sources.md": { + "path": "playbooks/training-resource-budget/references/sources.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.stas-decision-notes.json b/src/inferrsi/knowledge/atoms/training-resource-budget.stas-decision-notes.json new file mode 100644 index 000000000..c6ff0a6ae --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.stas-decision-notes.json @@ -0,0 +1,94 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [ + { + "type": "git", + "repo": "https://github.com/stas00/ml-engineering", + "commit": "ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7", + "author": "Stas Bekman", + "title": "Machine Learning Engineering Open Book", + "license": "CC-BY-SA-4.0", + "license_url": "https://creativecommons.org/licenses/by-sa/4.0/" + } + ], + "empirical_validation": "not_run", + "title": "Stas Bekman scoped decision notes", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/stas-decision-notes.md", + "sha256": "f1a993e6c4ca9a035a2effcaf5500081f227b0cc56cc885a6b22fda0041fc744" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + }, + { + "type": "git", + "repo": "https://github.com/stas00/ml-engineering", + "commit": "ee7517e0f562ff0e7d56c3e88c619d0c0c496ba7", + "author": "Stas Bekman", + "title": "Machine Learning Engineering Open Book", + "license": "CC-BY-SA-4.0", + "license_url": "https://creativecommons.org/licenses/by-sa/4.0/" + } + ], + "id": "training-resource-budget.stas-decision-notes", + "kind": "knowledge", + "entrypoint": "stas-decision-notes.md", + "atom": { + "when": {}, + "license": "CC-BY-SA-4.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/stas-decision-notes.md", + "byte_range": [ + 0, + 4086 + ], + "sha256": "f1a993e6c4ca9a035a2effcaf5500081f227b0cc56cc885a6b22fda0041fc744" + } + } + }, + "content": { + "stas-decision-notes.md": { + "path": "playbooks/training-resource-budget/references/stas-decision-notes.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/training-resource-budget.training-memory-scheduling.json b/src/inferrsi/knowledge/atoms/training-resource-budget.training-memory-scheduling.json new file mode 100644 index 000000000..ce2084d13 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/training-resource-budget.training-memory-scheduling.json @@ -0,0 +1,75 @@ +{ + "authority": "checkout", + "metadata": { + "origin": [ + "external" + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "title": "Training memory and scheduling: incremental mechanisms", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md", + "sha256": "9aa6d3e01452dff95c8a8940ff62ead8c146ce215c9175b78c9f2ef508a7b2de" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "id": "training-resource-budget.training-memory-scheduling", + "kind": "knowledge", + "entrypoint": "training-memory-scheduling.md", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md", + "byte_range": [ + 0, + 18660 + ], + "sha256": "9aa6d3e01452dff95c8a8940ff62ead8c146ce215c9175b78c9f2ef508a7b2de" + } + } + }, + "content": { + "training-memory-scheduling.md": { + "path": "playbooks/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/transformers.common.llm.kv_cache_strategy_contracts.original.json b/src/inferrsi/knowledge/atoms/transformers.common.llm.kv_cache_strategy_contracts.original.json new file mode 100644 index 000000000..7277fd106 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/transformers.common.llm.kv_cache_strategy_contracts.original.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Transformers cache strategies trade compilation, capacity and latency", + "summary": "Dynamic, static, offloaded and quantized KV caches have different contracts; select by workload and API support rather than a universal ranking.", + "applicability": { + "hardware": [ + "Device and quantization-backend support must be checked for the chosen model; this is API guidance" + ], + "software": [ + "huggingface/transformers at 2126f65b0ab267e113e78a002447fc7094de83d5; later revisions need reinspection" + ], + "conditions": [ + "Autoregressive generation with known length distribution, attention type and memory budget" + ] + }, + "limitations": [ + "Memory reduction alone is not throughput evidence.", + "This source documents Transformers interfaces; downstream serving-cache compatibility remains an unverified transfer hypothesis.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "transformers", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/transformers.common.llm.kv_cache_strategy_contracts.json", + "sha256": "a2df26052112a9f3fc6242b2bd636ab13991442db57e56646168d6c52032d38d" + }, + { + "url": "https://github.com/huggingface/transformers/blob/2126f65b0ab267e113e78a002447fc7094de83d5/docs/source/en/kv_cache.md", + "type": "technical_document", + "commit": "2126f65b0ab267e113e78a002447fc7094de83d5", + "accessed_at": "2026-10-15", + "content_sha256": "70b4f34a7a10862ac48a697f998f65ecf446f423ab9adbd9d23137a259ba7dd0" + } + ], + "attribution": [ + { + "url": "https://github.com/huggingface/transformers/blob/2126f65b0ab267e113e78a002447fc7094de83d5/docs/source/en/kv_cache.md", + "type": "technical_document", + "commit": "2126f65b0ab267e113e78a002447fc7094de83d5", + "accessed_at": "2026-10-15", + "content_sha256": "70b4f34a7a10862ac48a697f998f65ecf446f423ab9adbd9d23137a259ba7dd0" + } + ], + "id": "transformers.common.llm.kv_cache_strategy_contracts.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/transformers.common.llm.kv_cache_strategy_contracts.json", + "byte_range": [ + 0, + 3072 + ], + "sha256": "a2df26052112a9f3fc6242b2bd636ab13991442db57e56646168d6c52032d38d" + } + } + }, + "content": { + "record.json": { + "path": "records/transformers.common.llm.kv_cache_strategy_contracts.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 288 + ], + "sha256": "ff43d4e934b34c9d29709b3612a5820cff05399b3cc30125f353f2976bd028e2" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 292, + 312 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 316, + 473 + ], + "sha256": "cf73851aa857314ffa570bec525f1853d9621acc95e5146fec4e1b6d25303ca3" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 477, + 606 + ], + "sha256": "04543aa3fd99ed5628585a262c52b307c0f2285a46f165b7e68df1c71fcce251" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 610, + 993 + ], + "sha256": "83c5649566d436f90d97678f487e7e1b0304cdc0846a5997209bc376efb97366" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 997, + 1413 + ], + "sha256": "bbc68d91232f303c3569e46e56daf2f7a0a660862882986b199e53e5afc8b097" + }, + "claim-0": { + "summary": "StaticCache reserves a maximum size and supports compilation, at the cost of reserved capacity and work on masked positions for shorter sequences.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1433, + 1645 + ], + "sha256": "8fa4d47491ba6a00f104d15c90e567dadfd211de116bf9d6a30dc4bee89d0c4c" + }, + "claim-1": { + "summary": "The inspected table distinguishes sliding-layer, offloading and torch.compile support. Quantized cache can hurt latency on short contexts with sufficient GPU memory; offload adds transfer work.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1651, + 1910 + ], + "sha256": "ec09437e4611f49b27b74b452a8982dd757d0e1f8864fef047b715b1b84ad858" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 1918, + 2231 + ], + "sha256": "9893bbcf4f697e53426703067941b36b01dda88d643b43f5315b3ea2a6459842" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2235, + 2378 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2382, + 2626 + ], + "sha256": "8558a54b02c26fdad7235e436c8a722e19ec72e15979de002fffff6a41b51b37" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2630, + 2980 + ], + "sha256": "a37189fc17eb272c9f008322f36d13c8a3387477abbe5807e3d5b66528709959" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 2984, + 3069 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/triton.common.kernel.bandwidth_fusion_resource_limits.original.json b/src/inferrsi/knowledge/atoms/triton.common.kernel.bandwidth_fusion_resource_limits.original.json new file mode 100644 index 000000000..32b4ea494 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/triton.common.kernel.bandwidth_fusion_resource_limits.original.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Triton fusion trades memory traffic for register and shared-memory pressure", + "summary": "Fuse a bandwidth-bound reduction when its working set fits on chip; choose launch geometry using the compiled resource footprint.", + "applicability": { + "hardware": [ + "The tutorial includes CUDA and HIP target-specific occupancy calculations; each device still needs qualification" + ], + "software": [ + "triton-lang/triton at 4eda6cc91e86553a2517d1c764ea2967985553ad; later revisions need reinspection" + ], + "conditions": [ + "Rows fit the kernel resource envelope; the input stride and masked padded width are accounted for" + ] + }, + "limitations": [ + "Tutorial speedups are tied to its reference implementations and shapes; they are not predictions for current torch.compile or a service.", + "Fusion can regress when register pressure, padding or shared-memory demand reduces occupancy.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "triton", + "backend": "common", + "scenario": "kernel.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/triton.common.kernel.bandwidth_fusion_resource_limits.json", + "sha256": "6e9673d1a600a6ad34820e4325f2a6417f44f0f96d8ed0bcf21466d998f19ee4" + }, + { + "url": "https://github.com/triton-lang/triton/blob/4eda6cc91e86553a2517d1c764ea2967985553ad/python/tutorials/02-fused-softmax.py", + "type": "source_code", + "commit": "4eda6cc91e86553a2517d1c764ea2967985553ad", + "accessed_at": "2026-10-15", + "content_sha256": "4dbf82027df6149efaec19569e5b10b4c7600f53d4041dedc315a86c75b9141e" + } + ], + "attribution": [ + { + "url": "https://github.com/triton-lang/triton/blob/4eda6cc91e86553a2517d1c764ea2967985553ad/python/tutorials/02-fused-softmax.py", + "type": "source_code", + "commit": "4eda6cc91e86553a2517d1c764ea2967985553ad", + "accessed_at": "2026-10-15", + "content_sha256": "4dbf82027df6149efaec19569e5b10b4c7600f53d4041dedc315a86c75b9141e" + } + ], + "id": "triton.common.kernel.bandwidth_fusion_resource_limits.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/triton.common.kernel.bandwidth_fusion_resource_limits.json", + "byte_range": [ + 0, + 2941 + ], + "sha256": "6e9673d1a600a6ad34820e4325f2a6417f44f0f96d8ed0bcf21466d998f19ee4" + } + } + }, + "content": { + "record.json": { + "path": "records/triton.common.kernel.bandwidth_fusion_resource_limits.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 296 + ], + "sha256": "15db8bb7304cf5abd820b43455df74d3d4c6cc5c0f6bbc41a9b0c59c4d8720a9" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 300, + 320 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 324, + 466 + ], + "sha256": "0aa7e95795813218dc450e7a70cbf9e788765ea22d7d0a212766d05223738525" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 470, + 577 + ], + "sha256": "567bd0e060322873f8b8490afa209d9a4f7c32a771106104d69852af06ce766d" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 581, + 961 + ], + "sha256": "e274d40df64da7a5ee6a05c1e75c87a98b7512278935287444cdd78396853416" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 965, + 1396 + ], + "sha256": "05a4b7f7755b9761c51265624f7d4f221e867945ffebd568de740062fff9f43a" + }, + "claim-0": { + "summary": "The fused softmax tutorial avoids intermediate global-memory passes and masks power-of-two padding.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1416, + 1581 + ], + "sha256": "5afe26404f340427c82fd78456582162c401a8b2808f8f53cfac78dba3742523" + }, + "claim-1": { + "summary": "Its launch calculation uses compiled register/shared-memory usage and distinguishes HIP occupancy. tl.exp is approximate.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1587, + 1774 + ], + "sha256": "ee2e4288308b433f8777d0b85fa6bac62efd7259f6b1629ad51dec20976e2aa4" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 1782, + 2058 + ], + "sha256": "72f2ce611ffd22922d19a6462a92327461196cfb38eeae858648fff66c7a2617" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2062, + 2205 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2209, + 2444 + ], + "sha256": "7826f6609345a49136eec68c469ab7b8454dab9eaccd3a4585a6b0c801246dc4" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2448, + 2849 + ], + "sha256": "9312f7bf678937a79943882551194bd50b1ddcda3047a4913563d5934eabf4ad" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 2853, + 2938 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.json new file mode 100644 index 000000000..0717ab6ce --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.json @@ -0,0 +1,269 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 reference KV reuse must balance ownership after Ulysses", + "summary": "A reference-KV reuse candidate fixes a slower pre-Ulysses prototype by caching full reference sequences per local head shard after All-to-All; reuse remains quality-sensitive and evidence is one-shot.", + "applicability": { + "hardware": [ + "4× Ascend 910B3, 64 GiB HBM/device" + ], + "software": [ + "Hardware environment vLLM 0.28.0, vllm-omni abbreviated validation commit 85d63868", + "Rebased source revision at import 6de9a18572ba3211fc33f47c8e5beaea8d895e98 targets vLLM 0.30 APIs; local rebase environment was incompatible" + ], + "models": [ + "MiniMax-H3" + ], + "conditions": [ + "USP4/Ring1, 1344×768, 5-second output, 24 FPS, 50 steps", + "Tier2, refresh interval 8, ring size 2, unquantized BF16 host cache", + "4 images / 2-second reference video / 5-second reference video; one warmup then one measured request each" + ] + }, + "limitations": [ + "Unmerged candidate at import; hardware validation source differs from rebased Source revision.", + "One-shot measurements after warmup cannot establish variance or production tail latency.", + "Objective quality, host quantization E2E, remote reliability and cross-backend portability remain unverified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "ascend", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json", + "sha256": "80b853fc594d387ab48bed04dca245e0a22b8cdaf7c9b853551ab3bafa302e84" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "6de9a18572ba3211fc33f47c8e5beaea8d895e98", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "6de9a18572ba3211fc33f47c8e5beaea8d895e98", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json", + "byte_range": [ + 0, + 4047 + ], + "sha256": "80b853fc594d387ab48bed04dca245e0a22b8cdaf7c9b853551ab3bafa302e84" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 216 + ], + "sha256": "75b68324aa20ee4eea2996722cfd8b4353b4e8d7e6cf729c57724754798de443" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 220, + 433 + ], + "sha256": "e868bbdaf42b5a57d8967b470c6d7fb3d670abc1e670c72f819212ec51fddcbd" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 437, + 576 + ], + "sha256": "91fb243a3db852c51a84e409c9445806e16c7d773191214d1bb1642b7163845e" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 580, + 846 + ], + "sha256": "4a2bce39651c82c2cd4e0a1a6a435cbe144bbe3d2d173786f3f14b59ee5d9c33" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 850, + 1532 + ], + "sha256": "8e612755e1701ca490ef117ee818e8d00203043b686fec489e0ecc42cc6c11ae" + }, + "claim-0": { + "summary": "Pre-Ulysses prototype worsened E2E: 4 images 878321→913491 ms; 2s video 477610→675020 ms; 5s video 925693→1270051 ms. Sequence shards gave uneven reference ownership/H2D critical paths.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1552, + 1806 + ], + "sha256": "859519198c5c09b8c5b7e4eba26ed64a84b99366996bc0f93dfd1ffd34d09fd3" + }, + "claim-1": { + "summary": "Post-Ulysses E2E: 739566 ms (4 images), 441096 ms (2s video), 846829 ms (5s video), reported reductions 15.80%, 7.65%, 8.52% against disabled baselines. Peak HBM rises slightly.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1812, + 2055 + ], + "sha256": "0adb06cd91d076c8dad7c79e726cb3b7351c8d8055c1b36554a9174ec03a355f" + }, + "claim-2": { + "summary": "Post-All-to-All cache keeps the full reference sequence for each rank's local head shard; pinned host storage is staged through a 2–3-slot device ring with ready/consumed events.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2061, + 2306 + ], + "sha256": "b8d9660608c652d21ba2e55ce035e8b2775b85e6167cda75d8fba8dc5afcb319" + }, + "claim-3": { + "summary": "Outputs were manually inspected with no obvious difference on tested prompts/seeds; no objective quality metric or repeated variance. INT8/FP8 host-cache modes have unit coverage but no Ascend E2E benchmark.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2312, + 2581 + ], + "sha256": "5f032286cff3006e1cd193dd77eff3a2f48c513f47a825cb8cb72866c7e98656" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2589, + 2964 + ], + "sha256": "002b411a6c08382d668bc0dd2647cb62357ec5a691eb7746e46d745fc85a14ce" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2968, + 3510 + ], + "sha256": "3fc50665641af8ba9cd8e6c135352135004c3e5edfc2e0eba545abff574c10ac" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3514, + 3848 + ], + "sha256": "b2b5c661c73c8a5e329bcf23225bcd895625eabcae42d6f058109461d15354b1" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 3852, + 3922 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 3926, + 3946 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3950, + 4044 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.json new file mode 100644 index 000000000..dfa418e42 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.json @@ -0,0 +1,269 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 SP head buckets reduce exposed All-to-All with quality still pending", + "summary": "An open Ascend head-bucket pipeline overlaps projection/attention with communication; reported latency improves against the same-round chunk path, but full-model output equivalence remains unproven.", + "applicability": { + "hardware": [ + "4× Ascend 910B" + ], + "software": [ + "vLLM 0.29.0, CANN 9.0.0", + "Reported E2E source c36a9b6979a890c4ec9c3e8bf54000174134bea9; imported source revision f9e5d544d33428e17b818be3a01cb7d0956e4ead" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "SP4, 1344×768, 124 frames, 24 FPS, 8 steps, seed 3100, guidance 1, flow shift 12", + "Chunk size 64 MiB unchanged; head buckets 0→4", + "Each arm: 2 warmups + formal + profile + formal; only unprofiled formal requests underpin latency comparison" + ] + }, + "limitations": [ + "Unmerged candidate at import, not a main-supported feature declaration.", + "Only two unprofiled formal samples per arm; current-head E2E and full-model quality need revalidation.", + "Ascend910B/CANN evidence does not validate NVIDIA or ROCm transport." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "ascend", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json", + "sha256": "c4d29d1bceb5e2cf86151bf53c9dafb3d83428fb1e9d2a848d852bb8824bf857" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f9e5d544d33428e17b818be3a01cb7d0956e4ead", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f9e5d544d33428e17b818be3a01cb7d0956e4ead", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json", + "byte_range": [ + 0, + 3742 + ], + "sha256": "c4d29d1bceb5e2cf86151bf53c9dafb3d83428fb1e9d2a848d852bb8824bf857" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 226 + ], + "sha256": "a64ab1c51b88c3dc2612493b64414c2d0c3d8bcb1998e837c14e5c17d94200a8" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 230, + 441 + ], + "sha256": "8355ae8fe7129d34eeff74f88fa628158c4a2b9ab122ac27c884848ee8a3cc9e" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 445, + 559 + ], + "sha256": "c713012ad093d5ae766553ba8747127ef902ced49e3c32ba79cf5d830f1d4c19" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 563, + 829 + ], + "sha256": "0a5433120a0e5c483c29e1e2eb6520de89615e066d98cd3dd2c5f5a2d3aab09b" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 833, + 1438 + ], + "sha256": "95e1e979b51e7012a2dd78cdeac443f870d20bb0a7f4d15739d2c39e5adb505d" + }, + "claim-0": { + "summary": "Same-round chunk mean 88906±4 ms to head-split 85195±574 ms (sample SD, n=2 per arm), reported 4.174% client E2E reduction.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1458, + 1649 + ], + "sha256": "6eab83a92a2b0f88805bd5be1a096d42f15976d7027a25c2caf9c0a64e3a0206" + }, + "claim-1": { + "summary": "Diagnostic per-block exposed All-to-All falls 16.359→2.455 ms while compute kernels rise 145.323→147.346 ms; reported benefit is overlap/critical-path shortening, not faster compute kernels.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1655, + 1915 + ], + "sha256": "9257de03b0b45120fef98db0714b56d37f240672b0dcbcc688c7b278530ef4f1" + }, + "claim-2": { + "summary": "Author self-review says cross-arm video hashes differ; operator/refactor equivalence checks do not establish full-model quality equivalence. E2E data precedes the current refactor.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 1921, + 2163 + ], + "sha256": "4c40b34f12578d1c36f6b6754169f77d8268b722a2a257b4b0f377a208c2f5c3" + }, + "claim-3": { + "summary": "A previous-round baseline appears only as reference and must not be used as a matched control for the current 4.17% claim.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2169, + 2360 + ], + "sha256": "791ab817c1b7a6cbbc212406dd6399322c442cf46c31f0d336fd81ab04c26665" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2368, + 2770 + ], + "sha256": "a20be98096d5400a5b74f77304dd553b8f4f4dc460aec5afd8f35dd198981bdc" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2774, + 3255 + ], + "sha256": "4154a3b222ba7d9ca544a6cc57848b49165c53e93824d4027dcef43430af7b6e" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3259, + 3543 + ], + "sha256": "f64ea64ccca81c15ef5cfc41ea78cb784b6e3148d30d33c0d6ecd3f46f00829d" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 3547, + 3617 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 3621, + 3641 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3645, + 3739 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.json new file mode 100644 index 000000000..4adc00fc1 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.json @@ -0,0 +1,315 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen-Image-2.1 eager text-to-image on one 910B1: reuse plus interleaved RoPE, 30% not met", + "summary": "The author reports: On one Ascend 910B1, conditioning reuse plus npu_rotary_mul interleaved RoPE cuts the eager BF16 1280×704 eight-step mean from 3111.5 ms to 2459.6 ms with identical RGBA. Opt-in VAE fastpath reaches 2425.5 ms and passes the quality gate without pixel identity. A 30% line at 2178 ms was not met.", + "applicability": { + "hardware": [ + "1× Ascend 910B1, 64 GiB HBM" + ], + "software": [ + "vLLM 0.31.0", + "vllm-omni branch amy/qwen-image-21-conditioning-reuse at 399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + ], + "models": [ + "Qwen-Image-2.1-Turbo" + ], + "conditions": [ + "BF16, eager, TORCH_SDPA, CFG=1, 1280×704, checkpoint native 8 sigmas", + "Two warmup rounds, then three repeated prompts with seeds 42/43/44", + "Unoptimized baseline mean 3111.5 ms; 30% line is 2178 ms", + "QWEN21_NPU_ROPE defaults to fused; QWEN21_NPU_ROPE=eager restores the unflatten/stack path", + "QWEN21_VAE_FASTPATH, QWEN21_ATTN and QWEN21_CACHE_STEP_INPUTS stay off unless set" + ] + }, + "limitations": [ + "Single 910B1 eager cohort. Not a four-card B300 HTTP result and not a 30% PASS.", + "Three measured requests after warmup. No production tail claim.", + "Later repeats were blocked when the allocator could not reserve a small extra block and the NPU runtime reported insufficient compute resources.", + "Ascend 910B1 evidence does not transfer to CUDA, ROCm, or other Ascend SKUs.", + "Imported from amy-why-3459's report; raw per-request timings, RGBA outputs and a frozen validator are not included. No NPU rerun was performed for this import; InferRSI acceptance remains INCONCLUSIVE." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "ascend", + "scenario": "diffusion.image_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json", + "sha256": "ef107d43cc448219eda4d64ab961b61cda6350e20d30d94de1ff7c4ffff7e775" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-12", + "authors": [ + "amy-why-3459" + ] + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-12", + "authors": [ + "amy-why-3459" + ] + } + ], + "id": "vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json", + "byte_range": [ + 0, + 5268 + ], + "sha256": "ef107d43cc448219eda4d64ab961b61cda6350e20d30d94de1ff7c4ffff7e775" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 233 + ], + "sha256": "cb231b621c8daa0e892d0447640a8dff3b2ca843f4dd499cbe0f37b74d8cd3ff" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 237, + 566 + ], + "sha256": "4f8945fd7b5b2971cc7cc4667bb7ade7f76530db2bc39e3f4711adba58a541ef" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 570, + 711 + ], + "sha256": "17a34a39817e77dd254af70c4e0e052aec49e70a6e10d5d67013df539ea4132d" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 715, + 1032 + ], + "sha256": "fb0bb1f541fe57679fb092f70dac4ec740a43600cbddce6f2c05b78bc5ab70de" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1036, + 1761 + ], + "sha256": "d50ffa61a35954859f224a230fc204894db8260729cf1fc7aff48687d6d6a311" + }, + "claim-0": { + "summary": "Conditioning reuse only: mean 2654.3 ms, −14.7% vs 3111.5 ms, decoded RGBA identical. An earlier same-patch cohort on this host was 2658.2 ms (−14.6%).", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1781, + 2002 + ], + "sha256": "83e53b43c7775fefe9529910c3d755bb2c2f2a5cea82c10dbca1a8972f357f06" + }, + "claim-1": { + "summary": "Reuse plus npu_rotary_mul interleaved RoPE: mean 2459.6 ms, −21.0%, RGBA identical. Atlas A2 npu_apply_rotary_pos_emb has no interleave mode. The fp32 cos/sin table follows the current freqs object; decode slices a longer table to the target-token tail.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2008, + 2329 + ], + "sha256": "e67f69dfae626006767bc0d6c58a6cdfb4a3b0666dc85fdffa83a3448d4da7f0" + }, + "claim-2": { + "summary": "Reuse plus NPU RoPE plus QWEN21_VAE_FASTPATH=1: mean 2425.5 ms, −22.0%. Quality gate passed (SSIM≥0.99, PSNR≥35 dB) and pixels were not identical. A later rerun of the same stack was 2431.9 ms (−21.8%).", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2335, + 2611 + ], + "sha256": "5e65a407984356f94d287bb95b7d9a732ac6eeebc8b5ebfd1e691efd4ee02006" + }, + "claim-3": { + "summary": "A timed first request on the RoPE plus VAE stack spent about 550 ms in prompt encode, 1.5 s in the eight-step denoise, and 190 ms in the VAE.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2617, + 2824 + ], + "sha256": "0d14839809f13ec56e80b1e107f5f46b7e9aa659d215482df284f927c6d5ff70" + }, + "claim-4": { + "summary": "Rejected without changing steps, resolution, or the sampler: eager RoPE cos/sin cache 2657.2 ms; expanded SDPA mask cache 2667.5 ms; npu_fusion_attention precise=2 at 2655.2 ms and precise=0 at 2623.7 ms; decode-only fusion 2631.7 ms; TASK_QUEUE_ENABLE=1 at 2654.4 ms and =2 at 2661.1 ms; enforce_eager=0 at 2718.8 ms; dropping the prompt-cache autograd guard at 2474.7 ms.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 2830, + 3266 + ], + "sha256": "2db4dd9bf81bfea328cab665c4038cb3b1992fc3148ea3215cd7bf25ee82e3b5" + }, + "claim-5": { + "summary": "Per-step mask/prompt tensor cache, and RoPE plus VAE fastpath plus fusion attention, failed with NPU out-of-memory during allocation or initialization.", + "layer": "L1", + "pointers": [ + "/claims/5" + ], + "byte_range": [ + 3272, + 3486 + ], + "sha256": "53d352eb3a18b5fbe41ad15a57d496c78048e8eee35a2c402c767e6d0446cf56" + }, + "claim-6": { + "summary": "The 2425.5 ms stack is not pixel-identical. Do not describe it as the B300 384.16→266.60 ms five-group HTTP PASS.", + "layer": "L1", + "pointers": [ + "/claims/6" + ], + "byte_range": [ + 3492, + 3669 + ], + "sha256": "f8dd910b2244e9e52f7e9f45b1798f4de02f06674f00f7689ffb31b01432ead2" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 3677, + 4158 + ], + "sha256": "b2431a2d8e20eadfbb530ecf0b512281f92c46f8c285132bbda355c7f9bacc5e" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 4162, + 4443 + ], + "sha256": "1107d2d6a54b09f7873cd9811a6a0a7cae3fbb7d0e390a878f64fe699b092968" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 4447, + 5069 + ], + "sha256": "8290c96b718e01a4e387386920a9aa7ee4e98810547234c5d6757a401b89efd7" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 5073, + 5143 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 5147, + 5167 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 5171, + 5265 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.measurement_and_profiling.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.measurement_and_profiling.original.json new file mode 100644 index 000000000..81e515633 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.measurement_and_profiling.original.json @@ -0,0 +1,273 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Diffusion measurement and profiling discipline", + "summary": "Freeze the serving, single-request and benchmark commands; measure performance without diagnostic profiler overhead, then use targeted traces to choose one-variable experiments.", + "applicability": { + "hardware": [], + "software": [ + "vllm-omni guidance snapshot ee81f33001922f8d91dd09da0a57ee1531a8df82; parser flags and model capabilities must be checked at the target revision" + ], + "models": [ + "Wan/Qwen/Flux-style image and video pipelines; adapt to other diffusion models" + ], + "conditions": [ + "Named device SKU/count/topology, model revision, assets, seed, shape, frames, schedule, dtype, attention backend and compile state are frozen", + "Backend-native profiler and low-overhead stage timings are available or their absence is recorded" + ] + }, + "limitations": [ + "This is imported methodological guidance, not a performance result.", + "Parallelism and compiler benefits depend on model implementation, shapes, topology and target software.", + "No remote device run or upstream tool execution was performed by InferRSI during this import." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.measurement_and_profiling.json", + "sha256": "c8b25583cd160024c7472a20debea34cb6d4bc79714b4bad2953555adc9f794e" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/references/optimization-playbook.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/references/optimization-playbook.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.common.diffusion.measurement_and_profiling.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.measurement_and_profiling.json", + "byte_range": [ + 0, + 4472 + ], + "sha256": "c8b25583cd160024c7472a20debea34cb6d4bc79714b4bad2953555adc9f794e" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.common.diffusion.measurement_and_profiling.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 177 + ], + "sha256": "7969166fe0110ec31c62608816de1a367981896cd608b025fdae146109d3e414" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 181, + 371 + ], + "sha256": "8224cc3f7eeafa8f9605524e7f931a7b2b8feb53b1a05cd0f4b0083bc20ad1d2" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 375, + 473 + ], + "sha256": "afa0e5e5301b6ff5d799106c831a07bcbb8687c29f053af9c8b50339bc58cf3b" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 477, + 1073 + ], + "sha256": "e29ec49c2f317237e0f7c1541e133acabb4842dd34d3c87453ccdec9abf0e146" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1077, + 1690 + ], + "sha256": "9136015d3028f214a5d075c961a67e4dbd69c33b0295be1587912f98361a2c76" + }, + "claim-0": { + "summary": "Performance baseline and operator/host-stack diagnostic traces serve different purposes. PyTorch profiler, shape recording and stack collection can distort measured latency.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1710, + 1940 + ], + "sha256": "cd2f0c87aec134cca298415e9beccab9bfba25db440d50fd86f9fe9ec568fff2" + }, + "claim-1": { + "summary": "Compare client E2E, server inference, encode, denoise, decode and peak memory independently. A kernel or denoise win can be offset by decode, communication or transport.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1946, + 2172 + ], + "sha256": "f6ac913616a029a764a2e492d9a01c5bcc0e527833b333cd6d127281a91b0783" + }, + "claim-2": { + "summary": "For CFG-enabled models, compare CFG2×USP(world/2) with USP(world); treat HSDP primarily as capacity until an A/B demonstrates speed; tune VAE patch parallel only where its stage share is material.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2178, + 2432 + ], + "sha256": "94c44a89cdd7d0a4b6bc22c25a83d06c39fc6eff7271179da87dd64818dc9723" + }, + "claim-3": { + "summary": "Every optimization, including intended math-preserving layout/cache changes, needs artifact and numerical evidence. Quantization, sparse/approximate attention and reduced steps are quality-sensitive hypotheses.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2438, + 2705 + ], + "sha256": "00a3d848d2af298da6239c9cf606816ddcec76624a22617fb367b0a9e88b32f5" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2713, + 3389 + ], + "sha256": "26eef63d4247afd6c594325398eed8916eab79cd03a1a8ebc7977da4158f4f73" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 3393, + 3972 + ], + "sha256": "9f494bb027272fe6bc8a5facea0999a5f059726b8319f578317d7773dec7cf73" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3976, + 4282 + ], + "sha256": "977285928a48bd0fc6e343cdab16446b8d5a153fcf33c2274bc0f9329b9d3bd8" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 4286, + 4356 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 4360, + 4380 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 4384, + 4469 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.production_integration_gates.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.production_integration_gates.original.json new file mode 100644 index 000000000..2e4276c2a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.production_integration_gates.original.json @@ -0,0 +1,321 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Production diffusion integration and compatibility gates", + "summary": "Separate Day-0 loading support from production readiness; qualify exact task/backend/hardware combinations through API parity, strict loading, quality, offload/cache lifecycle, cancellation and load stability.", + "applicability": { + "hardware": [], + "software": [ + "vllm-omni source snapshot ee81f33001922f8d91dd09da0a57ee1531a8df82; online FP8/DLO/cache/batching support must be qualified at target commit" + ], + "models": [ + "New or existing diffusion integrations, including MiniMax-H3" + ], + "conditions": [ + "The initial pipeline/registry/loader vertical slice already works", + "Official implementation, checkpoint and target repository revisions are pinned independently" + ] + }, + "limitations": [ + "The source describes a target readiness process; it does not prove that every model or hardware satisfies the gates.", + "CUDA/ROCm/Ascend support, sparse attention, HWR/mmap, quantization and offload are independent scoped qualifications.", + "No local GPU/NPU, generated-media quality, real serving or soak validation was performed for this knowledge import." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.production_integration_gates.json", + "sha256": "649b49ff64d3e9e88bd620027dabf9d126ca69bbe91b448f28e845ecbe1f8e2f" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/api-and-recipes.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/feature-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/performance-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/production-validation.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/api-and-recipes.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/feature-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/performance-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/production-validation.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.common.diffusion.production_integration_gates.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.production_integration_gates.json", + "byte_range": [ + 0, + 6112 + ], + "sha256": "649b49ff64d3e9e88bd620027dabf9d126ca69bbe91b448f28e845ecbe1f8e2f" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.common.diffusion.production_integration_gates.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 190 + ], + "sha256": "218b6f751289b0fd7e63975e919daf5af7703fcb2455d0a072613e1d51d8d0b8" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 194, + 416 + ], + "sha256": "423e388fbc4d88e8d556fb35a6f33002534e0904b2e92f2a986e52f8092d3e30" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 420, + 547 + ], + "sha256": "316398ee17fadfded20e833b7eb867611929c166e7c1fb7c0a924dd9a7c4f1f0" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 551, + 2107 + ], + "sha256": "6eab69fabd1b47f163d3ae4b2daaddc9a45ef21b811dfe34be6fc97c22977086" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 2111, + 2621 + ], + "sha256": "faa719911cad8029a4a39d76c9a8cf3ceba29f5d7eeed981fd39409fb1dcfae8" + }, + "claim-0": { + "summary": "A compatibility row includes task, API/execution mode, shape/schedule, backend, packed layout, cache, quantization, offload, topology, hardware, dtype and output transport. Unproven combinations default to not tested.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 2641, + 2915 + ], + "sha256": "83b2f41d7fe81a754606d16eb6036bb4e7049a50346e31bb84342aa8dd96f3bd" + }, + "claim-1": { + "summary": "Strict loading must account for every retained tensor and all source shards of fused QKV/gate-up destinations. Shared layers must use their platform dispatcher, with explicit guarded fast paths and native fallbacks.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2921, + 3193 + ], + "sha256": "d4348b989e604ec314f98c7940cca82f42ec18b577cc316e1a44a0ba4119ed58" + }, + "claim-2": { + "summary": "Online quantization, pre-quantized/pruned/rotated checkpoints, fixed adapter fusion and DLO are distinct evidence lanes; resident and cold/materialization memory peaks must be recorded.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 3199, + 3441 + ], + "sha256": "f5b30ee62d388b8477eee5835d79beb98ed38150c9b7bcb89fec34624c174d0d" + }, + "claim-3": { + "summary": "Mutable scheduler, RNG, latent and cache state belongs to each request. Structural request-batch/step-execution interfaces do not establish model throughput, quality or cancellation safety.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 3447, + 3693 + ], + "sha256": "127a528a165cd21ab60b6d0755511779456958798a9c570cc1e2330baed9d27f" + }, + "claim-4": { + "summary": "Function, Accuracy, Performance and Reliability are independent readiness tracks. They must not be equated automatically with InferRSI's conceptual L0–L4 validation levels or upstream CI's numbered taxonomy.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 3699, + 3965 + ], + "sha256": "0dfcef271787435b902a7cf211b04b25882b261447130acb93f774119624a707" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 3973, + 4764 + ], + "sha256": "b2e865dd32fe2babb37e8a86f066786cdeadc02924f591e9f5dff7593af442c2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 4768, + 5527 + ], + "sha256": "9f7c6411596dfd3ac7e39edcadf005526f0601cffa0beb1faca3f21c74218382" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 5531, + 5922 + ], + "sha256": "04b7cb56dd8693b25ac16906b279f40aaacb963e475e4ae3217842fe43874db9" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 5926, + 5996 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 6000, + 6020 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 6024, + 6109 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.upstream_review_gates.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.upstream_review_gates.original.json new file mode 100644 index 000000000..c94a8ce58 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.common.diffusion.upstream_review_gates.original.json @@ -0,0 +1,394 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Upstream review gates for optional acceleration and evidence ownership", + "summary": "Review framework policy boundaries, all shared-component consumers, optional backend prerequisites, request-state lifetime, portable reproduction, and independent artifact provenance before promoting an optimization.", + "applicability": { + "hardware": [], + "software": [ + "Diffusion frameworks with optional extensions and singleton model state" + ], + "models": [ + "Models sharing numerical operator contracts" + ], + "conditions": [ + "A candidate is being prepared for upstream review", + "Benchmarks emit per-trial artifact manifests" + ] + }, + "limitations": [ + "This record imports review guidance; it is not a benchmark or an accelerator support claim.", + "Local regression and E2E results belong to the review-response report and its pinned evidence, not this portable record." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.upstream_review_gates.json", + "sha256": "5127709bb85ce31008d19468e1b4fcb5454a71776f69f991841cd9ef7558f9c4" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "443b3e97c09af3f5bd9399ef3b3ec8e7b0215852", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "d57480f5054e6c377a04225840b24e6355244dd9", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "6550e3f626e5c38fb7bf8a487f397797447fde33", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "e36d48ba47eef4b4954b6c4d97fd42471525fd30", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "443b3e97c09af3f5bd9399ef3b3ec8e7b0215852", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "d57480f5054e6c377a04225840b24e6355244dd9", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "6550e3f626e5c38fb7bf8a487f397797447fde33", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "e36d48ba47eef4b4954b6c4d97fd42471525fd30", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + } + ], + "id": "vllm_omni.common.diffusion.upstream_review_gates.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.upstream_review_gates.json", + "byte_range": [ + 0, + 7614 + ], + "sha256": "5127709bb85ce31008d19468e1b4fcb5454a71776f69f991841cd9ef7558f9c4" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.common.diffusion.upstream_review_gates.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/title", + "/repo", + "/backend", + "/component", + "/scenario" + ], + "byte_range": [ + 4, + 271 + ], + "sha256": "90d2a4bb2e8b706ec22d926d4c51ba18280d635a2a653c6fde8692f2ab957393" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 275, + 295 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 299, + 528 + ], + "sha256": "f74dbb4d349aa63f0884ac265a9c166659544b8729c21bb5d63126ba6019d5ac" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 532, + 733 + ], + "sha256": "950ba6ed6cba5b916e572c86382735361271e405a7a096097545b3f176837c52" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 737, + 1638 + ], + "sha256": "11c39e9b8d325b5067812a42c566f86cd1e8bb37775a956379f69aae09db8578" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 1642, + 2002 + ], + "sha256": "15d38c0099aa9f6347325c986325a5c19c4fdab2a78781cf4f2cb62207b35838" + }, + "claim-0": { + "summary": "A hardware/dtype match does not establish compiler, header, library or collective availability. Keep optional acceleration opt-in, or coordinate one initialization decision across all ranks.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 2022, + 2269 + ], + "sha256": "ac3689e2af9fa29520f6ecb375fa769a15e3764612f95d1c12bda5f62ce7d5a0" + }, + "claim-1": { + "summary": "Singleton model state must not extend request prefix-KV lifetime. Use request ownership or weak identity and cleanup on success, error, cancellation and dropped step-mode requests; keep graph buffers separate.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2275, + 2541 + ], + "sha256": "e978b6fb4c4b98b3412827679f96efb9ccb0a6b01bc92de06ecc6adee84a4028" + }, + "claim-2": { + "summary": "Reusable math belongs in the target common operator layer; model-specific dispatch and approximation policy stay in adapters. Preserve reduction order, casts and dtype/compile/autograd fallbacks.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2547, + 2799 + ], + "sha256": "76cbaf54f7aa5fddbfdb4dab880180436fc2b120ee2eac711cbe085221324eea" + }, + "claim-3": { + "summary": "Tracked source changes remain in the fingerprint even if output directories overlap source. Exclude only the active run untracked artifact directory.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2805, + 3011 + ], + "sha256": "a1304d5a1b9fae2297324055c2bc52624b75002ed8626719daaf6ad9972a2ef6" + }, + "claim-4": { + "summary": "Generated files resolve beneath their own trial; references and duplicate/cross-trial paths cannot substitute for independent outputs. Final integrity or cleanup errors still produce failed records.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 3017, + 3272 + ], + "sha256": "cea58b5e544b2ec614504428299c236b8b5040e601a2b1a8f3b5cce618b98f1f" + }, + "claim-5": { + "summary": "Published evidence uses portable paths, complete before/after timings, image checksums and frozen validators. Historical source-pair claims are distinct from rebased-head comparisons.", + "layer": "L1", + "pointers": [ + "/claims/5" + ], + "byte_range": [ + 3278, + 3518 + ], + "sha256": "8cf6da952802e5bb90a43f5215e8f60590126cf8002b8761af603caa6f7004a8" + }, + "claim-6": { + "summary": "Framework dispatch and framework tests remain model-neutral. Reuse explicit common configuration; keep model policy in adapters and topology/build prerequisites in the owning backend instead of duplicating model/device/version condition chains.", + "layer": "L1", + "pointers": [ + "/claims/6" + ], + "byte_range": [ + 3524, + 3825 + ], + "sha256": "1994497bbc90ecfca2ca3ad2b283740ea8e912b491e86eb16229176e05dc2fc2" + }, + "claim-7": { + "summary": "Shared component or script changes require a direct and transitive consumer inventory, regression evidence for other affected models, and explicit coverage gaps. One model E2E result cannot establish another model quality or performance.", + "layer": "L1", + "pointers": [ + "/claims/7" + ], + "byte_range": [ + 3831, + 4125 + ], + "sha256": "d886c2abece85ec79508af3d0065228e404bf4192aceca27801907fe691ccfe0" + }, + "claim-8": { + "summary": "Keep benchmark code and acceptance criteria outside the candidate optimization change. Pin the same independently reviewed evaluator for both arms; archive historical results without treating them as validation of a later revision.", + "layer": "L1", + "pointers": [ + "/claims/8" + ], + "byte_range": [ + 4131, + 4419 + ], + "sha256": "e4c3146eedd400018a05b81ee4b905b48016bf3ca2ed84aff40091f83ab10376" + }, + "claim-9": { + "summary": "Prefer full-model E2E coverage for normal model behavior. Add focused tests for cache invalidation, errors, fallback selection and shared consumers only where E2E does not exercise the contract; avoid repeated production-shape matrices.", + "layer": "L1", + "pointers": [ + "/claims/9" + ], + "byte_range": [ + 4425, + 4718 + ], + "sha256": "da0c2bad835a078bb8cde74e25f9e4358974ce9498480590b2824838628adb95" + }, + "claim-10": { + "summary": "Prefer module-level imports for ordinary dependencies; retain documented lazy imports where transitive optional kernels or backend libraries would otherwise become unconditional platform requirements.", + "layer": "L1", + "pointers": [ + "/claims/10" + ], + "byte_range": [ + 4724, + 4981 + ], + "sha256": "ada27fbff138924334ec56c3da0b90ce069a10f50a1a3ac34690a4dc2ec684dc" + }, + "claim-11": { + "summary": "Share identical kernel eligibility predicates across consumers. Colocate small ownership-only types with their consumer instead of adding modules for speculative growth. Explain low-precision round trips that reproduce eager intermediate rounding.", + "layer": "L1", + "pointers": [ + "/claims/11" + ], + "byte_range": [ + 4987, + 5291 + ], + "sha256": "f7334185ac81322ceace95d07c60d17e7a15715bb184fd2d2df8d58570623353" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 5299, + 6003 + ], + "sha256": "91ce55fa73df531dfb098c2477058b5aa9549998c67c521f73629474f14e26b2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 6007, + 7272 + ], + "sha256": "6b6368a189e04423fea21ed11cfff02c754c9ce55371a40df172c7df3f5f5298" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 7276, + 7522 + ], + "sha256": "6db3048e79c7af8fcc235ac38e1f5b432c314b3683ec47fc4f61217580173b50" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 7526, + 7611 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.json new file mode 100644 index 000000000..9004b9dcc --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.json @@ -0,0 +1,276 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Audio concurrency scaling: mixed prefill, state ownership and codec overlap", + "summary": "Diagnose audio scaling with scheduler-step counts, admission/drain phases, mixed prefill/decode and codec overlap; isolate state, label and RNG ownership before qualifying same-source service throughput and complete audio quality.", + "applicability": { + "hardware": [ + "CUDA GPUs supported by the pinned runtime and operators; qualify the actual SKU separately" + ], + "software": [ + "vllm-project/vllm-omni source snapshot d6ed4f4844fbc41573ffc03247e5b2ff0a38d322" + ], + "conditions": [ + "The model uses autoregressive acoustic frames, a codebook tower, recurrent GDN state and a streaming codec.", + "Resolve effective stage settings, CUDA graph buckets, precision and dependencies from the selected revision; deployment comments are not local benchmark evidence." + ] + }, + "limitations": [ + "This record describes source-grounded mechanisms, not a reproduced speedup or a portable set of tuned constants.", + "A low-concurrency improvement does not imply high-concurrency improvement; reducing admission wait can also increase costly mixed steps.", + "Changing state precision, codec precision or FP8 execution can affect generated samples. Operator parity alone does not establish end-to-end audio quality.", + "A faster isolated operation can still regress service throughput. Recheck the unchanged serving configuration and complete audio quality before choosing a fused kernel or a different batch policy.", + "CUDA event spans can include host-submission gaps. Do not label their union as SM utilization, or count overlapped codec duration again as an available end-to-end speedup.", + "Qualification of another engine or a different GPU requires its own acceptance issue and complete evidence.", + "A whole-run average batch can be dominated by drain steps; a high batch in an admission subset does not establish an end-to-end speedup. Phase cuts are diagnostic scope, not permission to remove requests from acceptance metrics.", + "A shared-execution prototype may change GEMM shapes, MoE implementation or random-number consumption. Keep those changes explicit, and keep timing from a device with observed external work unqualified even when numerical checks pass.", + "A kernel reading nearly one active-expert weight footprint can remain bandwidth-limited despite low tensor activity; row padding or inactive experts must not be converted directly into a speedup claim.", + "A dedicated capture stream is a workspace-isolation hypothesis, not proof that prior quality failures were races. Require a fixed dynamic schedule and full service quality before attributing a cause or selecting overlap.", + "Configured or logged SM reservations may apply to a routing subkernel rather than expert GEMMs; inspect the actual dispatched branch before using such a setting as a resource-allocation explanation.", + "Native codec re-batching can change floating-point rounding. An error confined to a private scratch slot differs from a live-state error, but neither scratch analysis nor a high PCM SNR establishes full service quality.", + "A selected-phase delivery rate can explain a changing service score but is not GPU effective batch or a replacement acceptance metric. High client occupancy only rules out client starvation within its measured scope.", + "Repository-local issue evidence for the machine-code, live-metadata and complete-call lessons is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#complete-call-evidence-rejects-both-initial-native-moe-candidates. Its scoped results do not promote this imported guidance to a locally verified optimization.", + "Repository-local issue evidence for metadata-readiness graphs, loaded-library identity and zero-replacement comparisons is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#metadata-readiness-and-loaded-library-identity. Correctness evidence and a bounded feasibility screen do not establish a service gain or change this imported guidance status.", + "Repository-local issue evidence for occupancy versus issue, unresolved PC sampling, reference-ABI checks and staged causal-prefix reuse is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#measured-residency-and-staged-prefix-reuse. These diagnostic outcomes do not promote the imported guidance to a verified service optimization.", + "Repository-local issue evidence for inverse-row adapters and transparent compressed allocation is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#inverse-row-consumption-and-transparent-compressed-allocation. The scoped graph result and failed native allocation screen do not establish a service gain or change imported/unverified status.", + "Repository-local production-prefix and pause evidence is in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#production-prefix-reuse-correct-graphs-can-still-lose-at-service-level. Historical workload tables and single later observations are not a matched three-framework acceptance matrix; imported guidance remains unverified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "audio.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json", + "sha256": "cb47fabb232db81ed525cbb54371becc7e4a28b2bae9d8492f60dfb6f31563e8" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/deploy/fish_omni.yaml#L1-L100", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/gdn.py#L144-L246", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L1-L28", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/model_state.py#L264-L379", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L425-L478", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/deploy/fish_omni.yaml#L1-L100", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/gdn.py#L144-L246", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L1-L28", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/model_state.py#L264-L379", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L425-L478", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + } + ], + "id": "vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json", + "byte_range": [ + 0, + 25324 + ], + "sha256": "cb47fabb232db81ed525cbb54371becc7e4a28b2bae9d8492f60dfb6f31563e8" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/title", + "/repo", + "/backend", + "/component", + "/scenario" + ], + "byte_range": [ + 4, + 276 + ], + "sha256": "6866108b7bc6f5729d16bc70e24b94c20ad19797a8e67199eed9beb3ad915bdc" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 280, + 300 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 304, + 547 + ], + "sha256": "6e6a24a2511d6ef4d972c8ef5b166f7bee52b855589d5bc8d3bc35be513a8611" + }, + "translation": { + "layer": "L0", + "pointers": [ + "/translations" + ], + "byte_range": [ + 551, + 1223 + ], + "sha256": "641772881832625cbb97815015e8f880bb12580e484d4b376e8607c654c0929d" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 1227, + 1736 + ], + "sha256": "ebf5a1454e8b4dc3422cd0afc5e9467e6a3e5c8f7e4ca592884c413a0d7376d9" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 1740, + 3235 + ], + "sha256": "c0194f04e93b3bc9732e8aa1bdcbb9bdffd247bfaa14be5d3c6cc6caba07e467" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 3239, + 3812 + ], + "sha256": "29a285dd97d2c3c89119a38dc3fb68dc82bc0c67b4ec298aa09ffd995a9a4bff" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 3816, + 15726 + ], + "sha256": "ed50abc461c03ff04e2537a4ba3eb9ecabc5f9670867e6ecd7326c9f48cdf76a" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 15730, + 20922 + ], + "sha256": "cbe65285703461142f5afbe470e5b3acaca7644ca073a81875a6d12b0b2c9b24" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 20926, + 25232 + ], + "sha256": "40ed1a112943a22ebe45d8e8ce909fe79969ee829aff5b4a51086032ef120008" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 25236, + 25321 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.json new file mode 100644 index 000000000..190163053 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.json @@ -0,0 +1,269 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 exact AdaLN schedule cache: capacity benefit can exceed latency benefit", + "summary": "A schedule-cache candidate precomputes finite-schedule AdaLN tables and can release projection weights; production-shape compiled measurements show capacity savings without a distinguishable speed gain.", + "applicability": { + "hardware": [ + "2× NVIDIA H20 98 GB for TP2; one H20 for the separately reported layerwise run" + ], + "software": [ + "Source/hardware revision 635215a96d3eaf6b5bac66020feae51b34daa5c9", + "Python 3.12, PyTorch 2.11.0+cu128, vLLM 0.26.0, FlashAttention" + ], + "models": [ + "MiniMax-H3 FL2VA / T2VA" + ], + "conditions": [ + "Small eager row: 448×256, 29 requested/39 aligned frames, 50 sigma points/49 forwards, seed 42, TP2/text-encoder TP2, flow shifts 12/3", + "Production regional-compile row: 1248×768, 209 frames, 50 steps, seed 2101, TP2", + "Single request in flight; schedule hits and cold misses measured separately" + ] + }, + "limitations": [ + "Source candidate unmerged at import; target main support is not implied.", + "Production-shape deltas are one-sample observations and sub-1% values do not establish statistically meaningful speed changes.", + "H20 and specific versions/schedules only; H200/B200 or another backend needs new validation." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json", + "sha256": "ddbba3bb72b5789938595a82d3280e861f75f6ed54f05a1d2b7dcb1089d30f63" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "635215a96d3eaf6b5bac66020feae51b34daa5c9", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "635215a96d3eaf6b5bac66020feae51b34daa5c9", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json", + "byte_range": [ + 0, + 4253 + ], + "sha256": "ddbba3bb72b5789938595a82d3280e861f75f6ed54f05a1d2b7dcb1089d30f63" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 230 + ], + "sha256": "48971e5f5a994bbe42f8bd47d596cebc47e7bf846365d4606bf64914a4b2f421" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 234, + 449 + ], + "sha256": "e6487524d78ebc3e8c61e9bfb4226bc97fd9be5ce82bef73f5e2570b3d4b30ee" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 453, + 569 + ], + "sha256": "a5508b9863155964955d5829b53e1d2d0b4ad4a4a65d7f16f9e706eea265dbd2" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 573, + 839 + ], + "sha256": "3e64f8e697a64ccb5a9bf1866b8eed8fa56f15eb7474c5866b4e6ea5c20d9176" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 843, + 1549 + ], + "sha256": "cf687c061dbefe067ee32f4652f853627c0ace52dd2dc1305cb80e0a8a9391c8" + }, + "claim-0": { + "summary": "Small eager row: five steady requests after warmup; wall mean 15285.8 ms disabled, 14987.9 ms cache retained, 15029.4 ms cache+weight-offload. These are roughly 1.95% and 1.68% reductions for that row.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1569, + 1836 + ], + "sha256": "5b03d2169444bbb92dfeb554215cff36afe2f390b108016864add016fbe597ed" + }, + "claim-1": { + "summary": "Per TP rank, 12.144 GiB projection weights replaced by 0.885 GiB tables yields 11.259 GiB net device-memory reduction by accounting. First-build peak still includes coexisting weights and tables.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1842, + 2103 + ], + "sha256": "dea4645e31fb076ad263f915eb2abecddf530a6719dd62ebbfe993753daab0dd" + }, + "claim-2": { + "summary": "Production compiled row: one measured steady sample per mode; retained cache changed client wall 1298497→1298456 ms, effectively no distinguishable speed benefit. Weight offload increased client wall to 1305133 ms (~0.51% slower) while lowering residency ~11.256 GiB/device.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2109, + 2448 + ], + "sha256": "344ea8bf61490d01ebd29d7b865c5b837c599f79b2e67a7fb4ba811d03f0a6e1" + }, + "claim-3": { + "summary": "Fixed steady outputs were reported byte-identical across the three modes. Schedule changes require restore/build/atomic replace/re-offload and can add substantial miss latency; cold-to-steady audio differences also exist in the disabled control.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2454, + 2765 + ], + "sha256": "530a7b6544422c4c6a926a90e8404a292176919dc46137aa980f762f4cb7a327" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2773, + 3194 + ], + "sha256": "e2d6ff64dc1eca2125e35d3291be9c926a24ec98e96bd60338ad68db054a1d9e" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 3198, + 3717 + ], + "sha256": "29a9c4f0c3235e64f354555244e6968f422963878277b72db3ad98c87d218c87" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3721, + 4054 + ], + "sha256": "91da50eaed168222bebf8aeb7a364b28933f6115b14d0fbe2af095098b73dac8" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 4058, + 4128 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 4132, + 4152 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 4156, + 4250 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.json new file mode 100644 index 000000000..7af349f61 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.json @@ -0,0 +1,282 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 online CUDA MXFP8 is an opt-in approximate deployment lane", + "summary": "A Blackwell MXFP8 candidate quantizes selected DiT projections after loading/fixed-adapter fusion and preserves sensitive components; small/shared-host observations do not establish stable speed or quality equivalence.", + "applicability": { + "hardware": [ + "NVIDIA device reported as NVIDIA Graphics Device, compute capability 12.0, approximately 71.12 GiB/device; exact SKU unspecified" + ], + "software": [ + "vLLM 0.29.0 wheel overlay, PyTorch 2.13.0+cu132, Python 3.12.13, driver 580.95.05", + "Source revision 0c248c848b5dfadef7066d54cfeae1d78c898757 based on c7cd37b61e44fb51c61212ac9a317f2be26fe638", + "Public PyTorch block-scaled scaled_mm; CUDA/partition capability guards" + ], + "models": [ + "Native FastH3 checkpoint with fixed vsa-datafree adapter" + ], + "conditions": [ + "TP2/USP2/text-encoder TP4, eager, VAE tiling, 448×256, 4.4 seconds, seed 1101, four denoise steps", + "Main DiT QKV/output/MLP quantized; conditioning/refiner/AdaLN/gates/output projections retain original precision", + "Runtime adapter switching after conversion is unqualified" + ] + }, + "limitations": [ + "Unmerged candidate at import; broad quality/performance coverage and human review remain pending.", + "Reported SM12.0 hardware is not evidence for H200 or B200.", + "Shared-host observations, one prompt and a microbenchmark do not support production speed/quality claims." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json", + "sha256": "e4c538f03f4ab90a4acc8e3d8721bbd226aec1ee9bde45757a7c27d3d970821d" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0c248c848b5dfadef7066d54cfeae1d78c898757", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0c248c848b5dfadef7066d54cfeae1d78c898757", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json", + "byte_range": [ + 0, + 4468 + ], + "sha256": "e4c538f03f4ab90a4acc8e3d8721bbd226aec1ee9bde45757a7c27d3d970821d" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 207 + ], + "sha256": "1c005977b3acb525de27e94373ac7d914cea1be8b6b0f1c8aa4855ff2ff05105" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 211, + 442 + ], + "sha256": "2249291844ad2ba48f62474db4cb73134dd9841fcb2c2ef220aaa4a1e1b2fa1c" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 446, + 583 + ], + "sha256": "ee9832df2796a59c6aef6ca7aa707aad116d0a7de87a84acd53d9e9a79938355" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 587, + 859 + ], + "sha256": "32a6a081ad8347b72a8bb9fceab1b400697b4fcfd2fc1acb284bc662ffd973fb" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 863, + 1769 + ], + "sha256": "a01348088363dee85a36593a68184fcc5d3b6d99f4afc912b030f8b2fc850d6e" + }, + "claim-0": { + "summary": "12 new CUDA tests and 30 regression tests passed (3 skipped). Three full-model requests produced decodable 107-frame/24-FPS MP4s with stereo 32-kHz audio; TP2 uses reduction-compatible fallback rather than TP1 fused activation path.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1789, + 2087 + ], + "sha256": "40855d40508dffa6630a69fcc24d68d0e75248c95082ecc0cbb68fbd9bb023dc" + }, + "claim-1": { + "summary": "Two warm shared-host client observations: branch 3018/2968 ms versus BF16/FastVideo 3419/3419 ms. Source explicitly disclaims a stable performance claim.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 2093, + 2312 + ], + "sha256": "6ccaf3f55132c60e441c305253792e250172e9a806861b1ca51eed0447393a48" + }, + "claim-2": { + "summary": "Single-prompt decoded-media drift: RGB PSNR 22.92 dB and audio MSE 0.00080053. These are not perceptual acceptance, byte equality or quality-equivalence evidence.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2318, + 2542 + ], + "sha256": "0db900affd378990a81dd59c50addf1aafb886fd96293b1c59b86ca33c686180" + }, + "claim-3": { + "summary": "Checkpoint-scale TP1/USP4 resident attempt exceeded ~71.12 GiB/device during fixed-adapter fusion. Lower post-quantization residency does not qualify the loading/fusion peak.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2548, + 2785 + ], + "sha256": "7236545c7d9875a5ec790e98dcdf8b9dd5342596320d15a5937145a35ef87845" + }, + "claim-4": { + "summary": "Separate shared-host microbenchmark M=2048/K=14336/N=5376: median 0.8818→0.8491 ms after five warmups/30 CUDA-event samples, final GEMM output byte-identical. This is a kernel observation only.", + "layer": "L1", + "pointers": [ + "/claims/4" + ], + "byte_range": [ + 2791, + 3052 + ], + "sha256": "0a976e71b51bc5b17be268c220445aed68ad81f36f16415b28640fc2e6707926" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 3060, + 3422 + ], + "sha256": "e81f5aa6573d0a9476da41a40ec2d62603f603c6902d0ebee173b80f3ee9248b" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 3426, + 3962 + ], + "sha256": "a3afc3eb75676e562f450d407b55e3d1be04e0b466263f003e17d89b69ecfd96" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3966, + 4269 + ], + "sha256": "acb9a45765f9fecaba5828337528b7a488171cff212014497081860b994a3c64" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 4273, + 4343 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 4347, + 4367 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 4371, + 4465 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.json new file mode 100644 index 000000000..e19ad978d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.json @@ -0,0 +1,256 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 modulation fusion changes rounding and requires platform guards", + "summary": "Merged FP32-accumulating modulation fusion reduces launch count but removes intermediate BF16 rounding; its numerical drift and historical non-CUDA dispatch finding must remain visible.", + "applicability": { + "hardware": [ + "CUDA GPU SKU not stated in source benchmark; do not substitute H200/B200" + ], + "software": [ + "Source revision 7d74126f0723d355d82b47e98f820394320e1a4a; merged 14f2c16fb28e1e0c8615372675f2757466260ad8", + "Triton modulation path, eager, USP4" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "5-second output, 49 denoise iterations; both configurations warmed up", + "Report hardware/driver/runtime identity before reproduction" + ] + }, + "limitations": [ + "Hardware SKU, repeat count and broader prompt coverage are not stated in the source report.", + "Merged code is not proof of quality equivalence or safe support on every backend.", + "Historical review findings may have changed later; source revision must be rechecked." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json", + "sha256": "abb8d94a1b025f0e2c8e085275e96ee85d68aeb27cb12d0918e4647f8255b693" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "7d74126f0723d355d82b47e98f820394320e1a4a", + "merge_commit": "14f2c16fb28e1e0c8615372675f2757466260ad8", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "7d74126f0723d355d82b47e98f820394320e1a4a", + "merge_commit": "14f2c16fb28e1e0c8615372675f2757466260ad8", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json", + "byte_range": [ + 0, + 3625 + ], + "sha256": "abb8d94a1b025f0e2c8e085275e96ee85d68aeb27cb12d0918e4647f8255b693" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 217 + ], + "sha256": "fccf17e368d65f5832f9abf1b552007ebf70516ace3976a9abda3dc49c303a17" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 221, + 419 + ], + "sha256": "d7fe2d38f4ee2cf169ed83308ca3ed0f5fbc47a66b710ac1e60888133ad10433" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 423, + 557 + ], + "sha256": "8869579b5f77bdd34aa9ebf541f2f1493e8ef29deb78b5b9bc0b35a629c4692a" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 561, + 867 + ], + "sha256": "780bdc46436b2cc3919ae20de8cd566c80b8bd3eb3b43035ab15c7da4e1bc3f0" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 871, + 1405 + ], + "sha256": "6da4a126a59328655c790018de3db4bdd3e59cd2ccf858112da02d3e70dd444b" + }, + "claim-0": { + "summary": "Engine E2E fell from 136961 ms to 134707 ms (1.65%); a single DiT profile reports 1969→1234 CUDA kernels (37.33% fewer). Profiled wall time is diagnostic and not interchangeable with unprofiled engine E2E.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1425, + 1698 + ], + "sha256": "6a91b1cc8b70c07a595c4312ef55d2b16c4183745bbb3fd20ccfa87a9857d549" + }, + "claim-1": { + "summary": "FP32 accumulation removes intermediate BF16 rounding. Reported output PSNR is 39.55 dB and SSIM 0.9750; the author explicitly says outputs are not bit-exact.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1704, + 1927 + ], + "sha256": "135afca6ffd284d3012773e60cfe40295d5bd59dca5b4c3949e86664a9b9f1ff" + }, + "claim-2": { + "summary": "Review identified x.is_cpu-only gating, which could launch Triton on NPU/XPU/MUSA, and noted row-major contiguity assumptions. The fetched source patch still contains that historical guard; verify subsequent target-source fixes rather than inferring safe non-CUDA support.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 1933, + 2268 + ], + "sha256": "c4e224911466fdfca9a4ec76a687d1c8a6da626bc0c7d964a6f47ee1cbc10993" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2276, + 2644 + ], + "sha256": "dccc5b7bed5570b1236ef390ca88922b76d4dea105a5da585e9b7c057ab62660" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2648, + 3122 + ], + "sha256": "16f7cf6d99fffdb7f1e4b03ea1ae2112a2af7dc2ac304d540bb4f7f0acbf11ea" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3126, + 3426 + ], + "sha256": "04caffd5615b9b6eb3a3e18aac30d2c6b984b556fe5e5b72f431b6732ab00ad8" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 3430, + 3500 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 3504, + 3524 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3528, + 3622 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.json new file mode 100644 index 000000000..d2bc0e65d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.json @@ -0,0 +1,257 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 guarded Q/K RMSNorm and packed RoPE fusion", + "summary": "A merged CUDA fusion avoids normalized-Q/K and rotary intermediates for a specific packed BF16 geometry; reported denoise benefit is small and limited to a B300 workload.", + "applicability": { + "hardware": [ + "4× NVIDIA B300 SXM6" + ], + "software": [ + "Source revision 0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd; merged as 596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "CUDA/Triton BF16 fast path; head_dim=128, rotary_dim=96; TP1, Ulysses4, Ring1, TRTLLM_ATTN" + ], + "models": [ + "MiniMax-H3" + ], + "conditions": [ + "Packed [tokens, heads, head_dim] with compatible non-interleaved [cos|sin] frequencies", + "1344×768, 243 frames, 50 configured steps, seed 0", + "One warmup followed by one measured request per revision" + ] + }, + "limitations": [ + "The reported benchmark is B300, not H200/B200, ROCm or Ascend evidence.", + "Only one measured request per arm was reported.", + "No objective full-model quality metric appears in the reviewed report; imported status does not mean locally verified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json", + "sha256": "4c1c4acfb9cc0baa90bc28fed1903020ea1ea38755b84315711795db45e48bb6" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd", + "merge_commit": "596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd", + "merge_commit": "596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json", + "byte_range": [ + 0, + 3706 + ], + "sha256": "4c1c4acfb9cc0baa90bc28fed1903020ea1ea38755b84315711795db45e48bb6" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 193 + ], + "sha256": "7eb1ed4b942a59a254025a64acdfad79ca087b752ca8e89e09dc61a7c55a0ae4" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 197, + 380 + ], + "sha256": "d6bfcd47a641ade775d4b1ae8e106c5836ce9428f7600df673a7c820c080bffa" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 384, + 485 + ], + "sha256": "3b3edd7738a98b96b5a05ddb7bfa42a6db06ac6c74ad901663c89b12e7c2c276" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 489, + 795 + ], + "sha256": "8b7500a87ab9b088e0f0d07266b0316c6ef4d8dce2d1c94101365bc212a64a82" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 799, + 1406 + ], + "sha256": "7f8247d44979253c5e410a3bed59e4a9443844872578be3dd2f4cf04a252dca9" + }, + "claim-0": { + "summary": "Steady denoise latency fell from 109687 ms to 106205 ms, a reported 3.18% reduction. This is denoise timing, not client E2E or a statistical performance guarantee.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1426, + 1706 + ], + "sha256": "ebdb95064c135b23036e2298bbc96ffc079fb350f06f275c68cbae0c73474f34" + }, + "claim-1": { + "summary": "Three CUDA unit cases tested sequence lengths 1, 257 and 1024. Author comment reports max absolute operator error 0.0625, mean absolute error 0.00072–0.00077; qualitative near-identical E2E video is reported without objective media metrics.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1712, + 2020 + ], + "sha256": "6d0e4152f3074a1d76eb1e1d26dfdb934d3f4f3d80b6b8c06d2a2d1d7be4817b" + }, + "claim-2": { + "summary": "The patch dispatches fusion only with HAS_TRITON, CUDA platform/tensors, BF16 and supported geometry; other valid inputs use the eager reference. It preserves a BF16 normalization materialization before RoPE but still tests tolerance rather than byte identity.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2026, + 2351 + ], + "sha256": "c88d76dfedf4507d28dcbe3ca8aab3551749d456061980beda3ef4d9eac1831c" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2359, + 2726 + ], + "sha256": "9d4b73715d1ecd72e9a1faa31299c209d3f6af979bcd280656180aaef22b2129" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2730, + 3224 + ], + "sha256": "870db151157e7f7b95cb8466e838d32db0a6f0a072759b3ba56ea5b01726d9da" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3228, + 3507 + ], + "sha256": "be773a11e51deea9bec5627ed0cc0daa863100005ea556939668a3774623109c" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 3511, + 3581 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 3585, + 3605 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3609, + 3703 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.json new file mode 100644 index 000000000..6ba0bbd41 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.json @@ -0,0 +1,269 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 Ref2VA TeaCache needs task-specific calibration and step defaults", + "summary": "A Ref2VA TeaCache candidate calibrates a conservative late-step budget; quality and speed depend on task/step policy, and some cases produce zero hits and no gain.", + "applicability": { + "hardware": [ + "1× NVIDIA B300" + ], + "software": [ + "Unmerged source revision at import f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "BF16, CUDNN_ATTN, task-specific TeaCache coefficients" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "448×256, 107 output frames, 50 configured steps; fixed-seed comparison", + "Calibration uses 15 full-compute Ref2VA cases: 6 image, 6 image+audio, 3 video+audio", + "35 initial full-compute denoise calls, then at most five cache hits; other step counts remain uncached" + ] + }, + "limitations": [ + "Unmerged candidate at import; no claim of main support or InferRSI reproduction.", + "Reported quality results are a small same-seed sample set; full perception/temporal quality acceptance remains user-specific.", + "TeaCache and Cache-DiT are separate mutually exclusive backend choices in the reviewed branch." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json", + "sha256": "8aeb3f99ac4227cf8b3a5cece13d938b19082e265a557eddae27b7e495bcc22e" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json", + "byte_range": [ + 0, + 3835 + ], + "sha256": "8aeb3f99ac4227cf8b3a5cece13d938b19082e265a557eddae27b7e495bcc22e" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 219 + ], + "sha256": "425092e9438baeaa4a730020705afa80f991bbc5fb8152800cce8ab0d9b7d72c" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 223, + 399 + ], + "sha256": "f2e4adafc95a909ba4e36e508d7686792bf325cdd94018c03578ac1d87f835d1" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 403, + 546 + ], + "sha256": "302d6b7d341390f5df7010aec2600186368e1af477b0528683269e33b4e21def" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 550, + 822 + ], + "sha256": "1b8ea0c72cfc4ed6aa34a683c11dfcc6761927f17b48bfb443ec49601f328eb4" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 826, + 1430 + ], + "sha256": "21a9796f71f76e73f8e942093ba8eff8fc02a43c08feafc53448113c46fb7b66" + }, + "claim-0": { + "summary": "Video+audio example: 5/49 cache hits; latency 244190→221240 ms, video SSIM 0.9795/PSNR 41.60 dB and audio PSNR 168.8 dB. This demonstrates a speed/quality tradeoff, not exact equivalence.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1450, + 1705 + ], + "sha256": "815355195a38afa6eff44a465c5f1ebc29aa3f3a5960761f600eaa482b8ef467" + }, + "claim-1": { + "summary": "Image-only example: 0/49 hits; 53340→53260 ms, SSIM 1.000 and sample-identical audio. No meaningful speed gain was observed.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1711, + 1900 + ], + "sha256": "d5a46b1643d447e2e6d2fb1f4082563ade9edfc27cea98d25a8c20efa4909b5d" + }, + "claim-2": { + "summary": "Both video+audio runs peak at 140972 MiB; caching reduces compute and is not a weight-memory solution.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 1906, + 2074 + ], + "sha256": "25aab896420db4b692e9a0f1a5308a2877ce3db4b96bc3fde217a7ae2e3dd5ca" + }, + "claim-3": { + "summary": "An omitted num_inference_steps initially resolved to 0 in cache refresh while the pipeline used 50, bypassing calibrated warmup. Author reports a fix at 0d9594f21 preserved in f86bd6ad7, with shared effective defaults and regressions.", + "layer": "L1", + "pointers": [ + "/claims/3" + ], + "byte_range": [ + 2080, + 2377 + ], + "sha256": "3ce2d891dc669091af9e2f50f17bdb0f4a0605b1dbf9b0ee6ab949d4757fe557" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2385, + 2783 + ], + "sha256": "4e8a3139915e29856db17e051d66893dbbe4e9af76eada184e56242de2f5bf1e" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2787, + 3290 + ], + "sha256": "fa028e99a3f51aeac5e69608dbd32db31fc92dcbc359610b0522713969957a00" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3294, + 3636 + ], + "sha256": "95437d679a587f0052ed0c4ecfd53dd907030065daba4f5c8019d64e142fd694" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 3640, + 3710 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 3714, + 3734 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3738, + 3832 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.json b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.json new file mode 100644 index 000000000..426ae9b8e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.json @@ -0,0 +1,258 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 stacked VAE tiling trades activation memory for fewer decode calls", + "summary": "A stacked-tiling candidate batches rank-local spatial tiles into one decoder call per temporal window; measured decode gains are exact for the reported latent but PP1 memory rises.", + "applicability": { + "hardware": [ + "NVIDIA B300 SXM6, SM103; PP4 uses GPUs 0–3" + ], + "software": [ + "vLLM 0.28.0 benchmark environment", + "Base dff28e686711add0e929ce0c5660b09ef26c8c88 + Source revision b188874539903ecc04a8874b782d7d1a898d191c", + "Exact decoder kernels from #6607; FP16 CUDA autocast" + ], + "models": [ + "MiniMax-H3 video VAE" + ], + "conditions": [ + "Fixed latent (1,24,62,48,84), 768×1344 decode, same latent broadcast to ranks", + "One warmup + three measured decodes; PP latency is max rank wall-clock", + "Remote VAE implements native stack_tiling; auto requires at least two global tiles per VAE rank" + ] + }, + "limitations": [ + "Unmerged candidate at import; branch/default/options may differ from current main.", + "Clean current-branch PP2/PP8 latency is reported pending.", + "Reported exactness applies to this latent, autocast mode and decoder revision; portability is unverified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json", + "sha256": "8cc18eacbbfd8fc4d3a6b4152c4b584d559fc9b15377da56ef072e542d807c93" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "b188874539903ecc04a8874b782d7d1a898d191c", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "b188874539903ecc04a8874b782d7d1a898d191c", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json", + "byte_range": [ + 0, + 3508 + ], + "sha256": "8cc18eacbbfd8fc4d3a6b4152c4b584d559fc9b15377da56ef072e542d807c93" + } + } + }, + "content": { + "record.json": { + "path": "records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/id", + "/title", + "/backend", + "/scenario" + ], + "byte_range": [ + 4, + 223 + ], + "sha256": "22aefa79777cd9dc6a121051d6f3a605d20260407ea6387d96c2853aa47fcbef" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 227, + 420 + ], + "sha256": "5db6d0786c8b8640085a4168a4e9c4506e8bd6de02fc47ab88e35db22560a2a0" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 424, + 537 + ], + "sha256": "494c11538654be0777bc72bcf13d58c60043868ddf22bccbbb55ff4ab429950d" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 541, + 813 + ], + "sha256": "a82b69d2a13156c7b560794c38c087174a963ac90905b6e9fcba73aa97226d9f" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 817, + 1510 + ], + "sha256": "c0551ea13f94204ec2dca5379f6935b9001cabb0bdacb1861edcd03098a19358" + }, + "claim-0": { + "summary": "PP1 sequential→stacked median decode: 4387→3838 ms, peak allocated 11.83→16.73 GiB. PP4: 1198→1055 ms, peak 12.49 GiB unchanged; reported torch.equal=True and max abs diff 0 for both comparisons.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1530, + 1799 + ], + "sha256": "6e1c16c82282ae6e3b1fc47b49c85bc1e2510cb25227d8ed5b84f4aa505da60c" + }, + "claim-1": { + "summary": "Default false keeps sequential behavior; auto checks global tile count relative to parallel size. The model's previous stack_tiling state is restored in finally.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1805, + 2031 + ], + "sha256": "3f5edfe64e70721c31346f84cdc20be86bf257bee71047da693160b1157c3a1f" + }, + "claim-2": { + "summary": "Fewer decoder calls improve stage latency while PP1 activations consume about 4.90 GiB more. A decode microbenchmark does not establish complete generation or HTTP speedup.", + "layer": "L1", + "pointers": [ + "/claims/2" + ], + "byte_range": [ + 2037, + 2272 + ], + "sha256": "1b5ffa392f45500f49a32e0dd8d857fadf2bbf292d6281c3363ceaaebd211aba" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2280, + 2576 + ], + "sha256": "79cad491de4bbd6aa504632d0c2ea2154d9f1a0aa9459cc1c7a3f3dfa7a78ab9" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2580, + 3018 + ], + "sha256": "3940330d7ea06ab610f0b01ec446fba8416975f10638b837d3e569ad251f59cc" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 3022, + 3309 + ], + "sha256": "a41d0c6d0bd49475180c74fdb34766435064dca464bb9d9ad8ac00878066f58e" + }, + "identity-3": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/repo", + "/component" + ], + "byte_range": [ + 3313, + 3383 + ], + "sha256": "29ba856e9ee6478ce7506769f0372cec7cf8a6a32ee41b476a4ad7f589929dac" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 3387, + 3407 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3411, + 3505 + ], + "sha256": "eafdc88d8ca22907a4e02ad9497c6cb609882831a11b027bded511c5898b77b9" + } + } +} diff --git a/src/inferrsi/knowledge/atoms/workflows/cite-check-downstream-pr.md b/src/inferrsi/knowledge/atoms/workflows/cite-check-downstream-pr.md new file mode 100644 index 000000000..3a7fd5777 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/cite-check-downstream-pr.md @@ -0,0 +1,72 @@ +--- +name: cite-check-downstream-pr +description: Review a downstream PR description for correct acceptance issue links, SHA pins, and artifact citations. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "review", + "downstream", + "citation", + "evidence", + "verdict" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Review of a downstream PR description that cites RSI acceptance work for a performance or quality improvement", + "prerequisites": "The PR description, the acceptance issue it cites, and the evidence paths it names; reviewing is read-only and needs no local run", + "input_contract": "One PR description plus the cited acceptance issue and its evidence tree; the reviewer reads claims and citations, not the candidate code", + "produced_artifact": "A per-checklist review result that either accepts the citation or marks the summary unverified, using only PASS/FAIL/INCONCLUSIVE vocabulary", + "failure_modes": [ + "No acceptance issue URL, only a chat thread", + "Branch names instead of full baseline and candidate SHAs", + "Microbenchmark evidence offered for an end-to-end latency claim", + "A threshold restated or invented relative to the acceptance issue", + "Evidence path absent, stale or on a different SHA than the cited candidate" + ], + "refusal_point": "Refuses to restate a performance or quality claim whose artifacts are missing, stale or off-SHA; reports the summary as unverified instead" + }, + "recommendations": [ + "Read the cited acceptance issue before the PR description so an invented threshold is visible immediately.", + "Resolve every listed evidence path and compare its SHA with the candidate SHA the PR names.", + "Report an unverifiable claim as unverified rather than repeating its number." + ], + "limitations": [ + "Checklist-only procedure; it validates citation discipline, not the measurement behind an artifact.", + "A passing review does not establish that the campaign evidence itself is correct." + ], + "provenance_readsets": [], + "searchspace_not_applicable": "SKILL.md §§ Checklist and Red flags check acceptance links, revision/artifact citations and claim wording; they provide no hardware-resource mechanism." + } +--- + +# Cite-check a downstream PR + +Use when reviewing external PRs that claim performance or quality improvements tied to RSI acceptance work. + +## Checklist + +- [ ] Links an acceptance issue URL (not only a chat thread) +- [ ] States **baseline SHA** and **candidate SHA** matching that issue +- [ ] Points to `evidence//results/` (or equivalent published mirror) +- [ ] Does **not** invent new thresholds or restate bars differently +- [ ] Marks summaries **unverified** if artifacts are missing, stale, or off-SHA +- [ ] Uses verdict vocabulary only: `PASS` / `FAIL` / `INCONCLUSIVE` + +## Red flags + +- “X% faster” without artifact path +- Branch names instead of full SHAs +- Microbench-only support for e2e latency claims + +## Reference + +[docs/contributing.md#evidence-and-claims](https://github.com/InferMatrixLab/InferRSI/blob/b2f60f913a949f9073686a23476f752e11d709a4/docs/contributing.md#evidence-and-claims) diff --git a/src/inferrsi/knowledge/atoms/workflows/claim-contract.md b/src/inferrsi/knowledge/atoms/workflows/claim-contract.md new file mode 100644 index 000000000..581dd6611 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/claim-contract.md @@ -0,0 +1,73 @@ +--- +name: claim-contract +description: Enforce ThinkFlowLab claim contract wording and verdict rules without embedding campaign-specific revision pins. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "claim", + "wording", + "verdict", + "evidence", + "portable" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Wording and verdict rules for any public performance or quality claim produced from an RSI campaign", + "prerequisites": "A completed campaign with pinned baseline and candidate SHAs and an evidence tree; the rules themselves carry no numeric threshold", + "input_contract": "A claim draft, the campaign RunSpec and its evidence tree under evidence//", + "produced_artifact": "A claim sentence in the pinned form, or a refusal when the campaign verdict is not PASS", + "failure_modes": [ + "Claim asserted before the campaign reaches PASS with artifacts", + "Baseline or candidate SHA written into a shared template, skill or default CI environment", + "Microbenchmark result presented as end-to-end completion", + "A lesson transferred across an unverified repo x revision x backend x device x model x scenario tuple" + ], + "refusal_point": "Refuses any public claim lacking a PASS verdict and artifacts under evidence/, and refuses numeric thresholds because thresholds belong to the campaign" + }, + "recommendations": [ + "Keep campaign SHAs in the acceptance issue; a shared template that carries them will be wrong for the next campaign.", + "Write the verdict from the evidence tree before writing the claim sentence.", + "Treat each repo x revision x backend x device x model x scenario tuple as an independent claim." + ], + "limitations": [ + "States wording and verdict rules only; it selects no numeric gate and validates no measurement.", + "SIAS plane boundaries constrain where a change belongs, not whether it is correct." + ], + "provenance_readsets": [] + } +--- + +# Claim contract (portable) + +## Public claim wording + +Use: “on {repo}@{candidate} vs baseline@{baseline}, under {RunSpec}, we observed …” + +Only after acceptance **`PASS`** with artifacts under `evidence/`. + +## Rules (not numbers) + +| Verdict | When | +| --- | --- | +| PASS | Pinned SHAs, artifact tree on candidate tip, gates satisfied | +| FAIL | Gates failed with complete evidence | +| INCONCLUSIVE | Cannot defend comparison (env, partial run, missing validator freeze) | + +## What not to do + +- Do not bake baseline/candidate SHAs into shared repo templates, skills, or default CI env. +- Do not treat microbench alone as e2e campaign completion. +- Do not auto-transfer lessons across unverified repo × revision × backend × device × model × scenario tuples. + +## SIAS + +Respect plane boundaries: `harness/` orchestrates, `model/` defines quality, `infra/` supplies execution. Cross-plane deps belong in RunSpec. diff --git a/src/inferrsi/knowledge/atoms/workflows/competitor-scan.md b/src/inferrsi/knowledge/atoms/workflows/competitor-scan.md new file mode 100644 index 000000000..92376ead4 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/competitor-scan.md @@ -0,0 +1,69 @@ +--- +name: competitor-scan +description: Structure a lightweight competitive scan without inventing benchmark numbers or campaign verdicts. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "competitive-analysis", + "positioning", + "claim", + "unverified" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Qualitative positioning of a new RSI repository against other projects before acceptance evidence exists", + "prerequisites": "A selected repository and readable public material from the alternatives; no benchmark run is required", + "input_contract": "A target repository plus whatever the alternatives publish about what they optimize and how they prove it", + "produced_artifact": "A short Markdown note covering problem, alternatives, differentiation, limits and open questions", + "failure_modes": [ + "Numeric comparison written without a PASS campaign in our own evidence tree", + "Third-party figure repeated as if reproduced under our RunSpec", + "Scan presented as a substitute for acceptance evidence" + ], + "refusal_point": "Refuses any numeric comparison not sourced from our own evidence//results/ with a PASS verdict" + }, + "recommendations": [ + "Answer the four framing questions qualitatively first; the absence of a published claim contract is itself a finding.", + "Label every third-party number unverified unless it was reproduced under our RunSpec.", + "Close the note with open questions rather than a conclusion the evidence cannot support." + ], + "limitations": [ + "Produces positioning material only; it establishes no performance or quality result.", + "Third-party claim contracts are read from public material and may be incomplete." + ], + "provenance_readsets": [], + "searchspace_not_applicable": "SKILL.md §§ Frame, Rules and Deliverable produce a qualitative competitive comparison with evidence limits, not a hardware-resource decision or implementation mechanism." + } +--- + +# Competitor scan (generic) + +Use when positioning a new RSI repo—not to replace acceptance evidence. + +## Frame + +| Question | Answer (qualitative) | +| --- | --- | +| What do others optimize? | _throughput, latency, cost, quality, …_ | +| How do they publish proof? | _blogs, papers, dashboards, none_ | +| Claim contract? | _pinned revisions + reproducible artifacts? often missing_ | +| Our wedge | _smallest proof that unlocks the next bet_ | + +## Rules + +- No numeric comparisons unless sourced from **our** `evidence/.../results/` with `PASS`. +- Label third-party numbers **unverified** if not reproduced under our RunSpec. +- Use the [evidence and claim rules](https://github.com/InferMatrixLab/InferRSI/blob/b2f60f913a949f9073686a23476f752e11d709a4/docs/contributing.md#evidence-and-claims) when writing a comparison. + +## Deliverable + +Short markdown: problem, alternatives, differentiation (claim contract + SIAS), limits, open questions. diff --git a/src/inferrsi/knowledge/atoms/workflows/draft-acceptance-issue.md b/src/inferrsi/knowledge/atoms/workflows/draft-acceptance-issue.md new file mode 100644 index 000000000..874096066 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/draft-acceptance-issue.md @@ -0,0 +1,74 @@ +--- +name: draft-acceptance-issue +description: Draft a campaign acceptance issue with checklist, RunSpec, evidence paths, and placeholders for baseline/candidate SHAs. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "acceptance", + "issue", + "runspec", + "template", + "campaign" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Opening a new acceptance campaign in an RSI-style repository, before any baseline or candidate run", + "prerequisites": "A chosen campaign subject and an empty evidence// tree copied from evidence/_template/; SHAs may still be placeholders", + "input_contract": "A campaign id of the form {model-or-scenario}/{device}x{count}, any user-supplied criteria or accepted plan, and available workload/baseline/calibration evidence for deriving missing targets", + "produced_artifact": "An acceptance issue body with campaign id, pinned baseline and candidate SHAs, RunSpec, criteria source and derivation including gaps and freeze authority, gates, evidence paths, initial verdict and a downstream citation blurb", + "failure_modes": [ + "Gates written after the search loop has already run", + "Campaign SHAs committed into recipes/, benchmarks/, skills or workflow defaults", + "PASS claimed without a validator/ freeze and a results/ rationale" + ], + "refusal_point": "Refuses to state a verdict other than INCONCLUSIVE while the validator freeze or results rationale is absent" + }, + "recommendations": [ + "Use user-supplied criteria; when absent, follow the performance-ceiling-analysis acceptance procedure to formulate targets, preserving partial requirements and identifying derived fields and evidence gaps.", + "Write the gates in plan/ before any search loop; a gate chosen afterwards cannot reject the candidate honestly.", + "Use the and placeholders until the campaign fixes them, and keep the real values in the issue.", + "Set the initial verdict to INCONCLUSIVE so the absence of evidence is recorded rather than assumed away." + ], + "limitations": [ + "Drafts an issue only; it freezes no gate and runs no measurement.", + "The placeholder SHA convention depends on the campaign owner filling them in later." + ], + "provenance_readsets": [], + "searchspace_not_applicable": "SKILL.md §§ Steps and Output prepare an acceptance issue, RunSpec, frozen gates and evidence paths; device identifiers are campaign metadata rather than a hardware-resource mechanism." + } +--- + +# Draft acceptance issue + +Use when starting a new campaign in a ThinkFlowLab RSI-style repo. + +## Steps + +1. Pick `campaign_id` (naming: `{model-or-scenario} / {device}×{count}`). +2. Copy `evidence/_template/` → `evidence//` (empty tree with README stubs). +3. Open issue using `.github/ISSUE_TEMPLATE/campaign-acceptance.yml` or [docs/contributing.md#acceptance-checklist](https://github.com/InferMatrixLab/InferRSI/blob/b2f60f913a949f9073686a23476f752e11d709a4/docs/contributing.md#acceptance-checklist). +4. Fill **pinned baseline SHA** and **pinned candidate SHA** in the issue—use placeholders `` / `` until known. +5. Resolve criteria using the [acceptance-criteria procedure](../../../playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md): + use user-supplied criteria; otherwise use `performance-ceiling-analysis` to + formulate targets. Preserve partial requirements, label derived fields and + retain unresolved evidence gaps. List supported gates and their provenance in + `plan/` before candidate search. +6. Set initial verdict `INCONCLUSIVE`. + +## Do not + +- Commit campaign SHAs into `recipes/`, `benchmarks/`, skills, or workflow defaults. +- Claim `PASS` without `validator/` freeze and `results/` rationale. + +## Output + +Issue body sections: campaign id, SHAs, RunSpec, criteria source and derivation (including evidence gaps and freeze authority), gates, evidence paths, verdict, downstream citation blurb. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/guide.md b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/guide.md new file mode 100644 index 000000000..57771fb2b --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/guide.md @@ -0,0 +1,45 @@ +--- +name: inference-engine-research +description: "Prepare model-aware inference-engine research: broaden knowledge discovery, select source references, inventory full-pipeline weights and screen target feasibility before engine design. Route relevant Strata, vLLM, SGLang and Omni knowledge." +license: Apache-2.0 +metadata: + disco-role: operating +--- + +# Inference engine research router + +Use this collection to prepare a dedicated engine, compare architectures or design a constrained search. Start from the model's actual task and component graph, then discover both model-specific and transferable knowledge. A model name and a preferred framework alone are insufficient. Keep the library's `repositories/` and `workflows/` layout so links reach their owners; repository skills can also be distributed independently. + +| Question | Route | +|---|---| +| Prepare a new model/hardware pair: discovery, reference selection, full weights and feasibility | [Model-aware preparation](references/model-aware-preparation.md) | +| MiniMax-H3 native execution, component lifetimes and Apple Silicon feasibility | [h3.c residency audit](../../../systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md), including its source inventory and comparisons | +| Compare graph, cache, lifetime, stop and completion contracts across source slices | [Cross-repository mechanisms](references/cross-repository-mechanisms.md) and [source scope](references/repository-source-scope.md) | +| Strata heterogeneous MoE, CPU/GPU expert placement, memory and speculative execution | [strata](../../../systems/engines/strata/SKILL.md) | +| vLLM token scheduling, KV/prefix reuse, execution/parallelism or model integration | [vllm](../../../systems/engines/vllm/SKILL.md) | +| SGLang scheduling, Radix/HiCache, prefill/decode, parallel runtime or extensions | [sglang](../../../systems/engines/sglang/SKILL.md) | +| SGLang-Omni pipelines, stage/scheduler ownership, streaming and transport | [sglang-omni](../../../systems/engines/sglang-omni/SKILL.md) | +| vLLM-Omni model/deploy separation, AR/diffusion execution, stage transport and heterogeneous outputs | [vllm-omni](../../../systems/engines/vllm-omni/SKILL.md) | + +## Comparison procedure + +1. Fix the model/checkpoint/tokenizer, tasks/modalities, component graph, target hardware/memory, software and quality contract. Ask only for missing facts that alter a decision; otherwise state reversible assumptions. Do not infer architecture from a family name. +2. Search model, framework, task, modality and mechanism dimensions independently and union the results. + Use `inferrsi knowledge research --framework ` with explicit `--task`, + `--modality` or `--mechanism` additions as needed. Known profiles supply grounded terms. + Inspect sources for unknown models. Each query uses Find's lexical ranking over the eligible + package records. Retain hard filters and record empty dimensions. Change the scope explicitly + if it is too restrictive. +3. Compare eligible native implementations at pinned revisions. If the user requests the most-starred reference, record the candidate set, eligibility, observation date and counts; choose the largest count within that set, then check license and compatibility. Read that source directly or distill its relevant paths with an available repo-to-skill workflow before engine generation. Popularity is a reference-selection input, not a quality or hardware guarantee. +4. Inventory every selected encoder, denoiser, VAE/decoder, conditioning path, adapter and auxiliary asset. Reconcile tensor shapes, dtypes, quantization metadata, files and actual execution paths. Separate full checkpoint weights, required subsets, phase and cold-start peaks, activations/workspace, unified/host memory and storage. Do not count alternative task checkpoints twice or equate a DiT-only quant with a complete pipeline. Follow the [preparation procedure](references/model-aware-preparation.md) before deciding target feasibility. +5. Load the smallest relevant repository branches. Trace work units, state ownership, scheduling, memory, communication, output and cleanup. Produce supported settings, semantics-preserving implementation changes and research extensions as separate candidate classes, with explicit approximation budgets. +6. Screen supported model/backend/format pairs, residency, partition/layout, numerical/quality contracts, abort/termination and queue stability before benchmarking. Mark unsupported and unverified paths separately; preparation alone does not establish target feasibility. +7. Freeze the workload and validators before candidate experiments. Measure matched real workloads, separating CPU/static, mocked contract, accelerator/native transport, real-model quality and service evidence. Rank only valid runs and report conflicting objectives without claiming a universal winner. + +## Transfer rules + +DP/EP/TP labels, batch size, prefix cache, async execution and streaming can mean different things across engines. Translate the ownership and capability contract before transferring a knob or optimization. Do not assume an Omni repository accepts the independently captured base-engine HEAD: these snapshots do not constitute a compatibility matrix. + +Measure text TTFT/TPOT separately from media first-packet latency, chunk gaps, end-to-end completion, RTF, image/video throughput and quality. Reduced steps, resolution or output length change the workload/quality contract and must be disclosed. + +The repository and framework owners retain their pinned provenance and source evidence. The collection is a portable candidate; actual GPU, native distributed and quality validation requires the target environment. No new engine or measured speedup is included. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/cross-repository-mechanisms.md b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/cross-repository-mechanisms.md new file mode 100644 index 000000000..64fac68ff --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/cross-repository-mechanisms.md @@ -0,0 +1,79 @@ +# Cross-repository mechanisms: ownership, validity and completion + +This source-derived synthesis compares nine bounded distillation slices at the +same responsibility layer. Its purpose is to choose the right owner and the +smallest discriminating check, rather than to rank engines or prescribe a shared +runtime abstraction. The [source-scope snapshot](repository-source-scope.md) +retains each source pin, attribution, owner and evidence boundary. + +Across these nine slices, native engine/backend, real-model, service and +performance validation is **not_run**. Separately, seven checks passed on +ComfyUI’s unchanged `graph_utils` module; these do not validate its executor, output-cache semantics, model management or accelerator. InferRSI +catalog, package, test and CI results validate knowledge delivery separately. +They do not promote a source-derived candidate. Older, unrelated runtime +evidence retains its original scope and date. + +CODE observations below are carried from the linked pinned readsets and +owner-local references. TEST-SOURCE means an assertion was inspected, not run. +Cross-runtime transfer and proposed checks are HYPOTHESIS. No repository-wide +review, compatibility matrix or comparable performance result is established. + +## Compare responsibilities before names + +| Responsibility | Source-supported examples | Transferable question or invariant | Assumptions that remain local | +|---|---|---|---| +| **Loader and component construction** | stable-diffusion.cpp separates model catalog, parameter storage and compute staging. Diffusers can create a new pipeline wrapper while passing existing components through `from_pipe`. MLX-LM's cache command loads a model and writes an artifact. | Establish model/component byte identity, construction ownership and the point at which actual weights become usable. Distinguish constructing a wrapper, registering metadata, loading bytes, staging weights and first-request readiness. | This batch does not establish a complete checkpoint/storage-I/O optimization. Diffusers component reuse is not checkpoint loading; MLX-LM loader internals were not deeply read; DeepInfer's loader was largely navigation. Reuse existing loading/storage owners for those questions. [Stable](../../../../systems/engines/stable-diffusion-cpp/audit-sd-cpp-residency/references/source-notes.md), [Diffusers](../../../../systems/frameworks/diffusers/diffusers-invocation-state/references/source-map.md), [MLX-LM](../../../../systems/engines/mlx-lm/generation-cache-lifecycle/references/source-map.md). | +| **Graph and execution** | ComfyUI executes a workflow dependency graph with lazy/dynamic dependencies. MLX constructs a lazy primitive graph, then evaluates it with stream dependencies. llama.cpp reuses a compatible frontend graph result after memory preparation and refreshes its inputs. stable-diffusion.cpp selects a monolithic or eligible segmented native graph. | Trace producer → effective dispatch → input readiness → consumer → completion. A reusable plan still needs current inputs and valid resource lifetimes. Observe the actual branch before measuring it. | A ComfyUI node graph, an MLX lazy graph, llama.cpp frontend graph reuse and a backend-native captured graph are different objects. None implies fusion, capture replay or transfer overlap in the others. Segmentation eligibility and backend implementations are source-specific. [ComfyUI](../../../../systems/engines/comfy-ui/references/graph-cache-invalidation.md), [MLX](../../../../systems/frameworks/mlx/lazy-evaluation-stream-lifetimes/references/source-map.md), [llama.cpp](../../../../systems/engines/llama-cpp/audit-llama-runtime-state/references/source-notes.md), [Stable](../../../../systems/engines/stable-diffusion-cpp/audit-sd-cpp-residency/references/phase-residency.md). | +| **Allocation and lifetime** | MLX backend work can retain buffers after graph detachment. ComfyUI can partially unload weights while retaining a wrapper. stable-diffusion.cpp separates weights, retained runtime and pending allocations; unpinning is distinct from eviction. SGLang closes component-use intervals while policy may retain modules or prefetch the next request. llama.cpp memory and server prompt state have separate owners. | Name every owner and last consumer. Distinguish a logical state transition, permission to reclaim, actual allocation release, allocator cache and device completion. Account for simultaneously live current/queued work without counting reusable storage twice. | Array buffers, model weights, workflow outputs, attention state and request records have different identities. A logical token/cache offset is not allocated capacity. CPU reroutes or bypasses important ComfyUI/stable accelerator paths. SGLang's concrete residency strategies and MLX allocator internals remain outside the respective readsets. [MLX](../../../../systems/frameworks/mlx/lazy-evaluation-stream-lifetimes/references/execution-lifetime.md), [ComfyUI](../../../../systems/engines/comfy-ui/references/model-residency.md), [Stable](../../../../systems/engines/stable-diffusion-cpp/audit-sd-cpp-residency/references/phase-residency.md), [SGLang](../../../../systems/engines/sglang/audit-sglang-diffusion-lifetimes/references/source-notes.md). | +| **Cache validity and retained state** | ComfyUI output signatures include dependencies/fingerprints, while retention has a separate policy. MLX-LM prompt reuse depends on model/adapter/draft identity, token-prefix state, copying and cache-specific trimming. llama.cpp graph compatibility does not replace memory updates. DeepInfer compacts query rows while preserving required full-layout state. | First establish computation/state identity and dependency closure; then decide retention or reclamation. A hit, retained object or shorter logical view does not by itself prove equivalent future computation. External inputs and model bytes need explicit identity. | Node-output caches, prompt KV state, recurrent state, graph arenas and denoising scheduler state are not one cache schema. DeepInfer's retained query suffix is not the whole historical-key set. Diffusers/SGLang scheduler objects are mutable execution state, not a generic cache entry. [ComfyUI](../../../../systems/engines/comfy-ui/references/graph-cache-invalidation.md), [MLX-LM](../../../../systems/engines/mlx-lm/generation-cache-lifecycle/references/cache-stop.md), [DeepInfer full-state path](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py#L672-L719). | +| **Scheduling, stopping and cancellation** | DeepInfer pipelines CPU scheduling and device work, with explicit stale-state repair. MLX-LM cooperatively removes a UID while preserving aligned survivor rows. Diffusers Flux skips remaining iterations after interruption and can still reach normal output cleanup. llama.cpp queues cancellation and may retain a stateful prompt. SGLang timeout/socket close or video deletion is not per-generation device abort. vLLM-Omni distinguishes enqueue, correlated logical acknowledgment and queued transfer reclamation. | Follow the same request/task/sequence identity across admission, work, stop observation, output finalization and cleanup. Record which event actually occurred. A caller ceasing to wait does not retract work; a release or acknowledgment must name its owner and completion scope. | Partial llama.cpp ubatches can survive abort/fatal failure; recovery is not whole-batch rollback. An HTTP task, numerical diffusion scheduler, engine queue and device kernel are different lifetimes. Do not introduce retries or concurrency changes without the existing caller contract. [llama.cpp](../../../../systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md), [MLX-LM](../../../../systems/engines/mlx-lm/generation-cache-lifecycle/SKILL.md), [Diffusers](../../../../systems/frameworks/diffusers/diffusers-invocation-state/SKILL.md), [SGLang](../../../../systems/engines/sglang/audit-sglang-diffusion-lifetimes/SKILL.md), [vLLM-Omni](../../../../systems/engines/vllm-omni/sub-skills/omni-validation/references/abort-acknowledgment.md). | +| **Transport and synchronization** | DeepInfer separates CPU scheduling metadata from worker-side GPU confidence repair. MLX and ggml use backend-specific fences, events, copy buffers or synchronization. SGLang has rank policies and a request transport. vLLM-Omni routes abort/release by request-to-replica binding and correlates results separately. | Distinguish data dependency, device-stream ordering, collective participation, message delivery and resource reclamation. Retain buffers until the real receiver/consumer is done. Verify each affected rank/replica and preserve correlation when a waiter disappears. | H2D/D2H copies and a local IPC socket are not network throughput evidence. A barrier declaration does not qualify cross-rank exception recovery. Source-level async capability does not establish useful overlap. Vendor, connector and driver internals have independent pins and unread boundaries. [DeepInfer budget source notes](../../../../systems/engines/deepinfer/budget-speculative-verification/references/source-notes.md), [llama.cpp](../../../../systems/engines/llama-cpp/audit-llama-runtime-state/references/source-notes.md), [SGLang](../../../../systems/engines/sglang/audit-sglang-diffusion-lifetimes/references/source-notes.md), [vLLM-Omni](../../../../systems/engines/vllm-omni/sub-skills/omni-validation/references/abort-acknowledgment.md). | +| **Measurement and acceptance** | All nine slices identify meaningful work/completion boundaries and unrun native checks. DeepInfer's verification objective separates verification rows from accepted tokens and includes unchanged draft work in total cost. MLX/MLX-LM make submission versus completion important. Diffusion paths distinguish preparation, denoising, decoding and finalization. | Freeze the exact workload, numerical/quality contract, backend, model bytes, device count and effective branch. Verify correctness first; separately record startup, first request, warm work, host/device peaks, transfer events, failure cleanup and service completion as applicable. | No matched cross-repository benchmark exists here. Do not rank throughput, compare different token/media work units, copy source margins into acceptance thresholds or treat package checks as native evidence. Earlier author-reported figures are not reproduced results in this synthesis. [Evidence boundary](repository-source-scope.md#validation-boundary). | + +## DeepInfer contracts that constrain transfer + +These source contracts keep query work, historical state, confidence estimates +and sampling outcomes separate. The complete procedures remain with the +[bounded-replay owner](../../../../systems/engines/deepinfer/bound-windowed-attention-replay/SKILL.md) and +[verification-budget owner](../../../../systems/engines/deepinfer/budget-speculative-verification/SKILL.md). + +| Question | Source-supported statement | Consequence for another implementation | +|---|---|---| +| What is shortened? | The compact path removes query rows. Required boundary full hidden and main/index KV remain available separately. A consumer need not be limited to SWA historical keys. [Boundary](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/decoder_layer.py#L134-L152), [full KV](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py#L672-L719). | Derive the complete consumer dependency closure before applying `window + rollback`. A stack of finite-window layers alone does not prove suffix-only replay is valid. Keep query compaction separate from historical-key retention; it does not promise lower persistent-KV memory. | +| When do ring margins apply? | The kvstore extra-state flag gates both margins; the truncation keep margin additionally requires truncation mode not `off`. [Nested gates](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py#L88-L110). | Carry the effective gates and model-specific ring layout, not an unconditional enlarged-ring formula. Mask mode remains the compute-neutral reference; compact mode needs equivalence evidence. | +| What does speculation budgeting save? | The inspected DFlash producer still runs its configured draft width; the scheduler budgets verification rows. [Draft producer](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/mtp/dflash.py#L347-L387), [sampler caller](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/sampler.py#L225-L251). | Include draft work in cost and keep verified rows, accepted tokens and time separate. Equal accepted length or identical stochastic token streams is not a universal correctness criterion. | +| Which confidence is available? | CPU budget/per-request queues and the overlapping worker repair have distinct round availability. The worker redistributes a fixed total using previous GPU confidence before forward and synchronizes corrected metadata before sampling. [CPU queues](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp#L160-L214), [worker correction](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219). | Re-derive causal timing before changing the lag. At a fixed historical global budget, the same proposal’s legal cumulative prefix through position i and other allocation state, its later confidence must not change inclusion of i. Historical N−2 rates may legitimately change the global budget. A violation may bias the complete emitted distribution; test G5. Multiplication of confidence estimates is not proof of statistical independence. Confidence-head calibration and request sampling temperature are separate controls. | +| What is the minimum budget? | The search starts with one golden-token verification row per scheduled sequence; draft rows are additional allocations. [Row floor and objective](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp#L231-L257). | Preserve the allocation contract; a row floor does not guarantee that a draft token is accepted. Measure realized emitted tokens separately. | +| How is confidence consumed and checked? | The scheduler forms cumulative products from per-position confidence. [Producer contract](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp#L1243-L1250). | V3 uses exact cumulative products for conditional per-position inputs and leaves already-cumulative inputs unchanged. G5 checks the complete emitted next-token distribution, including reject/residual paths; G7 measures accepted tokens over total time including unchanged draft work. These are proposed validation gates, not executed results. | + +## Use the existing research procedure + +Use this comparison to select a procedure; repository and framework owners +retain the complete operational steps. + +1. Select the symptom and responsibility layer, then load the smallest relevant + source owner from the [coverage table](repository-source-scope.md#per-repository-scope-and-owner). + Keep SGLang `multimodal_gen` distinct from SGLang-Omni, and MLX array execution + distinct from MLX-LM request/cache policy. +2. Build one ledger: `identity`, `owner`, `producer`, `consumer`, `validity or + readiness condition`, `last use`, `terminal/retention event`, `evidence`, and + `unknown`. Preserve the engine's actual unit: node, array, ubatch, token row, + component-use interval, stage, request or replica. +3. Trace the selected behavior through setup, normal work, relevant failure and + cleanup. Check feature-off behavior and effective defaults. Do not assume a + `finally` covers entry/setup that precedes its `try`, or that an acknowledgment + includes separately queued reclamation. +4. Propose one falsifying check using the real selected implementation. Examples + include a changed external input with the same filename, a partial-ubatch + abort after proven earlier progress, survivor-row correctness after removal, + mutable scheduler identity during grouped reuse, or release completion on an + affected replica. Avoid a substitute allocator, scheduler or model that only + mirrors the proposed explanation. +5. Keep the outcome at its demonstrated strength. Missing fixtures/backends + remain explicit `not_run` boundaries. Native correctness, real-model quality, + and matched service/performance acceptance require their own evidence. + +The Reference Matrix continues to own provenance and extraction coverage; the +SearchSpace Matrix continues to own resource × stage coverage. The companion +source-scope document is a finite snapshot of this batch, not a third maintained +matrix. There is no implied ordering of the nine systems by speed or maturity. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/import.md b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/import.md new file mode 100644 index 000000000..315cacea4 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/import.md @@ -0,0 +1,56 @@ +# Import scope and verification + +This library retains the English editions of the five portable skill sets +originally constructed in English and Chinese on 2026-10-14. The method was +AREX-Skill's direct `distill-ml-knowledge` workflow: scope, source grounding, +construction and verification. The five engine source +snapshots and method revision are recorded in [source-manifest.json](source-manifest.json). +They are independent knowledge snapshots, not a tested dependency matrix. + +## Included material + +- Complete English repository entries, sub-skills, source references, + routing/provenance metadata and the Strata offline CSV summarizer. +- Strata's design-space analysis and the cross-engine overview in English. +- A collection router extended to include Strata alongside the other four engines. +- Repository license texts: MIT for Strata; Apache-2.0 for the other four. +- Catalog abstracts with repository/backend/scenario boundaries and pointers to + the English documents. Prior vLLM-Omni experience records are retained. + +Source clones, model weights, build environments, construction scripts, archives +and machine-specific raw construction reports are not package resources. Native +test commands in the skills require a separately supplied matching source tree. +The summarizer is an offline helper, never an engine or automatic quality gate. +Its formatting is adapted to InferRSI's line-length rules; its parsed Python AST +is unchanged from the original delivery. + +## Earlier construction evidence + +The original construction runs reported the following limited checks. These are +historical extraction evidence, **not rerun accelerator qualification in InferRSI**: + +| Repository | Executed during original extraction | Limit | +| --- | --- | --- | +| Strata | 141 selected Python setup/source/benchmark/calibration tests; offline helper cases | Includes mocked behavior; no native C++/GPU build or model execution | +| vLLM | Source/AST, option and test-selector inspection | Native metadata test collection blocked by missing `regex`; no test body passed | +| SGLang | Registration linter over 2360 Python files and negative/repaired fixture | File scanning is not 2360 runtime tests | +| SGLang-Omni | 84 configuration and prepared-queue CPU tests | Pipeline-schema collection blocked by missing `pytest_asyncio`; no transport/model certification | +| vLLM-Omni | 5 narrow stdlib enum/deployment-shape probes | Not a complete native engine test suite | + +Both original packages also underwent local-link, bilingual contract and +independent document-use reviews. Per-repository source references retain the +specific evidence and refresh boundaries. Original reports are not bundled as +new execution evidence; no performance measurements are introduced by this import. + +## Qualification boundary + +Every new catalog entry is imported guidance with `locally_verified=false`. +Catalog tests, wheel resource checks, parsing and CPU probes do not establish +accelerator correctness, native distributed transport, real-model quality, +concurrency stability, capacity or speedup. No DisCo managed import or global +agent-skill installation is claimed. + +Before a performance claim, use InferRSI's normal acceptance process: freeze the +actual source/model/environment tuple, workload and quality gates; run the +required backend, model and service levels; preserve failures and raw artifacts. +Research-source SHAs here are provenance and do not set shared campaign defaults. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/model-aware-preparation.md b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/model-aware-preparation.md new file mode 100644 index 000000000..99821e856 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/model-aware-preparation.md @@ -0,0 +1,152 @@ +# Model-aware engine preparation + +Read this before generating a dedicated engine or treating a known family name +as a complete model specification. The output is a cited preparation decision +with explicit gaps. The local discovery operation does not run a model, inspect +hardware, crawl sources, install a tool or select an engine automatically. + +## 1. Identify the actual computation + +Pin the model card, configs and task checkpoint. Record task, input/output +modalities, conditioning, denoising/AR stages, sampling schedule, supported shapes +and all encoder/decoder paths. Include resolution, duration, batch and input +reference requirements when they change execution. A text encoder inside a video +diffusion pipeline does not make it a language-model serving task. Separate +hosted-only services from locally released components. Unknown architecture facts +remain unknown. + +## 2. Discover along separate dimensions + +Run the public operation, adding dimensions established from the selected source: + +```bash +inferrsi knowledge research MiniMax-H3 --framework mlx --target-backend metal --target-device "M5 Mac Studio" --target-memory-gib 64 --limit 12 +``` + +This emits JSON: the packaged profile and sources, independent query groups, +match counts, bounded deduplicated records with `matched_queries`, active filters, +component roles and target annotations. It searches the installed catalog only. +Round-robin selection lets different queries contribute; it is not an evidence +quality or engine ranking. Read the original records' applicability, sources, +negative results and verification state alongside their full linked procedures. + +- **Model:** canonical identity and aliases; preserve checkpoint/task variants. +- **Framework:** preferred runtime and its lazy evaluation, buffers and streams. +- **Task:** diffusion, autoregressive generation or the actual computation. +- **Modality:** video, audio, image and other required input/output contracts. +- **Mechanism:** relevant memory, residency, quantization, tiling, offload, + scheduling or reuse questions; query presence does not assert support. + +Known profiles supply only source-grounded discovery terms and component roles; +their linked repository skills own the detailed source map and inventories. The +MiniMax-H3 profile points to the [h3.c residency audit](../../../../systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md). +For an unknown model, supply `--task` and `--modality` after inspecting its sources; +no architecture is guessed. Repeat dimensions to add queries. +A text query to `knowledge search` and each research query use the same Find +lexical ranking over the eligible package records. + +Tier/repository/backend/scenario flags remain hard catalog filters. An empty +dimension can mean missing or filtered knowledge: report it, inspect the missing +source and explicitly change scope when useful. Cross-platform records can +suggest mechanisms, but CUDA/Ascend evidence does not qualify Metal. The free-text +`--target-backend` describes the intended runtime; it does not add that backend to +InferRSI's experiment adapters. Avoid a CUDA-only filter when researching common +MLX procedures unless that restricted view is intentional. + +## 3. Choose and inspect an implementation reference + +Search the target's native ecosystem as well as the preferred framework. Define +eligibility (actual model execution, required modalities, target API/hardware, +available source) before ranking. Distinguish independent engines from UI +wrappers, forks, unrelated projects and hosted API clients. + +When the user requests the most-starred reference, record the bounded search, +candidate repositories, star counts and observation timestamp, source revisions, +license state, supported tasks, hardware reports and known approximations. Choose +the highest count among eligible inspected candidates and state that boundary; +do not claim a global maximum from a few results. Popularity does not override +model/format compatibility or target quality requirements. Keep alternatives +when different engines accept different quantized formats. + +Use one of two preparation paths before generation: + +1. Read the pinned implementation directly and retain a compact source map for + loaders, component graphs, memory lifetimes, kernels and verification. +2. If an available repo-to-skill workflow helps, distill those same paths into + owner-local operating knowledge with source attribution, license state and + validation limits; verify it against source before using it. + +The second path is optional. Reading a repository does not authorize installing +an unknown tool or executing upstream commands. No automatic skill promotion or +runtime dependency follows from distillation. + +## 4. Account for the complete selected pipeline + +Build one inventory row per encoder, denoiser, video/image/audio decoder or VAE, +required adapter and auxiliary asset. Include input encoders needed only by a +conditioning mode. Record: + +| Field | What it must distinguish | +| --- | --- | +| Identity | Repository/revision, path/shards, component and task; one selected alternative | +| Tensor count | Shape/dtype-derived elements; distinguish logical weights, buffers and packed quant metadata | +| Representation | Dense dtype or quant format, bits/group size, scales/zeros/biases, unquantized exceptions | +| Storage | Exact selected-file bytes and units; optional alternatives/conversion sources separately | +| Execution | Cold load/conversion/compile, precompute/conditioning/denoise/decode/release order and live component subset | +| Extra memory | Activations, scheduler/KV/latent state, workspaces, caches, copies, compilation and allocator pools | +| Evidence | Source report vs inspected metadata vs measured target peak; missing facts remain explicit | + +Do not sum all downloaded task alternatives or repeated shared-component copies +as one execution. Do not infer logical parameters from raw `U32` element counts +in packed quantized files. Count scales and other quant overhead in storage and +residency without calling them additional trained parameters. If inspecting +remote safetensors, bounded HTTP range reads may inspect only the length and JSON +header; stop if the server ignores ranges. Header inspection does not verify +the payload bytes or establish output quality. + +Estimate each phase independently: + +```text +phase memory = live component weights + activations/state + workspaces/caches + + staging/dequantization copies + allocator/runtime overhead +machine requirement = largest cold-start or execution peak + + OS/display/other-process headroom +``` + +Evaluate cold loading, conversion and compilation separately from steady-state +phases: source and converted weights, staging buffers and compiled caches can +coexist. Record what is actually released at each transition and any retained +conditioning or decoded outputs. A warm denoising peak alone cannot bound the +whole process. Keep estimated, source-reported and measured peaks distinct. + +On unified-memory systems, CPU and GPU allocations share physical capacity; +offloading within the same machine does not create a second independent RAM +budget. File-backed mapping and SSD streaming can reduce residency but add I/O, +page-fault and storage constraints. Measure physical footprint, compression and +swap alongside engine-reported tensor memory. Storage bytes, a backend wired +limit and total installed memory are not interchangeable peak measurements. + +## 5. Compare weight/engine pairs and make a conditional decision + +For each candidate, check conversion lineage, format/loader compatibility, +complete component coverage, weight/code licenses, quantized exceptions and +task-specific quality. A 4-bit DiT does not account for its text encoder or VAEs; +a framework-specific affine export cannot be assumed loadable by a dense-weight +native loader. Verify the exact loader's formats, component layout and conversion +requirements rather than comparing bit widths alone. +Separate weight-only quantization from activation quantization, exact schedule +precompute from approximation, and fewer steps/layers from a matched workload. + +Compare published hardware, memory metrics, shapes/duration/batch, speed and +quality protocol with the target. Record **unsupported**, **unverified**, or a +bounded source-reported/locally verified configuration. If the model cannot fit +all-at-once, evaluate phased release, precomputation, supported quantization and +streaming; do not imply that fitting guarantees useful latency or quality. + +Return a concrete next decision: a candidate pair and required validation, a +smaller permitted workload/precision with disclosed costs, or a larger-memory +hardware requirement justified by peak plus headroom. Keep the proposed +workload/quality gates explicit. Freeze them in the acceptance issue/evidence +before candidate experiments, then validate operators, complete media quality and +end-to-end service as required. No hardware feasibility or quality PASS follows +from package tests or this procedure alone. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/overview.md b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/overview.md new file mode 100644 index 000000000..06e94be21 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/overview.md @@ -0,0 +1,74 @@ +# Five inference repositories as English skills + +The package turns five pinned official source snapshots into **operating knowledge**: where to look, what can be changed, which choices interact, what can invalidate correctness, and how to verify a proposed optimization. It includes complete English procedures and supporting resources. + +The main design lesson is to organize knowledge by **work unit, state ownership, scheduling, memory, communication and validation**, then map it to each engine. vLLM and SGLang provide deep examples of token execution and serving; the two Omni repositories add model-specific stage composition and heterogeneous output lifecycles. Strata adds heterogeneous MoE placement, expert memory and speculative execution. The boundaries overlap, and supported paths must be verified at a specific revision. + +## Start here + +For a new model/hardware pair, first follow [model-aware preparation](model-aware-preparation.md) +for independent model/framework/task/modality/mechanism discovery, native reference +selection and complete weight/residency accounting. Model-specific procedures, +inventories and comparisons stay with their repository owners; for MiniMax-H3, +use the [h3.c residency audit](../../../../systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md). +The five original source snapshots below remain independent imports; the +preparation procedure does not change their provenance or establish new runtime +compatibility. + +| Repository | Knowledge emphasized | Skill | +|---|---|---| +| Strata | Heterogeneous MoE, CPU/GPU placement, memory and speculation | [Skill](../../../../systems/engines/strata/SKILL.md) | +| vLLM | Token/admission/input budgets, KV ownership and prefix reuse, scheduler/runner/attention, parallel serving | [Skill](../../../../systems/engines/vllm/SKILL.md) | +| SGLang | Scheduler and cache reuse, Radix/HiCache, prefill/decode and parallelism, extension and tuning | [Skill](../../../../systems/engines/sglang/SKILL.md) | +| SGLang-Omni | Pipeline/stage runtime, scheduler IO boundary, stream/backpressure/transport, model integration | [Skill](../../../../systems/engines/sglang-omni/SKILL.md) | +| vLLM-Omni | Fixed topology vs deploy resources, stage affinity/connectors, AR/diffusion modes, output/state contracts | [Skill](../../../../systems/engines/vllm-omni/SKILL.md) | +| Collection router | Cross-engine reasoning and a unified constrained search workflow | [Skill](../SKILL.md) | + +## What to learn across repositories + +| Design question | Transferable knowledge | Important boundary | +|---|---|---| +| What is scheduled? | Requests, prefill chunks, decode tokens, speculative work, media chunks or diffusion steps | A bigger batch flag does not establish model support for that schedule unit | +| Who owns state? | Request lifecycle, KV blocks, prefix references, RNG, intermediate tensors and stage/replica affinity | Abort, preemption, reuse and streaming cannot discard or replay arbitrary state | +| What is the memory budget? | Weights + KV/model state + activations + workspace + transfer buffers + graph pools | Device utilization percentages alone do not prove feasibility; include host memory and lifetimes | +| Where is the bottleneck? | Admission/queue, CPU preprocessing, kernels, collectives, cross-stage transfer and output encoding | A local kernel improvement may worsen service p95 or shift the bottleneck | +| What parallelism is legal? | TP/PP/DP/EP and stage replicas; additional model-specific diffusion groups | Names and meanings differ by repository; group/layout and topology constraints matter | +| What is being reused? | Prefix/KV state, embeddings, weights or approximate diffusion intermediate results | Exact reuse and approximation need different validity keys and quality gates | +| How does streaming change execution? | Overlap, chunk size, context windows, readiness, backpressure and completion | First text token is not first usable audio/video; chunk throughput can hide gaps | +| How is improvement proved? | Matched baseline, fixed corpus/output contract, repeated measurements, quality gate and failure record | CPU/mocks cannot certify accelerator or native transport behavior | + +## AI engine generation: three search levels + +1. **Existing configuration**: search settings exposed and supported by the selected model/backend. First remove infeasible combinations, then profile and tune the measured bottleneck. +2. **Implementation changes**: modify a scheduler, cache policy, kernel/backend choice, runner, transfer path or stage boundary while preserving model semantics. Test state, numerical and concurrency contracts before timing. +3. **Research extensions**: introduce new scheduling/transport/decomposition or approximate computation. State new assumptions, comparison baseline and quality budget explicitly. + +Use a constraint system before an optimizer. A candidate is feasible only if it respects hardware memory, communication, supported layouts, model semantics, termination/abort behavior and task quality. Among feasible candidates, compare latency percentiles, throughput, memory and cost. Keep a Pareto frontier where objectives conflict; there is no universal best setting in these artifacts. + +## Snapshot and reuse caveats + +The five HEADs were captured independently. **They are knowledge snapshots, not a tested compatible dependency stack.** In particular, Omni repositories pin/use specific base-engine releases; do not substitute the separately captured base-engine HEAD merely because it is in the same package. + +| Snapshot | Pinned commit | +|---|---| +| strata | [`296b59d2f73c`](https://github.com/Niko1221/Strata/tree/296b59d2f73c8f04a805df29c2fa97655adace78) | +| vllm | [`2521446ac8c9`](https://github.com/vllm-project/vllm/tree/2521446ac8c92937b5a32b7dc2a84ef7fa8e99c5) | +| sglang | [`16176278d018`](https://github.com/sgl-project/sglang/tree/16176278d0180f1a1a578e53e6eef432577876c2) | +| sglang-omni | [`2cfb3b67becb`](https://github.com/sgl-project/sglang-omni/tree/2cfb3b67becb437b70751defe37e63d3af4eedb0) | +| vllm-omni | [`52194f24fa42`](https://github.com/vllm-project/vllm-omni/tree/52194f24fa42e14d1c5e096f4bea4dc7f95cffa1) | + +Existing AREX skills were inspected as prior work and refreshed against source rather than treated as current truth. Examples of drift: vLLM Python requirements and scheduler budgets; SGLang benchmark/cache paths and DP flag meanings; vLLM-Omni's 0.26-to-0.31 quickstart alignment. SGLang-Omni's queue implementation also required checking code beyond a descriptive module title. Exact source evidence and refresh boundaries are in the per-repository references. + +## How this used AREX + +Construction follows AREX-Skill `distill-ml-knowledge`: **scope → ground → construct → verify**, using its direct construction strategy, provenance/routing patterns, operating metadata and review criteria. This is a portable candidate preview. The DisCo managed CLI/importer, full environment preparation and GPU acceptance were not executed. See [construction record](import.md) and [verification](import.md). + +Each repository is independently readable, with an entry point and progressively loaded references/sub-skills. The optional collection router links from `workflows/research/inference-engine-research/` to the five engine packages under `repositories/`; preserve that library layout when using the router. No global skill was installed or overwritten. + +## Try it + +```text +From the skill library root, read workflows/research/inference-engine-research/SKILL.md. For a new inference engine, derive a constrained search space from these repositories. Separate existing settings, implementation changes and research extensions. For each dimension give a source anchor, compatibility constraints, correctness tests and measurements. Hardware: [fill in]; model/revision: [fill in]; workload and SLO: [fill in]. +``` + +For one repository, read its SKILL.md directly. The source code and model weights are excluded from the library; immutable source URLs and verification recipes are retained. GPU correctness, native distributed behavior and performance still require the target environment. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/repository-source-scope.md b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/repository-source-scope.md new file mode 100644 index 000000000..f2e27bb8d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/repository-source-scope.md @@ -0,0 +1,94 @@ +# Nine-repository source scope + +This is a finite source-scope snapshot for nine bounded slices inspected on +2026-10-21 and 2026-10-22. Use the linked owners for their complete procedures +and detailed readsets. The Reference Matrix owns maintained provenance and +extraction coverage; the SearchSpace Matrix owns maintained resource × stage +coverage. This snapshot does not track live integration or validation progress. + +## Pinned sources + +| Repository | Distillation source revision | Preserved independent sources / boundary | +|---|---|---| +| DeepInfer | [`8b16149741a4935e1dec8cea27853f273b374c5b`](https://github.com/deepseek-ai/DeepInfer/tree/8b16149741a4935e1dec8cea27853f273b374c5b) | Apache-2.0 parent; six vendor pins/licenses and unexpanded nested gitlinks remain separate. The reading archive omits nine media assets and leaves ten nested gitlinks unexpanded; this is not a complete whole-tree audit. | +| ComfyUI | [`b1a247c9cf9dbfda4b2c0a0c1d50950667eeaa0c`](https://github.com/Comfy-Org/ComfyUI/tree/b1a247c9cf9dbfda4b2c0a0c1d50950667eeaa0c) | GPL v3; old AREX `comfy-ui` snapshot is reference input, not equivalent source evidence. | +| llama.cpp | [`707616feb5f379e99ff7442680a55b4a1704c7c9`](https://github.com/ggml-org/llama.cpp/tree/707616feb5f379e99ff7442680a55b4a1704c7c9) | MIT; older loading/host source `3e390af18de1131dda27913c00511725b4274c8a` retains its own scope. | +| MLX | [`bff10220c742907f0c68e55ff174aaea56f74e3d`](https://github.com/ml-explore/mlx/tree/bff10220c742907f0c68e55ff174aaea56f74e3d) | MIT / Apple attribution; framework source is independent of MLX-LM application source. CPU/Metal/CUDA implementations are distinct. | +| MLX-LM | [`ab7f7048dc341ced2d84b1887eeb17d60b0d1b02`](https://github.com/ml-explore/mlx-lm/tree/ab7f7048dc341ced2d84b1887eeb17d60b0d1b02) | MIT / Apple attribution; compatibility with the independently captured MLX pin is unverified. Model-specific caches are not one universal KV type. | +| Diffusers | [`aea7b70be0f594bcdc15a6f2677ee2ca85e49e8e`](https://github.com/huggingface/diffusers/tree/aea7b70be0f594bcdc15a6f2677ee2ca85e49e8e) | Apache-2.0 attribution; existing CUDA group-offload guidance stays at `efe46a5b177af67c64b3666da8ddddac7ee12163`. The selected slice is invocation state. | +| stable-diffusion.cpp | [`b13a48219d5cdf408edcb93da6cd69b612ed03d3`](https://github.com/leejet/stable-diffusion.cpp/tree/b13a48219d5cdf408edcb93da6cd69b612ed03d3) | MIT / leejet; 18 bounded readset paths plus one separately identity-checked README, totaling 19 blobs matched to pinned Git tree IDs and sizes. model_manager.h was limited to selected owner/state fields and symbols. The README is not an implementation read; complete archive/submodule bytes are not authenticated. Matching GGML/private headers remain required. | +| SGLang | [`df13d5dce31abfeff0e701a62e8c39a136758e6c`](https://github.com/sgl-project/sglang/tree/df13d5dce31abfeff0e701a62e8c39a136758e6c) | Apache-2.0 plus retained FastVideo/Diffusers origins; this is `multimodal_gen`, not SGLang-Omni. Old LLM owner `16176278d0180f1a1a578e53e6eef432577876c2` and HiCache peer `f7ad4345b86d147a1c3095a3cebabca9a33ebaa1` remain independent. | +| vLLM-Omni | [`18c3bd5d2d4323bc7adca1ac3c465c4a53bbfb6e`](https://github.com/vllm-project/vllm-omni/tree/18c3bd5d2d4323bc7adca1ac3c465c4a53bbfb6e) | Apache-2.0 / vLLM-Omni and vLLM attribution; original engine guide at `52194f24fa42e14d1c5e096f4bea4dc7f95cffa1` is preserved rather than silently repinned. | + +For the four supplemental sources, a manifest-selected blob check is not a +whole-tree byte check. Diffusers, SGLang and vLLM-Omni retain that explicit +selected-file limitation. stable-diffusion.cpp additionally carries its separate +19-blob identity check, including the separately checked README. Those checks +do not certify unexpanded dependencies. + +## Per-repository scope and owner + +Each link names a canonical packaged owner. Similar terminology does not make +their work units, state or completion contracts interchangeable. Existing +loading, host-placement and offload references retain their independent pins. + +| Repository | Canonical owner | Selected mechanism | Deferred or excluded | +|---|---|---|---| +| DeepInfer | [DeepInfer owner](../../../../systems/engines/deepinfer/bound-windowed-attention-replay/SKILL.md) and [verification budget](../../../../systems/engines/deepinfer/budget-speculative-verification/SKILL.md) | Dependency-closed bounded query replay with separately preserved full state; gated ring margins; verification-row budgeting, draft/verify cost separation and CPU/GPU confidence-round ownership | No native equivalence or sampling-correctness run; model-specific dimensions, vendor/kernel bodies, in-flight preemption safety and backend parity. | +| ComfyUI | [ComfyUI owner](../../../../systems/engines/comfy-ui/SKILL.md) | Dependency-complete output identity versus object identity/retention; lazy consumers and external fingerprints; wrapper/patch identity versus partial/full weight release | Full executor/cache suites, third-party custom nodes, provider storage, native dynamic allocator, model families, device/quality/performance. No LLM KV or storage-tuning claim. | +| llama.cpp | [llama.cpp owner](../../../../systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md) | Partial ubatch progress and memory-specific rollback; frontend graph compatibility plus fresh inputs/readiness; task/slot/prompt retention and cancellation boundary | Native context/server replay tests; recurrent/hybrid generalization; backend capture/kernel behavior; loading, quantization, full stream sessions and model quality. | +| MLX | [MLX owner](../../../../systems/frameworks/mlx/lazy-evaluation-stream-lifetimes/SKILL.md) | Graph construction/evaluation/availability; stream fence/event dependencies; backend buffer retention after graph detach | MLX execution on any backend; allocator internals, compile/fusion, numerical operator coverage, distributed execution and model/service qualification. Does not own LLM request/cache policy. | +| MLX-LM | [MLX-LM owner](../../../../systems/engines/mlx-lm/generation-cache-lifecycle/SKILL.md) | Prefill/decode lookahead boundaries; pending/prompt/generation UID and aligned rows; model/token prefix identity, copy/trim/retention; cooperative stop | Native/model/HTTP tests; model-specific cache families, full speculation/VLM/distributed semantics and combined MLX compatibility. No paged/radix allocator inference. | +| Diffusers | [Diffusers owner](../../../../systems/frameworks/diffusers/diffusers-invocation-state/SKILL.md) | Flux wrapper/component identity and `from_pipe` sharing; selected FlowMatchEuler scheduler reset/index progression; interruption and normal output tail | Real scheduler/pipeline test, serving caller serialization, other pipeline/scheduler classes, exception cleanup, offload implementation and image quality. No framework-wide thread-safety verdict. | +| stable-diffusion.cpp | [stable-diffusion.cpp owner](../../../../systems/engines/stable-diffusion-cpp/audit-sd-cpp-residency/SKILL.md) | Native image entry path; managed weights/runtime budget versus device headroom; protected segment pin/preparation, optional prefetch and synchronized activation/cleanup | Matching unexpanded GGML/private headers, model-specific numerical runner chain, device memory/async behavior, graph-cut algorithm, complete loader I/O, video/audio/server. CPU bypasses decisive accelerator gates. | +| SGLang | [SGLang owner](../../../../systems/engines/sglang/audit-sglang-diffusion-lifetimes/SKILL.md) | Default ParallelExecutor and entry/cleanup intervals; component retention and request-tail prefetch; mutable numerical scheduler aliases/dedup copies; timeout/job deletion versus device completion | Concrete offload strategies, pool/disaggregation, realtime/rollout, complete CUDA IPC exception lifetime, model kernels and native quality/performance. Existing LLM/Radix/HiCache is not repinned. | +| vLLM-Omni | [Existing validation owner](../../../../systems/engines/vllm-omni/sub-skills/omni-validation/SKILL.md) and [abort scope](../../../../systems/engines/vllm-omni/sub-skills/omni-validation/references/abort-acknowledgment.md) | Abort submission versus correlated logical receipt versus queued per-replica transfer reclamation; partial AR output/processor commit; waiter/late-result ownership; post-submit wait timeout excludes blocking submission | Native abort guarantee, connector internals, every serving wrapper, full duplex/session lifecycle, all-device reclaim, model/media semantics and service/performance. | + +## DeepInfer state and sampling boundary + +The [comparison](cross-repository-mechanisms.md#deepinfer-contracts-that-constrain-transfer) +separates compact query rows from preserved full-layout hidden state and +historical main/index KV. Ring margins depend on the outer extra-state flag +and the inner truncation gate. The verification-row floor is an allocation +contract, not an accepted-draft-token guarantee. CPU total-budget selection, +per-request allocation and GPU worker correction consume different available +confidence rounds. G3 fixes the historical global budget, the same proposal’s +legal cumulative prefix through position i and other allocation state before +perturbing its later confidence; inclusion of i must then stay unchanged. +Changing historical N−2 rates may legitimately change the global budget. +A causal violation may bias sampling and requires the complete-distribution +check below. + +The verification owner retains distinct validation gates: V3 checks exact +cumulative products of conditional per-position inputs, preserving inputs +already expressed cumulatively; G5 measures the complete emitted next-token +distribution, including rejection/residual sampling; G7 uses accepted tokens +over total elapsed time including draft work. Multiplying estimates establishes +neither statistical independence nor calibration. Source guards and release +ordering constrain reachable paths; a missing runtime experiment does not +establish a preemption race or a known defect. + +## Validation boundary + +For the newly distilled mechanisms, N = native engine/framework/backend +behavior, M = real-model correctness or quality, S = service behavior, and +P = performance or efficacy. + +| Slice | N | M | S | P | Separate bounded evidence | +|---|---|---|---|---|---| +| DeepInfer | not_run | not_run | not_run | not_run | Source and unexecuted test assertions | +| ComfyUI | not_run | not_run | not_run | not_run | Seven checks passed on the unchanged complete pure-Python graph_utils module; see the [owner boundary](../../../../systems/engines/comfy-ui/references/validation-boundaries.md). This does not cover executor, cache-signature, model or allocator behavior. | +| llama.cpp | not_run | not_run | not_run | not_run | Source and unexecuted test assertions | +| MLX | not_run | not_run | not_run | not_run | CPU, Metal and CUDA execution remain separately unqualified | +| MLX-LM | not_run | not_run | not_run | not_run | Selected test classes load external model fixtures | +| Diffusers | not_run | not_run | not_run | not_run | Source observations; a real CPU scheduler cycle is a proposed check | +| stable-diffusion.cpp | not_run | not_run | not_run | not_run | Selected source-identity/static checks; CPU bypasses decisive accelerator gates | +| SGLang | not_run | not_run | not_run | not_run | Source and unexecuted test assertions; mocked assertions do not qualify native paths | +| vLLM-Omni | not_run | not_run | not_run | not_run | Source and unexecuted test assertions; synthetic clients do not qualify backend reclamation | + +Catalog/resource/package checks establish knowledge delivery, not engine +correctness, model quality, service behavior or speed. Source presence, a +candidate procedure, native correctness and service performance are distinct +claims. Applying a transfer hypothesis requires the matching implementation, +fixtures and relevant backend; no comparable cross-repository benchmark or +compatibility result is established by this snapshot. diff --git a/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/source-manifest.json b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/source-manifest.json new file mode 100644 index 000000000..e60de8ff8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/inference-engine-research/references/source-manifest.json @@ -0,0 +1,52 @@ +{ + "date": "2026-10-14", + "method_repo": "VectorSpaceLab/AREX-Skill", + "method_commit": "ac3fe1afa80fb9a09775ecfb2b6cc3ba850a2db6", + "sources": [ + { + "skill": "strata", + "repository": "Niko1221/Strata", + "commit": "296b59d2f73c8f04a805df29c2fa97655adace78", + "license": "MIT", + "locally_verified": false + }, + { + "skill": "vllm", + "repository": "vllm-project/vllm", + "commit": "2521446ac8c92937b5a32b7dc2a84ef7fa8e99c5", + "license": "Apache-2.0", + "locally_verified": false + }, + { + "skill": "sglang", + "repository": "sgl-project/sglang", + "commit": "16176278d0180f1a1a578e53e6eef432577876c2", + "license": "Apache-2.0", + "locally_verified": false + }, + { + "skill": "sglang-omni", + "repository": "sgl-project/sglang-omni", + "commit": "2cfb3b67becb437b70751defe37e63d3af4eedb0", + "license": "Apache-2.0", + "locally_verified": false + }, + { + "skill": "vllm-omni", + "repository": "vllm-project/vllm-omni", + "commit": "52194f24fa42e14d1c5e096f4bea4dc7f95cffa1", + "license": "Apache-2.0", + "locally_verified": false, + "supplements": [ + { + "commit": "18c3bd5d2d4323bc7adca1ac3c465c4a53bbfb6e", + "license": "Apache-2.0", + "date": "2026-10-22", + "scope": "Abort acknowledgment/cleanup supplement only; not a compatibility range with the original guide.", + "locally_verified": false + } + ] + } + ], + "profile": "AREX direct portable knowledge; no DisCo managed import or accelerator certification" +} diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory.md new file mode 100644 index 000000000..4e99c29f3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory.md @@ -0,0 +1,221 @@ +--- +name: npu-skill-factory +description: 'Design and operation of the InferRSI NPU skill factory: artifact lifecycle, skill evaluation contract, corpus selection, hide-and-re-distill procedure, and skill evolution cycle. Use when deciding where new skill artifacts belong, how to distill a candidate skill, or how to run the No-Skill vs Human-Skill vs Distilled-Skill comparison. + + ' +metadata: + inferrsi: | + { + "schema_version": 1, + "status": "candidate", + "sources": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "verification": { + "locally_verified": false, + "evidence_level": "source_grounded", + "note": "Historical repository extraction and sibling schema at 82218b4, not a current local factory implementation. Reviewed paper additions and exact versions live in references/papers-20261015/references/readset.md and docs/reference-matrix.md; no efficacy or paper-to-code equivalence established." + }, + "applicability": { + "scope": "InferRSI skill lifecycle management", + "prerequisites": "Current candidate inventory and source/evaluation evidence; historical sibling execution interfaces are not required for read-only artifact admission", + "input_contract": "A candidate inventory plus the source and evaluation evidence for each candidate skill; read-only artifact admission needs no historical sibling execution interface", + "produced_artifact": "An admitted or refused skill candidate with its source, evidence and limitation record, and its stable id and owning path", + "failure_modes": [ + "A candidate admitted on an inventory line without source or evaluation evidence", + "A stable id or path assigned twice across owners", + "Indexing or admission reported as validation or promotion", + "Paper-to-code equivalence asserted without a pinned readset" + ], + "refusal_point": "Refuses admission when a candidate has neither source evidence nor a declared evaluation state, and records the refusal instead of leaving the field blank" + }, + "recommendations": [ + "Read the methodology counterexamples in references/papers-20261015/cases/ before admitting a candidate derived from a paper.", + "Keep the source snapshot revision as research evidence; it is not a campaign default.", + "Record an unvalidated candidate as candidate with not_run rather than omitting the state." + ], + "tags": [ + "skill-factory", + "distillation", + "evaluation", + "npu", + "ascend" + ], + "profile": "local-skill-v1", + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "limitations": [ + "Source-derived candidate; no local efficacy validation." + ], + "provenance_readsets": [ + "references/papers-20261015/cases/methodology-counterexamples.md", + "references/papers-20261015/COMPARISON.md", + "references/papers-20261015/INTEGRATION_NOTES.md", + "references/papers-20261015/knowledge/evidence-routing.md", + "references/papers-20261015/QA.md", + "references/papers-20261015/README.md", + "references/papers-20261015/references/learning-to-commit.md", + "references/papers-20261015/references/protocol-details.md", + "references/papers-20261015/references/readset.md", + "references/papers-20261015/references/repo-to-skill.md", + "references/papers-20261015/references/skillopt.md", + "references/papers-20261015/references/trace2skill.md", + "references/papers-20261015/UNREAD_LEADS.md", + "references/papers-20261015/updates/bounded-updates.md" + ], + "consumption_mode": "packaged", + "searchspace_not_applicable": "SKILL.md §§ Choose the evidence product, Artifact lifecycle, and What this skill does not do define skill-distillation/evaluation methodology; NPU task tiers are evaluation prerequisites, not a hardware-resource mechanism." + } +--- + +# NPU Skill Factory Design + +Status: candidate. A Tier A pilot was reported by the sibling workstream on +2026-10-14; it was not integrated or rerun here. This skill supplies methodology, +not an implemented factory or automatic promotion pipeline. + +## Choose the evidence product + +Choose a case, reusable knowledge, bounded amendment or new skill according to +scope and workflow ownership. A new source need not create a new skill; a distinct +trigger, procedure and output can justify one. The +[evidence-routing note](references/papers-20261015/knowledge/evidence-routing.md), +[comparison](references/papers-20261015/COMPARISON.md), +[counterexamples](references/papers-20261015/cases/methodology-counterexamples.md) +and [exact paper readset](references/papers-20261015/references/readset.md) +retain the approved paper-level reasoning alongside the older repository pins. + +Keep source fidelity, static usability, execution correctness, behavioral efficacy +and transfer evidence separate. Construction, selection, deployment-context and +downstream costs need distinct denominators; a library entry or upstream score +is not local promotion. Source limitations and unrun checks remain explicit. + +Current candidate bundles live under `src/inferrsi/knowledge/data/skill_library///`, +with linked references and cases under their owning skill. The library's +`skill-index.json` maps stable skill names to those category paths. Exactly two primary matrices record provenance +and coverage. Do not invent a paper Git SHA or force these notes into a repository +knowledge-record schema that requires implementation fields they cannot supply. +The CLI explicitly reads metadata, instructions and resources; it implements no +factory, automatic routing or updater. Manual integration is not an AREX/DisCo run. + +## Artifact lifecycle + +The following lifecycle and schema are historical design references from the +sibling workstream and PR #9, not current implemented repository contracts. +Use the current candidate layout above for integration; historical evaluation +examples neither launch work nor set universal promotion thresholds. + +``` +1. Raw/preflight evidence + ↓ (exploration, repo cloning, index extraction — read-only) +2. Imported / distilled source material + ↓ (knowledge JSON records in repo_packs/, skill_library/ entries) +3. Candidate skill (SKILL.md + schema-validated bundle) + ↓ (3-5 candidates from a distillation run; status: candidate) +4. Skill evaluation + ↓ (No-Skill vs Human vs Distilled comparison on held-out tasks) +5. Promoted executable skill (in skills/) + ↓ (only after a passing evaluation campaign with PASS evidence) +6. Evolution (bounded edit → re-evaluation → accept/reject) +``` + +**Promotion rule:** directory placement does not establish promotion. The current +`skill_library/` tree includes explicitly labeled candidates. A candidate without an +authorized evaluation trail remains unvalidated regardless of packaging. + +**Where each artifact belongs:** + +| Artifact | Location | Format | +|----------|----------|--------| +| Knowledge records (experience) | `src/inferrsi/knowledge/data/skill_library/records/.json` | Validated JSON (catalog.py schema) | +| Bilingual skill library | `src/inferrsi/knowledge/data/skill_library/en//` and `zh-CN//` | SKILL.md + references/ + scripts/ | +| Skill bundle (distillation output) | `evidence//plan/agent-source-candidates/` | schema-validated JSON bundle | +| Human reference skill | `evidence//plan/human-/SKILL.md` | SKILL.md + references/ | +| Candidate skill under evaluation | `evidence//plan/agent-source-candidates//` | SKILL.md + references/ | +| Promoted skill | `skills//SKILL.md` (including metadata) | InferRSI skill format | +| Skill evaluation evidence | `evidence//results/` | per InferRSI evidence tree | + +Source: PR #9 `skill_library/` layout (source-grounded, pr/9 @ 4ad551a9); +sibling workstream `evidence/skill-bootstrap-20261014/` (observed @ 82218b4). + +## Design detail (historical, not implemented here) + +The full historical design records — the sibling bundle schema +(`schemas/skill-bundle.json`, not present in this repository), the selected +NPU corpus with license status, the Stage 3.4 hide-and-re-distill procedure +(its `omnirsi.harness.skill_distill` entrypoint is a sibling-workstream +prototype, also not in this repository), the Stage 3.5 three-variant evaluation +contract with its SkillOpt-derived accept criterion, the revision-lineage +layout and the Phase 1 evolution cycle — live in +[skill-factory-design-20261014.md](references/skill-factory-design-20261014.md), +preserved with their sources and the two sibling-prototype entrypoints annotated. + +Boundaries that still hold from that design: + +- The sibling pilot (one Tier A task, all three variants passing) established no + statistical difference; promotion remains INCONCLUSIVE. +- Tier A tasks are CPU/static only; Tier B tasks require an NPU device. +- Do not promote based on token cost alone; record skill build cost separately + from per-task runtime benefit. + +## Where to go next after Phase 1 + +Once the evaluation contract is validated on ≥1 Tier A task with ≥3 tasks and +≥2 repetitions: + +1. Add Tier B tasks (require a real NPU environment — REMOTE). +2. Expand corpus from `raw_npu_repos_metadata_only` in `preflight.json`: + priority order is Ascend/pytorch, then op-plugin, then triton-ascend, then msit. + Do not clone all four at once; state the capability/question first. +3. Implement harvest-from-real-agent-traces (SkillOpt Sleep cycle pattern). +4. Wire the skill router to select skill by detected repository type and task tier. + +## What this skill does not do + +- It does not claim that any distilled skill works on a real NPU — all current + evaluation is Tier A (CPU/static). +- It does not establish statistical significance from the current pilot. +- It does not manage the catalog or automatically route agents to skills. +- It does not provide the skill library management framework — that is PR #9. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/COMPARISON.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/COMPARISON.md new file mode 100644 index 000000000..b6bd3d37c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/COMPARISON.md @@ -0,0 +1,28 @@ +# Comparison: choose the artifact before choosing the learning method + +All destinations below are P, candidate/not_run. The underlying F records and exact paper locators are in the linked ledgers. + +| Source | Distinct evidence contribution beyond the prior repository summaries | Best-fit artifact decision | Main boundary | +|---|---|---|---| +| [Repo-To-Skill v1](references/repo-to-skill.md) | Distinguishes source-anchored construction from task-conditioned pools; verification and construction cost are separate from downstream score | Existing factory's evidence/admission contract; retain a source-local case when the reusable workflow is not established | The benchmark gains are not a controlled test of the entire public repository library | +| [Learning to Commit v1](references/learning-to-commit.md) | A historical expert patch is a contrastive reference for the agent's own attempted change | Repository-scoped persistent knowledge, or a revision/deprecation of an existing convention | Chronology prevents the specified adaptation leakage, not every possible contamination path; accepted code is not necessarily the unique correct solution | +| [Trace2Skill v5](references/trace2skill.md) | Separates causally investigated errors from successful procedures; studies interactions among patches | Consolidated procedural knowledge and a candidate update to an existing skill | Faster parallel construction is not proof of lower aggregate compute or reliable routing to the skill | +| [SkillOpt v2](references/skillopt.md) | Separates proposed edits, accepted skill state, rejected-edit history, and optimizer-only memory | A bounded change proposal with an independent acceptance decision | Selection improvement is neither a formal generalization guarantee nor a permission to deploy | + +## P — Artifact selection rule + +- **Case:** preserve a bounded observation when the source is singular, applicability is uncertain, the explanation is unverified, or a negative example is most informative. Store the original outcome and alternatives; do not silently turn it into a universal instruction. +- **Persistent knowledge:** retain a stable source contract or a supported reusable relationship. State repository/model/harness/version scope and evidence strength. A procedural claim can remain knowledge until a reliable trigger and validation contract exist. +- **Bounded update:** choose this when a current skill already owns the workflow and the evidence supports a specific correction. Identify the exact incumbent version, target passage, expected behavioral change, possible regressions, and rollback. No current body means no literal patch application. +- **New skill:** choose this only for a separately triggerable, materially distinct workflow with inputs, procedure, constraints, outputs, and checks. A new paper, repository, or failure does not by itself justify a new skill. +- **No promotion:** keep the item as a case or knowledge record when causality, scope, source integrity, or the evaluation signal is insufficient. + +## P — Reconciliation rather than a universal winner + +Broad offline consolidation and cautious incremental editing solve different problems. Use consolidation to assemble a coherent candidate from an independent evidence pool. Use bounded updates to preserve an incumbent whose value is already known. The combination is a proposal here; none of these four papers establishes that this combined policy is optimal for InferRSI. + +A historical merge, static documentation check, execution correctness check, held-out behavioral win, and cross-model transfer result answer different questions. Keep separate fields for each rather than a single “verified” flag. Make source availability and empirical validity independent of whether an artifact has been extracted. + +## P — Cost decision + +Record construction cost, candidate-selection cost, deployment context cost, and downstream task cost separately. Amortization is a workload hypothesis: benefit across future uses must exceed one-time construction plus repeated context/selection cost. Faster wall time, a small exported file, or fewer accepted edits alone does not establish that inequality. This pack does not select an optimizer, compute budget, or hardware target. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md new file mode 100644 index 000000000..da20f6109 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md @@ -0,0 +1,51 @@ +> Supplier integration proposal, preserved as historical source context (2026-10-15). The local owner review and current two matrices govern acceptance; suggested follow-ups and permission statements below do not authorize work or describe the current inventory. + +# Pack E integration notes + +Status: **candidate / not_run**. Independent paper-first deliverable, not a repository change. + +## What is incremental + +The prior work already names repository-memory construction, repo-to-skill lifecycle, Trace2Skill consolidation and bounded skill evolution. This pack adds original-paper evidence about what those mechanisms actually establish, their costs, their counterexamples, and the boundary between a case, knowledge, candidate construction and accepted update. It does not restate source-file pipeline maps or declare them absent. + +## Proposed integration destinations + +| Deliverable | Existing artifact target | Decision | +|---|---|---| +| [Evidence-routing knowledge](knowledge/evidence-routing.md) | `npu-skill-factory` references; link from `skill-evolution-playbook` | Reconcile as shared methodology knowledge, not a new factory/tool | +| [E-C1 and E-C4](cases/methodology-counterexamples.md) | Existing factory/evolution case references | Preserve task-condition and output-contract exceptions | +| [E-C2](cases/methodology-counterexamples.md#e-c2--better-repository-familiarity-can-produce-unnecessary-caution) | `repository-evolution-analysis` references | Repository-scoped convention-expiry case | +| [E-C3](cases/methodology-counterexamples.md#e-c3--fixing-targeted-failures-can-break-unrelated-successes) | `skill-evolution-playbook` references | Interaction/regression case | +| [E-U1–E-U5](updates/bounded-updates.md) | Existing skills identified per proposal | Compare latest bodies, retain only missing amendments; do not apply these as blind patches | +| [Four paper ledgers](COMPARISON.md) and [readset](references/readset.md) | `docs/reference-matrix.md` **§2 Methodology and corpus references** | Add paper versions/read scope as evidence alongside the prior repository pins | + +The existing target paths above are handoff-indexed. Their current bodies and verified public URLs were unavailable; no fabricated remote artifact link is supplied. The linked files in this pack are complete incremental artifacts. Preserve that availability distinction during integration. + +The only other primary matrix remains `docs/searchspace-matrix.md`. No methodology rows are forced into Accelerator/RAM/SSD/Communication/OS coverage. This handoff table is not a third primary matrix. The older independent bundle's `docs/repo-source-matrix.md` spelling is superseded by the uploaded Reference Matrix's authorized `docs/reference-matrix.md` path. + +## Interface with separate Pack F + +Pack F is a separate artifact supplied by the parent workstream, not a source mined here. Its adaptation-unit semantics can answer *what changes* (for example, a policy/search configuration or other bounded state). Pack E's admission decision answers *what evidence product to retain* and *what can justify altering an incumbent*. Match those two decisions before integration; do not turn a search candidate into a skill merely because it is persistent. Use the artifact names `Pack F` and `Pack E` across separate archives rather than relative file links that will break. Pack E makes no independent claims about Pack F's papers or results. + +## Non-negotiable evidence boundaries + +- Every local artifact remains candidate/not_run; author results remain author-reported. +- This pack proposes bounded updates rather than new skills because the known artifact ownership overlaps; GLM should reconcile current bodies before applying. This is a pack-specific choice, not a general gate against candidate-skill growth. +- No replay, installation, task execution, generated optimizer, framework, CLI change, matrix edit, promotion, commit or PR occurred. +- No AREX/DisCo execution claim. Prior manual repo-to-skill-inspired work is not an AREX run. +- No new claimed NPU capability or hardware coverage follows from these methodology papers. +- Full source copies and parsing scratch files are outside this delivery tree. + +## Integration follow-ups, not queued work + +1. Obtain the current bodies and hashes of the existing methodology skills and named pipeline indexes; only then convert a missing semantic amendment into a literal diff. +2. If a concrete reproducibility decision later requires it, reconcile the paper versions with the four already-known repository pins and author run artifacts. Do not clone or re-audit everything by default. +3. Resolve SkillOpt's split and cost-denominator discrepancies using author artifacts only if cost/protocol choice depends on them. +4. Request an authorized evaluation scope if behavioral efficacy, transfer to another model/harness, or promotion becomes the actual task. Define a task contract and suitable held-out/regression evidence then; this pack does not launch or prescribe a reproduction campaign. +5. Inspect other papers or additional frameworks only under a later gate. None is adopted as extra evidence in Pack E. + +A separately labeled [unread literature lead](UNREAD_LEADS.md) is provided without adding it to the extracted evidence. + +## Delivery QA + +Static editorial review covers paths, status labels, source versions, F/P separation, and correspondence between proposed amendments and inspected paper evidence. It does not establish runtime behavior or skill efficacy. See [QA.md](QA.md) for the final check result. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/QA.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/QA.md new file mode 100644 index 000000000..98b62603f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/QA.md @@ -0,0 +1,18 @@ +> Supplier delivery snapshot, 2026-10-15. Packaging checks and inventory below refer to the original pack, not to this relocated integration. Empirical validation remains not_run. + +# Pack E delivery QA + +Status: candidate. Behavioral/runtime validation: not_run. + +Completed 2026-10-15: +- Original arXiv titles, version histories and exact version URLs checked for all four approved papers. +- Methods, experimental controls, resource costs, negative results and reporting inconsistencies inspected against original full text; no author result presented as a local result. +- Source hashes recorded; full texts and parsing scratch files excluded from the deliverable. +- Existing uploaded readsets distinguished from unavailable indexed skill/pipeline bodies. +- All local file-link targets verified after this QA file was created. Original-paper HTML fragment links checked against downloaded HTML IDs. +- Candidate/not_run scope, F/P distinction and no-execution boundary reviewed. +- Known artifact ownership overlaps preserved as bounded amendments; no forced new skill count. +- Methodology routing limited to `docs/reference-matrix.md` §2; `docs/searchspace-matrix.md` remains the only other primary matrix. +- Separate unread literature lead labeled as not opened/not mined; integration follow-ups labeled separately. + +Not performed: repository/source-version reconciliation, method installation or execution, hardware workloads, A/B evaluation, code tests, runtime skill validation, promotion, InferRSI/matrix edits or publication. This QA is editorial and structural, not independent empirical verification. Independent review corrected the MLE running-budget unit to GPU-hours per task and required explicit PassNet metric denominators/tolerance; both corrections are incorporated. Further parent-workstream review may add corrections before delivery. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/README.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/README.md new file mode 100644 index 000000000..5ea25660f --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/README.md @@ -0,0 +1,24 @@ +> Supplier delivery snapshot, 2026-10-15. Packaging checks and inventory below refer to the original pack, not to this relocated integration. Empirical validation remains not_run. + +# Pack E — Evidence into repository memory and bounded skills + +Status: **candidate**. Validation: **not_run**. Paper-first extraction, 2026-10-15. + +**Recommendation:** use the evidence's generality and validation status to choose a case, persistent knowledge, a bounded update, or a new skill. These are different products, not successive mandatory stages. This pack proposes additions to existing methodology artifacts rather than another skill-factory framework. + +Read in order: +1. [Comparison and decision](COMPARISON.md) +2. [Exact readset and prior-work availability](references/readset.md) +3. [Evidence-routing knowledge](knowledge/evidence-routing.md) +4. [Counterexample cases](cases/methodology-counterexamples.md) +5. [Bounded update proposals](updates/bounded-updates.md) +6. [Integration notes](INTEGRATION_NOTES.md) +7. [Separate unread literature lead](UNREAD_LEADS.md) + +[Protocol details and retained baselines](references/protocol-details.md) complement the compact ledgers. + +Paper ledgers: [Repo-To-Skill](references/repo-to-skill.md), [Learning to Commit](references/learning-to-commit.md), [Trace2Skill](references/trace2skill.md), [SkillOpt](references/skillopt.md). + +F identifies directly inspected source statements or author-reported measurements. P identifies this pack's proposed operational rules, interpretation, or verification requirements. An author's successful run is not local validation. Proposal acceptance is not execution permission. + +No repository implementation was re-mined; no AREX/DisCo, LearningToCommit, Trace2Skill, or SkillOpt execution occurred. No installation, evaluation run, reproducibility package, framework, runtime tool, InferRSI edit, matrix edit, commit, or PR is included. Source copies stay outside this deliverable. A new standalone SKILL.md is deliberately not emitted: the existing artifact names already cover these workflows, and their current full bodies were unavailable for a defensible duplication check. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md new file mode 100644 index 000000000..5f797ae50 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md @@ -0,0 +1,7 @@ +# Unread literature lead — separate from the approved extraction + +This lead is not evidence for Pack E. Its original paper was not opened, its latest version was not checked, and no implementation was inspected. Following it requires a later scope decision. + +- **SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks**, arXiv **2602.12670**. The title and identifier are listed in [Trace2Skill v5's bibliography](https://arxiv.org/html/2603.25158v5#bib.bib2), which links the [original-paper landing page](https://arxiv.org/abs/2602.12670). Potential next question: which task, agent and skill conditions make a candidate useful or harmful, and what evidence would justify its validation contract? This is a complementary evaluation lead, not a basis for claiming any benchmark result here. + +Integration follow-ups (current skill bodies, repository-version reconciliation and unresolved denominators) are listed separately in [INTEGRATION_NOTES.md](INTEGRATION_NOTES.md). They are not additional literature sources. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md new file mode 100644 index 000000000..ffe6265b3 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md @@ -0,0 +1,51 @@ +# Candidate cases: where seemingly useful rules fail + +Status: candidate. Local validation: not_run. These are paper-reported historical cases, not InferRSI executions. P sections are proposed interpretations and boundaries. + +## E-C1 — A useful default becomes an unjustified ban + +**F locator:** Repo-To-Skill [Appendix A.2.4, paired verification and refinement](https://arxiv.org/html/2609.02749v1#A1.SS2.SSS4.Px3), Table 6. + +**F case:** PassNet refinement encountered a special convolution structure that could undermine a blanket preference for vendor operators. The authors changed an absolute prohibition into an exception-sensitive prior. Construction-stage arithmetic mean fell (.9566→.7492) while geometric mean (.5352→.6941), median (.7340→.7941), match failures (10→1 of 50), and solve time (40→22 minutes) improved. These construction trials used DeepSeek v4 pro/Claude Code, unlike the final GPT-5.5/Codex evaluation. + +**P mechanism:** a generally sensible precaution suppresses exploration after direct structural evidence suggests an exception. Preserve the precaution's conditions and the counterexample rather than deleting either. + +**P proposed action:** revise only the implicated prohibition, retain a correct baseline, require task-specific correctness and outcome evidence before choosing the exception. Do not import the convolution optimization into an NPU skill from this narrative alone. The exact specialized implementation was not inspected here. + +**P acceptance question:** does the narrower rule recover legitimate exceptions without encouraging unsupported rewrites elsewhere? This requires new evidence; the answer is not_run. + +## E-C2 — Better repository familiarity can produce unnecessary caution + +**F locator:** Learning to Commit [§4.3 case study](https://arxiv.org/html/2603.26664v1#S4.SS3.SSS0.Px3), Tables 2–4. + +**F case:** the paper contrasts successful localization of a shared-RNG issue with a training-step fix where skill-guided work retained a redundant guard. The quantitative seq-bycat condition also has worse line deviation and weak judge preference in the [ledger](../references/learning-to-commit.md). + +**P mechanism:** a historical defensive pattern can be activated beyond its original preconditions. Repository memory is most useful when it retains the reason and boundary for the rule, not only the coding pattern. + +**P proposed action:** keep the historical change as a case until the invariant can be stated precisely. Scope a new convention to the subsystem and condition actually supported. Do not equate a smaller oracle-like patch with functional correctness, and do not infer the private repository's exact code from the narrative. + +**P acceptance question:** are there both positive examples and cases where applying the rule adds needless behavior? Use both before a broad memory update. + +## E-C3 — Fixing targeted failures can break unrelated successes + +**F locator:** Trace2Skill [§4.3](https://arxiv.org/html/2603.25158v5#S4.SS3), [Appendix C.2](https://arxiv.org/html/2603.25158v5#A3.SS2), Appendix E. + +**F case:** the greedy patch study reports bidirectional task flips, including 57 failure-to-pass against 21 pass-to-failure at one step and 26 against 46 at another. Recurring patch themes also overlap semantically. Individually selected edits did not match whole-pool consolidation in that study. + +**P mechanism:** patch effects interact; a narrowly successful fix can redirect broader agent behavior. Duplicate guidance can change emphasis without adding capability. + +**P proposed action:** evaluate the combined candidate and retain an unrelated-success regression sample. Review semantic overlap and contradictory instructions before writing. Do not infer from this case that all patches should always be merged or that greedy selection is universally inferior. + +**P acceptance question:** what improved, what regressed, and which changes are attributable to the edited instruction rather than stochastic execution? No such test was run in this pack. + +## E-C4 — A scorer-compatible procedure can violate a deployment contract + +**F locator:** SkillOpt [§4.5 spreadsheet case](https://arxiv.org/html/2605.23904v2#S4.SS5), [Fig.4](https://arxiv.org/html/2605.23904v2#S4.F4); Trace2Skill [Appendix I.3 examples](https://arxiv.org/html/2603.25158v5#A9.SS3). + +**F case:** learned spreadsheet guidance includes static-value fallbacks and automation preferences conditioned on benchmark behavior. These examples are reported skill text, not independent proof of suitability for every spreadsheet request. + +**P mechanism:** optimizing the available evaluator can reward a shortcut that is valid for the benchmark but conflicts with a real request for reusable formulas or a particular automation format. + +**P proposed action:** preserve the user's output contract above any learned heuristic. Record the evaluator's view of success and flag dimensions it cannot test. A candidate update must not silently change the requested artifact type. + +**P acceptance question:** would the output still satisfy the user if evaluated outside the benchmark? Treat this as an explicit transfer boundary rather than generic skill quality. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md new file mode 100644 index 000000000..e31628f4e --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md @@ -0,0 +1,51 @@ +# Candidate knowledge: evidence-to-artifact admission + +Status: candidate. Validation: not_run. All rules in this file are P, proposed for reconciliation with existing methodology artifacts. The four [paper ledgers](../COMPARISON.md) provide the F basis; this is a synthesis, not an implementation reproduced from one author. + +## Objective and assumptions + +Retain evidence at the narrowest useful abstraction without losing counterexamples, increasing instruction conflicts, or claiming behavioral improvement that has not been measured. Assume the source identity and its inspected boundary are known. If they are not, retain a lead rather than authoritative knowledge. + +## Decision variables and constraints + +Choose artifact type, scope, owner, applicability trigger, evidence strength, and revision boundary. Constraints are the actual task contract, source version, authorized actions, known counterexamples, and whether the current incumbent can be inspected. Artifact count, repository popularity, and the number of source files are not objectives. + +## Proposed decision procedure + +1. **Identify the evidence unit.** Is it a versioned API/implementation contract, an expert's accepted historical diff, an individual execution, a repeated pattern, or an aggregate controlled evaluation? Do not combine them into an undifferentiated confidence score. +2. **Preserve the case first when necessary.** Capture the input/state, observed behavior, outcome, comparator, and alternatives. Separate direct observation from the proposed cause. A log message alone can identify a lead without establishing the cause. +3. **Determine whether generalization is supported.** A versioned contract may justify scoped knowledge directly. An empirical behavior needs recurrence or an intervention consistent with the proposed cause. A source-local exception can remain a case even when it challenges a general rule. +4. **Check ownership and overlap.** Read the current relevant skill body. If it already owns the trigger and procedure, propose a localized correction or reference. If its body is unavailable, provide a semantic amendment specification and defer literal patching. Do not create a second skill merely to avoid the missing comparison. +5. **Select the smallest durable representation.** Put stable preconditions and decision rules in knowledge; put uncommon examples in cases/references; put broadly reused procedure in an existing skill. Create a new skill only if a distinct workflow remains unowned. +6. **Define acceptance separately.** Static coherence, source fidelity, functional correctness, behavioral improvement, and transfer have separate evidence statuses. A source-derived candidate may be useful before empirical testing, but must keep not_run and unresolved branches visible. +7. **Preserve rejection and expiry.** Record what change was tried, which scope it targeted, why it was rejected, and when the evidence stops applying. Do not generalize “failed here” into a timeless ban. Conflicting newer evidence can narrow, replace, or retire a rule. + +## Required information, not a new schema implementation + +- Source/version and exact evidence locator; read versus inferred status +- Evidence unit and provenance lineage; independent examples versus correlated copies +- Applicable task, repository, model, harness, and environment conditions +- Claimed mechanism and plausible alternative explanation +- Expected benefit plus construction, selection, context, and downstream cost dimensions +- Known negative cases and disallowed extrapolations +- Current artifact owner and proposed operation: retain case, add knowledge, revise, deprecate, or create +- Verification already available versus future checks; outcome stays not_run where appropriate + +These are editorial requirements. This pack does not add a catalog, database, router, evaluator, optimizer, installer, or scheduled update mechanism. + +## Resource benefit and cost + +Potential benefit is less repeated rediscovery and fewer conflicting instructions. Cost includes investigating causes, retaining provenance, deduplicating, and evaluating candidate changes. Selective reading can reduce context burden, but instruction-guided agents may also perform more work. No break-even point is known for InferRSI. + +## Limits and counter-signals + +- More repeated text can reflect shared prompts or duplicated cases rather than independent evidence. +- A maintainer-approved historical patch may encode a temporary compromise rather than a lasting convention. +- A higher aggregate score may hide correctness, task-contract, latency, or subgroup regressions. +- A protected text region helps preserve editing boundaries but can also preserve an outdated rule; it still needs a revision authority and expiry test. +- An edit-count cap does not cap the number of behavioral changes. Inspect the actual replacement and retain a reversible incumbent. +- Test-set separation alone does not prove causal mechanism; matched controls and alternate explanations still matter. + +## Output for this pack + +The justified output is one admission-policy knowledge note, counterexample cases, and bounded update specifications for existing artifacts. No new skill and no empirically promoted update are warranted by the inspected evidence alone. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md new file mode 100644 index 000000000..62c04b3b7 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md @@ -0,0 +1,32 @@ +# Learning to Commit evidence ledger + +F — [Learning to Commit: Generating Organic Pull Requests via Online Repository Memory](https://arxiv.org/abs/2603.26664v1), Li et al.; v1, 2026-03-27, work-in-progress. [Methods](https://arxiv.org/html/2603.26664v1#S3), [experiments](https://arxiv.org/html/2603.26664v1#S4). Prior implementation pin `7e5a1d77` is not independently reconciled with the paper. + +## Mechanism contract + +- **Objective:** repository-aligned future patches. +- **Assumptions:** chronological expert-reviewed commits; parent snapshots; intent-only queries. +- **Variables/constraints:** cutoff, curriculum, memory CRUD; future diffs excluded from onboarding (§3.1–3.4). +- **Mechanism:** attempt historical task before revealing accepted diff; contrast localization/API/style discrepancies; revise or deprecate memory (Eq.1, Fig.1). +- **Resources:** onboarding attempts/reflection plus full memory at solve time; total tokens, time and memory growth unreported. + +## Author-reported evidence + +Claude Opus 4.6; one internal RL repository; 24 learning/7 test tasks (§4.1). Table 2 pairs skill/base: + +| Condition | File IoU % | Tool calls | Line deviation | +|---|---:|---:|---:| +| seq-all | 80/61 | 56.8/71.9 | .69/1.59 | +| par-bycat | 80/68 | 62.7/62.7 | .62/.88 | +| par-all | 81/72 | 67.7/68.3 | .80/1.06 | +| seq-bycat | 71/71 | 75.0/76.4 | 1.22/1.13 | + +Table 3 skill-win % (Claude/Gemini): seq-all 55/58; par-bycat 54/57; par-all 46/54; seq-bycat 26/46. Functional pass rates and explicit API-reuse-rate results are not supplied. + +## P — Interpretation and limits + +The measured outcomes support a limited repository-onboarding hypothesis, not broad reliability or real maintainer acceptance. Oracle similarity can penalize valid alternate solutions; a smaller patch is not automatically correct. Keep tests, localization, bloat, style, and acceptance as separate outcomes. Only two conditions exceed 50% under both judges in Table 3, so do not repeat the broader prose claim as if every dimension agreed. + +Strict temporal separation blocks one known leakage route. Audit synthetic-query generation and benchmark access separately; the cutoff alone does not prove the model never encountered relevant material. Historical conventions also expire. Store when a rule was supported, conflicting later evidence, and a reason to retire it. + +The paper moves from 2,738 raw commits to 386 suitable commits while reporting 77.2% suitability; that percentage is not 386/2,738, and the intermediate denominator is not clear in the inspected report. Do not reuse it as the raw-history yield. The four curricula are comparisons, but neither an oracle-free matched ablation nor a multi-repository generalization result is reported. For InferRSI, propose scoped memory updates rather than treating history mining as validated skill promotion. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/protocol-details.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/protocol-details.md new file mode 100644 index 000000000..147eefd53 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/protocol-details.md @@ -0,0 +1,49 @@ +# Protocol details and unreported quantities + +F entries below are author-reported protocol details, not recommended InferRSI settings. P entries identify what cannot safely be inferred. Local validation: not_run. + +## Repo-To-Skill + +**F — models and separation.** Repository-graph creation uses GPT-5.5/GPT-5.6-sol, xhigh; final controlled downstream comparisons use GPT-5.5/Codex, xhigh. PassNet's 50-task construction study instead uses DeepSeek v4 pro/Claude Code. The public 1,000-repository collection, the 153-paper/636-skill PaperBench collection, the per-competition MLE graphs, and the shared FrontierCS/PassNet graphs are separate construction populations. [§§4–5; Appendix A](https://arxiv.org/html/2609.02749v1#A1). + +**F — constraints.** MLE excludes the original competition site and competition-specific content; PaperBench skill sources exclude the target paper and released target artifacts. FrontierCS freezes its graph before 188 evaluations, each with five hours, two CPUs and 4 GiB agent RAM; task-judge limits vary independently. PassNet evaluation uses A100-SXM4-40GB. Its correctness and Fast_1 metrics use tolerance t = −5; Fast_1 is conditional on numerically correct subgraphs, whereas AS aggregates rectified speedups across tolerance levels. Source/module and graph-construction checks are not the same as downstream trials. [§5.1](https://arxiv.org/html/2609.02749v1#S5.SS1). + +**P — what remains unknown.** No matched total-cost comparison including skill construction is established. The PaperBench running-budget amount is not specified in the inspected protocol, despite the stated matching. Aggregate catalog counts do not establish isolated efficacy for catalog routing, every module, every repo, or every accelerator. + +## Learning to Commit + +**F — variants and judges.** Both solver conditions use Claude Opus 4.6 and identical tools. Sequential versus parallel onboarding is crossed with all-corpus versus category-specific assignment. Two judges are Claude Opus 4.6 and Gemini 3.1 Pro. Curation removes trivial changes and diffs over 180K tokens, constructs seven categories, and synthesizes intent queries while omitting solution details. [§§3.4–4.1](https://arxiv.org/html/2603.26664v1#S3.SS4). + +**F — metric contract.** File IoU is overlap of changed-file sets; line deviation is candidate-minus-oracle diff size divided by oracle size; solve steps count tool calls. Pairwise dimensions concern location, logic, redundancy and style. [§3.5](https://arxiv.org/html/2603.26664v1#S3.SS5). + +**P — what remains unknown.** A low or negative signed line deviation does not certify completeness, and a file-set match does not certify correctness. Neither a practical retention/size bound for the accumulated memory nor lifecycle cost is reported. Do not infer the value of chronological/oracle supervision in isolation from the curriculum comparisons. + +## Trace2Skill + +**F — target/author distinction.** Qwen3.5-122B-A10B and Qwen3.5-35B-A3B serve as both skill authors and users, with cross-pair deployment. Author-side trace generation, diagnosis and merging use the same model. Additional family tests use Gemma-4-31B-it and GPT-5.5-high. ReAct runs use instruct mode; single-call steps use thinking mode; no separate tool-call cap is imposed. [Appendix A](https://arxiv.org/html/2603.25158v5#A1). + +**F — evaluation breadth.** Spreadsheet evaluation has 200 verified test examples, 2,529 Soft/Hard examples after removing evolution items, 2,810 WikiTQ and 1,585 HiTab. Math uses 400 DAPO evolution examples, 100 held-out DAPO examples and AIME 2026 avg@8 over 30 problems. DocVQA uses 50 evolution examples and 5,299 remaining evaluation examples; reported metrics are ANLS and thresholded accuracy. Seeds are 41–43. [§3 and Appendices A–B](https://arxiv.org/html/2603.25158v5#S3). + +**F — subset study.** BO searches at most 15 high-support patches on 32 evolution-set validation examples; empty/full/singleton/random initialization, up to four rounds, eight chosen candidates per round from 500 proposals. Its objective has zero cardinality penalty. [Appendix E](https://arxiv.org/html/2603.25158v5#A5). + +**P — what remains unknown.** The three-minute comparison concerns skill-generation rounds, not a full end-to-end learning-plus-evaluation lifecycle. The total 20,000 GPU-hours is study-wide, not attributable to one method variant or exported skill. Support frequency, faster construction and successful transfer are separate claims; none establishes a universal default selector. + +## SkillOpt + +**F — default controls.** Four epochs; rollout batch 40; reflection batch 8; 16 analyst workers; merge batch 8; edit cap 4 with cosine floor 2; slow comparison over 20 training tasks; up to three reflection refinements. Benchmark overrides include LiveMath's 35 training items and ALFWorld's 39 train/140 selection/134 test environments. Same-model GPT-5.5 target/optimizer is used for component studies. [§4 setup; Appendix C](https://arxiv.org/html/2605.23904v2#A3). + +**F — model and baseline coverage.** Seven targets: GPT-5.5, GPT-5.4, GPT-5.4-mini, GPT-5.4-nano, GPT-5.2, Qwen3.5-4B, Qwen3.6-35B-A3B. Direct-chat comparisons include no skill, human, one-shot LLM, Trace2Skill, TextGrad and GEPA; EvoSkill is the harness-side comparator. The six benchmark families are SearchQA, SpreadsheetBench, OfficeQA, DocVQA, LiveMath and ALFWorld; ALFWorld is not included in Codex/Claude Code rows. [Table 1 and §4](https://arxiv.org/html/2605.23904v2#S3.T1). + +**F — GPT-5.5 direct-chat baseline retention.** Column order: SearchQA / Spreadsheet / OfficeQA / DocVQA / LiveMath / ALFWorld. Values are absolute benchmark scores, not deltas. + +| Method | Scores | +|---|---| +| No skill | 77.7 / 41.8 / 33.1 / 78.8 / 37.6 / 83.6 | +| Human | 81.8 / 72.9 / 66.9 / 90.1 / 38.4 / 91.8 | +| One-shot LLM | 80.9 / 43.2 / 51.7 / 89.6 / 40.0 / 93.3 | +| Trace2Skill | 82.4 / 49.6 / 65.7 / 90.6 / 52.0 / 87.3 | +| TextGrad | 81.4 / 41.1 / 42.0 / 87.2 / 49.2 / 82.8 | +| GEPA | 84.8 / 73.6 / 63.9 / 89.1 / 43.2 / 85.8 | +| SkillOpt | 87.3 / 80.7 / 72.1 / 91.2 / 66.9 / 95.5 | + +**P — what remains unknown.** Matched target/test/scorer does not establish matched total optimization cost across baselines. “No optimizer at deployment” does not mean zero additional skill-context cost. No confidence interval or monetary break-even estimate is supplied. Resolve the split/run inconsistencies in the main ledger before selecting a reproducibility or budget target. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/readset.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/readset.md new file mode 100644 index 000000000..e3fce8c0a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/readset.md @@ -0,0 +1,65 @@ +# Exact readset and availability + +Read on 2026-10-15. Direct original-paper HTML and arXiv version history were inspected. The source cache is outside the deliverable; source hashes are in [source-manifest.json](source-manifest.json). No complete paper, repository, prompt template, or implementation source is bundled. + +## Existing material inspected first + +| Material | Inspected scope | What is established | +|---|---|---| +| Uploaded `HANDOFF.md`, 90 lines | Entire file; methodology especially §§2,4,5 | Prior repository pins and named pipeline indexes; no inference that the remote Windows workspace is locally mounted | +| Uploaded `reference-matrix.md`, 144 lines, snapshot `4d61d2c` | Entire file; extraction routing from §2 | Current two-matrix contract, methodology targets, prior evidence roles | +| Uploaded `[supplied handoff text; original filename in source archive]`, 238 lines, checkpoint `6ed8162` | Entire file | Earlier candidate-skill inventory and historical work boundaries; not current repository status | +| Prior independent bundle `INTEGRATION_NOTES.md` | Entire file | Existing five runtime candidate bundles, F/P discipline and no AREX execution; its old `docs/repo-source-matrix.md` path is superseded by the uploaded Reference Matrix | + +## Indexed but unavailable in this session + +- `indexes/learning-to-commit-pipeline.md` +- `indexes/arex-pipeline.md` +- `indexes/skillopt-pipeline.md` +- Current bodies/references of `repository-evolution-analysis`, `npu-skill-factory`, `skill-evolution-playbook`, `optimization-search-policy`, `dense-performance-evidence`, and `inference-benchmark-design` +- Any full trajectory/evaluation artifact behind the prior implementation work + +Two bounded Library searches used the named pipeline files and `skill-evolution-playbook` (one exact-quoted pass). Returned hits were the already supplied handoffs/matrices and unrelated or adjacent artifacts; no standalone requested pipeline-note body appeared in the inspected result pages. This is a retrieval limitation, not a claim that the files do not exist. No broad private-history search or assumption of local repository access followed. No upstream implementation clone/read was needed to answer the approved paper-level question. + +## Original-paper readsets + +### Repo-To-Skill, arXiv 2609.02749v1 + +- Identity/version: [abstract and history](https://arxiv.org/abs/2609.02749v1); submitted 2026-09-02, only v1 shown. +- Formalization: [§2](https://arxiv.org/html/2609.02749v1#S2), Eqs.1–4; [§3](https://arxiv.org/html/2609.02749v1#S3), Eqs.5–8, Fig.2. +- Collection versus evaluated pools: [§4](https://arxiv.org/html/2609.02749v1#S4), Fig.3. +- Setup/results: [§5.1–5.5](https://arxiv.org/html/2609.02749v1#S5), Tables 1–4, including metrics, negative tasks and resource columns. +- Implementation-method description: [A.1](https://arxiv.org/html/2609.02749v1#A1.SS1), all scoping/verification/classification/routing subsections. +- Task-specific construction: [A.2.1–A.2.4](https://arxiv.org/html/2609.02749v1#A1.SS2), Eq.9, Tables 5–6; all four benchmark protocols and recovery/counterexample paragraphs. +- Not mined: Appendix B's long repository inventory, bibliography-linked works, author repository implementation. Reading collection counts is not reading the individual repository skills. + +### Learning to Commit, arXiv 2603.26664v1 + +- Identity/version: [abstract/history](https://arxiv.org/abs/2603.26664v1); 2026-03-27, work-in-progress. +- Full main text §§1–5; [§3.1–3.5](https://arxiv.org/html/2603.26664v1#S3), Fig.1, Eq.1; [§4.1–4.3](https://arxiv.org/html/2603.26664v1#S4), Tables 2–4. Table 1 was read as authors' benchmark comparison, not independently verified claims about other projects. +- Not available in paper: exact pilot cutoff date, full private task/diff records, total build cost, functional-pass-rate results, explicit API-reuse-rate results, confidence intervals, a large multi-repository validation. +- Not mined: referenced benchmark papers or the existing repository implementation. + +### Trace2Skill, arXiv 2603.25158v5 + +- Identity/version: [abstract/history](https://arxiv.org/abs/2603.25158v5); v1 2026-03-26, v5 2026-06-04. +- [§2.1–2.4](https://arxiv.org/html/2603.25158v5#S2), Eqs.1–2, Figs.1–2; [§§3–4](https://arxiv.org/html/2603.25158v5#S3), all experiment and analysis prose, Tables 1–6; limits. +- [Appendix A](https://arxiv.org/html/2603.25158v5#A1): exact split sizes, serving, seeds, compute, Table 7 dispersion. +- [Appendix B](https://arxiv.org/html/2603.25158v5#A2): B.1 latency derivation, B.2–B.4 transfer and sequential/retrieval controls, Tables 8–11. +- [Appendices C–E](https://arxiv.org/html/2603.25158v5#A3): qualitative diagnosis/interaction analysis; Table 12; 32-task selection protocol, add/remove interventions, binary subset objective and TPE details. +- [Appendices F–H](https://arxiv.org/html/2603.25158v5#A6): broader domain setup, Table 13, head-to-head adaptation caveats/Fig.7, skill-creator Table 14. +- [Appendix I](https://arxiv.org/html/2603.25158v5#A9): target skill preloading, analyst/merge contracts and intermediate examples, including atomic reference-create/link pairs. +- HTML occasionally groups two printed tables under one container: printed Tables 2/3 use container `S3.T3`, 8/9 use `A2.T9`, and 10/11 use `A2.T11`. Use printed captions plus section when resolving. +- Not mined: author repository implementation, cited external baselines' repositories, per-run logs. Numeric claims in this pack use tables/prose; figures were not independently digitized. + +### SkillOpt, arXiv 2605.23904v2 + +- Identity/version: [abstract/history](https://arxiv.org/abs/2605.23904v2); v1 2026-05-22, v2 2026-05-25. The initially fetched unversioned HTML was byte-equal to the subsequently fetched v2 HTML. +- [§3.1–3.7](https://arxiv.org/html/2605.23904v2#S3), Eqs.1–3, Fig.2; [§4.1–4.5](https://arxiv.org/html/2605.23904v2#S4), all experiment/ablation/transfer/cost prose and Tables 1–6. Numerical extraction focuses on matched controls rather than reproducing every headline as a local claim. +- [Appendix A](https://arxiv.org/html/2605.23904v2#A1), [B limitations](https://arxiv.org/html/2605.23904v2#A2), [C protocol](https://arxiv.org/html/2605.23904v2#A3): Algorithm 1, all eight optimizer prompt contracts, patch safeguards and deployment/meta-memory separation. +- Reported protocol/denominator discrepancies are retained in the [ledger](skillopt.md), not silently resolved using the prior repository version. +- Not mined: SkillOpt/Sleep implementation, author run logs, model-serving documentation or extra frameworks. No claim about Sleep's operation is derived from this paper. + +## Cross-version boundary + +Prior repository pins (`ac3fe1af`, `7e5a1d77`, `3d0b52a`, `343db229`) are provenance from the user's existing work. They are not a tested dependency set and were not proven to implement these exact paper versions. Future reconciliation must inspect only the concrete version-sensitive question; it should not repeat the prior pipeline summaries. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md new file mode 100644 index 000000000..5190c56fd --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md @@ -0,0 +1,28 @@ +# Repo-To-Skill evidence ledger + +F — [Repo-To-Skill: Distilling GitHub Repositories Into AI4AI Skills](https://arxiv.org/abs/2609.02749v1), Chen et al.; v1, 2026-09-02. Read [§§2–5](https://arxiv.org/html/2609.02749v1#S2), [Appendix A](https://arxiv.org/html/2609.02749v1#A1). Prior implementation pin `ac3fe1af` is carried context, not matched to this paper version. + +## Mechanism contract + +- **Objective:** reusable operational context with unchanged backbone/harness (§2, Eqs.1–4). +- **Assumptions:** inspectable evidence, scoped capabilities, relevant future tasks, trustworthy checks. +- **Variables/constraints:** source/task anchor; capabilities; evidence subset; graph/interfaces; verification record (Eqs.5–8). Skill construction and evaluation are separated. +- **Mechanism:** capability-specific evidence becomes procedures with references, optional wrappers, and explicit unresolved gaps (§3; A.1). Paper modules undergo isolated checks and bounded recovery without reopening the source implementation (A.2.2). +- **Resource trade-off:** construction is paid before reuse; downstream context is selective. Library construction allocation ≈$40/repository; MLE construction ≤24 GPU-hours/task is additional to ≤24 GPU-hours/task for running (Table 5). + +## Author-reported evidence + +| Setting; controlled comparator | Without → with skill | Locator | +|---|---|---| +| GPT-5.5/Codex, MLE 75 tasks; medal % | 31.11±2.22 → 72.89±1.18; three runs, SEM | Table 1 | +| PaperBench 20; replication % | 29.45 → 39.59 | Table 2 | +| FrontierCS 188; score / tokens per task | 70.63 / 2.46M → 77.14 / 4.47M | Table 3 | +| PassNet 200; AS / correctness / Fast_1 | 1.343 / 81.35% / 28.48% → 1.5313 / 90.76% / 26.72% | Table 4 | + +F — PassNet metric denominators (§5.1): at tolerance t = −5, correctness is the fraction of subgraphs matching eager outputs; Fast_1 is the share of numerically correct subgraphs at least as fast as eager. AS aggregates rectified speedups across tolerance levels t ∈ [−10, 4] under the benchmark aggregation protocol; it is not a rate with the Fast_1 denominator. + +## P — Interpretation and limits + +The public repository count and the evaluated task/paper-specific collections must not be conflated. No result here establishes that every generated repository skill improves an agent. Same downstream budget does not mean equal total construction-plus-use cost. FrontierCS's larger token consumption makes an unconditional “skills save compute” rule indefensible. PassNet's aggregate and correctness gains coexist with a worse Fast_1 metric; select a metric contract before deciding which revision is preferable. + +No component-isolating ablation establishes a universal benefit for scripts, graph depth, routing, or verification itself. PaperBench's two negative tasks and the PassNet overconservative-rule case deserve preserved counterexamples, not deletion from a positive summary. The proposed factory change is to preserve verification type, scope and cost, with source-local exceptions and a fallback when guidance is poorly matched. These are proposed safeguards, not local results. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/skillopt.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/skillopt.md new file mode 100644 index 000000000..d34caf2b1 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/skillopt.md @@ -0,0 +1,33 @@ +# SkillOpt evidence ledger + +F — [SkillOpt: Executive Strategy for Self-Evolving Agent Skills](https://arxiv.org/abs/2605.23904v2), Yang et al.; v2, 2026-05-25 (v1 2026-05-22). [§3](https://arxiv.org/html/2605.23904v2#S3), [§4](https://arxiv.org/html/2605.23904v2#S4), Appendices A–C, Algorithm 1. Prior `343db229` is not independently reconciled. + +## Mechanism contract + +- **Objective:** select a compact skill on selection data; report untouched-test performance (Eqs.1–3). +- **Assumptions:** reliable scalar feedback; frozen target/harness; independent splits. +- **Variables/constraints:** edit budget/schedule, rollout/reflection batches, current/best skill, rejected buffer, protected slow region, optimizer-only memory. +- **Mechanism:** ranked localized edits; strict selection improvement, ties rejected; epoch-level comparisons separately gated (§3.2–3.6). + +## Author-reported evidence + +| Measurement | Values | Locator | +|---|---|---| +| GPT-5.5 Spreadsheet, no-skill / strongest baseline / SkillOpt | 41.8 / 73.6 GEPA / 80.7 | Table 1 | +| Default / no edit budget; SearchQA, Spreadsheet, LiveMath | 87.1,77.5,61.3 / 84.6,75.7,57.3 | Table 3 | +| No rejected buffer | 85.5,72.9,58.9 | Table 3 | +| No meta or slow update | 86.3,55.0,59.7 | Table 3 | + +Table 6: 379–1,995 final tokens; 1–4 accepted updates. Training tokens: SearchQA 213.8M; Spreadsheet 21.4M; OfficeQA 20.8M; DocVQA 188.2M; LiveMath 23.2M; ALFWorld 59.3M. No optimizer calls at deployment. + +## P — Interpretation and limits + +A strict scalar gate controls acceptance; it does not prove that every important behavior is preserved. Add an explicit regression set and task contract before translating that gate into an operational policy. A single append operation can add a large instruction block, so counting edits is not a semantic or token-distance bound. Keep proposal size and changed behavior inspectable too. The optimizer's private learning history should not automatically become instructions for the deployed agent. + +Preserve these reporting uncertainties: +- Table 2(a) states a 4:1:5 train/selection/test split; Appendix C's ablation paragraph states 2:1:7. Do not silently select one. +- Table 6 cost/point values (37.9M, .6M, 1.1M, 46.4M, 3.6M, 15.9M) do not directly reproduce Table 1 no-skill gains from their total tokens. Treat the gain denominator/run identity as unresolved. +- Table 2's learning-rate sweep and Table 3's default row differ. The headline results are not all a single default-config run. +- No matched numerical gate-off row or repeated-seed uncertainty is supplied in the inspected result tables. A strong narrative claim about gating is not that missing ablation. + +The native verifiers and scorer-specific adaptations are useful only within their task contract. For example, a benchmark favoring static spreadsheet values does not authorize replacing formulas when a real user requires them. Training cost may be unattractive for one-off work. These are limits on transfer, not evidence that the method fails generally. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/source-manifest.json b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/source-manifest.json new file mode 100644 index 000000000..a55407c85 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/source-manifest.json @@ -0,0 +1,74 @@ +[ + { + "source": "arXiv original paper", + "arxiv_version": "2609.02749v1", + "url": "https://arxiv.org/html/2609.02749v1", + "sha256": "69c75a6059a4ccf341ceb358149342e2055572218d4ad3a37a0f107eeb833210", + "bytes": 1415606, + "accessed": "2026-10-15", + "local_validation": "not_run", + "source_copy_in_deliverable": false + }, + { + "source": "arXiv original paper", + "arxiv_version": "2603.26664v1", + "url": "https://arxiv.org/html/2603.26664v1", + "sha256": "7a4b1fb93c8578e70fe3c2c64e2e0c4e26b10fadafa56e5d0e5b3bfe3862b767", + "bytes": 122076, + "accessed": "2026-10-15", + "local_validation": "not_run", + "source_copy_in_deliverable": false + }, + { + "source": "arXiv original paper", + "arxiv_version": "2603.25158v5", + "url": "https://arxiv.org/html/2603.25158v5", + "sha256": "e8847c7eccfd066869ef5b61fe208a8b8de251365150c62add9c4d313373623b", + "bytes": 692897, + "accessed": "2026-10-15", + "local_validation": "not_run", + "source_copy_in_deliverable": false + }, + { + "source": "arXiv original paper", + "arxiv_version": "2605.23904v2", + "url": "https://arxiv.org/html/2605.23904v2", + "sha256": "cf20e8e33038ff9f198d98beeb01e736ee4219eb1d7e2a71133d918a9b577e41", + "bytes": 571780, + "accessed": "2026-10-15", + "local_validation": "not_run", + "source_copy_in_deliverable": false + }, + { + "source": "existing supplied handoff", + "name": "HANDOFF.md", + "sha256": "a52b9584580f1b42210071e91d67a3cf3f46bddf68e734d46e54c2c9690009f8", + "bytes": 9812, + "scope": "entire file", + "source_copy_in_deliverable": false + }, + { + "source": "existing supplied handoff", + "name": "reference-matrix.md", + "sha256": "56d5115f4570fe1946d369ca61eecac361f2ff1c996709918b5ac3b508f3dd51", + "bytes": 21344, + "scope": "entire file", + "source_copy_in_deliverable": false + }, + { + "source": "existing supplied handoff", + "name": "[supplied handoff text; original filename in source archive]", + "sha256": "9fc4e217034d88fee1da947f5f305f574258b078a0a6f5036be1ff7d347167cd", + "bytes": 15447, + "scope": "entire file", + "source_copy_in_deliverable": false + }, + { + "source": "existing supplied handoff", + "name": "INTEGRATION_NOTES.md", + "sha256": "3ec7b0e0f7e30f13442e586c04cb218ef8d01938802d9e8bbf982e5fb57462dd", + "bytes": 6249, + "scope": "entire file", + "source_copy_in_deliverable": false + } +] diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/trace2skill.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/trace2skill.md new file mode 100644 index 000000000..05319d099 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/references/trace2skill.md @@ -0,0 +1,32 @@ +# Trace2Skill evidence ledger + +F — [Trace2Skill: Distill Trajectory-Local Lessons into Transferable Agent Skills](https://arxiv.org/abs/2603.25158v5), Ni et al.; v5, 2026-06-04 (v1 2026-03-26). [§2](https://arxiv.org/html/2603.25158v5#S2), [§§3–4](https://arxiv.org/html/2603.25158v5#S3), Appendices A–I. Prior `3d0b52a` is not a verified paper-version match. + +## Mechanism contract + +- **Objective:** frozen-agent test improvement from disjoint evolution evidence (Eq.1). +- **Assumptions:** labeled traces, inspectable artifacts, reusable target procedure. +- **Variables/constraints:** seed skill, error/success pools, merge breadth, edit applicability. Unexplained failures are excluded (§2.3). +- **Mechanism:** independent diagnoses become hierarchical consolidated edits; reject missing-file and conflicting-range edits (§2.4, Eq.2). +- **Resources:** 128 analysts, merge batch 32; same eight-A100 node; full study ≈20,000 GPU-hours (A; B.1), not per-skill cost. + +## Author-reported evidence + +| Controlled comparison | Result | Locator | +|---|---|---| +| Spreadsheet parallel / seq-1 / seq-4 | 122B Vrf 65.83/61.83/59.00; ≈3/60/15 min | Table 4 | +| Consolidated / ReasoningBank top-1 | 122B Vrf 69.83/56.00 | Table 5 | +| All-error / BO-selected | Vrf 65.83/69.83; HiTab 43.45/43.38 | Table 6 | +| Human skill / none, 35B | Vrf 9.67/19.00 | Table 1 | + +Main spreadsheets: 200 evolution/200 verified test; three seeds. +57.65 WikiTQ points is a specific 35B-author→122B-user creation/error result, not an average. + +## P — Interpretation and limits + +This is evidence for candidate consolidation, not an unconditional publish-all rule. The default aggregation avoids repeated subset evaluation, but the paper itself shows gains from selection and an unfavorable counter-metric. Independent diagnosis can still share correlated model errors; support counts should trace back to distinct tasks and sources, not merely the number of generated patches. + +The latency result is wall time with large concurrency, not token-normalized or dollar-normalized efficiency. Seq-1 remains higher on 35B Soft/Hard in Table 4. Top-1 retrieval is one particular retrieval comparator, and OOD retrieval results were excluded; do not conclude that consolidated skills dominate every retrieval strategy. + +The study preloads the known target SKILL.md (I.1). It therefore does not validate catalog discovery, routing, or autonomous skill selection. Treat the human skill's small-model regression as evidence for model/harness-specific suitability checks. The agentic analyst's benefit is also not universal: 122B creation's Avg is 26.02 versus 26.60 for log-only analysis (Table 12), despite better in-distribution scores. + +BO uses only 32 validation tasks and at most 15 high-coverage patches (Appendix E). Its search must remain separated from final test claims. No local trajectory was generated or diagnosed in this pack. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md new file mode 100644 index 000000000..6c642767d --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md @@ -0,0 +1,69 @@ +> Historical supplier amendment proposal, 2026-10-15. This is editing context, not a deployed task procedure or an execution grant. The owning SKILL.md records the reconciled amendment. + +# Bounded amendments to existing methodology artifacts + +All entries: **P; candidate; not_run; not applied**. These are reviewable semantic amendments, not literal diffs. The current full skill bodies and their hashes are unavailable. The existing targets below are identified in the uploaded Reference Matrix §2 and prior handoff, not asserted to exist at a currently accessible remote URL. Before integration, compare the latest body, reuse matching language, and add only missing material. + +## E-U1 — Repository memory needs scope, contradiction, and expiration + +**Target:** `src/inferrsi/data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md` and its existing evidence references. + +**Increment:** extend the already-covered temporal split with a distinction between accepted historical implementation and durable invariant. Use the [Learning to Commit ledger](../references/learning-to-commit.md) and [E-C2](../cases/methodology-counterexamples.md#e-c2--better-repository-familiarity-can-produce-unnecessary-caution). + +**Proposed insertion, if absent:** + +> For each historical lesson, record the parent snapshot, task intent, accepted change, evidence of the agent's specific discrepancy, and the narrow condition under which the lesson applies. Separate file-local habit, subsystem invariant, and repository-wide convention. Revise or retire a lesson when later accepted evidence contradicts it. Freeze adaptation inputs before future-task evaluation; audit issue synthesis and source access separately. Report correctness, localization, patch size, style and resource use separately. + +**Expected effect:** fewer invented repository-wide rules and less obsolete defensive behavior. **Regression risk:** overly narrow rules may miss useful transfer. **Acceptance evidence needed:** exact incumbent/version, a reviewed historical evidence pair, a counterexample/expiry condition, and a held-out future check if efficacy is claimed. No new history replay or benchmark is authorized here. + +## E-U2 — Factory output and verification are independent choices + +**Target:** `src/inferrsi/data/skill_library/workflows/maintenance/npu-skill-factory/SKILL.md` and its source/admission notes. + +**Increment:** add the [artifact decision](../knowledge/evidence-routing.md), not a second lifecycle or another factory implementation. + +**Proposed insertion, if absent:** + +> Choose case, knowledge, bounded amendment or new skill according to evidence generality and workflow ownership. A new source does not mandate a new skill. Keep source-fidelity, static usability, execution correctness, behavioral efficacy and transfer evidence distinct. Record construction cost separately from downstream cost. Mark unresolved checks and unrun checks explicitly; neither a curated library entry nor an upstream score promotes this local candidate. + +**Expected effect:** better admission discipline without expanding runtime machinery. **Regression risk:** excessive checking can consume more than a one-off task warrants. **Acceptance evidence needed:** latest factory body, duplicate-content review, explicit source constraints and known negative cases. Keep author construction modes descriptive; do not activate AREX/DisCo or inherit its installation/check permissions. + +## E-U3 — Consolidation proposes; validation decides + +**Target:** `src/inferrsi/data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md` and existing evolution references. + +**Increment:** distinguish evidence-pool consolidation from incumbent replacement using [Trace2Skill](../references/trace2skill.md), [SkillOpt](../references/skillopt.md), and [E-C3](../cases/methodology-counterexamples.md#e-c3--fixing-targeted-failures-can-break-unrelated-successes). + +**Proposed insertion, if absent:** + +> Diagnose the causal failure before proposing a corrective rule. Keep successful behaviors that a correction must preserve. Consolidate overlapping evidence into one coherent candidate, but do not treat consensus as an acceptance test. Bound the target passage and behavioral scope of each amendment, inspect its actual size, and retain the incumbent for rollback. Evaluate combined effects and unrelated-success regressions; keep the final test partition outside selection. A tie or uncertain result must not be reported as improvement. + +**Expected effect:** less anecdotal rule growth and fewer unobserved interactions. **Regression risk:** narrow edits may fail to realize complementary changes. **Acceptance evidence needed:** full incumbent, evidence lineage, candidate diff, independent evaluation contract, regression observations and rollback state. No automatic thresholds, worker counts, optimizer schedule, or software changes are adopted from the papers. + +## E-U4 — Negative feedback belongs to a versioned editing context + +**Target:** the same `skill-evolution-playbook` update/provenance section; optionally a reference linked by `npu-skill-factory`, rather than a separate skill. + +**Increment:** preserve a useful distinction in SkillOpt between target-facing guidance and optimizer-only learning history. + +**Proposed insertion, if absent:** + +> Record a rejected edit with the incumbent/candidate identifiers, target conditions, observed outcome and suspected reason. Treat rejection as evidence about that comparison, not a universal ban. Keep advice about how to edit skills outside the deployed task procedure unless it independently belongs there. Long-lived protected guidance remains subject to explicit revision when its evidence expires. + +**Expected effect:** avoid repeating harmful changes without leaking editing bureaucracy into task instructions. **Regression risk:** stale rejection records may suppress valid later changes. **Acceptance evidence needed:** scoped rejection example and a retirement condition. The pack does not create a persistent optimizer memory store. + +## E-U5 — Report costs and gains on comparable denominators + +**Target:** existing `src/inferrsi/data/skill_library/playbooks/measurement/dense-performance-evidence/SKILL.md` or `src/inferrsi/data/skill_library/playbooks/measurement/inference-benchmark-design/SKILL.md`, whichever already owns agent-methodology cost accounting; link from evolution notes instead if outside their current purpose. + +**Increment:** one narrowly placed metric-contract note, using the four ledgers rather than forcing methodology into hardware coverage. + +**Proposed insertion, if absent:** + +> Separate build, selection, deployment-context and downstream-task costs. State whether metrics are absolute points, relative gains, geometric means, or rates with conditional denominators. Retain worse metrics and per-task regressions. Flag unresolved protocol or denominator mismatches rather than repairing them by assumption. A shared task budget does not establish equal total cost. + +**Expected effect:** prevent false economics or promotion claims. **Regression risk:** misplaced content could bloat a hardware-specific skill; use a reference instead when appropriate. **Acceptance evidence needed:** ownership check in the current artifact. This entry is optional after deduplication, not a request to expand that skill's scope. + +## Stopping rule + +Stop after the evidence notes and amendment specifications. Literal edits, test campaigns, optimizer implementation, deployment, or publication require a later authorized task and current artifact access. No amendment here is a claim that the existing skill lacks this material. diff --git a/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/skill-factory-design-20261014.md b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/skill-factory-design-20261014.md new file mode 100644 index 000000000..88d1d21e0 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/npu-skill-factory/references/skill-factory-design-20261014.md @@ -0,0 +1,187 @@ +# Skill factory design detail (historical, 2026-10-14/15) + +Historical design references from the sibling workstream and PR #9, moved from +the entry `SKILL.md` with the two sibling-prototype entrypoints annotated as +not present in this repository. They record methodology and observed pilot +material, **not** implemented InferRSI functionality: `schemas/skill-bundle.json` +and `python -m omnirsi.harness.skill_distill` below belonged to the sibling +`codex/skill-eval-bootstrap` workstream (observed @ 82218b4) and are **not +present in this repository**. Two sources that section cites: +PR #9 `skill_library/` layout (source-grounded, pr/9 @ 4ad551a9) and sibling +workstream `evidence/skill-bootstrap-20261014/` (observed @ 82218b4). + +## Skill bundle schema + +Each distillation produces a bundle validated against `schemas/skill-bundle.json`. +A bundle must have: + +- `status`: `"candidates_generated"` or `"blocked"` (not a placeholder). +- `capability_graph.nodes`: each node has `id`, `label`, and `source_paths` + pointing to files actually present in the source snapshot. +- `skills`: 3-5 candidates, each with: + - `name`: lowercase, no spaces, ≤63 chars. + - `capability`, `applicability`, `preconditions`, `inputs`, `outputs`, + `procedure`, `knowledge_sources`, `code_evidence`, `docs_evidence`, + `tools`, `scripts`, `validation` (≥1 item), `failure_modes`. + - `provenance.source_repo`, `provenance.source_revision`, + `provenance.source_paths` (all paths must be in the snapshot). + - `revision.version` and `revision.parent`. + +Source: `schemas/skill-bundle.json` (observed @ 82218b4). + +## Existing corpus: selected NPU performance skills + +These four skills are the starting corpus for hide-and-re-distill and the +A/B/C comparison: + +| Skill | Repo | Path | Purpose | Perf-relevant | +|-------|------|------|---------|---------------| +| profiling-analyze | MindIE-SD @ 8481d39b | `.agents/skills/profiling-analyze/` | 5-layer CANN profiling analysis from CSV/JSON | Yes | +| dit-perf-opt | MindIE-SD | `.agents/skills/dit-perf-opt/` | DiT bottleneck → feature selection → A/B | Yes | +| perf-gate | MindIE-SD | `.agents/skills/perf-gate/` | Same-window A/B protocol & noise floor | Yes | +| ops-profiling | awesome-ascend-skills @ 75ec89ce | `external/cannbot/ops/ops-profiling/` | Operator profiling → roofline | Yes | + +The two `vllm-ascend` skills in the sparse clone are framework-integration and +CI/CD skills, not performance skills. They are not used in this corpus. +Source: `w3b-ascend-corpus-evidence.md` (2026-10-14). + +**License status:** MindIE-SD is Apache-2.0. `awesome-ascend-skills` synced from +GitCode; license is UNKNOWN — flag this before any external publication. + +## Stage 3.4 — Hide-and-re-distill procedure + +Best candidate: `profiling-analyze` from MindIE-SD. + +**Why this candidate:** +- The skill encodes NPU-specific knowledge that is only partially recoverable from + public documentation: CANN CSV field aliasing proof (value-set matching, not + header name matching), silent failure patterns ("export succeeded" ≠ file + exists), and empirical utilization rules (call counts stable across devices, + single-kernel ms varies ±10%, single collective latency varies ~2×). +- Source material available before the skill's cutoff: CANN 24.7+ public CSV + spec, `torch_npu.profiler` API, reference materials in `.agents/skills/profiling-analyze/references/`. +- The distilled version can be compared at the same length budget (~295 lines, + ~1287 words). + +**Temporal cutoff (REMOTE verification required):** +Run `git -C log --follow -- .agents/skills/profiling-analyze/SKILL.md` +on the MindIE-SD clone at revision 8481d39b to find creation and last +substantive change dates. Reported by corpus agent as 6-12 months pre-cutoff, +but the exact dates are INSUFFICIENT_EVIDENCE locally. + +**Procedure:** +1. Archive source snapshot at `cutoff_commit` (the commit just before the skill + was last substantially changed). Remove `.agents/skills/profiling-analyze/` + from the archive (this is the "hidden" material). +2. Keep: CANN public docs, `torch_npu.profiler` API, any referenced source files + that predate the cutoff, the `analyze_trace.py` and `compare_traces.py` + scripts that ship with the skill. +3. Run the sibling workstream's distillation prototype (its entrypoint was + `python -m omnirsi.harness.skill_distill`; that module is not in this + repository) with the distillation config pointing to the archived snapshot, + producing 3-5 candidates. +4. Validate the bundle against the sibling `schemas/skill-bundle.json` (also not + in this repository). +5. Render candidate SKILL.md files from the bundle. +6. Proceed to Stage 3.5 evaluation. + +Source: sibling workstream `skill_distill.py` (observed @ 82218b4), which +implements this exact procedure for the `retire-mlapo-env` task. + +## Stage 3.5 — Skill evaluation contract + +**Three variants:** + +| Variant | What the agent receives | +|---------|------------------------| +| no_skill | Task only; no skill document | +| human | Task + frozen human SKILL.md from `plan/human-/` | +| distilled | Task + rendered candidate SKILL.md from bundle | + +Fix across all variants: same model, same harness, same tools, same task, +same base commit, same budgets. + +**Evaluation measures:** + +| Measure | Type | Notes | +|---------|------|-------| +| Task success | Primary | Frozen validator exit code: 0 = success, 1 = fail, other = inconclusive | +| Correctness | Primary | Does the patch actually pass the verification contract? | +| Regression | Primary | Does the validator's regression check pass? | +| Files inspected | Secondary | From agent trace `tool_calls` count | +| Tool calls | Secondary | From agent trace | +| Failed attempts | Secondary | `failed_commands` from trace | +| Input tokens | Cost | From `turn.completed` events | +| Wall time | Cost | Elapsed seconds per variant | +| Patch minimality | Quality | Lines added/removed relative to oracle diff | +| Repo convention adherence | Quality | Requires human review | + +Tier A tasks: CPU/static correctness only. Tier B tasks: require NPU device. + +**Accept criterion (SkillOpt-derived, adapted for InferRSI):** +The distilled skill is accepted for promotion when, on a held-out task set: +``` +task_success(distilled) > task_success(no_skill) +``` +with no regression relative to `human` on correctness or Tier A validation. +A single pilot result (1 task × 1 repetition each) is not sufficient for +promotion. The accept criterion requires: ≥3 tasks, ≥2 repetitions per variant, +`inconclusive` trials excluded from the success-rate estimate, and a campaign +evidence tree under `evidence//`. + +Do not promote based on token cost alone. Lower input tokens does not imply +better task success. + +Source: sibling workstream pilot result (one Tier A task, all three variants +pass, no statistical difference established — consistent with the criterion +above: INCONCLUSIVE for promotion). +`evidence/skill-bootstrap-20261014/results/pilot-01-summary.json` (observed @ 82218b4). + +**Skill build cost vs per-task runtime benefit:** +Record `build-cost.json` separately from task execution costs. The distillation +run's usage (model calls, elapsed time) is a one-time cost amortized over all +tasks the skill is used for. Do not include distillation cost in per-task ROI. + +## Skill revision lineage + +When an accepted skill is subsequently evolved, preserve the revision chain: + +``` +skills// + SKILL.md (current version, including revision.version and revision.parent) + history/ + v0/SKILL.md (initial promoted version) + v1/SKILL.md (first accepted evolution) + ... +``` + +`revision.parent` points to the previous version's SHA or version string. +Rejected candidates are stored in the evidence tree of the evolution campaign +under `evidence//plan/rejected-candidates/`. +Source: skill bundle schema `revision` field (observed @ 82218b4); skill history +layout is a design decision — no prior implementation exists in this branch. + +## Skill evolution cycle (minimum viable, Phase 1) + +One evolution cycle: + +1. **Select trigger:** a task where the current skill (v0) produced FAIL or + INCONCLUSIVE, or where the human skill outperformed the distilled one by a + measurable margin (not within noise). +2. **Bounded edit:** propose a revision that changes only the `procedure`, + `failure_modes`, or `knowledge_sources` sections, not the `capability` or + `applicability` contract. Length budget: ±20% of current skill length. + Do not replace the entire skill. +3. **Independent evaluation:** use development/selection evidence to choose the + candidate; keep final-test tasks outside adaptive edit selection. Check combined + behavior and unrelated successes, not only the triggering failure. +4. **Accept/reject gate:** apply the frozen task-specific contract. A tie or noisy + result is not an improvement. Preserve the incumbent and report regressions or + inconclusive outcomes without excluding them silently from success estimates. +5. **Revision lineage:** on accept, copy the current `SKILL.md` to `history/v0/` + and write the accepted edit as the new `SKILL.md`. Update its frontmatter + with the new `revision.version`. + +This cycle does not require automatic trace harvesting in Phase 1. The trigger +comes from observed evaluation failures. Harvest-from-real-traces (SkillOpt +Sleep cycle) is deferred to Phase 2. diff --git a/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis.md b/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis.md new file mode 100644 index 000000000..1ee25d8ae --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis.md @@ -0,0 +1,443 @@ +--- +name: repository-evolution-analysis +description: 'Analyze a repository''s commit history to build a capability-evolution model: what the system can do, how it got there, and what patterns allow it to iterate quickly. Use to produce history-derived knowledge for agent skill conditioning, and to design temporal-split benchmarks for skill evaluation. + + ' +metadata: + inferrsi: | + { + "schema_version": 1, + "status": "candidate", + "sources": [ + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "verification": { + "locally_verified": false, + "evidence_level": "source_grounded", + "note": "Carried LearningToCommit pipeline and Magpie history analysis, not causal evidence of development speed. The reviewed paper amendment is linked from SKILL.md; paper-to-code equivalence is not established. First-hand Magpie coordination research remains pending Dot delivery and owner review. The RTK worked transition is pinned static source/test inspection only; no upstream execution or heldout efficacy evaluation." + }, + "applicability": { + "scope": "any software repository with a recoverable git history", + "prerequisites": "git history access, optionally LearningToCommit-style benchmark for evaluation" + }, + "tags": [ + "repository-intelligence", + "history", + "skill-distillation", + "evaluation" + ], + "profile": "local-skill-v1", + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "The RTK transition is a learning example, not an independent heldout task; upstream tests were inspected, not executed.", + "Existing audit and synthetic KV comparison adapters are not a generic historical coding-task evaluator." + ], + "provenance_readsets": [], + "consumption_mode": "packaged", + "references": [ + "references/rtk-consumer-path-transition.md" + ] + } +--- + +# Repository Evolution Analysis + +Status: candidate. Procedures have not been evaluated against a real campaign. + +## When to use this skill + +Use this skill when you need to answer one of these questions before acting +on a repository: + +- What capabilities has this repository accumulated, and in what order? +- Why can this team iterate quickly, and what patterns should I preserve? +- What historical tasks can I construct for skill evaluation with a proper + temporal cutoff? +- Does this repository have a recurring convention for adding a new provider, + adapter, or capability class that I should follow? + +Do not use this skill to justify a specific code change — that requires +evidence from the current source. This skill produces history-derived +knowledge that conditions how you approach future changes. + +## Evidence to inspect first + +Before analysing history, determine what you have: + +1. Does `git log` work? (Full history vs. shallow clone — report the clone depth.) +2. What are the top-level directories and their activity counts? + `git log --numstat --format='%H' | grep -v '^$' | awk '{print $3}' | cut -d/ -f1 | sort | uniq -c | sort -rn | head -10` +3. What is the commit rate over time? A prepared JSONL extract is faster than + re-scanning — if one exists, use it. +4. Are there already extracted commit clusters, coupling indexes, or important- + commit shortlists? If so, read those first and validate by sampling diffs + rather than running a full re-scan. + +## Building the evolution model + +The model has three parts. Build them in order. + +### State model + +Identify what state the repository carries across commits: registered modules, +provider/adapter lists, config surfaces, routing tables. These are the nouns +that change. + +Method: look for `register`, `PROVIDERS`, `ADAPTERS`, `BACKENDS`, `ROUTES`, +`plugins`, `catalog` patterns in the most-active files. Count commits per +top-level directory as a proxy for where state lives. + +From the Magpie analysis (source-grounded, commit history 2026-09-22 to +2026-10-14, 3428 commits): +- State lives almost entirely in `internal/` (3280 commits = 95.7% of activity). +- Key state surfaces: provider registry, subscription manager, routing groups, + session index, library (MCP/skills/instructions), gateway config, usage ledger. +- `docs/` (152) and `site/` (83) are secondary; `.github/` (26) is CI-only. +Source: `magpie-change-coupling.json`, `magpie-commits.jsonl`. + +### Capability model + +Name the recurring capability families. A family is a cluster of commits that +add, repair, and extend one coherent user-facing capability. + +Method: start from existing clusters if available; validate each by sampling +2-3 diffs per cluster. For an unanalysed repository, use `git log --follow +--numstat -- ` on the most-active files, then group files by co-commit +frequency. + +From the Magpie analysis (source-grounded): + +| Family | Subsystem | Commits (approx) | Description | +|--------|-----------|-------------------|-------------| +| Provider onboarding | internal | ~300 | Adding a new AI provider/subscription | +| Subscription/auth | internal | ~200 | Sign-in flows, session tokens, metering | +| Routing & affinity | internal | ~150 | Routing groups, per-client affinity | +| GUI settings | internal | ~200 | Settings pages, UI state | +| Library/MCP | internal | ~180 | Skills, MCP servers, instructions sharing | +| Session search | internal | ~120 | Session index, search, folders | +| Usage/metering | internal | ~160 | Balance, usage charts, gateway keys | +| i18n | internal | ~120 | German, Japanese, Traditional Chinese | + +Source: `magpie-clusters.json`, validated by diff sampling on 8 SHAs from +`magpie-important-commits.md`. + +### Transition model + +For each family, reconstruct the actual commit sequence. The task description +proposes: initial feature → repair → edge-case → abstraction → compatibility +→ validation → cleanup. Do **not** assume this order. Infer it from real SHAs. + +From the Magpie analysis, the observed sequence for **provider onboarding**: + +1. `702477525a` (2026-09-24): Claude subscription as a provider; model lists + fetched, never compiled in. [initial feature] +2. `9bf6d43527` (2026-10-01): magpie no longer asks Anthropic for usage; adding + an account improved. [repair + edge-case] +3. `09c635cf03` (2026-09-25): model tells Pi/Crush/Codex how much it holds. + [capability extension, concurrent with step 2] +4. `4f22d103d3` (2026-09-27): Kiro served through its own API. [parallel provider + variant — abstraction follows feature] + +Observed sequence for **library/MCP centralization**: + +1. `dfc2d7fa93` (2026-09-25): MCP servers, skills, instructions kept once in + magpie, given to every agent. [initial abstraction — after several individual + agent-specific skills existed] +2. `bf0f3e3f73` (2026-10-03): a remote MCP server signed in once in magpie used + by every agent. [capability extension] +3. `9848a9062a` (2026-10-03): RTK says when it is missing and installs it. + [repair — self-healing environment] + +Source: `magpie-important-commits.md`, verified via `git show --stat` on each SHA. + +**Key observation:** In Magpie, abstraction layers are introduced *after* 2-5 +features exist that would share them, not speculatively upfront. This is +consistent across provider onboarding, library/MCP, and routing. Source: inferred +from commit date ordering; not causally established. + +## Historical Magpie observations and their limits + +These are carried history-analysis results from the earlier corpus, not a fresh +coordination audit. Commit granularity, repair intervals and subject patterns do +not causally establish speed, review latency, automation or release reliability. +The first-hand ownership/concurrency/review/testing/integration/release case is +pending Dot delivery and owner review; do not reconstruct it from these counts. + +**Evidence-grounded findings:** + +- **Change granularity**: 71% of commits under 1000 lines; p50 = 151 lines, + p75 = 342. Review speed and change safety were not measured. + Source: computed from `magpie-commits.jsonl` numstat. + +- **Repair latency**: median 1.54 hours from feature commit to related fix + (454 validated commit pairs). 42% of repairs land within 1 hour. + Source: computed from `magpie-commits.jsonl` date fields. + +- **Single-subsystem focus**: 91.3% of focused commits touch only one top-level + area. Provider, gateway, and GUI changes arrive in separate commits. + Source: computed from `magpie-commits.jsonl` top-3 paths. + +- **PR merge cadence**: ~40 PRs/day (from `(#NNNN)` patterns in subjects); + 27% of commits include a PR number. + Source: computed from `magpie-commits.jsonl` subjects. + +- **Abstraction timing**: shared layers introduced post-feature (observed for + library/MCP, provider registry, routing groups). Correlation with speed; + causation not established. + +**What this implies for an agent working on such a repository:** +When adding a new provider, adapter, or capability class, follow the existing +registration pattern — do not introduce a new abstraction unless 2+ concrete +implementations already exist. + +## Auditing a claimed capability + +When a release note or README claims a capability and you need to state whether +it runs at a given revision, use +[capability presence audit](references/capability-presence-audit.md). It classifies +each claim into implemented, hook, documented only or contradicted, and requires +the enabling gate for anything not implemented. This is narrower than the +capability model above: it answers presence and wiring, not speed. + +## Temporal-split benchmark construction (LearningToCommit method) + +Use historical tasks to separate earlier onboarding evidence from later test +changes. Keep three evidence classes distinct: the pinned public implementation +below, the paper's reported method/results, and proposed InferRSI safeguards. + +### Observed public implementation + +The following is a source inspection of +[LearningToCommit at `7e5a1d770eb9eb58e614db45f40b1b911529c6e7`](https://github.com/LearningToCommit/LearningToCommit/tree/7e5a1d770eb9eb58e614db45f40b1b911529c6e7), +not an executed benchmark or a claim of equivalence with every paper version. + +1. **Scan and split** + ([`s1_scan_commits.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/data_construction/s1_scan_commits.py), + [`utils.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/data_construction/utils.py)): + parse non-merge commit metadata/numstat, prefilter tiny or housekeeping + changes, sort retained commits by the recorded date, keep the most recent + requested count, then assign the oldest fraction to `learning` and the + remainder to `test`. An LLM suitability scan follows that split; unavailable + or oversized diffs are marked unsuitable. This stage, not S3, assigns the + chronological split. +2. **Derive categories** + ([`s2_cluster.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/data_construction/s2_cluster.py)): + ask a model to derive development categories from a sample of suitable + commits' suitability rationales. This is not direct file-coupling clustering. +3. **Tag categories** + ([`s3_tag.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/data_construction/s3_tag.py)): + classify each suitable commit using the categories, subject, rationale and + diff; retain the existing split. The tag is a category, not a cutoff date. +4. **Sample separately** + ([`s4_sample.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/data_construction/s4_sample.py)): + perform category-proportional sampling within the learning and test pools, + excluding unsuitable and uncategorized commits. This does not promise equal + category counts or coverage when the requested sample is too small. +5. **Build tasks** + ([`s5_build.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/data_construction/s5_build.py)): + export each sampled change's oracle diff and parent-revision source archive; + synthesize an issue-style query from subject, body and diff. The emitted + `benchmark_tasks.jsonl` top-level fields are: + ```text + id, repo, category, synthetic_query, oracle_diff, snapshot_path, + learning_commits + ``` + Each learning record contains `sha, repo, title, category, synthetic_query, + diff_path, snapshot_path`. Mode `all` shares all sampled learning commits + with each test task; `by_category` selects the matching category. No + `tier`, frozen `validator` or verification-command field is emitted here. + +**Snapshot and access boundary.** S5's helper uses `git archive` at the sampled +commit's parent. [`modules/sandbox.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/modules/sandbox.py) +extracts that archive and initializes a new Git repository with a base commit; +it does not give the agent the target repository's original history. These +inspected paths do not implement a `hidden_paths` filter or frozen external +validator. The phase directory is explicitly **not a security sandbox**: +agent tools run with host-user permissions. A parent snapshot alone does not +establish isolation from later source, oracle data or other host files. + +**Skill conditioning.** +[`workflow/phases.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/workflow/phases.py) +copies learned skill files into the phase's separate skills directory for the +with-skill solve; the baseline receives no skill directory. +[`modules/prompt_builder.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/modules/prompt_builder.py) +substitutes workspace/skills paths and describes that directory in the user +context. The [with-skill template](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/system_prompts/solve_with_skill.txt) +points to it; the environment context asks the agent to read `SKILL.md` first. +This is directory-based access, not verbatim insertion of the skill body. + +**Evaluation, not a correctness oracle.** + +- [`evaluation/programmatic_metrics.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/evaluation/programmatic_metrics.py) + computes changed-file IoU, tool-using assistant-message counts from the + trajectory, and signed/absolute line-count deviation from the oracle patch. + It does not run a frozen validator or map validator exit codes to task + correctness. +- [`evaluation/pairwise_judge.py`](https://github.com/LearningToCommit/LearningToCommit/blob/7e5a1d770eb9eb58e614db45f40b1b911529c6e7/evaluation/pairwise_judge.py) + compares the with-skill and baseline **patches**, shown with the task query + and oracle diff, on scope alignment, logic similarity, redundancy/hallucination + and code style. Its default four rounds use ABBA presentation order. It is + not an oracle-trajectory comparison or a fallback gated on ambiguous + programmatic results. Patch similarity and judge preference do not establish + functional correctness. + +### Paper claims and version boundary + +The [existing Learning to Commit paper ledger](../../maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md) +records the v1 method, author-reported pilot outcomes and limitations. Those +paper claims are separate from the public-code observations above; this source +reconciliation does not reproduce them or establish paper-to-code equivalence. +Do not combine versions or promote this candidate on the basis of reported +localization, patch-size or judge outcomes. + +### Proposed InferRSI safeguards and portability questions + +These are adaptations to evaluate, **not mechanisms attributed to the pinned +upstream implementation**: + +- Freeze the learning inputs and skill revision before held-out evaluation; + audit synthetic-query answer leakage independently of the chronological split. +- Enforce source/oracle separation in an actually isolated, least-privilege + execution environment. If paths must be hidden, specify and verify that policy + rather than assuming that an archive or phase directory enforces it. +- Define and freeze task-specific correctness/integrity validators outside the + editable workspace, with explicit failure and incomplete-evidence handling. + Report correctness separately from localization, style, patch size and cost. +- For NPU/kernel tasks, first check whether commit context supports an intent-only + query and a reproducible parent environment. Compiler/runtime availability, + numerical checks, profiler access and performance-regression gates require + task-specific qualification; temporal sampling alone does not transfer them. +- Compare with-skill and baseline under declared matched model, harness, tool and + budget controls, retaining failed attempts and deviations. No kernel-repository + portability, agent-efficacy or performance result is established by this guide. + +## Scoped historical lessons + +For each lesson, record parent snapshot, task intent, accepted change, the agent's +specific discrepancy and the narrow applicability condition. Separate file-local +habits, subsystem invariants and repository-wide conventions. Accepted historical +code is a contrastive reference, not the unique correct solution or an eternal +rule. Revise or retire lessons when later accepted evidence contradicts them. + +Freeze adaptation inputs before future-task evaluation; audit issue synthesis and +source access independently. Report correctness, localization, patch size, style +and resource use separately. The +[Learning to Commit paper ledger](../../maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md) +and [convention-expiry counterexample](../../maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md#e-c2--better-repository-familiarity-can-produce-unnecessary-caution) +extend the existing temporal-split method. These methodology papers do not verify +Magpie's actual development coordination or authorize another history scan. + +### Worked learning transition: RTK consumer PATH + +The [pinned RTK transition](references/rtk-consumer-path-transition.md) turns one +already-cited Magpie change into a conditional lesson: manager discovery and +hook enablement do not establish consumer name resolution. Read its +unknown-PATH, binary-identity, diagnostic side-effect and platform qualifications +before reuse. It is a learning example, not an independent heldout task; +upstream tests were inspected, not executed. Candidate/not_run is unchanged. + +## Constructing the capability evolution graph + +For a new repository, build the graph with this procedure: + +1. Run coupling analysis on the commit log to find co-changed file sets. +2. For the top 5-10 file clusters, trace the commit sequence on those files + with `git log --follow --numstat -- `. +3. For each cluster, read the first, largest, and most recent 2-3 commits. + Record for each: + ``` + intent: (what the commit message says it does) + subsystem: (top-level directory or component name) + before: (concrete: what was the state/API before this commit) + after: (concrete: what changed in behavior/interface) + files: (list of changed files) + validation: (were tests added? in the same commit or a later one?) + followups: (SHA of the next commit in the same family, if traceable) + rework: (was this commit later reverted or significantly amended?) + ``` +4. Connect nodes with edges only where a commit SHA directly establishes the + connection (not where you infer it from timing alone). + +INCONCLUSIVE: if the repository history has gaps (shallow clone, squash merges, +or missing files), report which capability families cannot be reconstructed and +why. + +## What this skill does not do + +- It does not analyse the current source to determine correctness. +- It does not produce a performance measurement. +- It does not decide whether a proposed change is safe to make. +- It does not automatically select which tasks to include in a benchmark. + +All of those require separate evidence. diff --git a/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis/references/capability-presence-audit.md b/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis/references/capability-presence-audit.md new file mode 100644 index 000000000..ebd0c9c62 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis/references/capability-presence-audit.md @@ -0,0 +1,72 @@ +# Capability presence audit + +A procedure for answering one narrow question: **does the claimed capability actually run at this revision, and through what gate?** It is narrower than a capability-family analysis and wider than reading a README. + +Use this reference when a release note, README or vendor document lists features and you must state what the code does. Do not use it for performance claims — this classifies presence and wiring, not speed. + +## The four buckets + +Every claim lands in exactly one: + +| Bucket | Test | Typical evidence | +|---|---|---| +| **Implemented** | A reachable call path from the public entrypoint changes behaviour | A caller that is not gated off, plus a body that is not empty | +| **Hook** | A symbol exists and is called, but its body is empty, or its caller is gated off by a value that never occurs | Empty virtual method with no subclass; a body behind a constant-false gate | +| **Documented only** | No symbol, or symbols only in tests and docs | A tree-wide search that returns nothing in the called graph | +| **Contradicted** | The code does something different from the claim | A default that inverts the claim; a backend that asserts instead of degrading | + +A claim that fits two buckets is under-specified. Split it before classifying: "asynchronous scheduling is enabled by default" is two claims, one about existence and one about the default. + +## Procedure + +1. **Record the claim verbatim.** Do not paraphrase into something easier to confirm. Note whether it is a feature list, a hardware list, or an exclusion list. Exclusion lists are the easiest to audit and the most informative: a README that says "does not ship X" is making a falsifiable claim. + +2. **Find the entrypoint that would exercise the claim.** Follow from the public entry, not from the directory that shares the claim's name. Name-adjacency is the most common false positive. + +3. **Classify.** Use the table above. + +4. **For every hook, find the gate.** Ask what would have to be true for the body to run, then check whether that condition can be true in this build. An empty virtual method plus no subclass is a hook. A real body behind a flag whose value is a constant is also a hook. A flag that defaults false is *not* a hook if the documentation says it is optional. + +5. **Check for subclasses and registries.** A base class with virtual methods proves nothing. Search for derived types and for registration. Record the command shape, because "no subclass found" is a claim about a search. + +6. **Check defaults, not just existence.** A feature can be present and inert. Read the environment-variable or configuration default and quote it. Then check whether some other construction path overrides it — a `setdefault` in a dataclass `__post_init__` can make a variable default-false in one sense and default-true in another. + +7. **Separate the four claim strengths.** Exists, is correct, is fast, is end-to-end usable. Never let one imply another. + +8. **State the extraction boundary.** Say explicitly whether the tree is complete. Only a complete tree lets "absent" mean absent; a sparse checkout licenses only "not located in the inspected paths". + +## Worked instance + +Applied to [deepseek-ai/DeepInfer @ 8b16149741a4935e1dec8cea27853f273b374c5b](https://github.com/deepseek-ai/DeepInfer/tree/8b16149741a4935e1dec8cea27853f273b374c5b), by static source reading only. The supplied source-reading archive includes the parent and six direct vendor snapshots, but omits nine listed media files and leaves ten nested vendor gitlinks unexpanded. Its untruncated upstream tree inventory describes the snapshot before those omissions; it does not make the delivered archive a complete checkout or build environment. The observations below are bounded to the named parent-source paths, not an absence proof over omitted or external code. + +| Claim (verbatim from README) | Bucket | Deciding evidence | +|---|---|---| +| "Asynchronous scheduling (zero-overhead batch scheduler)" / "Enabled by default." | **Implemented**; constructor-dependent default | [The worker defers decode post-processing](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L182-L187). [EngineArgs uses setdefault and rearms the variable](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/arg_utils.py#L48-L55), with [NORMAL/COMPLETION true and PROMPT false](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/engine_type.py#L15-L17). The standalone [EnvVar.bool default is false](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py#L69-L71). These construction contexts are not contradictory; an explicit environment value is preserved. | +| "Parallelism: Attention DP / balanced CP, MoE EP + EPLB" — the EPLB rearrangement part | **Implemented**, opt-in; not a Hook | [Model sampling calls the EPLB manager](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/deepseek.py#L402-L409), which [calls each balancer](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/eplb/__init__.py#L378-L384). Its [real update/rearrange path](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/eplb/__init__.py#L131-L165) returns when the interval is zero and skips EP size one. The [interval defaults to zero](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py#L111-L117), using the [integer default](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py#L62-L63). This disables dynamic rearrangement by default, not the implementation or all load statistics. | +| "A KV cache system" — under the README's complete-service exclusion heading | Service save-integration **Hook**; in-engine KV **Implemented** | [README:38-42](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/README.md#L38-L42) excludes components needed for a complete service. The inspected [save-integration methods have no implementation](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L815-L822); this does not mean device KV is missing: [CacheEngine allocates KV/state storage and constructs GPUCacheInterface](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py#L918-L966). | +| "VE/Prefill/Decode disaggregation (most required engine functionality is already implemented)" — the same service exclusion list | **Hook** at the inspected integration seam | [init_pd_split](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L800-L809), [send_processed_prompts and post_process_model_outputs](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L848-L858) have no implementation in the base engine. The bounded parent-source search described below located no subclass; this does not negate the README's statement that supporting engine functionality exists. | +| "Load balancing across data-parallel replicas for both prefill and decode" — the same service exclusion list | **Documented only** within this readset | [README:38-42](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/README.md#L38-L42) states the service exclusion. This bounded hook/default audit did not establish an application request router or audit omitted/external implementations; it makes no stronger absence claim. | + +Two subtleties the exercise surfaced: + +- **`finalize_seq` is not empty.** It is inside the same virtual block but [calls scheduler.free_seq](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L804-L806). So the hook block is heterogeneous: an implementation inheriting it would get partial behaviour rather than nothing. A blanket "all these are empty" statement would be wrong. +- **A body can exist behind an inactive base-class gate.** [do_copy_state](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L787-L798) performs a copy only when its buffer exists, while [should_copy_state returns False](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L811-L813) in the inspected base engine. Body-present alone is not evidence that this entrypoint executes it. + +## Pitfalls + +- **Name-adjacency.** A directory or class named after the feature is not evidence that the feature runs. In the audited source, three claimed-absent components were present as named empty methods — the name was *more* misleading than absence would have been. +- **Body-present-is-not-reachable.** See the state-copy case above. +- **Flag defaults.** EPLB dynamic rearrangement is opt-in, whereas ZOS is enabled by the standard NORMAL/COMPLETION EngineArgs constructor when no environment override exists. Reading the variable's standalone default alone gives the wrong answer for that entrypoint. +- **Hardware lists.** A supported-device list is not a compatibility guarantee. Check whether unsupported cases assert or degrade silently; in the audited source one property hard-asserted on the non-NVIDIA backend. +- **Documentation that describes the deployment, not the code.** A production Q&A can truthfully describe a shape the open release does not implement. Label it DOC and keep it separate from CODE findings — both statements can be true. +- **Comments as evidence, carefully.** A source comment saying "virtual method, handles finished requests" is the author's description, not the behaviour. Read the body. The same applies in reverse: a comment stating a correctness requirement (as `mtp_varlen.hpp:160` does) is evidence of intent that must then be checked against the code that follows it. +- **Sparse checkouts.** Absence in a curated skill-doc checkout proves nothing. Say so rather than reporting a feature as missing. + +## Output + +A table with one row per claim: claim verbatim, bucket, deciding evidence, the gate that would enable it, residual uncertainty. Then a short list of findings that change how the release may be described. + +## Evidence this instance produced + +- The full-SHA path/line links above distinguish feature code, constructor defaults and the complete-service exclusion list; none is native execution evidence. +- Bounded search: `rg --no-ignore -n -F LLMEngine deepinfer tests`, plus class-declaration inspection, at the stated pin. The located declaration is [llm_engine.py:130](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L130); the public entry [constructs that engine through EngineArgs](https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/entrypoints/llm.py#L77-L84). No subclass was located in those two inspected directories. Vendors, unexpanded gitlinks and external deployment code are outside this search. diff --git a/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis/references/rtk-consumer-path-transition.md b/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis/references/rtk-consumer-path-transition.md new file mode 100644 index 000000000..0763a2732 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/repository-evolution-analysis/references/rtk-consumer-path-transition.md @@ -0,0 +1,156 @@ +# Worked transition: manager discovery is not consumer reachability + +Status: source-derived **candidate**; empirical validation **not_run**. This is +one learning example inside repository-evolution-analysis, not a new skill, +benchmark task or independent heldout task. It does not establish automatic +learning, agent efficacy or Magpie's development speed. + +## Source boundary + +The inspected change is +[`9848a9062a65c49e074c09770dc7de73dd012bea`](https://github.com/yetone/magpie/commit/9848a9062a65c49e074c09770dc7de73dd012bea), +whose recorded parent is +[`4b5d6d725fae3d8a263f6e43c707400e3765b84f`](https://github.com/yetone/magpie/tree/4b5d6d725fae3d8a263f6e43c707400e3765b84f). +Public source was inspected on 2026-10-29; upstream programs, shell profiles, +installers, Go tests and browser tests were **not executed** for this example. +The commit's reported checks are author reports, not local receipts. + +| Readset | Parent evidence | Change evidence and purpose | +| --- | --- | --- | +| Discovery and diagnostic view | [`internal/library/rtk.go`](https://github.com/yetone/magpie/blob/4b5d6d725fae3d8a263f6e43c707400e3765b84f/internal/library/rtk.go) | [`rtk.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk.go): `rtkPath`, `ReadRTK`, hook-state detection | +| PATH observation and mutation | These PATH-specific files are added by the change, absent in its parent | [`rtk_path.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_path.go), [`rtk_path_other.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_path_other.go), [`rtk_path_windows.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_path_windows.go) | +| PATH supplied to the observer | [`proc/path_other.go`](https://github.com/yetone/magpie/blob/4b5d6d725fae3d8a263f6e43c707400e3765b84f/internal/proc/path_other.go), [`proc/path_windows.go`](https://github.com/yetone/magpie/blob/4b5d6d725fae3d8a263f6e43c707400e3765b84f/internal/proc/path_windows.go), [`provider/install_windows.go`](https://github.com/yetone/magpie/blob/4b5d6d725fae3d8a263f6e43c707400e3765b84f/internal/provider/install_windows.go) | [`proc/path_other.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/proc/path_other.go), [`proc/path_windows.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/proc/path_windows.go), [`provider/install_windows.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/provider/install_windows.go): `LoginPath` and reuse of the moved registry reader | +| Upgrade destination | [`rtk_upgrade.go`](https://github.com/yetone/magpie/blob/4b5d6d725fae3d8a263f6e43c707400e3765b84f/internal/library/rtk_upgrade.go) | [`rtk_upgrade.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_upgrade.go): symlink-aware script destination | +| Entry points and presentation | Changed caller hunks in the pinned commit | [`internal/gui/library.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/gui/library.go), [`internal/gui/assets/library.js`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/gui/assets/library.js), [`library_cli.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/library_cli.go): warning, explicit repair action and restart advice | + +This is a bounded readset, not a complete consumer/runtime audit. In particular, +the change's description of Pi's extension is a reported motivation; the +extension's independent upstream implementation was not inspected here. + +## Reconstruct the transition + +**Task intent (commit report).** An agent could fail to find RTK by name although +Magpie found an installation and showed its hook enabled. The requested repair +was to expose that mismatch and offer an explicit PATH action, not silently +rewrite shell profiles or reinstall every agent. + +**Before (inspected parent).** `rtkPath` first used Magpie's `exec.LookPath`, then +searched installer locations outside that PATH. `ReadRTK` exposed the discovered +path, version, gains and per-agent hook state. These facts did not answer whether +a separately launched agent could resolve the name `rtk`. On non-Windows, +`proc.UserPath` augmented Magpie's own environment with known installer folders +and login-shell entries. Thus the manager's search environment could be broader +than the consumer's. The parent view had no `OffPath` distinction. + +**After (inspected change).** Discovery is retained, with Windows WinGet package +folders added. A separate `rtkReached` examines `proc.LoginPath`, and `ReadRTK` +adds `OffPath`, `PathDir` and `PathLink` when that check reports no match. The GUI +shows the warning whenever `OffPath` is true, but offers the repair button only +when a destination is available; the CLI also describes the applicable action. +`PathRTK` is reached by the explicit GUI +POST `/api/library/rtk/path` or CLI `magpie library rtk path`. It attempts the +platform-specific change, rereads the diagnostic view, rejects a still-off-PATH +result and lists enabled agents for restart. It does not restart those processes. + +**Observed discrepancy, not a reconstructed agent failure.** The contrast is +between manager-side discovery/hook state and consumer-side name resolution. +No original coding-agent trajectory or independent agent patch is available in +this readset, so do not invent what an agent tried or why it made a mistake. + +## Conditions and counter-signals + +| Condition | What the pinned implementation establishes | What it does not establish | +| --- | --- | --- | +| Manager found a path | `rtkPath` found a manager-PATH match or an existing fallback path | Successful execution, consumer name resolution or matching consumer binary; fallback `exists` is only a stat check | +| Known consumer PATH, no runnable name | `rtkReached` found no non-directory `rtk`/`rtk.exe` in its nonempty entries; non-Windows also requires an execute bit | Exhaustive emulation of every shell's aliases, wrappers, launch environment or executable-resolution rules | +| Unknown consumer PATH | A nil `LoginPath` makes `rtkReached` return **true**, suppressing the warning | Confirmed reachability; absence of `OffPath` can mean unknown rather than success | +| Runnable same-name file found | The name/existence/mode predicate passed somewhere in the observed directories | Identity with `ReadRTK.Path`, matching version, first-resolved binary, integrity, hook compatibility or a successful launch; Windows does not apply a Unix execute-bit test | +| PATH repaired | The code rereads the view and gives restart advice | Changed environments of already-running agents/terminals or actual end-to-end RTK use | + +Non-Windows `LoginPath` invokes the login shell interactively and caches a +successful PATH for a minute. Windows instead reads machine then user registry +PATH values, expanding variables and skipping unreadable keys. Neither is a +receipt from a specific agent process; caching, partial registry reads and +different launchers can weaken the approximation. A nil result is distinct from +a non-nil empty list in `rtkReached`. + +### Mutation and diagnostic boundaries + +- **Non-Windows repair:** select the first eligible directory from the fixed + list of local-bin, user-bin, Homebrew, system-local-bin, Linuxbrew and Cargo + locations. It must already occur in the observed PATH, be an existing writable + directory and have no existing `rtk` entry under `Lstat`. Create a symlink to + the discovered binary; do not overwrite an occupied entry or edit a profile. + If no destination qualifies, return advice rather than invent another folder. +- **Windows repair:** use the binary's own directory, append it to the user's + registry PATH if absent under the implemented case/trailing-separator check, + update Magpie's process PATH and broadcast an environment-change notification. + This is not the non-Windows symlink mechanism and not a copy of the binary. +- **Upgrade follow-through:** the non-Windows script-upgrade branch resolves a + symlink's target directory rather than installing over the link. Existing + package-manager branches remain separate; reading the proposed command does + not execute an upgrade or prove installer classification for every layout. +- **Diagnostics are not pure read-only:** with a discovered binary, `ReadRTK` + executes `--version` and `gain --daily --format json`. On the non-Windows + off-PATH branch, selecting `PathDir` may create, close and attempt to remove a + temporary file to probe writability; cleanup errors are not checked. PATH + observation may execute login-shell profiles. Do not call this a harmless + filesystem read or guarantee that an arbitrary discovered executable has no + side effects. `ReadRTK` does not itself perform the explicit PATH repair. +- **Caller effects are separate:** the GUI GET handler can call `RTKLatest`, + and the CLI calls `CheckLatest`; those paths may query GitHub. A read-labelled + UI/CLI operation therefore is not an offline/no-execution guarantee either. + +## Tests inspected, not executed + +| Source at the change pin | Assertions inspected | Limit | +| --- | --- | --- | +| [`rtk_path_test.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_path_test.go), `TestRTKOffPath` | Fallback discovery outside PATH; no destination produces advice; an eligible user-bin destination produces a symlink and enabled-agent restart list; script-upgrade destination follows that link | `!windows`; fake RTK and test PATH, not a real agent/installer | +| [`library_test.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/library_test.go), sandbox helper; [`rtk_test.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_test.go) | Sandbox replaces `userPath` with the test's PATH; fake RTK supplies version/gain/install behavior | Does not exercise real login-shell discovery; fake output is not observed savings | +| [`rtk_upgrade_test.go`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/library/rtk_upgrade_test.go) | Fake Brew/script upgrades and a local fake latest-release server | Not real package-manager or Windows validation | +| [`library-rtk-path.test.cjs`](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/internal/gui/tests/library-rtk-path.test.cjs) | English/Chinese warning, enabled-agent tag, button POST, warning removal and restart message in Chromium/WebKit cases | API is mocked; does not run backend PATH mutation or an agent | + +The inspected regression does not test unknown-PATH semantics, same-name binary +identity or Windows registry execution. This table describes test source, not a +passing test result. No upstream runtime or cross-platform qualification follows. + +## Conditional lesson to reuse + +When a manager configures a consumer with an absolute executable path but the +consumer's hooks later invoke it by name, **separate installation discovery, +hook enablement, consumer resolution and actual execution**. Inspect the actual +caller and environment at the target revision before reusing this lesson. + +1. Identify the command shape and who resolves it. Record the manager's found + path separately from the consumer environment; keep unknown observations + unknown rather than upgrading a warning's absence to success. +2. Check name collisions and version/identity requirements separately. The + historical predicate is evidence of its implementation, not a universal + identity validator or a recommendation to fail open. +3. Before offering repair, identify authorized mutations, occupied destinations, + platform behavior, upgrade destination and process-restart requirements. + Classify diagnostic execution/probes separately from the explicit repair. +4. Use discriminating tests for the mismatch and the chosen mutation. Add + unknown/identity/launcher/platform cases only under a separately accepted + implementation scope; source inspection alone does not close those gaps. + +This lesson is narrow: it does not apply unchanged when the consumer always +uses an absolute path, inherits a different verified environment or has another +resolver. The accepted historical patch is one contrastive solution, not the +unique correct repair or an enduring repository-wide convention. + +## Evaluation and rights limits + +The target diff and regression tests are learning inputs here. Reusing this +same transition as a heldout task would leak the answer; future efficacy work +needs independently separated tasks, frozen controls and correctness evidence. +InferRSI's existing `audit` and `kv-admission-diagnostic-v1` comparison adapters +handle report auditing/extraction and synthetic KV diagnosis respectively; they +do **not** provide a generic historical coding-task evaluator. Packaging and +Reader checks verify access/consistency, not this lesson's effect on agents. + +This reference is an attributed interpretation of yetone/magpie, not a vendored +source snapshot. Its pinned [root LICENSE](https://github.com/yetone/magpie/blob/9848a9062a65c49e074c09770dc7de73dd012bea/LICENSE) +declares MIT; no substantial upstream code is reproduced here. That observation +does not resolve rights for other inherited sources, grant third-party/model +rights or alter existing unknown/absent license declarations in this skill. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence.md new file mode 100644 index 000000000..558fca4e8 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence.md @@ -0,0 +1,154 @@ +--- +name: rsi-evidence +description: Guide agents to establish acceptance criteria, freeze and cite RSI evidence using plan/results/patch/validator paths and PASS/FAIL/INCONCLUSIVE verdicts. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "evidence", + "verdict", + "runspec", + "provenance", + "review" + ], + "empirical_validation": "not_run", + "provenance_readsets": [ + "references/loopx-goal-governance/README.md" + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "recommendations": [ + "Use user-supplied acceptance criteria; otherwise follow performance-ceiling-analysis to formulate targets. Preserve partial requirements and record each derived field's evidence before freezing gates.", + "Link evidence paths in the report; a metric quoted only in a comment cannot be re-checked later.", + "Fingerprint tracked source even when the output directory overlaps it, and exclude only the current run's generated files.", + "Treat a missing upstream-cache release proof as INCONCLUSIVE rather than a PASS with a caveat.", + "Read baseline and candidate SHAs from the acceptance issue for that campaign, never from a skill default.", + "Freeze optional required_trial_checks for complete requests, effective graph controls and clean worker exits; require literal true per trial and retain supporting receipts." + ], + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation." + ] + } +--- + +# RSI evidence discipline + +Use when documenting or reviewing optimization campaigns in ThinkFlowLab-style repos. + +## Establish acceptance criteria + +Use the user's supplied criteria, including a referenced accepted plan. If none +were supplied, use `performance-ceiling-analysis` to formulate evidence-backed +targets under its [acceptance-criteria procedure](../../../playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md). +Preserve partial requirements and derive only missing fields. Record the source +of each criterion, derivation evidence and freeze authority before search. +Unknown inputs remain explicit; estimates cannot relax supplied or frozen gates. + +## Evidence paths + +For campaign id `{campaign_id}`, artifacts live under: + +- `evidence/{campaign_id}/plan/` +- `evidence/{campaign_id}/results/` +- `evidence/{campaign_id}/patch/` +- `evidence/{campaign_id}/validator/` + +Do not paste metrics only in issue comments—link paths. + +## Verdicts + +Only **`PASS`**, **`FAIL`**, or **`INCONCLUSIVE`**. + +- **PASS**: pinned baseline SHA + pinned candidate SHA, frozen validators, gates met on recorded RunSpec. +- **FAIL**: gates not met with complete evidence. +- **INCONCLUSIVE**: missing freeze, partial runs, or environment blocks comparison. + +## SHAs + +Baseline and candidate revisions are **owned by the acceptance issue** for that campaign. Replace placeholders like `` and `` from the issue—never assume org-wide default pins in skills or CI. + +## RunSpec + +Freeze **repo × revision × backend × device × model × scenario** before comparing results. Reference `inferrsi.runspec.RunSpec` or your renamed package. + +## Runtime and upstream review gates + +- Keep framework dispatch and its tests model-neutral. Prefer existing explicit + configuration over a second model/device/version-specific selection rule. + Model policy belongs in model adapters; backend prerequisites and topology + constraints belong in the owning backend. Remove obsolete knobs and tests + when consolidating selection, while retaining default and explicit-opt-in checks. +- Before changing a shared component or script, enumerate direct and transitive + consumers and map each changed contract to a regression test. Exercise the + other consumers' fast and fallback paths, layouts, dtypes, hooks and gradients; + include encoder/decoder integration where applicable. Record commands, source, + environment, failures and skips. Missing consumer coverage is `INCONCLUSIVE`; + one model's E2E success does not establish another model's quality or speed. +- Hardware/dtype matches do not prove build dependencies or collective availability. + Keep optional acceleration opt-in until initialization establishes prerequisites; + do not fall back on only one rank after starting a collective. +- Prove that request caches release after success, failure, interruption and + dropped step-mode requests. Avoid strong references from singleton models to + request prefix KV. Preserve reusable graph buffers separately. +- Search the target repository for shared primitives before adding kernels. + Place reusable math in its common operator layer, keep model-specific policy + in the adapter, and qualify reduction order, casts, hooks and dtype fallbacks. +- Fingerprint tracked source even when output directories overlap source. + Exclude only the current run's generated untracked artifacts. +- Require outputs to resolve inside their own trial directory. Reject aliases to + references, repeated paths within a trial, and reused outputs across trials. +- Cleanup and integrity probe failures must still produce a failed manifest; + missing evidence or changed source must never become `PASS`. +- Publish portable reproduction commands and path-normalized evidence with + checksums. Keep the archived raw records immutable and distinguish historical + frozen claims from fresh comparisons on rebased code. + +## Downstream citation + +External PRs link the acceptance issue and SHAs; they do not redefine thresholds. Mark summaries **unverified** if artifacts are missing. + +## Goal authority and accounting decisions + +When a recommendation, stop/resume decision or repeated settlement depends on +source state, use the [LoopX Goal governance reference](references/loopx-goal-governance/README.md). +It separates canonical Todo authority from Markdown/index projections, Python +fact preparation from TypeScript decisions, and local accounting recovery from +external execution guarantees. Read its counterexamples before interpreting +`should_run`, missing state or a replay lookup. This source-derived candidate +adds no execution permission or empirical validation; the evidence, RunSpec and +verdict rules above still apply. + +## Omni and streaming experiments + +Use the [Omni experiment contract](references/omni-experiments.md) +for reference/RNG parity, feedback-aware stage boundaries, +matching streaming decode schedules, internal graph controls and protocol preflight. +Freeze selected `--require-trial-check` dotted boolean fields +in RunSpec and require literal true evidence from every baseline/candidate trial. +Missing, malformed or false fields make qualification INCONCLUSIVE; a successful +process and metric alone do not prove complete requests or normal worker exits. +Retain underlying receipts and all failed attempts. After repairing the harness, +rerun the complete comparison rather than combining arms from different attempts. +These checks do not replace the accuracy dataset or mixed-request concurrency. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/LICENSE b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md new file mode 100644 index 000000000..f5746a7ee --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 LoopX contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/NOTICE.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/NOTICE.md new file mode 100644 index 000000000..45a3556ec --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/NOTICE.md @@ -0,0 +1,9 @@ +LoopX +Copyright 2026 LoopX contributors + +LoopX was created by huangruiteng (https://github.com/huangruiteng), +with contributions from the LoopX community. + +LoopX releases through v0.4.7 were distributed under the MIT License. +The historical MIT license text and copyright notice are retained in +LICENSE-MIT. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/README.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/README.md new file mode 100644 index 000000000..30a79f0ff --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/README.md @@ -0,0 +1,77 @@ +# LoopX Goal authority and quota boundaries + +Use this source-derived candidate when reviewing an agent's proposed next action, +a stopped Goal, or a repeated quota settlement. It supplies questions and +counterexamples for the existing RSI evidence workflow; it does not implement a +controller or change InferRSI's RunSpec, authorization or verdict rules. + +The source is [LoopX at `f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9`](https://github.com/loopx-project/loopx/tree/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9), +inspected on 2026-10-26. [The ledger](source-ledger.json) records actual file +bytes, Git blob identities, inspected sections and exclusions. Code, document +intent, test assertions and deductions have separate meanings. Upstream tests +were read, not run; empirical validation is `not_run` and agent efficacy is not +evaluated. + +## Choose the question + +| Question | Read | Observation to retain | +| --- | --- | --- | +| Is this the current Todo authority or a readable view? | [Authority and projections](mechanisms.md#authority-and-projections) | Selected provider, revision, complete source availability and Goal identity | +| Does `should_run` permit delivery, repair or another bounded action? | [Decision ownership and order](mechanisms.md#decision-ownership-and-order) | Admission lanes, effective action, reason and the guard that changed them | +| Is a retry the same accounting effect? | [Accounting identity and recovery](mechanisms.md#accounting-identity-and-recovery) | Effect ID, semantic request digest, index basis and durable receipt | +| Can an old event file or a missing receipt be treated as empty? | [Retirement and external effects](mechanisms.md#retirement-and-external-effects) | Explicit refusal or uncertainty; preserve the source and recovery evidence | +| What would expose an incorrect interpretation? | [Decision cases](decision-cases.md) | Source-supported expected result and the tempting unsupported conclusion | + +```mermaid +flowchart TB + A["Selected canonical Todo provider\nsource authority + revision"] --> P["Python: collect source facts\nhealth, frontier and scope"] + P --> T["TypeScript: ordered run decision\naction + distinct admission lanes"] + T --> C["Separate TypeScript accounting transaction\neffect ID + request digest + receipt"] + A -. "readable projection" .-> D["Markdown / Todo index / status"] + C --> F["Local JSON + Markdown + run index"] +``` + +The diagram shows inspected responsibilities, not an atomic transaction across +these layers. A returned decision does not execute work. Accounting artifacts +do not fence an external host or provider effect. + +## Apply the knowledge + +1. Identify the source revision and affected Goal. If an exact `GoalRef` is + required, retain both the Goal ID and its instance ID. +2. Establish source availability before interpreting counts or recommendations. + Distinguish missing state, unavailable provider and valid empty state. +3. Read the action and all admission lanes together. Check the ordered guards + before treating a repair or inbox action as normal delivery permission. +4. For accounting recovery, distinguish repeating the original commit from a + replay lookup. Compare identity and request semantics before retrying. +5. Record the remaining uncertainty and the next authorized check. Keep + execution status, task acceptance and `PASS` / `FAIL` / `INCONCLUSIVE` + separate. + +The examples are review aids, not permission to execute LoopX, restore a Goal, +remove files or spend compute. The historical reference for InferRSI RFC #137 +remains `a6f28057b49fe03bb234fa6ce1bac5d61df0c58f`; this newer knowledge readset +does not replace that pin or deliver its checkpoint implementation. + +## Read through InferRSI + +With the optional `skills` parser installed: + +```bash +inferrsi skills resource rsi-evidence references/loopx-goal-governance/mechanisms.md +inferrsi skills reference optimization-search-policy ../../workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md +``` + +The generated catalog's `inferrsi.common.skills.rsi_evidence` record links the +complete owner, including these resources. Reading, indexing or packaging the +material does not establish LoopX runtime behavior or incremental skill benefit. + +## License and attribution + +The pinned source uses Apache-2.0. Preserve its original [LICENSE](LICENSE) +and [NOTICE](NOTICE.md). The notice credits LoopX contributors and its creator +huangruiteng, and records MIT distribution through v0.4.7; the retained +[historical MIT text](LICENSE-MIT.md) does not relicense current code. +These references paraphrase the inspected mechanisms; no LoopX runtime is +bundled and no enterprise affiliation is inferred. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/decision-cases.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/decision-cases.md new file mode 100644 index 000000000..706b1c62a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/decision-cases.md @@ -0,0 +1,61 @@ +# Decision cases + +These are source-supported review cases for the [mechanisms](mechanisms.md). +They are not recorded executions. `not_run` applies to runtime and agent +evaluation. Inputs below describe the relevant facts; they are not complete +LoopX API requests or authorization to run work. + +## Goal and next-action cases + +| Case | Relevant input or observation | Expected interpretation / next check | Unsupported conclusion | +| --- | --- | --- | --- | +| G1: missing active state | The selected Goal has `state_file_missing`; an old recommendation and unused quota remain visible | Goal health is false. Inspect reconnect/retire guidance; do not manufacture intent, acceptance or stop conditions from the recommendation | Budget availability makes this a runnable Goal | +| G2: display versus authority | Markdown says a Todo is open; the selected provider is unavailable | Retain an authority failure, not a valid empty or Markdown-backed work list. Restore/inspect the owning provider through an authorized recovery | Readable Markdown is sufficient fallback authority | +| G3: valid empty source | Canonical read is loaded and complete, with zero Todos | Empty source is real input. Separately inspect closure/frontier evidence before terminal classification | Empty display or zero count proves terminal completion | +| G4: budget and recovery | No execution lane is open and state is `throttled`; compare with a separately admitted recovery lane | Closed throttled case skips. An explicitly admitted recovery can select `outcome_floor_recovery`; inspect its own boundary | A recovery action permits arbitrary delivery or enforces a supplier cost cap | +| G5: capability and workspace | Capability requests `repair_bridge`, and workspace guard is present; no later inbox/terminal override | Normal/recovery delivery and capability repair are closed; workspace repair is the selected action. `should_run=true` is repair permission at this layer | `should_run=true` permits the original selected Todo | +| G6: inbox exception | Required prompt upgrade plus due reply; compare nonterminal facts with terminal-source inbox facts | Nonterminal upgrade blocks. Terminal-source inbox exception preserves the reply action. Read source conditions rather than applying a universal priority slogan | Inbox always wins, or terminal always closes every possible lane | +| G7: terminal and resume | Complete user/agent Todo sources and validated empty frontier derive terminal-no-follow-up, with no inbox priority | All execution lanes close and recurring automation stops until explicit resume. Missing/incomplete source evidence cannot substitute for this derivation | A resumed receipt grants a fresh future task or makes incomplete sources terminal | + +G1 is grounded in `decision_summary.goal_missing_state_blocker` / +`goal_status_health_ok` and `should_run._apply_missing_state_health_guidance`. +G2/G3 use `local_authority.read_canonical_todos_if_promoted`, +`shared_goal_work_source.read_shared_goal_work_source`, and +`test_real_directory_lifecycle_uses_canonical_state_despite_stale_audit`. +G4–G6 use the shared `quota_run_decision.json` fixture and the Python/TypeScript +decision tests. G7 uses the Python terminal projection in +`test_terminal_closure_precedes_automation_upgrade`; the terminal helper's full +implementation is outside this readset. The [ledger](source-ledger.json) and +[decision ownership](mechanisms.md#decision-ownership-and-order) link these +sources. + +## Accounting and retirement cases + +| Case | Relevant input or observation | Expected interpretation / next check | Unsupported conclusion | +| --- | --- | --- | --- | +| A1: repeated commit | Same effect, full semantic request and Goal instance; a matching committed receipt exists | Validate receipt and artifacts. Return replay without a second index row, or repair missing artifacts under the original receipt | A new timestamp or lost response justifies a new effect ID | +| A2: conflicting request | Reuse an effect ID but change `source`, preview or another digest-covered semantic field | Reject with `effect_id_conflict`. Top-level transport timestamp/CAS changes are different from changes inside the complete preview | Identity equality alone makes a changed request equivalent | +| A3: competing new effect | Two different effects were prepared against the same observed index digest | The later new transaction fails its stale basis. Refresh the decision/basis; do not replace the digest merely to force admission | A new effect ID bypasses stale state | +| A4: partial local publication | Receipt exists; one expected artifact is missing or the final index row is its verified truncated prefix | Repeat the original commit to repair the receipt's artifacts. Conflicting JSON content, different Markdown text or an unrelated malformed row must fail; lookup-only replay does not run this repair | Any malformed index can be rewritten, or replay lookup is a repair command | +| A5: recreated Goal alias | Same Goal ID now refers to a new instance, or an alias-only caller encounters an exact-source row | Preserve and validate the exact `GoalRef`; reject incompatible ownership. Do not consume old-instance accounting as current | Same display ID means same lifetime | +| A6: external effect before receipt | External host/provider work may have completed; no durable local receipt or matching lookup row exists | Record uncertainty. Inspect the operation's independent identity/readback before any authorized retry | Local accounting guarantees external exactly-once, or a miss proves no charge | +| R1: retired event source | A legacy source has nonempty `events.jsonl` or one of the three retired aliases, including malformed bytes | Refuse that source, preserve bytes and expose incomplete coverage. Inspect/export with a compatible release before deliberately changing its active binding | Ignore events, replay them silently, delete them automatically, or fill the gap with rollout history | + +A1–A4 use `spend_commit.ts`, `accounting_artifact_transaction.ts`, +`test_quota_spend_commit_runtime.py` and the selected +`quota_spend_commit.test.ts` cases: exact-effect replay, changed-request/CAS +conflicts, partial-artifact repair and conflicting-identity/index rejection. +A5 follows `source_admission.ts` and the exact GoalRef checks in the transaction +and replay owners. A6 is an explicit deduction from the local accounting scope +and the retirement document's separately stated external-effect crash window; +it is not a reproduced failure. R1 uses `legacy_event_source.py` and +`test_retired_todo_event_source.py`. + +## Record a decision + +For an actual use, retain the applicable source revision, Goal/source identity, +observed input, selected action or refusal, and unresolved evidence. For an +accounting recovery, also retain effect identity, request semantics, index basis +and receipt availability. Separate an inspected source assertion, a locally +observed result and a proposed next action. Keep the original campaign verdict +and authorization unchanged. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/mechanisms.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/mechanisms.md new file mode 100644 index 000000000..7d36f47da --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/mechanisms.md @@ -0,0 +1,197 @@ +# Mechanisms and operating boundaries + +All source links below name LoopX commit +`f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9`. **Code** describes inspected control +flow; **test** describes assertions in upstream tests, not a local test result; +**document** describes stated intent; **deduction** is the resulting review +guidance. The [ledger](source-ledger.json) gives the inspected sections. + +## Authority and projections + +**Code:** `read_canonical_todos_if_promoted` retains a historical name but no +longer permits a Markdown fallback. It requires a loaded native result with a +recognized `source_authority`, `decision_read_from_provider=true`, +`legacy_fallback_used=false` and a consistent Todo read model. A requested +Todo/lease snapshot also requires leases and `provider_revision`. Missing or +failed authority raises its cause; it does not become a valid empty Todo list. +[Python reader](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/local_authority.py#L245-L333) + +The TypeScript list owner loads the selected provider once and builds Todos, +optional leases and acceptance guards from that head. It returns revision and +source-authority facts. `read_shared_goal_work_source` requires a declared state +path and runtime root, but takes its work items from this canonical read and +records its provider basis; it does not read Todo text from the display file. +[List owner](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/local_authority_read.ts#L292-L354), +[work-source caller](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/goals/shared_goal_work_source.py) + +| Layer | Responsibility | Unsafe substitution | +| --- | --- | --- | +| Provider selection and canonical snapshot | Choose and read current Todo authority; carry source, revision and record identity | A readable old Markdown file cannot rescue a lost provider | +| Source registration / exact Goal identity | Bind an observation or accounting request to its source and Goal instance | A registry witness is neither a grant nor a transaction spanning registry and provider | +| Markdown, Todo index and rollout annotations | Present current state and historical context | A historical event status cannot overwrite current Todo status or claim | + +**Code:** a missing provider selector does not redirect an existing SQLite +authority to File. The selector opener reports the missing selector. The +registry-source witness checks the recorded bytes and explicitly does not span +provider storage. This readset inspects these seams, not all provider internals. +[Provider selection](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/local_authority_provider.ts#L218-L252), +[source witness](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/authority_source.ts) + +**Test:** the retirement suite keeps current Todo status and claims when audit +events disagree. Its File/SQLite lifecycle case makes the provider unavailable +while readable stale Markdown remains; reads must fail or expose no authoritative +work, then recover after the provider is restored. This is different from a +successful empty snapshot. +[Authority counterexamples](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_retired_todo_event_source.py#L32-L48), +[provider-loss case](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_retired_todo_event_source.py#L229-L326) + +## Decision ownership and order + +**Code:** Python prepares source facts, Goal-scoped health, replan applicability, +terminal evidence and compatibility text. `resolve_quota_run_decision` sends +typed facts to `effect_runtime_result("quota.run_decision", ...)`. TypeScript's +`resolveQuotaRunDecision` owns the ordered base decision. Python merges only the +returned `quota_patch`, retaining source numbers and unrelated quota metadata. +The managed runtime call crosses to Node/TypeScript; this is not a standalone +pure Python quota kernel. +[Python adapter](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/decision_summary.py#L242-L312), +[typed owner](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/run_decision.ts), +[runtime boundary](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/effect_runtime.py#L1274-L1372) + +Read the following sequence with its conditions; it is not a universal ranking +of all work in LoopX. + +| Step in the typed owner | Condition and effect | +| --- | --- | +| Delivery guards | A non-running capability gate without monitor fallback closes normal/recovery delivery; `repair_bridge` enables capability repair. A workspace guard clears all lanes then enables workspace repair. A required automation-prompt upgrade clears all execution lanes. | +| Base action | Choose normal delivery, recovery, workspace repair, self-repair or capability repair from the remaining lanes. With none open, map operator/health/throttle/wait states to their skip/notify actions. | +| Replan | Without inbox priority, an applicable required replan needs healthy Goal facts, no workspace guard and no required prompt upgrade. It selects a bounded replan instead of normal/recovery delivery. | +| Terminal | Validated terminal-no-follow-up with no inbox priority clears execution lanes and stops recurring automation until explicit resume. It requires complete source/frontier evidence supplied by the Python side, not merely a zero visible count. | +| Inbox | A nonterminal required prompt upgrade still blocks inbox work. Otherwise a due reply or material review clears other lanes and selects its own bounded action; reply wins when both are due. Terminal-source inbox work retains its explicit exception. | +| Task coordination | A ready coordination contract refines only an admitted `normal_run`. It does not capture an inbox or repair action. A route hint is a separate returned patch, not permission to create work. | + +**Code:** `goal_missing_state_blocker` recognizes the selected Goal's +`state_file_missing` finding. `goal_status_health_ok` returns false for it; +unrelated Goal diagnostics are scoped separately. The final should-run facade +can replace an otherwise eligible health skip with `blocked_health` and the +finding's reconnect/retire guidance. Do not create a substitute Goal from a +generic recommendation when its declared active state is gone. +[Health input](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/decision_summary.py#L74-L137), +[missing-state guidance](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/should_run.py#L507-L543) + +**Test:** Python and TypeScript consume the same ordered-rule fixture. It covers +throttled/waiting/health states, explicit recovery, capability/workspace guards, +replan and terminal/inbox exceptions. Python also asserts that large integer +quota values and nested metadata survive the adapter. The small +`test_quota_decision_summary.py` tests only plan-item flattening; it does not +prove the complete decision system. +[Shared fixture](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane_ts/fixtures/quota_run_decision.json), +[Python assertions](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_quota_run_decision.py), +[TypeScript assertions](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane_ts/quota_run_decision.test.ts) + +**Deduction:** `should_run=true` alone is insufficient. Retain `effective_action`, +normal/recovery/repair lane flags, state and reason. A throttle skip blocks the +closed delivery lane; an explicitly admitted recovery/repair action has its own +semantics. None of these fields enforces a provider-side currency ceiling. + +## Accounting identity and recovery + +**Code:** Python constructs a complete preview request, validates the Goal/path +boundary and requires an index basis for execution. It preserves the complete +preview across the large-local-snapshot transport. TypeScript owns spend +validation and the durable accounting transaction. It requires an eligible +preview, positive integer slots, and `after.spent_slots = before.spent_slots + +slots`, with a permitted spend disposition. The caller's validated +delivery-completion attribution survives a later repair frontier. +[Python facade](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.py), +[typed validation](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.ts#L258-L420) + +| Identity / observation | Inspected behavior | +| --- | --- | +| `effect_id` | Use explicit request identity; otherwise `preview.effect_ref`, settlement effect plus `#quota_spend`, or a deterministic hash of selected semantic fields. It identifies the accounting effect, not a proof that external work ran. | +| `request_digest` | Hash canonical key-sorted semantics: effect, root, Goal, source, complete preview, compact before/after, agent and exact GoalRef when present. Top-level `generated_at`, `execute` and CAS observation are excluded. Fields inside the complete preview still participate. | +| `expected_index_digest` | Compare the current run-index bytes before creating a new transaction. Another new effect from the same stale basis is rejected. A matching existing receipt is resolved before this new-effect CAS. | +| Exact `GoalRef` | Source-owned accounting requires Goal ID plus instance ID and source admission together. Admission checks current ownership under the handed-off local locks. An alias-only replay cannot consume an exact-source record. | + +Source identity and digest are defined in +[spend_commit.ts](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.ts#L278-L361). +The [source-admission seam](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/source_admission.ts) +and [Python lock handoff](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/accounting_admission.py) +are local ownership checks. Distributed lease correctness is outside this +readset. + +**Code:** preview constructs a record and, when a runtime root is present, +prospective paths and the observed index digest without publishing artifacts. +Execution serializes the local transaction, writes a per-effect `prepared` +receipt, materializes JSON/Markdown/index, then marks the receipt `committed`. +The receipt retains the expected index prefix's digest and byte length. +[Preview/commit owner](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.ts#L787-L931), +[transaction sequence](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/accounting_artifact_transaction.ts#L894-L1044) + +Distinguish two operations when recovering: + +- **Repeat the same commit:** a matching receipt must have the same effect, + request digest and Goal instance. Its artifacts are checked and missing + artifacts may be repaired; the result is `repaired` or `replayed`. Conflicting + existing JSON content or different Markdown text is rejected. A truncated final index row is repaired only + when it is the expected row prefix after the receipt's verified prior bytes. +- **Replay lookup (`operation="replay"`):** inspect existing spend-index rows, + resolve effect identity, and check Goal and valid agent identity. It does not + execute the commit repair sequence. `read_only=true` also avoids the index + mutation lock; a lookup miss is a miss, not evidence that external work never + happened. + +Relevant rows with conflicting `effect_ref` and commit metadata are rejected in +either direction. Non-quota or unrelated-effect rows are not treated as a +matching spend. An index match without a matching receipt is not silently +adopted as a newly committed transaction. +[Identity/replay lookup](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/accounting_artifact_transaction.ts#L418-L536), +[repair constraints](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/accounting_artifact_transaction.ts#L734-L891), +[Goal/agent replay check](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.ts#L556-L677) + +**Test:** upstream cases assert no-write preview, one row for repeated or +concurrent identical commits, conflict on changed request/stale index basis, +artifact repair, and refusal of conflicting identity/index content. These are +local accounting assertions, not tests of an external provider's billing. +[TypeScript accounting cases](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane_ts/quota_spend_commit.test.ts#L737-L1103), +[Python facade cases](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_quota_spend_commit_runtime.py#L148-L251) + +The settlement event is append-only, while visible `spent_slots` is a rolling +window aggregate. The recorded before/after is a same-status-payload projection. +Later totals can stay flat or decrease when old spends expire; that does not +undo the event or prove a refund. +[Projection semantics](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.ts#L462-L505) + +## Retirement and external effects + +**Code/document:** a nonempty legacy `events.jsonl` or any bound +`state_event_log`, `state_events_file` or `event_log` is refused on the retired +Todo source route. The guard detects nonempty bytes without treating malformed +content as empty. The prescribed recovery preserves the file and inspects or +exports it with a compatible older release before deliberate removal of its +active binding/file. There is no automatic replay, deletion or Markdown +substitution. Empty/absent files contain no event-owned Todos. Current canonical +reads remain provider-owned and do not import stale audit files. +[Retirement guard](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/goals/legacy_event_source.py), +[retirement document](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/docs/architecture/rfcs/ledger/shared-goal-authority-state-provider-v0/2026-09-25-todo-event-retirement.md) + +**Test:** read/write selectors refuse without changing original state/event +bytes; completion requires canonical authority before validation effects. A +retired source makes that Goal unavailable and the Todo index incomplete while +healthy Goals remain visible. Historical rollout records cannot fill the gap. +[Refusal and portfolio cases](https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_retired_todo_event_source.py#L52-L188) + +**Document:** the separate experimental supervisor receipt log explicitly leaves +the crash interval between an external host effect and its receipt unresolved. +**Deduction from the inspected accounting code:** quota receipt repair only +reconstructs local accounting artifacts; it does not add fencing to that +external operation. If an external effect happened and the receipt is missing, +an automatic retry can duplicate the effect. Resolve it using that operation's +own identity/readback and authorization contract; do not infer success or safe +re-execution from a local lookup miss. + +Local accounting idempotency, correct Goal admission and bounded next-action +selection establish neither external exactly-once execution nor a supplier-side +hard cost cap. The readset does not qualify provider backends, distributed +leases, all controller overlays, runtime integration, performance or agent +benefit. It introduces no executor, database, migration or automatic retry. diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/source-ledger.json b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/source-ledger.json new file mode 100644 index 000000000..bb5dda691 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/loopx-goal-governance/source-ledger.json @@ -0,0 +1,337 @@ +{ + "status": "candidate", + "origin": "source-derived", + "empirical_validation": "not_run", + "agent_efficacy": "not_evaluated", + "source": { + "type": "repository", + "repository": "loopx-project/loopx", + "url": "https://github.com/loopx-project/loopx", + "commit": "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9", + "tree": "c2ce33feec908b70c3b582119c5d1fadbc038a16", + "inspected_on": "2026-10-26", + "access": "Original raw file bytes at the fixed commit, checked against the Git tree blob identities; no source installation or execution.", + "license": "Apache-2.0", + "notice": "NOTICE credits LoopX contributors and creator huangruiteng and retains MIT history through v0.4.7." + }, + "scope": { + "governing_issue": "https://github.com/InferMatrixLab/InferRSI/issues/149", + "tracking_issue": "https://github.com/InferMatrixLab/InferRSI/issues/91", + "owner": "workflows/governance/rsi-evidence/references/loopx-goal-governance", + "related_historical_issue": "https://github.com/InferMatrixLab/InferRSI/issues/137", + "related_historical_commit_preserved": "a6f28057b49fe03bb234fa6ce1bac5d61df0c58f" + }, + "evidence_classes": { + "code": "Inspected source control flow, not reproduced runtime behavior.", + "document": "Pinned author-stated intent and limits.", + "test": "Inspected upstream assertions, not local test outcomes.", + "deduction": "Review guidance derived from the stated code/document boundary; not an observed incident.", + "discovery-only": "Actually inspected to locate the owner; excluded from mechanism support and coverage credit." + }, + "readset": [ + { + "path": "LICENSE", + "kind": "license", + "inspected_scope": "Full original bytes; Apache-2.0 terms.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/LICENSE", + "git_blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "bytes": 11358 + }, + { + "path": "NOTICE", + "kind": "notice", + "inspected_scope": "Full original bytes; creator/contributor attribution and through-v0.4.7 MIT history.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/NOTICE", + "git_blob_sha": "45a3556ecf5e5d6fc04755d5b94f22cd90428346", + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d", + "bytes": 308 + }, + { + "path": "LICENSE-MIT", + "kind": "historical-license", + "inspected_scope": "Full original historical MIT text; not a license substitution for current source.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/LICENSE-MIT", + "git_blob_sha": "f5746a7eee9f275edd9b23f3ac1af27d02e9cd2d", + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3", + "bytes": 1075 + }, + { + "path": "loopx/control_plane/quota/run_decision.ts", + "kind": "code", + "inspected_scope": "Complete file: typed fact decoding, ordered guards, action selection and returned patches.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/run_decision.ts", + "git_blob_sha": "751c96b2869724903dd0ee6bff3dc855d4f3d7db", + "sha256": "dfd6d391a8042b0eb2a538b11140dec6179b4ecfbe8244ef481f21a22e3b374a", + "bytes": 11418 + }, + { + "path": "loopx/control_plane/quota/decision_summary.py", + "kind": "code", + "inspected_scope": "Complete file: compact packet, Goal-scoped health, recommendation refinement, typed runtime adapter and patch merge.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/decision_summary.py", + "git_blob_sha": "8a279260ea0428dabde1ae02f1239a8aab32fe36", + "sha256": "0d85de8174aeb23946917ee3a65a523dbe7f622c6d8e8cd57c316dfb430af737", + "bytes": 12469 + }, + { + "path": "loopx/control_plane/quota/spend_commit.ts", + "kind": "code", + "inspected_scope": "Lines 1-420 and 462-677, 787-931; identity/digest, validation, record, native replay, preview and commit. Payload rendering between these sections only located by symbol search.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.ts", + "git_blob_sha": "7a4f7eab4ad3a5c8be9af30c0fde2f1167b7699c", + "sha256": "626b38c6a101ff6653c7e6910939f579a86cfd196792cb664f3f625dfa0c32fc", + "bytes": 31263 + }, + { + "path": "docs/architecture/rfcs/ledger/shared-goal-authority-state-provider-v0/2026-09-25-todo-event-retirement.md", + "kind": "document", + "inspected_scope": "Complete retirement brief, compatibility/refusal, canonical versus legacy routes and separate supervisor external-effect limit.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/docs/architecture/rfcs/ledger/shared-goal-authority-state-provider-v0/2026-09-25-todo-event-retirement.md", + "git_blob_sha": "274866bf5b2640da8c1f5a6b544cfc26ec17a3fa", + "sha256": "b841e73af4466dad018fff880e38275c91a2315942dc91a7d23e453b885cead7", + "bytes": 3082 + }, + { + "path": "tests/control_plane/test_quota_run_decision.py", + "kind": "test", + "inspected_scope": "Complete file: Python adapter assertions, terminal fixture, ordered rules, inbox exception and source-number preservation.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_quota_run_decision.py", + "git_blob_sha": "33481d70435682dd0eb4e63e5a2481bea72ae1eb", + "sha256": "0417ef3614bd7a6e4b9b461e846851c8ae02afab54a8ae08f3bc2b289321cf05", + "bytes": 12584 + }, + { + "path": "tests/control_plane/test_quota_decision_summary.py", + "kind": "test", + "inspected_scope": "Complete file: plan-item flattening only; not full decision coverage.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_quota_decision_summary.py", + "git_blob_sha": "8e864cedec10d5d3e0994e225920745745d9dda6", + "sha256": "69bcbf4b346b2fe53823529ab4956ae3e8cbce0777811636d30ca88cb3895f01", + "bytes": 752 + }, + { + "path": "tests/control_plane/test_quota_spend_commit_runtime.py", + "kind": "test", + "inspected_scope": "Imports; lines 148-251 and 329-418; native typed facade, concurrent exact retries, complete preview retention, stale basis and boundary rejections. Other tests located by name only.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_quota_spend_commit_runtime.py", + "git_blob_sha": "bfa94dbf83eb68a7c394913df613cfeaa49a74fd", + "sha256": "67ae3337c27a9aa5e9ad6af7397a20636de273fe38a808a9a4356acfae1d0bb0", + "bytes": 14649 + }, + { + "path": "tests/control_plane_ts/quota_run_decision.test.ts", + "kind": "test", + "inspected_scope": "Complete file: shared rule fixture, malformed facts and coordination route-hint assertions.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane_ts/quota_run_decision.test.ts", + "git_blob_sha": "dc6ec5c00cac0d7a0bb3ee26df2d0a0c7ba97021", + "sha256": "b6c1f0704ba7385d77448970707d3e3aa93647f6b057cb1fa59d5e9c91897aef", + "bytes": 2270 + }, + { + "path": "tests/control_plane_ts/quota_spend_commit.test.ts", + "kind": "test", + "inspected_scope": "Lines 236-344, 737-813 and 941-1103: preview/rejection, commit replay, conflicting versus unrelated identity, partial-artifact/tail repair, prefix/row conflict, CAS and concurrent retries. Other source/lock cases located by name, not used to qualify leases.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane_ts/quota_spend_commit.test.ts", + "git_blob_sha": "553c25ed95c4313b0cdef71c7957af7f614be6ca", + "sha256": "06eddc569b5cb26fc8d70379d24f91893f2420645cd6c6cdc57de86909329eb6", + "bytes": 35895 + }, + { + "path": "loopx/control_plane/quota/accounting_artifact_transaction.ts", + "kind": "code", + "inspected_scope": "Lines 1-125, 390-536 and 734-1044; receipt contract, identity/replay, missing/conflicting artifact checks, prefix/tail repair and local commit order. Receipt path-validation symbols located, not a complete security audit.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/accounting_artifact_transaction.ts", + "git_blob_sha": "576deb432329d000af1c00b8ec812b8662f2c2d5", + "sha256": "821545fd7ef4e1c1e4b75af506c8a52d312873919e3233c06570a33182ec7d6c", + "bytes": 34291 + }, + { + "path": "loopx/control_plane/quota/source_admission.ts", + "kind": "code", + "inspected_scope": "Complete file: alias versus exact GoalRef, admission pair, local lock-witness adoption, current-owner check and cleanup; underlying lock implementation excluded.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/source_admission.ts", + "git_blob_sha": "47526e2a75935f864a1699e0383e5bff3e194836", + "sha256": "6da4d0c619725233b283fc31168feada913a724ab5048eba52cca4641d26604d", + "bytes": 10857 + }, + { + "path": "loopx/control_plane/quota/accounting_admission.py", + "kind": "code", + "inspected_scope": "Complete file: Python exact-source/legacy admission and ordered local lock handoff; no distributed-lease qualification.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/accounting_admission.py", + "git_blob_sha": "3ea97a9eead60c6db37e0ff3be0d78cacc86f3cc", + "sha256": "3f687091fa2ffe41f5e0d528b7e2e330c0ae07109302773a2fdebbb8c2f8952a", + "bytes": 3696 + }, + { + "path": "tests/control_plane_ts/fixtures/quota_run_decision.json", + "kind": "test-fixture", + "inspected_scope": "Base facts/results, cases through replan/terminal/inbox plus closed-lane cases; all case names inspected. This is a shared expected-rule fixture, not a local result.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane_ts/fixtures/quota_run_decision.json", + "git_blob_sha": "9e81c71c503e348f647f3bc77556ef4dc9a1e9f0", + "sha256": "7a5861021f2e8eda8f3f7c70d452a54b09aeeef171ab91c309d780b30ac457fb", + "bytes": 14721 + }, + { + "path": "tests/control_plane/test_retired_todo_event_source.py", + "kind": "test", + "inspected_scope": "Lines 1-188 and 229-326; audit cannot override current status, nonempty/empty event sources, validation-before-authority refusal, scoped portfolio incompleteness, canonical provider loss/restoration. HTTP case located but not read in full.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/tests/control_plane/test_retired_todo_event_source.py", + "git_blob_sha": "3cf34c9a38bd74817780fa24fc8c5cfd3a8a1f3c", + "sha256": "0cef96cc0df93a6cf69326968c0cac3e42fbec9f137dad8d49b8338a38cba236", + "bytes": 17707 + }, + { + "path": "loopx/cli_commands/todo_event.py", + "kind": "discovery-only", + "inspected_scope": "First 95 lines: error/audit logging helper; not the retired Todo source authority. Excluded from mechanism support.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/cli_commands/todo_event.py", + "git_blob_sha": "d59260d6980c35f423504b1b545e7e9a27a94bfd", + "sha256": "01d8a86e0820c967a43920cd9dea462aa35365e555d9046eebb948eb6df799fd", + "bytes": 7397 + }, + { + "path": "loopx/control_plane/todos/update_source.py", + "kind": "discovery-only", + "inspected_scope": "Complete small snapshot helper inspected during caller discovery; not a provider authority or write protocol. Excluded from mechanism support.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/todos/update_source.py", + "git_blob_sha": "2bafe1f0345b48ad54073f4c274808831177e00d", + "sha256": "0f0d37f3d333008f6f6068cc5f44cc7cf4a270724090daf93827377c55fdb8c4", + "bytes": 1380 + }, + { + "path": "loopx/control_plane/quota/should_run.py", + "kind": "code", + "inspected_scope": "Missing-state health guidance at lines 507-543; relevant action/health and acceptance guard search contexts only. Not a complete controller/overlay readset.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/should_run.py", + "git_blob_sha": "21ebc67e262e7fc24ba3ef3073c0b98a48d39543", + "sha256": "ebadbec6276a764e6d2dd42e8c84fa87710fb0872168fc257b459009581b4c5d", + "bytes": 28948 + }, + { + "path": "loopx/control_plane/quota/should_run_prepare.py", + "kind": "code", + "inspected_scope": "Source-selection/capability/receipt-resume search contexts and lines 731-840 only; source facts have separate preparation and receipt resume does not grant new work. Rest excluded.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/should_run_prepare.py", + "git_blob_sha": "fdb68941165252e9999d20d153cb220ca40afc05", + "sha256": "37f1c3673882b67f89675187d08ea83170f29d5ccd291fa63ffdca18f5ade523", + "bytes": 41168 + }, + { + "path": "loopx/control_plane/quota/spend_commit.py", + "kind": "code", + "inspected_scope": "Complete file: complete preview request, typed result/error adapter, native replay, execution index basis and lock/admission owner.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/spend_commit.py", + "git_blob_sha": "5ddc370ba6fcea4ecf0c9f416eaab0ae3da97d23", + "sha256": "8b5f2a8a38f7090d3a306bb0b436e2b154cf17c687b1b70ab3d6a9d0b17eb68d", + "bytes": 11986 + }, + { + "path": "loopx/control_plane/goals/shared_goal_work_source.py", + "kind": "code", + "inspected_scope": "Complete file: read Todos and leases at one canonical provider basis, no state-text work fallback.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/goals/shared_goal_work_source.py", + "git_blob_sha": "04c3583385e9058328455ea5c6f59ef1e6fdcabf", + "sha256": "0b3b92d8ce7e22a8080ef6a7f17ddfebbb60019a8508d21e70fcaf46386f6859", + "bytes": 2386 + }, + { + "path": "loopx/control_plane/goals/legacy_event_source.py", + "kind": "code", + "inspected_scope": "Complete file: three retired aliases plus adjacent events.jsonl, nonempty-byte refusal and preservation guidance.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/goals/legacy_event_source.py", + "git_blob_sha": "59f06883bd5af9574fff1d21c82a7d8b09aa1589", + "sha256": "e4fd7bd6d28cc53a1bcc6587cf2a2b687c71472ab0fb2adbd8b93baead0b5084", + "bytes": 1592 + }, + { + "path": "loopx/control_plane/coordination/local_authority.py", + "kind": "code", + "inspected_scope": "Lines 245-445: canonical-read validation, no Markdown fallback, incomplete/failed source rejection, request-local snapshot scope and canonical display adaptation.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/local_authority.py", + "git_blob_sha": "b4f88c5f5de73b0c90a95ea0b86cec9e3290886c", + "sha256": "1b50a7d0db7b68384c3f10fef04f9fa4e316d8d0dbc0b55dae013077e61309b8", + "bytes": 18321 + }, + { + "path": "loopx/control_plane/coordination/authority_source.ts", + "kind": "code", + "inspected_scope": "Complete file: registry source byte witness and its explicit non-grant/non-transaction boundary.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/authority_source.ts", + "git_blob_sha": "2779466d3281de25b131f77037091d10a4c8baec", + "sha256": "7c516799c4be782a0baf9d71ed28b14fa40f50937f8d49c29bb6a3b58470806c", + "bytes": 2080 + }, + { + "path": "loopx/control_plane/coordination/local_authority_read.ts", + "kind": "code", + "inspected_scope": "listLocalCoordinationTodos, lines 292-354; selected provider head and returned source/revision/no-fallback facts. Other functions located by symbols only.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/local_authority_read.ts", + "git_blob_sha": "f76cddd6ecef3b7bf59608c4e42109a49f8b8a3c", + "sha256": "2b06eaf17a72a96b867619e84376ac5625c26fb7772a350081a4117e31c57887", + "bytes": 18388 + }, + { + "path": "loopx/control_plane/coordination/local_authority_provider.ts", + "kind": "code", + "inspected_scope": "Provider declarations and lines 218-325; missing selector does not redirect initialized SQLite authority, selected provider seam. Backend implementations excluded.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/coordination/local_authority_provider.ts", + "git_blob_sha": "50007652797e69897428112dbabe5580c0473b07", + "sha256": "020b3bbc0807787d8eec1f2fd4a7d1ad5774aa3ac182fab3a9d2d68e3c73dd8e", + "bytes": 17350 + }, + { + "path": "loopx/control_plane/effect_runtime.py", + "kind": "code", + "inspected_scope": "Managed Node/TypeScript path/start/request/result boundaries by search context, including lines 1274-1372. No runtime execution or lifecycle qualification.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/effect_runtime.py", + "git_blob_sha": "fea81a4694d81ab1fa9f7d6935d92a3f7e3a61c9", + "sha256": "a1f4f49f433f8587afaaeffa40c64945d6fc4c69a43b00a71acd06a6d051b4d0", + "bytes": 59173 + }, + { + "path": "loopx/control_plane/quota/goal_boundary.py", + "kind": "discovery-only", + "inspected_scope": "Goal boundary/capability declarations located and source sampled; not the missing-state health owner. Excluded from mechanism support.", + "url": "https://github.com/loopx-project/loopx/blob/f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9/loopx/control_plane/quota/goal_boundary.py", + "git_blob_sha": "4e8f18adab4026773f68933f33ad961e652d1311", + "sha256": "dbce5a542287def0c4efe1f01ad76874df3a1be3013c2d0b4ebf210f29fa7872", + "bytes": 19235 + } + ], + "preserved_originals": [ + { + "source_path": "LICENSE", + "resource": "LICENSE", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "bytes": 11358 + }, + { + "source_path": "NOTICE", + "resource": "NOTICE.md", + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d", + "bytes": 308 + }, + { + "source_path": "LICENSE-MIT", + "resource": "LICENSE-MIT.md", + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3", + "bytes": 1075 + } + ], + "exclusions": [ + "Most of the repository, UI, host adapters and complete quota controller/receipt overlays.", + "Storage/provider implementations, provider capacity/soak behavior and distributed lease correctness.", + "Full terminal/frontier derivation implementation; terminal evidence shape is inspected in the adapter/tests.", + "Supervisor runtime implementation; only the retirement document's separate external-effect boundary is used.", + "Source installation, native LoopX tests, external provider effects/billing, agent trials, model/device/quality/performance validation.", + "vLLM adoption reports are not used as causal performance or efficacy evidence." + ], + "limitations": [ + "Original-byte identity authenticates file contents, not full-file semantic review; inspected_scope states the actual readset.", + "Python source preparation and TypeScript decisions/accounting remain distinct; no pure Python quota kernel is extracted.", + "Local accounting idempotency and repair do not establish external exactly-once execution or supplier hard cost ceilings.", + "This candidate does not implement InferRSI goal checkpoints or promote the inherited owner." + ] +} diff --git a/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/omni-experiments.md b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/omni-experiments.md new file mode 100644 index 000000000..40a8e8a72 --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/rsi-evidence/references/omni-experiments.md @@ -0,0 +1,99 @@ +# Qualifying Omni optimization experiments + +Use this protocol when a multimodal pipeline has feedback, stochastic audio +sampling, internal graphs, or stateful streaming. Freeze selected checks and +quality tolerances in the acceptance issue and `plan/` before searching. This +adds no default hardware job or model-specific threshold. + +## Reference and preflight + +- Map per-step feedback before splitting stages: a depth head whose output feeds + the next temporal step may need to stay in the same AR stage. Module names do + not establish process boundaries. +- Pin reference code/checkpoint, dependency versions, dtype, attention backend, + buffer construction device, and cast/move order. Nonpersistent rotary buffers + can differ despite identical weights. Match per-request RNG device, random + operation order/shapes and reveal schedule, not just a seed. Locate the first + divergent token/frame before relaxing tolerances. Isolate reference packages + when serving requires a different supported dependency range. +- Compare full decode with reference full decode, and streaming with reference + streaming under the same codec chunk schedule. Measure the reference's own + full/stream difference separately; it cannot excuse additional integration + error. Keep transport chunk coalescing from silently changing decoder shapes. +- Inventory outer and internal graph switches, effective backend, capture, + replay and fallback. An outer eager flag may leave component graphs enabled. +- Preflight the benchmark consumer with metadata-only, empty-final and coalesced + payloads. Count first audio only on nonempty samples while preserving completion + events. Distinguish text-end, audio-end and request-end; verify flush and abort + cleanup. Preserve processor signatures when adding diagnostic wrappers. +- Validate mixed prompts, seeds and lengths concurrently, cancellation followed + by a new request, and the campaign's accuracy dataset. Repeating one prompt + or matching a few fixtures does not replace these checks. + +## Executable trial qualification + +Select adapter-produced boolean fields with repeatable CLI options, for example: + +```text +--require-trial-check evidence.requests_complete +--require-trial-check evidence.workers_closed +--require-trial-check evidence.graph_controls_verified +``` + +Use the same flags for `inferrsi plan` and `inferrsi run`. They are frozen as +`required_trial_checks` in `run.lock.json`. Each baseline and candidate benchmark +command writes its normal metric plus the selected fields to `{result}` (or +`INFERRSI_RESULT_PATH`), for example: + +```json +{ + "metrics": {"latency_ms": 100}, + "evidence": { + "requests_complete": true, + "workers_closed": true, + "graph_controls_verified": true + } +} +``` + +These are illustrative adapter-defined keys, not built-in hardware probes. Derive +fields from actual request counts, worker exit receipts, and effective graph +controls; keep the underlying receipts in the trial's output directory. Emit +completion only after checking worker exits. Process exit zero, lack of an error +message, or executor-forced cleanup does not establish normal worker shutdown. +Never hardcode `true` to obtain a verdict. + +The harness snapshots only selected boolean fields into each `execution.json`. +Literal `true` is required on every measured trial, on both arms. Missing, +unreadable, non-boolean or false values make the comparison `INCONCLUSIVE` and +leave `improvement_pct` unset; raw metrics remain available for diagnosis. +Qualification describes completeness and comparability, not an accuracy score: +quality rejection still belongs to the explicit validation command and its frozen +gates. A completed quality rejection remains `FAIL` when evidence is otherwise +complete. No selected checks preserves the existing command contract; it does +not imply lifecycle or graph qualification. Adapter attestations do not replace +independent validation, source integrity, L3 quality or L4 service evidence. + +## Comparable experiments and repair + +Use the site's reservation mechanism on shared devices (such as `npu run` where +provided). Freeze device allocation, workload and software, including CANN, +torch-npu and vllm-ascend for Ascend. Record contention and graph/backend settings; +CUDA tooling and MPS are platform-specific. Use portable device labels in shared +artifacts and keep private machine addresses out of logs. + +Retain the common AB/BA loop. Report independent process repetitions separately +from requests within each process. Warm up before steady-state measurements; +report startup/capture costs separately when relevant. A new model unsupported +on upstream main needs a clearly labelled integration-with-optimizations-off +control, not a fabricated main baseline. + +Retain failed and slow attempts. If a consumer or harness bug is repaired, start +a fresh complete comparison with new frozen commands/source/validator identities; +do not splice successful samples across attempts or rewrite old evidence. A +receipt failure does not automatically retry commands or reserve more hardware. + +Skipping multimodal memory profiling can help diagnosis but cannot qualify +deployment capacity. Exercise normal profiling at declared modality limits and +headroom at target concurrency. Distinguish sampled device memory from allocator +peaks, component timing from service timing, and request success from clean exit. diff --git a/src/inferrsi/knowledge/atoms/workflows/skill-evolution-playbook.md b/src/inferrsi/knowledge/atoms/workflows/skill-evolution-playbook.md new file mode 100644 index 000000000..55135276c --- /dev/null +++ b/src/inferrsi/knowledge/atoms/workflows/skill-evolution-playbook.md @@ -0,0 +1,217 @@ +--- +name: skill-evolution-playbook +description: 'Practical design choices for evolving agent skills from execution traces: when one trajectory should update a skill, how conflicting lessons are handled, how negative evidence is preserved, how large an edit should be, and when skills should split or merge. Drawn from Trace2Skill and SkillOpt. Use when designing or operating a skill evolution pipeline. + + ' +metadata: + inferrsi: | + { + "tags": [ + "skill-evolution", + "trace2skill", + "skillopt", + "rsi" + ], + "status": "candidate", + "profile": "local-skill-v1", + "schema_version": 1, + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "applicability": { + "scope": "Design choices for evolving agent skills from execution traces, drawn from Trace2Skill and SkillOpt: when a trajectory should update a skill, how conflicting lessons are handled, how negative evidence is preserved, how large an edit should be and when skills split or merge; for designing or operating a skill evolution pipeline", + "prerequisites": "A final-test partition kept outside edit selection and the incumbent skill retained for rollback; changing a skill's scope first needs explicit review of its identity and consumers", + "input_contract": "Execution trajectories or trace IDs with the diagnosed causal failure and the successful behavior an amendment must preserve; the incumbent skill and its revision lineage; held-out evaluation results for candidate edits", + "produced_artifact": "A scoped case or amendment proposal, or a consolidated candidate edit, with rejection records and the versioned revision lineage; a candidate for independently evaluated acceptance, not a replacement decision or an efficacy claim", + "failure_modes": [ + "An anecdote, or agreement among analysts, is taken as efficacy", + "Consolidation output is treated as a replacement decision instead of a candidate awaiting independent acceptance", + "A tie or uncertain result is reported as improvement", + "A conflict is resolved by voting for whichever outcome appeared more often in the pool", + "A rejection is applied to every future use of an idea instead of the comparison it constrains", + "Paper-specific section counts or length budgets are used as universal defaults, or a skill is split on length alone", + "A stronger task solver is assumed to be a stronger improver, or replay rankings and private inner scores are read as outer generalization" + ], + "refusal_point": "Records a conflict that conditioning cannot resolve, where the same context produces different outcomes across runs, as INCONCLUSIVE and flags it for human review instead of choosing a lesson; claims no universal minimum trace count, paper-to-code equivalence or local efficacy" + }, + "recommendations": [ + "Condition a conflicting lesson on its context (when X, do A; when Y, avoid A) before choosing one side.", + "Store each rejection record with its evaluation evidence, outside the deployed task procedure, and give it a retirement condition.", + "Bound the target passage and intended behavior before editing, inspect the actual diff and preserve rollback state.", + "Prefer an amendment when the existing skill owns the workflow; create a new candidate only for a genuinely distinct capability." + ], + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." + ], + "provenance_readsets": [], + "consumption_mode": "packaged", + "searchspace_not_applicable": "SKILL.md §§ When should one trajectory update a skill?, How large should a skill edit be?, and When should skills split or merge? govern skill-text evolution and held-out evaluation, not hardware-resource state or control." + } +--- + +# Skill Evolution Playbook + +Status: candidate. Repository-derived notes record Trace2Skill @ 3d0b52a +and SkillOpt @ 343db229; the earlier Trace2Skill attribution to 7e5a1d77 belongs +to LearningToCommit and does not establish that implementation's behavior. +The [reviewed paper ledgers](../npu-skill-factory/references/papers-20261015/references/readset.md) +keep Trace2Skill v5 and SkillOpt v2 separate from these repository pins. No +paper-to-code equivalence or local efficacy is established. + +## When should one trajectory update a skill? + +A single trajectory can motivate a scoped case or amendment proposal. Diagnose +its causal failure first and retain successful behavior the amendment must +preserve. Neither an anecdote nor agreement among analysts establishes efficacy. +No universal minimum trace count follows from these papers. + +Trace2Skill's reviewed paper describes evidence-pool analysis and consolidation; +SkillOpt separates proposal generation from independently evaluated acceptance. +Consolidation produces a coherent candidate, not a replacement decision. Keep +final-test partitions outside edit selection, check combined effects and +unrelated-success regressions, and retain the incumbent for rollback. A tie or +uncertain result must not be reported as improvement. + +See [Trace2Skill evidence](../npu-skill-factory/references/papers-20261015/references/trace2skill.md), +[SkillOpt evidence](../npu-skill-factory/references/papers-20261015/references/skillopt.md) +and [interaction counterexamples](../npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md). + +## How are conflicting lessons handled? + +Two trajectories can encode contradictory lessons: one shows approach A works, +another shows approach A fails. + +**Trace2Skill's approach:** parallel multi-agent patch proposal followed by +hierarchical conflict-free consolidation. The `skill_evolver` agents each +propose section-level patches (`insert_after`, `replace_in_section`, +`add_section`, etc.); the consolidation step identifies conflicting edits to +the same section and resolves them through a separate consolidation model call. +Source: `skill_evolver/skill_evolving_agent.py`, `_SUPPORTED_PATCH_OPS` (historical code locator; pin attribution unresolved, not reverified). + +**Practical resolution strategies:** +1. **Context-condition the lesson.** If A works in context X but fails in + context Y, the skill should encode both as conditional: "When X, do A. + When Y, avoid A." This is better than choosing one and losing the other. +2. **Separate sections.** Conflicting lessons often target different conditions. + Add a "known failure modes" or "does not apply when" section rather than + overwriting the "procedure" section. +3. **Escalate to human review.** When the conflict cannot be resolved by + conditioning (the same context genuinely produces different outcomes across + runs), record it as INCONCLUSIVE and flag for human review. Do not resolve + by voting on whichever outcome appeared more often in the pool. + +## How is negative evidence preserved? + +**SkillOpt:** rejected candidate edits are stored in the staging area with +their evaluation result before being discarded. The staging state records +what was tried and why it was rejected. +Source: `skillopt_sleep/staging.py` @ 343db229. + +**Trace2Skill:** error traces are analyzed separately from success traces, and +both pools contribute to the consolidated edit. Error-driven evolution produces +failure-mode additions to the skill; success-driven evolution adds positive +procedure refinements. Neither is discarded. +Source: Trace2Skill `run_parallel_skill_evolution.py` (error traces) vs +`run_parallel_combined_skill_evolution.py` (combined success+error traces) (historical code locator; pin attribution unresolved, not reverified). + +**What to preserve in a rejection record:** +```yaml +rejected_edit: + proposed_change: + hypothesis: + held_out_result: + verdict: FAIL or INCONCLUSIVE + evidence_level: + context: + date: +``` + +A rejection record is editing context: keep incumbent/candidate identities, +target conditions, measured outcome, suspected cause and a retirement condition. +Store it with the corresponding evaluation evidence, outside the deployed task +procedure. Rejection constrains that comparison, not all future uses of an idea. +Protected guidance can be revised explicitly when its supporting evidence expires. + +## How large should a skill edit be? + +**SkillOpt's bounded edit:** modifications are restricted to specific sections +(`procedure`, `failure_modes`, `knowledge_sources`). The `clip.py` module +enforces a length budget: the candidate must not be substantially longer than +the current skill. The `revision.parent` field tracks the lineage so v0→v1→v2 +is reconstructible. +Source: `skillopt/optimizer/clip.py`, `skillopt/optimizer/skill.py` @ 343db229. + +**Trace2Skill's section-level patches:** edits target named sections with +specific operations. `replace_in_section` replaces content within a section, +`insert_after` adds content after a named anchor. Protected files (`LICENSE.txt`, +`recalc.py`) cannot be modified regardless of what the patch proposes. +Source: `skill_evolver/skill_evolving_agent.py` PROTECTED_FILES, PATCH_OPS (historical code locator; pin attribution unresolved, not reverified). + +**Practical size rule:** bound the target passage and intended behavior before +editing, inspect the actual diff, and preserve rollback state. Paper-specific +section counts and length budgets are not universal defaults. Changing a skill's +scope requires explicit review of its identity and consumers; consolidation or +splitting is justified by distinct workflows and observed interactions, not an +arbitrary word count. + +## When should skills split or merge? + +**Split a skill when:** +- The `procedure` has grown to cover two distinct workflows that rarely co-occur. + The signal: most trajectories use only the first half or only the second half, + rarely both. +- Two distinct `applicability` conditions consistently produce conflicting lesson + proposals. The conflict is structural, not resolvable by conditioning. +- Agents repeatedly need only a separable workflow with its own trigger and + evidence contract; length alone is not a split criterion. + +**Merge skills when:** +- Two skills consistently co-activate (every trajectory that uses skill A also + uses skill B, with little overlap with other skills). +- One skill's `procedure` duplicates a large portion of another's. +- The two skills' `applicability` conditions are indistinguishable in practice. + +**What to version when splitting:** +The original skill becomes deprecated (v_last) with a forward pointer to both +new skills. Both new skills start at v0 with `revision.parent = `. + +## Skill deepening vs skill creation + +Trace2Skill studies two modes: +- **Self-deepen:** start from an existing human-written skill; use traces to + refine procedure, add failure modes, and extend coverage. +- **Self-create:** start from a minimal draft (e.g., name + description only); + build up from error traces. + +Neither mode is universally superior. A relevant incumbent offers useful +structure, but model/harness-specific regressions and task-conditioning matter. +Prefer an amendment when the existing skill owns the workflow; create a new +candidate for a genuinely distinct capability. See the reviewed Trace2Skill v5 +ledger and its human-skill/small-model counterexample before claiming transfer. + +## Task solver and improver are different claims + +Use the [adaptation-interface records](../../../playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md) +for Dream-RSI replay support, AIDE²'s separate inner/private/outer evaluation +boundaries and JitRL's candidate-scoring prerequisites. A stronger task-solving +agent is not automatically a stronger improver. The AIDE² improver comparison +remains inconclusive; later checkpoints can regress on individual held-out domains. +Replay rankings and private inner scores are not untouched outer generalization +evidence. These records enable no execution interface or persistent memory store. + +## What should be versioned? + +- The skill document itself (`SKILL.md`) at each accepted version. +- The trajectory pool or trace IDs that motivated each edit. +- The held-out evaluation result (metric before → after) for each accepted edit. +- Rejected candidates and their evaluation results. +- The `revision.parent` chain so the full lineage is reconstructible. + +What does NOT need to be versioned separately: +- The raw agent trajectories (store a reference/ID, not a full copy). +- Intermediate patch proposals that were not accepted. +- The evaluation harness configuration (that is versioned separately in the + benchmark/evidence tree). diff --git a/src/inferrsi/knowledge/atoms/xdit.cuda.diffusion.parallelism_freshness_and_topology.original.json b/src/inferrsi/knowledge/atoms/xdit.cuda.diffusion.parallelism_freshness_and_topology.original.json new file mode 100644 index 000000000..0fbec5b4a --- /dev/null +++ b/src/inferrsi/knowledge/atoms/xdit.cuda.diffusion.parallelism_freshness_and_topology.original.json @@ -0,0 +1,240 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "xDiT parallelism: separate current-state attention from stale-state pipelines", + "summary": "USP, CFG splitting and PipeFusion have different topology, memory and quality tradeoffs; qualify each before combining them.", + "applicability": { + "hardware": [ + "Multiple CUDA GPUs with recorded interconnect topology; model support is method-specific" + ], + "software": [ + "xdit-project/xDiT at f7c16aa958379a9f0a0302350fe0e1bfcec5f23c; later revisions need reinspection" + ], + "conditions": [ + "A supported diffusion pipeline and compatible sequence/head partitioning", + "Record CFG setting, denoising schedule and all parallel degrees" + ] + }, + "limitations": [ + "Backend-specific implementations and model matrices do not transfer with the high-level method.", + "Current-state attention still requires numerical validation; stale-state methods must not be advertised as lossless from a speed benchmark.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "xdit", + "backend": "cuda", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json", + "sha256": "3674b5916cb7b384951bf3e449b6796b161878daabcc1d7e7f6d6f8ff861cc17" + }, + { + "url": "https://github.com/xdit-project/xDiT/blob/f7c16aa958379a9f0a0302350fe0e1bfcec5f23c/README.md", + "type": "technical_document", + "commit": "f7c16aa958379a9f0a0302350fe0e1bfcec5f23c", + "accessed_at": "2026-10-15", + "content_sha256": "07bfd6874db892623db179ca9cc7e51d3b7c2036bf624e50b7a6e314081979e9" + } + ], + "attribution": [ + { + "url": "https://github.com/xdit-project/xDiT/blob/f7c16aa958379a9f0a0302350fe0e1bfcec5f23c/README.md", + "type": "technical_document", + "commit": "f7c16aa958379a9f0a0302350fe0e1bfcec5f23c", + "accessed_at": "2026-10-15", + "content_sha256": "07bfd6874db892623db179ca9cc7e51d3b7c2036bf624e50b7a6e314081979e9" + } + ], + "id": "xdit.cuda.diffusion.parallelism_freshness_and_topology.original", + "entrypoint": "record.json", + "atom": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "layer": "L3", + "source_pointers": [ + "" + ], + "source_span": { + "source_index": 0, + "path": "src/inferrsi/knowledge/data/skill_library/records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json", + "byte_range": [ + 0, + 3236 + ], + "sha256": "3674b5916cb7b384951bf3e449b6796b161878daabcc1d7e7f6d6f8ff861cc17" + } + } + }, + "content": { + "record.json": { + "path": "records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json" + } + }, + "parts": { + "identity": { + "layer": "L0", + "pointers": [ + "/schema_version", + "/id", + "/tier", + "/repo", + "/backend", + "/component", + "/scenario", + "/title" + ], + "byte_range": [ + 4, + 295 + ], + "sha256": "379408b02c87bd477e318432a5723f77aadbbbfcc5c93f5bdc46ed73853f14b4" + }, + "status": { + "layer": "L1", + "pointers": [ + "/status" + ], + "byte_range": [ + 299, + 319 + ], + "sha256": "b21ac18c36179b9bc0eddc7210340ea040687001d41b6a69fe825ffda8d1c271" + }, + "summary": { + "layer": "L1", + "pointers": [ + "/summary" + ], + "byte_range": [ + 323, + 460 + ], + "sha256": "4270abf72d01b2b8ec2d72ec0befea36953ee3ff9bef513ac6e3cba920ea240b" + }, + "identity-2": { + "layer": "L0", + "pointers": [ + "/tags" + ], + "byte_range": [ + 464, + 599 + ], + "sha256": "366a59cb44ac634d4cfb614787306151716757ccb4d0ce6c83e0bddb3af296f1" + }, + "sources": { + "layer": "L1", + "pointers": [ + "/sources" + ], + "byte_range": [ + 603, + 962 + ], + "sha256": "77bc4e4ca48a5e3e6ebe193999ea66213a61118cffd60cf1334d1af706e36197" + }, + "scope": { + "layer": "L1", + "pointers": [ + "/applicability" + ], + "byte_range": [ + 966, + 1420 + ], + "sha256": "6c7ed6171155a808a2b45ae2f9393c4579c1323ec8be39999516b40b3102db5f" + }, + "claim-0": { + "summary": "USP combines Ulysses and Ring sequence parallelism. CFG parallelism splits the two guidance branches when CFG is active.", + "layer": "L1", + "pointers": [ + "/claims/0" + ], + "byte_range": [ + 1440, + 1626 + ], + "sha256": "0183ef9a899a55ab844ff651d0e1b7eeb95d4f2b79ef0ad82de5fc35ceb00bfb" + }, + "claim-1": { + "summary": "The source cost table labels Ulysses/Ring attention data as fresh and PipeFusion as using stale information. PipeFusion requires serial warmup steps that affect its benefit.", + "layer": "L1", + "pointers": [ + "/claims/1" + ], + "byte_range": [ + 1632, + 1871 + ], + "sha256": "a19501932fc810b57c6ae09055a3e60d20c1627c1273b3a37abd4ee31735c514" + }, + "transfer": { + "layer": "L1", + "pointers": [ + "/downstream_impact" + ], + "byte_range": [ + 1879, + 2307 + ], + "sha256": "f7d4cceb338dbf1df9ef9860710d4426539807e987b65546acfce1191cf6602d" + }, + "actions": { + "layer": "L2", + "pointers": [ + "/recommendations" + ], + "byte_range": [ + 2311, + 2454 + ], + "sha256": "f5dd942de7d7a136931d94515fd80ce0e339d6408fcbd4e428d1a6d078f32aa2" + }, + "validation": { + "layer": "L2", + "pointers": [ + "/validation_plan" + ], + "byte_range": [ + 2458, + 2734 + ], + "sha256": "68b3ac695916148843495139da8a45e2c5808390d28d12d43aa4af537161fe8c" + }, + "limits": { + "layer": "L1", + "pointers": [ + "/limitations" + ], + "byte_range": [ + 2738, + 3144 + ], + "sha256": "1a59cc63093823244260e3a6d6a3e47d0615ba18edaf3471ba83f78c21f0d007" + }, + "verification": { + "layer": "L1", + "pointers": [ + "/verification" + ], + "byte_range": [ + 3148, + 3233 + ], + "sha256": "16325f7e31b05a11aa233963dac3666797deeeb2fb75c86bf9b048b6c936c9bc" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/ascend-optimization-casebook.json b/src/inferrsi/knowledge/compositions/ascend-optimization-casebook.json new file mode 100644 index 000000000..e48ea6491 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/ascend-optimization-casebook.json @@ -0,0 +1,107 @@ +{ + "authority": "checkout", + "metadata": { + "id": "ascend-optimization-casebook", + "kind": "skill", + "entrypoint": "casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "title": "Casebook of NPU optimization cases for Ascend inference systems: symptom → diagnosis → action → evidence records for memory-bound, compute-bound, communication-exposed, graph-compilation, and AI-CPU-fallback bottleneck classes. Use when a bottleneck has been classified and you need prior art for what to try next. Complement to inference-optimization-casebook (which covers the casebook *pattern*; this carries the actual NPU cases).\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Find source-derived prior cases for an already classified Ascend inference bottleneck, including fallback, memory traffic, exposed communication, graph startup and host scheduling gaps.", + "prerequisites": "A bottleneck classification from profiling and a check of the selected case preconditions/mechanism before applying it.", + "input_contract": "Bottleneck symptoms and matching profiler evidence, model/hardware/CANN/configuration context and, for a new case, measured before/after metrics.", + "produced_artifact": "A matching prior-art case and evidence requirements for a later measured application; a new case record requires a verified win or clear failure with a metric comparison.", + "refusal_point": "Do not add an INCONCLUSIVE case or one without a measured metric comparison; a subjective direction is insufficient evidence." + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "casebooks/ascend/ascend-optimization-casebook/SKILL.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:ascend-optimization-casebook.original.navigation", + "revision": "sha256:6d24d9c38c2adffd33c93f5118eae2f94abf436217b587fa29b9994aa7fc5051" + }, + "decision": { + "ref": "checkout:ascend-optimization-casebook.original.decision", + "revision": "sha256:c5857a8c9d43981fd3ebcae3c1016b3773acb7b7f73e98ec985247c218f054fd" + }, + "procedure": { + "ref": "checkout:ascend-optimization-casebook.original.procedure", + "revision": "sha256:26d7227a10243ef3a924ad7ebb95e916ad3cdf2bd1fe5a65bfbed7eb0cda41d7", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:ascend-optimization-casebook.original", + "revision": "sha256:b65b38493d60535d7329a37e293ccb37b58f657a6dd48141b3c38439c6185432" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original" + ] + } + }, + "skill": { + "directory_entry": true + } + } + }, + "directory_resources": { + "casebooks/ascend/ascend-optimization-casebook/SKILL.md": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/cache_dit.common.diffusion.residual_cache_calibration.json b/src/inferrsi/knowledge/compositions/cache_dit.common.diffusion.residual_cache_calibration.json new file mode 100644 index 000000000..73c6bc153 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/cache_dit.common.diffusion.residual_cache_calibration.json @@ -0,0 +1,212 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Cache-DiT residual reuse needs model- and schedule-specific calibration", + "summary": "DBCache skips intermediate transformer work using residual similarity, with computed boundary blocks and warmup controlling approximation.", + "applicability": { + "hardware": [ + "Upstream advertises NVIDIA, AMD and Ascend support; individual model/backend combinations remain unverified here" + ], + "software": [ + "vipshop/cache-dit at a57c826d3527736a0d1f1b0243d47568c350eb5f; later revisions need reinspection" + ], + "conditions": [ + "A supported block adapter/forward pattern and explicit request-local cache state", + "Model, dtype, CFG branches, scheduler, step count and thresholds are fixed for an evaluation" + ] + }, + "limitations": [ + "Residual reuse is approximate; thresholds from example prompts are not portable quality guarantees.", + "Combined README speedup illustrations do not isolate the contribution of caching, and are not imported as local gains.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "cache_dit", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/cache_dit.common.diffusion.residual_cache_calibration.json", + "sha256": "bb9509ad0225a91b52bc6787477581d05f0ecd5e44fa59f08f718eea36a2ac45" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/docs/user_guide/CACHE_API.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "586b1acf878bb997da80dfda18de0b450cbc36a62c66901aef889ab3d8267265" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/README.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "470f81bdae9fedd777eed9fde6a8ccef895fd190252f7503b6d15d36941c8f30" + } + ], + "attribution": [ + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/docs/user_guide/CACHE_API.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "586b1acf878bb997da80dfda18de0b450cbc36a62c66901aef889ab3d8267265" + }, + { + "url": "https://github.com/vipshop/cache-dit/blob/a57c826d3527736a0d1f1b0243d47568c350eb5f/README.md", + "type": "technical_document", + "commit": "a57c826d3527736a0d1f1b0243d47568c350eb5f", + "accessed_at": "2026-10-15", + "content_sha256": "470f81bdae9fedd777eed9fde6a8ccef895fd190252f7503b6d15d36941c8f30" + } + ], + "id": "cache_dit.common.diffusion.residual_cache_calibration", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original", + "revision": "sha256:1078a8b75c42eac677a4ed2603fd123b1c4ba6bd0d6d97f635492bf825caa242" + }, + "identity": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.identity", + "revision": "sha256:0b8a386bd8ab16c2cc79a300312371579acf48bc0fd3837992f333530ff80f92" + }, + "status": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.status", + "revision": "sha256:1ca43434b5a0d9b744d66b3d5044e412e513104cb4b1776562aa8e597c330430" + }, + "summary": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.summary", + "revision": "sha256:c211cec4eca32334f27b960bb2167c2d2d198ab45bc0c7fd4549661d37472677" + }, + "identity-2": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.identity-2", + "revision": "sha256:106a8e6446f2dfab94e5d446bd37b2da8300694e53411a2984aa049d975ead11" + }, + "sources": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.sources", + "revision": "sha256:adb76dc75abf282fe01267143598bf83ce1be0eb05c63a88624c6e3b3e7df14e" + }, + "scope": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.scope", + "revision": "sha256:4ba04c10d71993624a66beec1ea655a2565179e8924676ad3d8b50216620d457" + }, + "claim-0": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.claim-0", + "revision": "sha256:1139b195dcf457e3f6b20dff9e768804491d0bf0d5a7402055e6d36c6454b0e9", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.claim-1", + "revision": "sha256:d6113518809ffb48ad0d79c02ed276c0033ab53055e20e761f62bd38e3d2966d", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.transfer", + "revision": "sha256:d102427d74ea96c17958fe856d9ae150c96fb3e45180c6ae8ab67b5f26b54269", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.actions", + "revision": "sha256:4aecacaa5d7b949d40e79130b44177a63ac32a9bb42586c82ff3565074d97347", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.validation", + "revision": "sha256:e7cdc6c359cc3bd9917fd74f2408212af51b3aa7817c981fbcca2ae5b93f2383" + }, + "limits": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.limits", + "revision": "sha256:b63a8a71491cffb9bcced5967d0317c98aa84d0d39d04733b2b1e0b58a2e9eb0" + }, + "verification": { + "ref": "package:cache_dit.common.diffusion.residual_cache_calibration.original.verification", + "revision": "sha256:894883dc0bddaf8163b7da5274a38dadf466d99b10f9bb7132eb4fa8845bccca" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/case.admission-drain-occupancy.json b/src/inferrsi/knowledge/compositions/case.admission-drain-occupancy.json new file mode 100644 index 000000000..235dc4196 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/case.admission-drain-occupancy.json @@ -0,0 +1,164 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.admission-drain-occupancy", + "kind": "case", + "title": "Admission occupancy is not whole-run occupancy", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Continuous admission, mixed prefill/decode and final drain", + "Recorded Drama3 B300 C64 diagnostic only" + ], + "limitations": [ + "Campaign INCONCLUSIVE", + "No new measurement or trace reproduction", + "Selected-phase occupancy is not service throughput", + "Raw evidence remains under its existing owner" + ], + "attribution": "InferRSI issue #10 diagnostic evidence; extraction retains the original observation and its limits", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json", + "sha256": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e" + }, + { + "type": "internal", + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10", + "run": "drama3-mixed-20261016", + "artifact": "vllm-continuous-schedule.json", + "sha256": "29e5cafe329cb85eaba69db7536a28a83fb7e3ac29bc154fc8747f317f6a4b3f", + "request_metadata_sha256": "bd50166976a4753b33c8aeb5a774ebb5711c74ccbba0df1843885f353ecdc996", + "integrity_status": "reported_not_rehashed", + "evidence_url": "https://github.com/InferMatrixLab/InferRSI/blob/c13027983b853fee3700de6aabde52b72e61885a/evidence/drama3-b300-scale150/results/diagnostic-lessons.md#continuous-admission-profile-and-mixed-backbone-2026-10-16" + } + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "checkout:case.admission-drain-occupancy.original", + "revision": "sha256:2b53c58c066e63a9b86c71be3c0306b6fd3097a3ef0d2baad634d080363893d5" + }, + "guide": { + "ref": "checkout:case.admission-drain-occupancy.guide", + "revision": "sha256:e44d3cf8be60a00fd4878283026d001f3b4008639494d2d916ee61d36f89deaa" + }, + "identity": { + "ref": "checkout:case.admission-drain-occupancy.original.identity", + "revision": "sha256:e253ec161014fe35b0fb50fe9fb9a1b92953fccea9b783fdd9db477357716644" + }, + "origin-state": { + "ref": "checkout:case.admission-drain-occupancy.original.origin-state", + "revision": "sha256:f04879c8dd393d125845e9291615e4f4cd9bb923bb672ff468ad6a51390955dd" + }, + "resources": { + "ref": "checkout:case.admission-drain-occupancy.original.resources", + "revision": "sha256:d7be1a24bbfce858b4feb4c1299e690c9be6ca86e5858f3418e4a50e1cc94d0d" + }, + "sources": { + "ref": "checkout:case.admission-drain-occupancy.original.sources", + "revision": "sha256:c7486fe74355f6bdb3d004465daa0cc689ca3f20da44f8634bb4f4d68c3ed3d5" + }, + "applicability": { + "ref": "checkout:case.admission-drain-occupancy.original.applicability", + "revision": "sha256:c0c8d7f191e3bbae6514be1efba49081c8accd354d8f063f3035b0d4290ba4cd" + }, + "limits-attribution": { + "ref": "checkout:case.admission-drain-occupancy.original.limits-attribution", + "revision": "sha256:aa31eb72cbb61634b0ab9376e0507a7e170cb95fff60292d3302b5bc472d73ae" + }, + "finding-0": { + "ref": "checkout:case.admission-drain-occupancy.original.finding-0", + "revision": "sha256:d20980e4727d59d320f9997326d2310eefa9a190d4e245f3c5a60dc194bf4e1c", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-1": { + "ref": "checkout:case.admission-drain-occupancy.original.finding-1", + "revision": "sha256:74c6ea8880fc56a782e26eac88633371cb1ae7002be86f02f6c4c5542f633262", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-2": { + "ref": "checkout:case.admission-drain-occupancy.original.finding-2", + "revision": "sha256:b92090930f6801a39bc28d214b9f25dfb19c7aa2739ab0ffb527f6fa3a2b4a23", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "identity" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "resources", + "guide" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "guide" + ] + }, + "finding-0": { + "layer": "L1", + "finding": "case.json#/findings/0", + "required": [ + "finding-0" + ] + }, + "finding-1": { + "layer": "L1", + "finding": "case.json#/findings/1", + "required": [ + "finding-1" + ] + }, + "finding-2": { + "layer": "L1", + "finding": "case.json#/findings/2", + "required": [ + "finding-2" + ] + } + } + } + }, + "case_resources": { + "admission-drain-occupancy.json": "original", + "admission-drain-occupancy.md": "guide", + "case.json": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/case.drama3-rejected-directions.json b/src/inferrsi/knowledge/compositions/case.drama3-rejected-directions.json new file mode 100644 index 000000000..56bef406c --- /dev/null +++ b/src/inferrsi/knowledge/compositions/case.drama3-rejected-directions.json @@ -0,0 +1,245 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.drama3-rejected-directions", + "kind": "case", + "title": "Drama3 B300: rejected directions and invalid controls", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Drama3 standalone native-computation runtime on one B300", + "Only each cited microbenchmark, fixed-state diagnostic or complete service trial" + ], + "limitations": [ + "Campaign remains INCONCLUSIVE and optimization is paused", + "Individual completed gate failures do not complete the all-concurrency acceptance matrix", + "Repository summary inspected; external raw traces and runtime artifacts not rerun or rehashed", + "No root cause inferred from client accounting or cross-screen timing subtraction" + ], + "attribution": "Issue #10 diagnostic lessons, including runtime 47c3d2ec4e3406d8a71fccc3cb4967783c2650f5; revisit checks are current suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json", + "sha256": "a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/evidence/drama3-b300-scale150/results/diagnostic-lessons.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "evidence/drama3-b300-scale150/results/diagnostic-lessons.md" + ], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/10" + } + ], + "tags": [ + "negative-evidence", + "service-regression", + "quality-rejection", + "harness-mismatch", + "prefix-reuse", + "memory-compression", + "analysis-only" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "checkout:case.drama3-rejected-directions.original", + "revision": "sha256:a1ce299b00d6a0ceef621d1273d525d8ed6a2f3bb7d39b2abb2be4c8ca95bdc3" + }, + "guide": { + "ref": "checkout:case.drama3-rejected-directions.guide", + "revision": "sha256:891e949998aebd588e74336d108d520cc43bc8741b7142dc6d161a254779ee72" + }, + "identity": { + "ref": "checkout:case.drama3-rejected-directions.original.identity", + "revision": "sha256:22304724b64974a0f0b81f2680fb06b773d8048a59b16edfcf1894da73900f21" + }, + "origin-state": { + "ref": "checkout:case.drama3-rejected-directions.original.origin-state", + "revision": "sha256:e0d50ef1887398ce1059b32902fc079de610f6b7cda45d1c66c63aad12024c7e" + }, + "resources": { + "ref": "checkout:case.drama3-rejected-directions.original.resources", + "revision": "sha256:28d3e41ad3ceee23f92739213fc9ab04a5a2e377193f39b7e2a374be585f5199" + }, + "sources": { + "ref": "checkout:case.drama3-rejected-directions.original.sources", + "revision": "sha256:972bf5b324830e9fcf99e4f596ca1836cc65144e9712de7cde7a5bb4862fe526" + }, + "applicability": { + "ref": "checkout:case.drama3-rejected-directions.original.applicability", + "revision": "sha256:2bb286ec6ffe88836f566558d589e0f39d61770f287844ce542585c58f749c99" + }, + "tags": { + "ref": "checkout:case.drama3-rejected-directions.original.tags", + "revision": "sha256:ac03993f767a22fb53241142faaf800e396e43ad84e4d3133b7b3892637079d4" + }, + "limits-attribution": { + "ref": "checkout:case.drama3-rejected-directions.original.limits-attribution", + "revision": "sha256:019484272f43324a950638d947e7f10519cc5cfdabe8acbfe280e6e30552f6d2" + }, + "finding-0": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-0", + "revision": "sha256:c01c2db6029283055624c3c5278285b24488a26761fb1e249a3e821a9f2f1cf3", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-1": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-1", + "revision": "sha256:7bd38374a0c27e6725cb866f722d7185d7ef2b507c8d1a24137788fe539e4b10", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-2": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-2", + "revision": "sha256:80a405f669f84c662bcfd5a7142369140c68112b7ad5ae20a7c29e772f7ca4c9", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-3": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-3", + "revision": "sha256:e4ba2dfde8e80ce9a6a309a5397456402d15681216b1c1e05392751746cf2f11", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-4": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-4", + "revision": "sha256:714592729833a92b4b29c15c105593e65de6589ef469a6b974698946183d0136", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-5": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-5", + "revision": "sha256:1c4be5c17ec0878bbe470bbd9704b7a87c7b74fc43eed93c92d5ac929f2025c4", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-6": { + "ref": "checkout:case.drama3-rejected-directions.original.finding-6", + "revision": "sha256:c3192628ef0168a95aab0da0dd9b256f5fe22288dbcdc78f0e619caf16309ed7", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "identity", + "tags" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "resources", + "guide" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "guide" + ] + }, + "finding-0": { + "layer": "L1", + "finding": "case.json#/findings/0", + "required": [ + "finding-0" + ] + }, + "finding-1": { + "layer": "L1", + "finding": "case.json#/findings/1", + "required": [ + "finding-1" + ] + }, + "finding-2": { + "layer": "L1", + "finding": "case.json#/findings/2", + "required": [ + "finding-2" + ] + }, + "finding-3": { + "layer": "L1", + "finding": "case.json#/findings/3", + "required": [ + "finding-3" + ] + }, + "finding-4": { + "layer": "L1", + "finding": "case.json#/findings/4", + "required": [ + "finding-4" + ] + }, + "finding-5": { + "layer": "L1", + "finding": "case.json#/findings/5", + "required": [ + "finding-5" + ] + }, + "finding-6": { + "layer": "L1", + "finding": "case.json#/findings/6", + "required": [ + "finding-6" + ] + } + } + } + }, + "case_resources": { + "case.json": "original", + "drama3-rejected-directions.json": "original", + "drama3-rejected-directions.md": "guide" + } +} diff --git a/src/inferrsi/knowledge/compositions/case.qwen-ascend-rejected-directions.json b/src/inferrsi/knowledge/compositions/case.qwen-ascend-rejected-directions.json new file mode 100644 index 000000000..77a671a20 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/case.qwen-ascend-rejected-directions.json @@ -0,0 +1,228 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.qwen-ascend-rejected-directions", + "kind": "case", + "title": "Qwen Ascend: reported rejected directions", + "backend": "ascend", + "origin": [ + "external" + ], + "state": "author_reported", + "applicability": [ + "Author-reported single Ascend 910B1 Qwen-Image-2.1-Turbo cohort", + "BF16, eager, TORCH_SDPA, CFG=1, 1280x704, native eight sigmas" + ], + "limitations": [ + "Imported author report; locally_verified=false", + "Raw request timings, RGBA outputs and frozen validator are absent from this import", + "InferRSI acceptance remains INCONCLUSIVE; the source 30 percent target was not met", + "No cross-device or HTTP-serving qualification" + ], + "attribution": "amy-why-3459 source report, retained by the existing Ascend guide; revisit checks are current suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json", + "sha256": "b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-ascend.md", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "docs/qwen-image-2.1-turbo-ascend.md" + ], + "upstream_head": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + } + ], + "tags": [ + "negative-evidence", + "resource-failure", + "OOM", + "no-demonstrated-gain", + "RoPE", + "fusion-attention", + "task-queue" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original", + "revision": "sha256:5d73751d8affa1e9e90c064a17dc1d278acde79e607bf627f9e1d12a6306750c" + }, + "guide": { + "ref": "checkout:case.qwen-ascend-rejected-directions.guide", + "revision": "sha256:c6c9d593fa1a2494a8a9c473dda926af563f868afd22e3e99c254f31a170f282" + }, + "identity": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.identity", + "revision": "sha256:44deeed2b1d2f1254d7d5006b80e4396a2fd511fc971995a9998d371c52fcb3f" + }, + "origin-state": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.origin-state", + "revision": "sha256:657e09c1defea7587e3c9e86fea1125fb415894fed0e54ccb0eed90b3f60472e" + }, + "resources": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.resources", + "revision": "sha256:d5f00f7ffcae09a113b4b18eecd195f46b9032ee116586822ed5d29237390a35" + }, + "sources": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.sources", + "revision": "sha256:ee3645e7b9d15f9f05428c5d4ea5b3baa040bd74bfa843979f9be1485d82c165" + }, + "applicability": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.applicability", + "revision": "sha256:b74edc8d941ecf313856a539e17d7c3d7028ff04adcc71ac93361dcfdb3057dd" + }, + "tags": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.tags", + "revision": "sha256:0bb2d1ff0a9340811b5e88cb0d205b829ef291ae16c84a2951f3a6a55d276e78" + }, + "limits-attribution": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.limits-attribution", + "revision": "sha256:60fa8cb3222c2c907233151e781724258b91b1d83762796768e2e4727b8ab3d0" + }, + "finding-0": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.finding-0", + "revision": "sha256:1c7180b432c1f771d87aca1b8f1bb164764fae0d69655c295aed28bd82f6c2da", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-1": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.finding-1", + "revision": "sha256:81450ca0d26dd0f924d879c3d5d42ac1d64c0c5894c99a0ba7cf6d2ecc1e95e9", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-2": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.finding-2", + "revision": "sha256:4615fbd7a6244c8cfe1c93a5d5c3568d2ffc256778365f95faf6c77eff3434ec", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-3": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.finding-3", + "revision": "sha256:6914bc815ff635f8f90f678b742ce6a442fe014603a9a5ca8ff3c32f40a5715e", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-4": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.finding-4", + "revision": "sha256:cbeafad7589667ed587f254efc87904afe10dbd856a2eaac2404bb4b91c192bf", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-5": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original.finding-5", + "revision": "sha256:f73b4dba213797ce26763ff52bce986f531532a91dc91cf34f77d1cd916c260e", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "identity", + "tags" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "resources", + "guide" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "guide" + ] + }, + "finding-0": { + "layer": "L1", + "finding": "case.json#/findings/0", + "required": [ + "finding-0" + ] + }, + "finding-1": { + "layer": "L1", + "finding": "case.json#/findings/1", + "required": [ + "finding-1" + ] + }, + "finding-2": { + "layer": "L1", + "finding": "case.json#/findings/2", + "required": [ + "finding-2" + ] + }, + "finding-3": { + "layer": "L1", + "finding": "case.json#/findings/3", + "required": [ + "finding-3" + ] + }, + "finding-4": { + "layer": "L1", + "finding": "case.json#/findings/4", + "required": [ + "finding-4" + ] + }, + "finding-5": { + "layer": "L1", + "finding": "case.json#/findings/5", + "required": [ + "finding-5" + ] + } + } + } + }, + "case_resources": { + "case.json": "original", + "qwen-ascend-rejected-directions.json": "original", + "qwen-ascend-rejected-directions.md": "guide" + } +} diff --git a/src/inferrsi/knowledge/compositions/case.qwen-b300-rejected-directions.json b/src/inferrsi/knowledge/compositions/case.qwen-b300-rejected-directions.json new file mode 100644 index 000000000..8b50236fc --- /dev/null +++ b/src/inferrsi/knowledge/compositions/case.qwen-b300-rejected-directions.json @@ -0,0 +1,226 @@ +{ + "authority": "checkout", + "metadata": { + "id": "case.qwen-b300-rejected-directions", + "kind": "case", + "title": "Qwen B300: rejected directions to check before retrying", + "backend": "cuda", + "origin": [ + "internal" + ], + "state": "historical_observation", + "applicability": [ + "Qwen-Image-2.1-Turbo, four B300, BF16, native eight steps", + "Only the source ledger's individual trials and controls" + ], + "limitations": [ + "The final campaign PASS does not qualify each rejected direction", + "Exploratory trial timings are not additive gains or causal comparisons", + "No experiment was rerun for this extraction" + ], + "attribution": "Historical issue #3 optimization ledger; revisit checks are current diagnostic suggestions", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json", + "sha256": "90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122" + }, + { + "type": "git", + "url": "https://github.com/InferMatrixLab/InferRSI/blob/d51c941dc57807c1e16ea698cd9291f414110c45/docs/qwen-image-2.1-turbo-b300.md#optimization-ledger", + "commit": "d51c941dc57807c1e16ea698cd9291f414110c45", + "paths": [ + "docs/qwen-image-2.1-turbo-b300.md" + ], + "issue": "https://github.com/InferMatrixLab/InferRSI/issues/3" + } + ], + "tags": [ + "negative-evidence", + "quality-rejection", + "no-demonstrated-gain", + "confounded-run", + "RoPE", + "CUDA-Graph" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "checkout:case.qwen-b300-rejected-directions.original", + "revision": "sha256:f9118c7f4ba8d539ff87cc4f9cf1890aa250ad20625ed5a79fecd81d155d388a" + }, + "guide": { + "ref": "checkout:case.qwen-b300-rejected-directions.guide", + "revision": "sha256:744854a77597c27600f368da02e7098d1a55b402a1abcfe04afc2c9be2a6a528" + }, + "identity": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.identity", + "revision": "sha256:418134c015ad6c033182cfcd7f89d6d8a33b6e2bc12b9002e8713a56bca68e5d" + }, + "origin-state": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.origin-state", + "revision": "sha256:8ef14243a71d71e0126af4b664629f7058e76429ec13d4304a964b29c076952c" + }, + "resources": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.resources", + "revision": "sha256:f2e85554a46450ac34886f5517bfcff304dce1897ab3e9be45d5a6421d67c470" + }, + "sources": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.sources", + "revision": "sha256:b8de0d114bda2ab440084a5e3936c914be52bf8a798c6119c2e7cf6ae7785462" + }, + "applicability": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.applicability", + "revision": "sha256:e8073f28453b3d5ba66eff293f9b3ae99e8c1909c3a1b560868e7317ed9c1223" + }, + "tags": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.tags", + "revision": "sha256:f906af9950ce099b5bb0a70e98f8bbf6195e81a1c0808fbbedc6af5ac803e010" + }, + "limits-attribution": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.limits-attribution", + "revision": "sha256:fb55908872b30493be207980d161e54e19e5a6007d4deb753f6e3205c6dd6b1b" + }, + "finding-0": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.finding-0", + "revision": "sha256:cf4af594e024a2846868dd619fd6873816ef1dcddac89b8bcf1fbf2b65653b14", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-1": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.finding-1", + "revision": "sha256:e2133612781a09e11c891543c592e77ca84e44cc851ec986e22642e9ddc78cd5", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-2": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.finding-2", + "revision": "sha256:fd2c82cfc21689322f3198aef732395610a6d64ce0ff815b2d43443a02d92e27", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-3": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.finding-3", + "revision": "sha256:2d02c0bdb596e9f42c7fbabffd1c63d619969ed5ada0a106b9fbfe1b0b784f29", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-4": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.finding-4", + "revision": "sha256:325b91d0bf9a771dfeb9e7e01b6557e0ca7450bb67045d047b65cf435307b3a6", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + }, + "finding-5": { + "ref": "checkout:case.qwen-b300-rejected-directions.original.finding-5", + "revision": "sha256:efd06e43357fd1f047b8be1e2a204e5499c1df824837dd22db005f448cb0bcf8", + "requires": [ + "origin-state", + "sources", + "applicability", + "limits-attribution" + ] + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "identity", + "tags" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "resources", + "guide" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "guide" + ] + }, + "finding-0": { + "layer": "L1", + "finding": "case.json#/findings/0", + "required": [ + "finding-0" + ] + }, + "finding-1": { + "layer": "L1", + "finding": "case.json#/findings/1", + "required": [ + "finding-1" + ] + }, + "finding-2": { + "layer": "L1", + "finding": "case.json#/findings/2", + "required": [ + "finding-2" + ] + }, + "finding-3": { + "layer": "L1", + "finding": "case.json#/findings/3", + "required": [ + "finding-3" + ] + }, + "finding-4": { + "layer": "L1", + "finding": "case.json#/findings/4", + "required": [ + "finding-4" + ] + }, + "finding-5": { + "layer": "L1", + "finding": "case.json#/findings/5", + "required": [ + "finding-5" + ] + } + } + } + }, + "case_resources": { + "case.json": "original", + "qwen-b300-rejected-directions.json": "original", + "qwen-b300-rejected-directions.md": "guide" + } +} diff --git a/src/inferrsi/knowledge/compositions/cite-check-downstream-pr.json b/src/inferrsi/knowledge/compositions/cite-check-downstream-pr.json new file mode 100644 index 000000000..251cdc9c9 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/cite-check-downstream-pr.json @@ -0,0 +1,114 @@ +{ + "authority": "checkout", + "metadata": { + "id": "cite-check-downstream-pr", + "kind": "skill", + "entrypoint": "workflows/governance/cite-check-downstream-pr/SKILL.md", + "title": "Review a downstream PR description for correct acceptance issue links, SHA pins, and artifact citations.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/cite-check-downstream-pr/SKILL.md", + "sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Review of a downstream PR description that cites RSI acceptance work for a performance or quality improvement", + "prerequisites": "The PR description, the acceptance issue it cites, and the evidence paths it names; reviewing is read-only and needs no local run", + "input_contract": "One PR description plus the cited acceptance issue and its evidence tree; the reviewer reads claims and citations, not the candidate code", + "produced_artifact": "A per-checklist review result that either accepts the citation or marks the summary unverified, using only PASS/FAIL/INCONCLUSIVE vocabulary", + "failure_modes": [ + "No acceptance issue URL, only a chat thread", + "Branch names instead of full baseline and candidate SHAs", + "Microbenchmark evidence offered for an end-to-end latency claim", + "A threshold restated or invented relative to the acceptance issue", + "Evidence path absent, stale or on a different SHA than the cited candidate" + ], + "refusal_point": "Refuses to restate a performance or quality claim whose artifacts are missing, stale or off-SHA; reports the summary as unverified instead" + }, + "state": "candidate", + "limitations": [ + "Checklist-only procedure; it validates citation discipline, not the measurement behind an artifact.", + "A passing review does not establish that the campaign evidence itself is correct.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/governance/cite-check-downstream-pr/SKILL.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:cite-check-downstream-pr.original.navigation", + "revision": "sha256:2e1b7afde428c8679def94df4361adc67374602042e7fbf8307634c4903d0374" + }, + "decision": { + "ref": "checkout:cite-check-downstream-pr.original.decision", + "revision": "sha256:0709396dc852cacb02e0f190b515cdffd6f6fd93cbc382c413dbb7b510ada418" + }, + "procedure": { + "ref": "checkout:cite-check-downstream-pr.original.procedure", + "revision": "sha256:479e1711fe473c49f52399e631329e7f98f355364454788d38ccad10fcd74577", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:cite-check-downstream-pr.original", + "revision": "sha256:de434b2220183c8abc3f76d990ee5e6dd7accca534be128f6f3edd7608b52fd2" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "original": { + "layer": "L3", + "required": [ + "original" + ] + } + }, + "skill": { + "directory_entry": true + } + } + }, + "directory_resources": { + "workflows/governance/cite-check-downstream-pr/SKILL.md": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/claim-contract.json b/src/inferrsi/knowledge/compositions/claim-contract.json new file mode 100644 index 000000000..d92513676 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/claim-contract.json @@ -0,0 +1,113 @@ +{ + "authority": "checkout", + "metadata": { + "id": "claim-contract", + "kind": "skill", + "entrypoint": "workflows/governance/claim-contract/SKILL.md", + "title": "Enforce ThinkFlowLab claim contract wording and verdict rules without embedding campaign-specific revision pins.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/claim-contract/SKILL.md", + "sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Wording and verdict rules for any public performance or quality claim produced from an RSI campaign", + "prerequisites": "A completed campaign with pinned baseline and candidate SHAs and an evidence tree; the rules themselves carry no numeric threshold", + "input_contract": "A claim draft, the campaign RunSpec and its evidence tree under evidence//", + "produced_artifact": "A claim sentence in the pinned form, or a refusal when the campaign verdict is not PASS", + "failure_modes": [ + "Claim asserted before the campaign reaches PASS with artifacts", + "Baseline or candidate SHA written into a shared template, skill or default CI environment", + "Microbenchmark result presented as end-to-end completion", + "A lesson transferred across an unverified repo x revision x backend x device x model x scenario tuple" + ], + "refusal_point": "Refuses any public claim lacking a PASS verdict and artifacts under evidence/, and refuses numeric thresholds because thresholds belong to the campaign" + }, + "state": "candidate", + "limitations": [ + "States wording and verdict rules only; it selects no numeric gate and validates no measurement.", + "SIAS plane boundaries constrain where a change belongs, not whether it is correct.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/governance/claim-contract/SKILL.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:claim-contract.original.navigation", + "revision": "sha256:d2f6c70f089f343d7c171908d246a9dcc77d779cc11986fe889427d862714751" + }, + "decision": { + "ref": "checkout:claim-contract.original.decision", + "revision": "sha256:337562c8059d2a81b1d848e8436418561ee6958a9d6811b586a5264e1b378f45" + }, + "procedure": { + "ref": "checkout:claim-contract.original.procedure", + "revision": "sha256:cb40386d2f1e23802aa5c49aec8996cfa1208a8653b0d5e9bcc4bf0e218b7b8a", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:claim-contract.original", + "revision": "sha256:48a0083d0536885a3b9f95e616dc59fbc2259bd896bf8909d5847608bf3d8d61" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "original": { + "layer": "L3", + "required": [ + "original" + ] + } + }, + "skill": { + "directory_entry": true + } + } + }, + "directory_resources": { + "workflows/governance/claim-contract/SKILL.md": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/competitor-scan.json b/src/inferrsi/knowledge/compositions/competitor-scan.json new file mode 100644 index 000000000..1f2a73e11 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/competitor-scan.json @@ -0,0 +1,112 @@ +{ + "authority": "checkout", + "metadata": { + "id": "competitor-scan", + "kind": "skill", + "entrypoint": "workflows/research/competitor-scan/SKILL.md", + "title": "Structure a lightweight competitive scan without inventing benchmark numbers or campaign verdicts.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/competitor-scan/SKILL.md", + "sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Qualitative positioning of a new RSI repository against other projects before acceptance evidence exists", + "prerequisites": "A selected repository and readable public material from the alternatives; no benchmark run is required", + "input_contract": "A target repository plus whatever the alternatives publish about what they optimize and how they prove it", + "produced_artifact": "A short Markdown note covering problem, alternatives, differentiation, limits and open questions", + "failure_modes": [ + "Numeric comparison written without a PASS campaign in our own evidence tree", + "Third-party figure repeated as if reproduced under our RunSpec", + "Scan presented as a substitute for acceptance evidence" + ], + "refusal_point": "Refuses any numeric comparison not sourced from our own evidence//results/ with a PASS verdict" + }, + "state": "candidate", + "limitations": [ + "Produces positioning material only; it establishes no performance or quality result.", + "Third-party claim contracts are read from public material and may be incomplete.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/research/competitor-scan/SKILL.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:competitor-scan.original.navigation", + "revision": "sha256:c46ae5cb4cf5f037b6146958acee5900aec243db006ee22fd7da4f06f7c470d3" + }, + "decision": { + "ref": "checkout:competitor-scan.original.decision", + "revision": "sha256:713da9406604deda0a7591caec86abc3e822b6b4384c82cfb80b3339a1c6b69f" + }, + "procedure": { + "ref": "checkout:competitor-scan.original.procedure", + "revision": "sha256:67a1f0929b2d6ddec7b391cced8d315ccdd221af7a946bd0e86d7754eda936dd", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:competitor-scan.original", + "revision": "sha256:d5e7b6d2f6cd46d171143ce6196ec851b06e2c9a35724a93f2203023569ba188" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "original": { + "layer": "L3", + "required": [ + "original" + ] + } + }, + "skill": { + "directory_entry": true + } + } + }, + "directory_resources": { + "workflows/research/competitor-scan/SKILL.md": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/deepinfer.common.llm.bounded_windowed_replay.json b/src/inferrsi/knowledge/compositions/deepinfer.common.llm.bounded_windowed_replay.json new file mode 100644 index 000000000..1b0588a2b --- /dev/null +++ b/src/inferrsi/knowledge/compositions/deepinfer.common.llm.bounded_windowed_replay.json @@ -0,0 +1,389 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "DeepInfer bounded replay: compact query rows with a derived dependency closure and separately preserved historical state", + "summary": "A decoder stack split at an explicit producer/consumer boundary can replay only a retained suffix if the boundary captures the full-length state the consumer needs. The retain arithmetic is small and transferable; which layers are safe to shorten is a per-model dependency question and must be derived, not assumed from per-layer windowing.", + "applicability": { + "hardware": [ + "Backend-independent retain rule; the reference asserts support only for NVIDIA SM100 and Ascend 950" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; the model's window sizes and layer boundary come from its config and do not transfer" + ], + "conditions": [ + "The decoder has an explicit boundary: earlier layers run over the full prefix, later consumer layers run compact query rows while reading all required preserved state", + "A dependency closure shows each retained query's inputs are available from retained producer outputs or explicitly preserved historical state", + "Full-length consumer KV is written at the boundary, independent of the compact query", + "The rollback depth is known and floored at the speculation width plus one" + ] + }, + "limitations": [ + "No equivalence run was performed; the metadata argument is from the shared formula, not from a measurement.", + "Applies to architectures with a demonstrated boundary dependency, not to arbitrary sliding-window stacks.", + "Window sizes, boundary-layer index and ring lengths are specific to one model and must not be carried across.", + "Query-row compaction does not imply dropping historical keys.", + "Prompt logprobs are not reconstructable from a clipped region.", + "The truncation path is off by default in the source." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + }, + "repo": "deepinfer", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.bounded_windowed_replay.json", + "sha256": "43613225e9ccdbd34c0f7e3e0767887b9bbfd0f38b2c21684677d99e31a432f0" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/input_metadata/prepare_tensor_input_v4.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "93a6b1dd533db116d2f7540c78d6bb5419bdb8c1d2063b031ab8b1a8cc138fe2" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/input_metadata/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "882a33de3da0fba81644adde9e9e1a90ec3d3ff34a8f3ad4dda18faafebd6460" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "7dc8ad7b6ca4902bcef67b1cbc4804592995c5b6af9ebaa00b59cc338c1aa6ec" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "cb228c8fd4c76200e2ec266c51872107cfe7b384fdc88458b3d1c0ff101f3116" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ca3d80120fe6bc50971b180278dd575d585e1a6c7a3c2174a8a6fd6213454161" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/model_metadata_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "1ef7803d2b0083d025de676c841db9a317235b881fb9ebf6781ec76d49d7b22c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/model_runner.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "9e2e18d136c9e0c9f23905ff994e9d23afaa94aa7a133d425e7fc1fc069033ef" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/decoder_layer.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "2189fa14c0665a3a211b47c5440748273fd92b39a68268a0080530d3c95b7297" + } + ], + "attribution": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/input_metadata/prepare_tensor_input_v4.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "93a6b1dd533db116d2f7540c78d6bb5419bdb8c1d2063b031ab8b1a8cc138fe2" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/input_metadata/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "882a33de3da0fba81644adde9e9e1a90ec3d3ff34a8f3ad4dda18faafebd6460" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/yoco.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "7dc8ad7b6ca4902bcef67b1cbc4804592995c5b6af9ebaa00b59cc338c1aa6ec" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/v4_modules/attn.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "cb228c8fd4c76200e2ec266c51872107cfe7b384fdc88458b3d1c0ff101f3116" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/cache_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ca3d80120fe6bc50971b180278dd575d585e1a6c7a3c2174a8a6fd6213454161" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/model_metadata_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "1ef7803d2b0083d025de676c841db9a317235b881fb9ebf6781ec76d49d7b22c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/model_runner.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "9e2e18d136c9e0c9f23905ff994e9d23afaa94aa7a133d425e7fc1fc069033ef" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/decoder_layer.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "2189fa14c0665a3a211b47c5440748273fd92b39a68268a0080530d3c95b7297" + } + ], + "id": "deepinfer.common.llm.bounded_windowed_replay", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original", + "revision": "sha256:095d26f0972f866e6578834da0a0af6739476cd95d9d0fea152ac44684cf51a4" + }, + "identity": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.identity", + "revision": "sha256:aefc4990b9a6e716a1e6f2659e91126d931534f1e63c8e7635966d25a41dbd61" + }, + "status": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.status", + "revision": "sha256:d7acd5b38b59d71397d3a93011c9ef07d2ef37ce675881aac1a78fb7a8d8c6de" + }, + "summary": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.summary", + "revision": "sha256:369b64ab8d1b70e0bce80a7503661c28ab2e7db70e516cf8f5ffe54bcf17b3d3" + }, + "identity-2": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.identity-2", + "revision": "sha256:19bf1597ceba3494e0d7120f2b7d4a925a31351dba14dcdd750079b8f76e5546" + }, + "sources": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.sources", + "revision": "sha256:4ca96198d571f3c6ae1624775e86a94106eb828e3e7444942b4411909bf08061" + }, + "scope": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.scope", + "revision": "sha256:96b00bbd626158864ea88f144c3a283d085886aebd6a5ec05df5cb25e6ad7842" + }, + "claim-0": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-0", + "revision": "sha256:69d886ad4abf58f91495dd769746fc00d4e39d04df69aa3b6ced185eca37c8d5", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-1", + "revision": "sha256:e2fffb6879cd58663d7f3635bab0f510feaf1868179cd53712a7b5673f5d9885", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-2", + "revision": "sha256:2eadcb8e7b6d5593e36578af7f66a0a999f05d32fe2482a8e989102092fed90f", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-3", + "revision": "sha256:019e19f8c9617f136eaded71964a62052a97854c6ad27905504e182e781443ef", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-4", + "revision": "sha256:a7773e064ca6b4c56486405a15fa9f26cf17b9fa29ea650ad9f8bdbeddd94024", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-5": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-5", + "revision": "sha256:f8b9ed6e73f17fb31dde7927c610680898321cf9e35f42e707c3dc32b74af41a", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-6": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.claim-6", + "revision": "sha256:6b42729f654392bd8d4c361d2553e3a587182faf6c4c30224a0f2ec47a258fce", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.transfer", + "revision": "sha256:a95027ad40c361177e63a235a8e6b9c87b011e7ac64d3c04d9f9353a48a7d058", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.actions", + "revision": "sha256:478bfc1fd146ada61b3a05c5d286a1090230542d8d5b254957741598eab9ae31", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.validation", + "revision": "sha256:c1f9c95978a79759e0fcf4a2bf8406c06e6b88eb20889fc18067bcf8d6130bf3" + }, + "limits": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.limits", + "revision": "sha256:77156f8996e68978a3a5327a19f2f91139e3c04faeaf08622bece77332e33b0b" + }, + "verification": { + "ref": "package:deepinfer.common.llm.bounded_windowed_replay.original.verification", + "revision": "sha256:138686720cb60d8d9a49f7ad4bea38de52579a4daee3743245500645269f6326" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "claim-5", + "claim-6", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/deepinfer.common.llm.speculative_verification_budget.json b/src/inferrsi/knowledge/compositions/deepinfer.common.llm.speculative_verification_budget.json new file mode 100644 index 000000000..b569781e0 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/deepinfer.common.llm.speculative_verification_budget.json @@ -0,0 +1,374 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "DeepInfer verification budget: spend verification rows by marginal acceptance, not by fixed draft width", + "summary": "A confidence head predicts per-position acceptance; a cumulative non-increasing rate vector plus a fitted step-cost model selects how many draft rows to verify per step. The objective is expected accepted tokens per unit time, so fewer verified drafts may accept fewer tokens while still raising throughput. Draft compute is unchanged.", + "applicability": { + "hardware": [ + "Backend-independent procedure; the reference implementation targets NVIDIA SM100 and Ascend 950 only" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; requires a model with a trained confidence head" + ], + "conditions": [ + "Multi-token speculative decoding with a draft head", + "Verification cost grows with query rows", + "Acceptance varies materially by request and draft position", + "A measured (rows, step_time) curve is obtainable at warmup", + "The per-position confidence feeding a verification decision at position i is independent of confidence at positions greater than i" + ] + }, + "limitations": [ + "No gain was reproduced; nothing here is a measured speedup.", + "The source's own efficiency figures are deployment documentation, not a controlled experiment.", + "Requires a trained confidence head; a substitute estimate needs its own calibration.", + "Budgeting can lower accepted length, so equal accepted length is not an available correctness criterion.", + "Cross-backend equality of the rejection comparison has no assertion in the source.", + "Numeric acceptance rates and warmup curves are deployment-specific and are not carried in this record." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + }, + "repo": "deepinfer", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.speculative_verification_budget.json", + "sha256": "a729e1fc00be44e1480a5dc65bbcdd58df8599681df74dbc651a5a49f27e9028" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "164f45db4cccd6d6909dd2846e7dfffb57754b108af679443bf4bd71ec33785a" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/sampling_params.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f800034efdebe1b21620660a51fa9122d3d7f138d8e60cd738f33d643c3116f8" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/mtp/dflash.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "12ebfb9c793062844d40e0fab17164d5365d965c318f8b9f0f4adf51b3afb684" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/tilelang_ops/fused_sample.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f43ac934284d15f708a0aa07aaa8fff7daa257984e311ca554bd9dbea89e5e1d" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/sampler.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "81205a12e860041ffa904321b852db2d048bc038bb07d494dbb78b44b522d9a9" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + } + ], + "attribution": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py#L118-L219", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/mtp_varlen.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "164f45db4cccd6d6909dd2846e7dfffb57754b108af679443bf4bd71ec33785a" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/environ.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "fe2c531989c419f0b51b169a07f5ed826dcec7f95c0c5bc3a351805923c4f218" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/sampling_params.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f800034efdebe1b21620660a51fa9122d3d7f138d8e60cd738f33d643c3116f8" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/models/mtp/dflash.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "12ebfb9c793062844d40e0fab17164d5365d965c318f8b9f0f4adf51b3afb684" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/tilelang_ops/fused_sample.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "f43ac934284d15f708a0aa07aaa8fff7daa257984e311ca554bd9dbea89e5e1d" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/layers/sampler.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "81205a12e860041ffa904321b852db2d048bc038bb07d494dbb78b44b522d9a9" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + } + ], + "id": "deepinfer.common.llm.speculative_verification_budget", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original", + "revision": "sha256:adb2b649986c2c5a2dfcb4269619d1596ee3ae0bc03d4ea11ce6748049345748" + }, + "identity": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.identity", + "revision": "sha256:4ea3d27912e311f7d85abdfb7ff72bc30abc454bf6782e3a12934f29e55cd10a" + }, + "status": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.status", + "revision": "sha256:9d26da990b6e65b77807c9d7ecfcf28f167f0eec4acd14beadda86689a29b3f4" + }, + "summary": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.summary", + "revision": "sha256:f75a5f68553434b5a5a809f35dd928b8f9fa3f787daae4d4b835dbbfe1f53873" + }, + "identity-2": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.identity-2", + "revision": "sha256:d2c8767fcff2cc8d4b3195422ad04fd5a72a121cb234ef0b5782bd8634b5de2a" + }, + "sources": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.sources", + "revision": "sha256:de7e0c41a3eda78a97a37c40b04d3c31ca0885aea87765fb5e56a34520f4a297" + }, + "scope": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.scope", + "revision": "sha256:26e379f853a89d670b6e4a0c8d0d3b62b06ddedef0488849eea8910432e96066" + }, + "claim-0": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-0", + "revision": "sha256:249f2f9718287a488cb071dc692fb7379f0947392c7a00b92e138f4826a5e093", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-1", + "revision": "sha256:b1b45a2c388fd7087e874862566bb1eb4105cb114b4dd2cff9720924ee5ba36c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-2", + "revision": "sha256:f5f05dc45e9e1b04f6cf6b2f88dee5a90051e874a83f2ad3bcc6e000fdfea8f8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-3", + "revision": "sha256:a753a6a4c86464ae15d050ff4aeaf8265657ef993234c9685bac5e2d3280e6b3", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-4", + "revision": "sha256:5a410c8e1356701e92b12b6efb9221afdffe8c11086909fb88a08737ff976991", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-5": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-5", + "revision": "sha256:ee07d91fc6c9c69b1637ff3fbf1c2cbd15cdb183d9719cf6ac0f0740f531a3eb", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-6": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-6", + "revision": "sha256:c456ec86e1a9fc53b13804cff4c0aa8d8e73a6da4f0f69f872ba5768a04d1703", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-7": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.claim-7", + "revision": "sha256:a2526d8472e38dac406eeacf076694d97d89e143f2a6e91b726ca7a5653279c8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.transfer", + "revision": "sha256:9918263959af8c00507965935a3b93cd4ec15622accd759bd2733cfe6f98cbb8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.actions", + "revision": "sha256:6e8fae7c7e2f52f28c14f09bca59172df9efcfc78ccd9e2fb8faea63d198c407", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.validation", + "revision": "sha256:d0f3443b2fe1dc92ab90258c68e04654cde9ec1249add993e2372b30b8a553c5" + }, + "limits": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.limits", + "revision": "sha256:d1c49ed6e2e0491873a55678b98ed9a8063f4adee7fb14ab136931c7ac80f5bb" + }, + "verification": { + "ref": "package:deepinfer.common.llm.speculative_verification_budget.original.verification", + "revision": "sha256:025f39a666056cff9cf34328244e247ecad83b0240e68204917c1faef6cbab6a" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "claim-5", + "claim-6", + "claim-7", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/deepinfer.common.llm.zero_overhead_deferred_scheduling.json b/src/inferrsi/knowledge/compositions/deepinfer.common.llm.zero_overhead_deferred_scheduling.json new file mode 100644 index 000000000..677bbe3dc --- /dev/null +++ b/src/inferrsi/knowledge/compositions/deepinfer.common.llm.zero_overhead_deferred_scheduling.json @@ -0,0 +1,335 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "DeepInfer zero-overhead scheduling: defer the previous step's post-process to overlap host prep with device work", + "summary": "Move the CPU-only post-process of step N into step N+1 so it overlaps the next forward. The reusable part is the staleness enumeration and the on-device repair, not the scheduler itself.", + "applicability": { + "hardware": [ + "Backend-independent pipelining idea; the reference implementation asserts support only for NVIDIA SM100 and Ascend 950" + ], + "software": [ + "deepseek-ai/DeepInfer at 8b16149741a4935e1dec8cea27853f273b374c5b; later revisions need reinspection" + ], + "conditions": [ + "Decode-heavy workload where the CPU post-process is exposed between device kernels", + "At least one extra step of retained metadata, state slots and KV blocks is affordable", + "Distributed step-type votes can run on a host-side backend, not a device collective", + "The entrypoint has a drain path, because callers see results one step late" + ] + }, + "limitations": [ + "No DeepInfer build or run was performed; nothing here is a measured gain.", + "The reference is an offline engine for one model; transfer to a serving engine with continuous batching is unproven.", + "Scheduler stale-output guards, sample-event synchronization and deferred metadata release exist. Their presence does not establish complete in-flight KV/state reuse safety; a reachable preemption race was neither proved nor reproduced, so it remains a validation question rather than a known defect.", + "Numeric timer thresholds and any reported throughput belong to the source deployment and are not reproduced." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "source_observed" + }, + "repo": "deepinfer", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/deepinfer.common.llm.zero_overhead_deferred_scheduling.json", + "sha256": "ed5426af145f066f6183bd316c4073c46f324f5ee83aa9bd616387c0d0e7149c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L307-L314", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/parallel_utils/parallel_state.py#L89-L94", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "3565b2449abff4df0df2f979061a73364886c93602218b43c2f86c70f2629801" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/zos.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "1cb70e0b4ed7181b95e19ef2cc3cc640d1cd8f24e874ce4bc34fe51d6f031b46" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/arg_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c28c478bd376165c073c6e0722bed8468599a2fd766ffc7aafcd4ef270af52c5" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/engine_type.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "9933d83f500e3cc14c5fef0dd2fbe5c5170dbbf24df217376b0a55c4fb4ab48c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "8a0049b98ea6f7ef98555ad8b38b9e8dac2292c0d2a89c2090bbdb5e5ee7295a" + } + ], + "attribution": [ + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/llm_engine.py#L307-L314", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "a636d60ca5711f6b7c21e68370c3bd9c2de6fc3f4439a7429ca4f572f0edeebe" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/model_executor/parallel_utils/parallel_state.py#L89-L94", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-22", + "content_sha256": "3565b2449abff4df0df2f979061a73364886c93602218b43c2f86c70f2629801" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/worker/worker.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "ad32e595d9ab289dff1a7709136431ac60dae709e9e5123ae42eb0ebf7c30cbb" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/zos.cpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "1cb70e0b4ed7181b95e19ef2cc3cc640d1cd8f24e874ce4bc34fe51d6f031b46" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/csrc/engine/scheduler.hpp", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c14de4d5341170227b82ddf2d146d9c6a337937885a6886237aab5a7238da5db" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/arg_utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "c28c478bd376165c073c6e0722bed8468599a2fd766ffc7aafcd4ef270af52c5" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/engine/engine_type.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "9933d83f500e3cc14c5fef0dd2fbe5c5170dbbf24df217376b0a55c4fb4ab48c" + }, + { + "url": "https://github.com/deepseek-ai/DeepInfer/blob/8b16149741a4935e1dec8cea27853f273b374c5b/deepinfer/utils.py", + "type": "source_code", + "commit": "8b16149741a4935e1dec8cea27853f273b374c5b", + "accessed_at": "2026-10-20", + "content_sha256": "8a0049b98ea6f7ef98555ad8b38b9e8dac2292c0d2a89c2090bbdb5e5ee7295a" + } + ], + "id": "deepinfer.common.llm.zero_overhead_deferred_scheduling", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original", + "revision": "sha256:a25099ddb12408ab51ac2936add86dce31ab105b1099206393fcbca9499fcf48" + }, + "identity": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.identity", + "revision": "sha256:64d863bf0a6b60425f3614e4e690de252117dd64e5fdcc44de6a777f991e2305" + }, + "status": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.status", + "revision": "sha256:4d3ed038b7e19b5e282b76f64df9252d618cb447c2546edac2002924089a9e03" + }, + "summary": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.summary", + "revision": "sha256:cc68acf579b3a8fb5c3de325b0eadeead2058df1f72f516f23c2970c2697d445" + }, + "identity-2": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.identity-2", + "revision": "sha256:64414325a75f7e50064d3169357b260d55e7b088c9d24ee59eb865cda244aedd" + }, + "sources": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.sources", + "revision": "sha256:efbdae235d3a7631b89622900837126c62716cb60a59528a6513e405aeca790b" + }, + "scope": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.scope", + "revision": "sha256:c09346562deb9139bfc289f8a63b8e377e8903e9dba0f7b7b267b9c26fefa797" + }, + "claim-0": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.claim-0", + "revision": "sha256:6b87fadf4d3850b3dfa86c4873a5c034aa792792d52798a258fdf564dd751002", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.claim-1", + "revision": "sha256:014a555c294f0894824eb1fb8857839ba4011ce189419e37a6be2f752c603b8d", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.claim-2", + "revision": "sha256:69b6efce331fac725481767df9ba5057bbf350c304e8a74cbca27ff2ca00acc8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.claim-3", + "revision": "sha256:146ffc3d45ddbe41e1bc2935bbf3f1f192c910f3e3f14a04535dd7218984f0b2", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.claim-4", + "revision": "sha256:05c259df7ceb871c3c668a48f4a3e34ee75e9ccc173b2d0f673b14144ec65b21", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.transfer", + "revision": "sha256:a3a8e607c0ebc93f961798fafb84d83098508707027d9fa93affc6ee4ef40083", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.actions", + "revision": "sha256:a4fec92e91143225121e41b6f84cdc7be87e98d927bfc3e24926f4a2c3295449", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.validation", + "revision": "sha256:78bb4f912f4a4a025a588eebb09353ba96328f4ca59f7fad8a17410b338c1be2" + }, + "limits": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.limits", + "revision": "sha256:d482b9d1f40564022928187394ae43152b60244363ed53f28e3ce73f2ae014e8" + }, + "verification": { + "ref": "package:deepinfer.common.llm.zero_overhead_deferred_scheduling.original.verification", + "revision": "sha256:07497743428c80b22819d2ae39210098fc0703c944f90ef0c2af7e778eda2029" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/diffusers.cuda.diffusion.group_offload_transfer_overlap.json b/src/inferrsi/knowledge/compositions/diffusers.cuda.diffusion.group_offload_transfer_overlap.json new file mode 100644 index 000000000..767773d16 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/diffusers.cuda.diffusion.group_offload_transfer_overlap.json @@ -0,0 +1,197 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Diffusers group offload exchanges VRAM for host memory and transfer scheduling", + "summary": "Group/leaf offload and asynchronous prefetch offer different memory-latency tradeoffs; hook compatibility and host allocation must be evaluated.", + "applicability": { + "hardware": [ + "CUDA GPU with asynchronous transfer streams, sufficient CPU memory and measured host-device bandwidth" + ], + "software": [ + "huggingface/diffusers at efe46a5b177af67c64b3666da8ddddac7ee12163; later revisions need reinspection" + ], + "conditions": [ + "The model supports the relevant group-offload hooks and its forward device casts do not conflict with them" + ] + }, + "limitations": [ + "The source warns about weight-dependent input device casting and a tiled-VAE warmup requirement; warmup belongs in preparation, not a substituted readiness response.", + "Insufficient CPU RAM or transfer bandwidth can erase latency gains.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "diffusers", + "backend": "cuda", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/diffusers.cuda.diffusion.group_offload_transfer_overlap.json", + "sha256": "9bec3d912192efa2f2c853d3fb70bdae21a75875630a02294fcd084b18c30414" + }, + { + "url": "https://github.com/huggingface/diffusers/blob/efe46a5b177af67c64b3666da8ddddac7ee12163/docs/source/en/optimization/memory.md", + "type": "technical_document", + "commit": "efe46a5b177af67c64b3666da8ddddac7ee12163", + "accessed_at": "2026-10-15", + "content_sha256": "fb390aac843bb8b53273f9584832b69299cacc7a805d07552598c017e7d1bae6" + } + ], + "attribution": [ + { + "url": "https://github.com/huggingface/diffusers/blob/efe46a5b177af67c64b3666da8ddddac7ee12163/docs/source/en/optimization/memory.md", + "type": "technical_document", + "commit": "efe46a5b177af67c64b3666da8ddddac7ee12163", + "accessed_at": "2026-10-15", + "content_sha256": "fb390aac843bb8b53273f9584832b69299cacc7a805d07552598c017e7d1bae6" + } + ], + "id": "diffusers.cuda.diffusion.group_offload_transfer_overlap", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original", + "revision": "sha256:222d2433626892b0b0b72a1be88972070e7f9e3b292e6a25f4a40e8068d89c8b" + }, + "identity": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.identity", + "revision": "sha256:bf4f239a1ce8eb10ff97bf5cfb0c0ee37de99e0cc96dcccdfe76059f96552027" + }, + "status": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.status", + "revision": "sha256:d7f3ea3470e6334282f1b20f7bfd035a810642a3c630ee7208f445833b0f3629" + }, + "summary": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.summary", + "revision": "sha256:b7905596c80b77b1018c557165808c687071c0e5e001189ccae3745e5fdde8d4" + }, + "identity-2": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.identity-2", + "revision": "sha256:710dbdaf14e7e34d70d46333019b96098344f24f947371288267e0a9288f6148" + }, + "sources": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.sources", + "revision": "sha256:4dd91ba3ce3e04873d6c857a4e6e21cd8a92e4aee98bf5f21bc6221a5bd2a0b2" + }, + "scope": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.scope", + "revision": "sha256:7aebf7b424adc7cedc3d8d81a842bd24e8eb08e972f103cb067e08c6282e9dd2" + }, + "claim-0": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.claim-0", + "revision": "sha256:4be2a5920f5da1d72c7cd045f29f93bcd8132b0b679e196ae92cd385a65d940e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.claim-1", + "revision": "sha256:8f6d177772d205c412c9eb2c67f6c6279517669d42c9bd7e2eece0116b2b8aa8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.transfer", + "revision": "sha256:8b21f4281c197bab7ccbbae53d87ceec44df6d22671fd496e106fc354e650697", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.actions", + "revision": "sha256:a13a26d2eb3a88fa3672d347ccb418d2b78f7ece66d6c95c6b0e0918e7de10fc", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.validation", + "revision": "sha256:6417191370e2cd17c436bfca81599e9b5ea488b0421bc2204aa353b0a1f06879" + }, + "limits": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.limits", + "revision": "sha256:80473723962978ca7cbd16d34e3f6eeda5cb8c2d1b49b310aed19e05fd7d5623" + }, + "verification": { + "ref": "package:diffusers.cuda.diffusion.group_offload_transfer_overlap.original.verification", + "revision": "sha256:bdfc7443ab9f1c648dbcfe45c8f1756b3757efb716e09c96b1b9fe0a8c45b5d6" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/draft-acceptance-issue.json b/src/inferrsi/knowledge/compositions/draft-acceptance-issue.json new file mode 100644 index 000000000..ad989d28f --- /dev/null +++ b/src/inferrsi/knowledge/compositions/draft-acceptance-issue.json @@ -0,0 +1,109 @@ +{ + "authority": "checkout", + "metadata": { + "id": "draft-acceptance-issue", + "kind": "skill", + "entrypoint": "workflows/governance/draft-acceptance-issue/SKILL.md", + "title": "Draft a campaign acceptance issue with checklist, RunSpec, evidence paths, and placeholders for baseline/candidate SHAs.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/draft-acceptance-issue/SKILL.md", + "sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Opening a new acceptance campaign in an RSI-style repository, before any baseline or candidate run", + "prerequisites": "A chosen campaign subject and an empty evidence// tree copied from evidence/_template/; SHAs may still be placeholders", + "input_contract": "A campaign id of the form {model-or-scenario}/{device}x{count}, any user-supplied criteria or accepted plan, and available workload/baseline/calibration evidence for deriving missing targets", + "produced_artifact": "An acceptance issue body with campaign id, pinned baseline and candidate SHAs, RunSpec, criteria source and derivation including gaps and freeze authority, gates, evidence paths, initial verdict and a downstream citation blurb", + "failure_modes": [ + "Gates written after the search loop has already run", + "Campaign SHAs committed into recipes/, benchmarks/, skills or workflow defaults", + "PASS claimed without a validator/ freeze and a results/ rationale" + ], + "refusal_point": "Refuses to state a verdict other than INCONCLUSIVE while the validator freeze or results rationale is absent" + }, + "state": "candidate", + "limitations": [ + "Drafts an issue only; it freezes no gate and runs no measurement.", + "The placeholder SHA convention depends on the campaign owner filling them in later.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/governance/draft-acceptance-issue/SKILL.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:draft-acceptance-issue.original.navigation", + "revision": "sha256:ac98627b1dea3fd5eb68642d4c3c77efd78b3de7e9147fda45d90a0d9d27cfdf" + }, + "decision": { + "ref": "checkout:draft-acceptance-issue.original.decision", + "revision": "sha256:a66294ae6e9c9766cf38903b4c6c5c5b6f72ccde4ba3833fffe8dc38ceefcf34" + }, + "procedure": { + "ref": "checkout:draft-acceptance-issue.original.procedure", + "revision": "sha256:c4631e08a93c836f6f213bbc0988e79134f57cbab00d63a76a217a68332e5d40", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:draft-acceptance-issue.original", + "revision": "sha256:ca10b80e39fe01a5ea57ccc6a3d834ec5f030f8cac79bc67f5ccd45cc1aa17ae" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "directory_resources": { + "workflows/governance/draft-acceptance-issue/SKILL.md": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/flashattention.cuda.attention.generation_specific_dispatch.json b/src/inferrsi/knowledge/compositions/flashattention.cuda.attention.generation_specific_dispatch.json new file mode 100644 index 000000000..a1b3334e1 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/flashattention.cuda.attention.generation_specific_dispatch.json @@ -0,0 +1,197 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "FlashAttention generations have distinct hardware and API contracts", + "summary": "Select an attention generation using its actual GPU, dtype and interface requirements; package names and installation paths are not interchangeable.", + "applicability": { + "hardware": [ + "FA2 CUDA: Ampere/Ada/Hopper; FA3: H100/H800; FA4 CuTeDSL targets Hopper/Blackwell in the inspected README" + ], + "software": [ + "Dao-AILab/flash-attention at 1fc0221183e799363001394a12dd9e78e15f5dda; later revisions need reinspection" + ], + "conditions": [ + "Qualify exact head dimensions, masks, variable lengths and dtypes on the selected implementation" + ] + }, + "limitations": [ + "Different algorithms and FP8 can change numerical error; mathematical attention equivalence is not bitwise parity.", + "ROCm has separate implementation requirements in the source and is outside this CUDA card.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "flashattention", + "backend": "cuda", + "scenario": "attention.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/flashattention.cuda.attention.generation_specific_dispatch.json", + "sha256": "90290d7bc80b1626863e0520c91bb196d93ebfe08190a450e9de59c6505ae8ad" + }, + { + "url": "https://github.com/Dao-AILab/flash-attention/blob/1fc0221183e799363001394a12dd9e78e15f5dda/README.md", + "type": "technical_document", + "commit": "1fc0221183e799363001394a12dd9e78e15f5dda", + "accessed_at": "2026-10-15", + "content_sha256": "0dbaba56da1c8372d460956e2609bfb89acf8f3aadd65d132b1697d221069619" + } + ], + "attribution": [ + { + "url": "https://github.com/Dao-AILab/flash-attention/blob/1fc0221183e799363001394a12dd9e78e15f5dda/README.md", + "type": "technical_document", + "commit": "1fc0221183e799363001394a12dd9e78e15f5dda", + "accessed_at": "2026-10-15", + "content_sha256": "0dbaba56da1c8372d460956e2609bfb89acf8f3aadd65d132b1697d221069619" + } + ], + "id": "flashattention.cuda.attention.generation_specific_dispatch", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original", + "revision": "sha256:78fd138ea4f44582f48dfc4cbd74bc953c0c0fd67a00b8be0233ac865158ed4b" + }, + "identity": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.identity", + "revision": "sha256:e8733246f9ec5399e97d6ac02b8234ec7f49a17824cbeda8a9cb492edd2b658b" + }, + "status": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.status", + "revision": "sha256:9c389f1aa9f89f392042af56a0c3ea704f999ac88e1194a18a60cea084bcdfca" + }, + "summary": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.summary", + "revision": "sha256:32f53085f256c14fef1914350fdae995a1f163d4826517f9bb0eafb58df4dd20" + }, + "identity-2": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.identity-2", + "revision": "sha256:da4a09079602009c13671576c38d50dc166df2a605e4b3b9d0e22131f38ddbee" + }, + "sources": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.sources", + "revision": "sha256:d9125028629ad6a1f2708c1cea51b537c9bb8198662e29d61e31b81d4fc6280c" + }, + "scope": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.scope", + "revision": "sha256:897840653c1605c8f7f9eb194d171496b547c87886bd8103b8dbb363268c14dd" + }, + "claim-0": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.claim-0", + "revision": "sha256:eac9d62aa6874fbcf5b52f6ef263a34a7a0897a188cfaaa1184730f6adfe1355", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.claim-1", + "revision": "sha256:7f8c3ae3cb20bd36bad7c618f1bbe6ea6e1806e3d1f3bbeac5061affa1db1f0b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.transfer", + "revision": "sha256:96d00dc38abe5e8c48f646297d9d4d393c9d26c13990f5b09713752cfcf2bb03", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.actions", + "revision": "sha256:e5cfec5b1ba78ca5f8398717df27a0b3f3bb4b0dbd82b119926e4137bfb4db73", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.validation", + "revision": "sha256:dd6a1d7aea7f8d117e521fab628c2e3d89e716031eaccd3827f6b88f1558a450" + }, + "limits": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.limits", + "revision": "sha256:aab93f85f431ef908683f419af6cf9903c2f08209f5aaac94ae70d96c3cab249" + }, + "verification": { + "ref": "package:flashattention.cuda.attention.generation_specific_dispatch.original.verification", + "revision": "sha256:5df558263968172153187c129cb5691e757182a9bc4b2e2c925a8d94daba8990" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/flashinfer.cuda.llm.paged_decode_dispatch.json b/src/inferrsi/knowledge/compositions/flashinfer.cuda.llm.paged_decode_dispatch.json new file mode 100644 index 000000000..caa7597a4 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/flashinfer.cuda.llm.paged_decode_dispatch.json @@ -0,0 +1,212 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "FlashInfer paged decode: freeze backend selection and graph buffers", + "summary": "Paged attention separates planning from execution; auto dispatch and CUDA graph buffer ownership are part of the reproducibility boundary.", + "applicability": { + "hardware": [ + "NVIDIA CUDA; the inspected auto-cuDNN dispatch specifically distinguishes SM100/SM103 and frontend versions" + ], + "software": [ + "flashinfer-ai/flashinfer at 3637083a3a3d08538cce60937cd876b17779c6f0; later revisions need reinspection" + ], + "conditions": [ + "Paged KV decode with known head dimensions, dtype, page layout and batch shape", + "Caller-owned graph buffers must remain valid across planning and replay" + ] + }, + "limitations": [ + "The library GPU table is not an operator-by-operator support matrix.", + "No downstream dependency bump or universal speedup is recommended from this snapshot.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "flashinfer", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/flashinfer.cuda.llm.paged_decode_dispatch.json", + "sha256": "0f2986494fcc9b751df71e598fd61caa68e28bc4b0ac401e4cc763bc3f75283b" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/README.md", + "type": "technical_document", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "472bc506d8a67ca7d8048650b9fc8f17d75f5adbaa016b505b76bbb48a8b4fbc" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/flashinfer/decode.py", + "type": "source_code", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "85411257e706ffdcb4334d2a8d721268fe236145ac855e4b32bef9109a7bf780" + } + ], + "attribution": [ + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/README.md", + "type": "technical_document", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "472bc506d8a67ca7d8048650b9fc8f17d75f5adbaa016b505b76bbb48a8b4fbc" + }, + { + "url": "https://github.com/flashinfer-ai/flashinfer/blob/3637083a3a3d08538cce60937cd876b17779c6f0/flashinfer/decode.py", + "type": "source_code", + "commit": "3637083a3a3d08538cce60937cd876b17779c6f0", + "accessed_at": "2026-10-15", + "content_sha256": "85411257e706ffdcb4334d2a8d721268fe236145ac855e4b32bef9109a7bf780" + } + ], + "id": "flashinfer.cuda.llm.paged_decode_dispatch", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original", + "revision": "sha256:53ef622ee8515474382a966777bd72246e11c27e14aa14c8249f3523f62d8176" + }, + "identity": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.identity", + "revision": "sha256:a64beeae8b872811de33dd14a9e2cf0518d544c8735b86778a81be9d9a1d74d9" + }, + "status": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.status", + "revision": "sha256:d01da59b15efb14fbd141ffb34df9e00f6da536c0747d990c8704c6c09a3d45a" + }, + "summary": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.summary", + "revision": "sha256:42034d56b00822694ee658c3a62b83a2288d91005095ad35d933bc44119885d8" + }, + "identity-2": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.identity-2", + "revision": "sha256:e1c9b97813c524b422d129212342d179407195d3d151ce8034b13b8d45df559e" + }, + "sources": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.sources", + "revision": "sha256:933f49c357df9b95a7348c62052af373c6c0aba3e00b9063f938eb4f56567e42" + }, + "scope": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.scope", + "revision": "sha256:e45e4da5a5bb04000df6d2ac268da6fd1fed2d25a1f3645917e5261f439bab84" + }, + "claim-0": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.claim-0", + "revision": "sha256:b16464c2519cea2ff989eb6ba9fbfb9d4c93000ccabfacbf11d3d6501952eedd", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.claim-1", + "revision": "sha256:bc65bd5eceac02cb9c52c98fb3ed7ff49ffc0d1fc328a88d16ebbfd35642d1b3", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.transfer", + "revision": "sha256:cee7dff7c0cf4d58c6a9eaf4eda40184f02dfead5170d65c280efaa2e5eaef22", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.actions", + "revision": "sha256:ed30a45a272f36bb34d78187c4c02fe4a9716a00287d848fb8adbd2f03492298", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.validation", + "revision": "sha256:6e6d2ff38e6097ecc04638b6e17f7b7d30f7e3e2fa1e8aa1c569524214e302da" + }, + "limits": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.limits", + "revision": "sha256:19d781db1feb92add453235b54362be6e850b724a23ec2f9126f4e0b46d25f41" + }, + "verification": { + "ref": "package:flashinfer.cuda.llm.paged_decode_dispatch.original.verification", + "revision": "sha256:63e0c6e0e5e406b3377a5627ac1879eefd33bfaa8c8abb08112e7c76f7c8b8ff" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/inference-optimization-casebook.json b/src/inferrsi/knowledge/compositions/inference-optimization-casebook.json new file mode 100644 index 000000000..89697019b --- /dev/null +++ b/src/inferrsi/knowledge/compositions/inference-optimization-casebook.json @@ -0,0 +1,171 @@ +{ + "authority": "checkout", + "metadata": { + "id": "inference-optimization-casebook", + "kind": "skill", + "entrypoint": "casebooks/inference/inference-optimization-casebook/SKILL.md", + "title": "How to structure and use a casebook of past optimization decisions as a decision-support tool. Extracts the casebook pattern from TensorRT-LLM's perf-optimization-casebook skill. Use when building a record of optimization experiments or when deciding which optimization to try next based on prior art.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/casebooks/inference/inference-optimization-casebook/SKILL.md", + "sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Structuring and querying a casebook of past optimization decisions as decision support, when recording optimization experiments or choosing the next optimization from prior art; the casebook is reference material and neither runs profiling nor makes decisions", + "prerequisites": "Whole-body text access to the case files for free-text search; applying a case first requires reading the nearest checked-in config and the model's deployment guide", + "input_contract": "For a query: natural search terms such as model name, knob, mechanism word or deployment feature, plus the current model and hardware. For a new case: mechanism, applies-when and does-not-apply conditions, procedure, expected effect, accuracy risk, verification, rollback and a real measurement trail with run ID, verdict, exact hardware SKU, model revision, workload and before/after result", + "produced_artifact": "Ranked matching cases read as precedents and diagnostic options, or a new or deprecated case record in the template; a precedent's procedure and expected direction of effect, not a guaranteed configuration or a measured result", + "failure_modes": [ + "The query is pre-translated into canonical vocabulary or bounded by structured fields, so synonyms in the body text are missed", + "A case's specific values, such as batch size, tensor-parallel degree or kernel parameters, are copied instead of re-derived for the current model and hardware", + "The precedent's expected direction of effect stands in for measurement after the change is applied", + "A rejected direction is read as a permanent blacklist, or one discarded implementation as ruling out its mechanism", + "A confounded run, a missing experiment and a failed gate are recorded as the same evidence state", + "Cross-system cases are bootstrapped without re-verifying that the mechanism holds on the target hardware" + ], + "refusal_point": "Adds no case for an INCONCLUSIVE optimization-effect claim, a single-configuration result without plausible generalization, or a result without a real measurement trail, except a scoped diagnostic observation that keeps its verdict and configuration boundary; manufactures no PASS, and reading the records does not reopen a paused campaign" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "casebooks/inference/inference-optimization-casebook/SKILL.md", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json", + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:inference-optimization-casebook.original.navigation", + "revision": "sha256:4a810d5c9c647238c6874375c9ce4d851e6b8b92b95a5afd0d8bc4fd2f6bd355" + }, + "decision": { + "ref": "checkout:inference-optimization-casebook.original.decision", + "revision": "sha256:240498b8f7acd30901366329dd6b5b76a13b85c1b3a0cdc9cbfce27eb478d184" + }, + "procedure": { + "ref": "checkout:inference-optimization-casebook.original.procedure", + "revision": "sha256:e7a4a79adaaabe3554901872255f482f21d631100444c77e6131b941365143ae", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:inference-optimization-casebook.original", + "revision": "sha256:f2251674f515ae4c62eb23493f600f699df00893ada134579da18e21ec34c7f7" + }, + "admission-drain-occupancy-original": { + "ref": "checkout:case.admission-drain-occupancy.original", + "revision": "sha256:2b53c58c066e63a9b86c71be3c0306b6fd3097a3ef0d2baad634d080363893d5" + }, + "admission-drain-occupancy-guide": { + "ref": "checkout:case.admission-drain-occupancy.guide", + "revision": "sha256:e44d3cf8be60a00fd4878283026d001f3b4008639494d2d916ee61d36f89deaa" + }, + "drama3-rejected-directions-original": { + "ref": "checkout:case.drama3-rejected-directions.original", + "revision": "sha256:a1ce299b00d6a0ceef621d1273d525d8ed6a2f3bb7d39b2abb2be4c8ca95bdc3" + }, + "drama3-rejected-directions-guide": { + "ref": "checkout:case.drama3-rejected-directions.guide", + "revision": "sha256:891e949998aebd588e74336d108d520cc43bc8741b7142dc6d161a254779ee72" + }, + "qwen-ascend-rejected-directions-original": { + "ref": "checkout:case.qwen-ascend-rejected-directions.original", + "revision": "sha256:5d73751d8affa1e9e90c064a17dc1d278acde79e607bf627f9e1d12a6306750c" + }, + "qwen-ascend-rejected-directions-guide": { + "ref": "checkout:case.qwen-ascend-rejected-directions.guide", + "revision": "sha256:c6c9d593fa1a2494a8a9c473dda926af563f868afd22e3e99c254f31a170f282" + }, + "qwen-b300-rejected-directions-original": { + "ref": "checkout:case.qwen-b300-rejected-directions.original", + "revision": "sha256:f9118c7f4ba8d539ff87cc4f9cf1890aa250ad20625ed5a79fecd81d155d388a" + }, + "qwen-b300-rejected-directions-guide": { + "ref": "checkout:case.qwen-b300-rejected-directions.guide", + "revision": "sha256:744854a77597c27600f368da02e7098d1a55b402a1abcfe04afc2c9be2a6a528" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "admission-drain-occupancy-original", + "admission-drain-occupancy-guide", + "drama3-rejected-directions-original", + "drama3-rejected-directions-guide", + "qwen-ascend-rejected-directions-original", + "qwen-ascend-rejected-directions-guide", + "qwen-b300-rejected-directions-original", + "qwen-b300-rejected-directions-guide" + ] + } + }, + "skill": { + "directory_entry": true + } + } + }, + "directory_resources": { + "casebooks/inference/inference-optimization-casebook/SKILL.md": "original", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json": "admission-drain-occupancy-original", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": "admission-drain-occupancy-guide", + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json": "drama3-rejected-directions-original", + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md": "drama3-rejected-directions-guide", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json": "qwen-ascend-rejected-directions-original", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md": "qwen-ascend-rejected-directions-guide", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json": "qwen-b300-rejected-directions-original", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md": "qwen-b300-rejected-directions-guide" + } +} diff --git a/src/inferrsi/knowledge/compositions/inference-task-router-header.yaml b/src/inferrsi/knowledge/compositions/inference-task-router-header.yaml new file mode 100644 index 000000000..53d4d07e0 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/inference-task-router-header.yaml @@ -0,0 +1,41 @@ +--- +name: inference-task-router +description: Select the starting route for day-0 model support, inference performance optimization, debugging, accuracy repair, version alignment, derived-engine development or independent runtime bring-up. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "task-routing", + "model-onboarding", + "performance", + "debugging", + "accuracy", + "version-alignment", + "inference-engine", + "day-0", + "cross-platform" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "This entry selects a task and its evidence requirements before resource-layer analysis.", + "applicability": { + "scope": "Classifying an inference engineering request and identifying reusable procedures.", + "input_contract": "Goal, deliverable, known model, backend, OS, engine and workload constraints.", + "produced_artifact": "Selected task cards, scoped references, unknowns and acceptance evidence.", + "refusal_point": "If the execution owner, reference behavior or target compatibility is unknown, record the gap before making a target-specific recommendation." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/inference-task-router.json b/src/inferrsi/knowledge/compositions/inference-task-router.json new file mode 100644 index 000000000..ef8b75861 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/inference-task-router.json @@ -0,0 +1,309 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.inference_task_router", + "kind": "skill", + "title": "inference-task-router", + "summary": "Select the starting route for day-0 model support, inference performance optimization, debugging, accuracy repair, version alignment, derived-engine development or independent runtime bring-up.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/inference-task-router/SKILL.md", + "sha256": "3dae791f61b26810332e05fbabe6fd7113abf9ed8609aef663535a267525849c" + } + ], + "applicability": { + "scope": "Classifying an inference engineering request and identifying reusable procedures.", + "input_contract": "Goal, deliverable, known model, backend, OS, engine and workload constraints.", + "produced_artifact": "Selected task cards, scoped references, unknowns and acceptance evidence.", + "refusal_point": "If the execution owner, reference behavior or target compatibility is unknown, record the gap before making a target-specific recommendation." + }, + "limitations": [ + "The cards describe routes and acceptance evidence; hardware support and task success require separate validation." + ], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-router-navigation", + "revision": "sha256:746b1f751d06ad9dff1d5ccb555f9d107afad35063f8d3898733cd98dddf0e35" + }, + "conditions": { + "ref": "package:task-router-conditions", + "revision": "sha256:878149de5dfd147b1e3cbcdf1eefd384af195da2d19d929f22176428ea2a230a" + }, + "handoff": { + "ref": "package:task-router-handoff", + "revision": "sha256:d7682430d2a5ac15bde08d753a4b5138cb888b5aac28f236c78b9bb7b3028a24", + "requires": [ + "conditions" + ] + }, + "task-accuracy-condition": { + "ref": "package:task-accuracy-condition", + "revision": "sha256:f3379e53e78e4f00e0706f3eac90dd94ebe618ab28cca6fdf55f7fceb14b0b51" + }, + "task-accuracy-route-card": { + "ref": "package:task-accuracy-route-card", + "revision": "sha256:473013fb5d39462fe6ba92cb820c9a32a9de3c9d69e761a3a940f13e8af68d97" + }, + "task-day-0-condition": { + "ref": "package:task-day-0-condition", + "revision": "sha256:ce562871c48dcc73b7ea944be3386a5dc2423ecd06f4a8e3d1e22f2a6e00b1ef" + }, + "task-day-0-route-card": { + "ref": "package:task-day-0-route-card", + "revision": "sha256:7dc5d7e17c95c37ab987161f5b735d2569c38b913f64d78644bb90280268d6c2" + }, + "task-debug-condition": { + "ref": "package:task-debug-condition", + "revision": "sha256:4d3371dedc197b02ad6e75cd1272934b7a49d9bb7dd7fac56a267dc17fa02382" + }, + "task-debug-route-card": { + "ref": "package:task-debug-route-card", + "revision": "sha256:b652dd060d2d299cdddea9da46279ff768c8bd729daf56cdce4b712a5c1e2928" + }, + "task-derived-engine-condition": { + "ref": "package:task-derived-engine-condition", + "revision": "sha256:a6fe8ec011c12d15027c46c02b440166faf4045624a6e36ddf5728caea0e7d3b" + }, + "task-derived-engine-route-card": { + "ref": "package:task-derived-engine-route-card", + "revision": "sha256:4b1b39c1c83cccbc43b1dc8b7cb8fed5907ee3c55db13560928a61317e6c8441" + }, + "task-independent-engine-condition": { + "ref": "package:task-independent-engine-condition", + "revision": "sha256:8edb2bb5e3d2ddb933da296654dd3af59be165b61f3095aaeec94b77a2fd3075" + }, + "task-independent-engine-route-card": { + "ref": "package:task-independent-engine-route-card", + "revision": "sha256:21c6a577e796942cb7364015feb56f1d577fd8589c189dab22112d91b4aff396" + }, + "task-performance-condition": { + "ref": "package:task-performance-condition", + "revision": "sha256:de1ad1bfae3b28693dd2662ca096a3568036f440f85ed227b38c8ee82c132ba5" + }, + "task-performance-route-card": { + "ref": "package:task-performance-route-card", + "revision": "sha256:52cd3166acddb7536dd74461fbf3157541ac8ccbfd61e2ce3cb8b2a2e8748674" + }, + "task-version-alignment-condition": { + "ref": "package:task-version-alignment-condition", + "revision": "sha256:ab0001edd9e56701f050f7f9761c683918b1319849ea6acacfac4ad1c263ea67" + }, + "task-version-alignment-route-card": { + "ref": "package:task-version-alignment-route-card", + "revision": "sha256:53f87fd923168f6ad65a49da91af8eed6788c8f1fae2605d2f2254999b53e331" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "conditions": { + "layer": "L1", + "required": [ + "conditions" + ] + }, + "handoff": { + "layer": "L2", + "required": [ + "handoff" + ] + }, + "task-accuracy-condition": { + "layer": "L1", + "required": [ + "task-accuracy-condition" + ], + "when": { + "task": [ + "task-accuracy" + ] + } + }, + "task-accuracy-route-card": { + "layer": "L3", + "required": [ + "task-accuracy-route-card" + ], + "when": { + "task": [ + "task-accuracy" + ] + } + }, + "task-day-0-condition": { + "layer": "L1", + "required": [ + "task-day-0-condition" + ], + "when": { + "task": [ + "task-day-0" + ] + } + }, + "task-day-0-route-card": { + "layer": "L3", + "required": [ + "task-day-0-route-card" + ], + "when": { + "task": [ + "task-day-0" + ] + } + }, + "task-debug-condition": { + "layer": "L1", + "required": [ + "task-debug-condition" + ], + "when": { + "task": [ + "task-debug" + ] + } + }, + "task-debug-route-card": { + "layer": "L3", + "required": [ + "task-debug-route-card" + ], + "when": { + "task": [ + "task-debug" + ] + } + }, + "task-derived-engine-condition": { + "layer": "L1", + "required": [ + "task-derived-engine-condition" + ], + "when": { + "task": [ + "task-derived-engine" + ] + } + }, + "task-derived-engine-route-card": { + "layer": "L3", + "required": [ + "task-derived-engine-route-card" + ], + "when": { + "task": [ + "task-derived-engine" + ] + } + }, + "task-independent-engine-condition": { + "layer": "L1", + "required": [ + "task-independent-engine-condition" + ], + "when": { + "task": [ + "task-independent-engine" + ] + } + }, + "task-independent-engine-route-card": { + "layer": "L3", + "required": [ + "task-independent-engine-route-card" + ], + "when": { + "task": [ + "task-independent-engine" + ] + } + }, + "task-performance-condition": { + "layer": "L1", + "required": [ + "task-performance-condition" + ], + "when": { + "task": [ + "task-performance" + ] + } + }, + "task-performance-route-card": { + "layer": "L3", + "required": [ + "task-performance-route-card" + ], + "when": { + "task": [ + "task-performance" + ] + } + }, + "task-version-alignment-condition": { + "layer": "L1", + "required": [ + "task-version-alignment-condition" + ], + "when": { + "task": [ + "task-version-alignment" + ] + } + }, + "task-version-alignment-route-card": { + "layer": "L3", + "required": [ + "task-version-alignment-route-card" + ], + "when": { + "task": [ + "task-version-alignment" + ] + } + } + }, + "skill": { + "name": "inference-task-router", + "description": "Select the starting route for day-0 model support, inference performance optimization, debugging, accuracy repair, version alignment, derived-engine development or independent runtime bring-up.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "conditions", + "handoff" + ], + "resources": { + "references/routes/accuracy.json": "task-accuracy-route-card", + "references/routes/day0-model.json": "task-day-0-route-card", + "references/routes/debug.json": "task-debug-route-card", + "references/routes/derived-engine.json": "task-derived-engine-route-card", + "references/routes/independent-engine.json": "task-independent-engine-route-card", + "references/routes/performance.json": "task-performance-route-card", + "references/routes/version-align.json": "task-version-alignment-route-card" + } + } + } + }, + "content": { + "host-header.yaml": { + "path": "inference-task-router-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json b/src/inferrsi/knowledge/compositions/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json new file mode 100644 index 000000000..fcad577a7 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json @@ -0,0 +1,197 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "LMDeploy KV quantization: preserve capacity gains and latency counterexamples", + "summary": "KV compression can increase cache capacity yet reduce throughput; distinguish engine-specific quantizers and validate long-context quality.", + "applicability": { + "hardware": [ + "INT4/INT8 source support spans NVIDIA Volta and later; the TurboQuant example is specifically H200" + ], + "software": [ + "InternLM/lmdeploy at 822dddb8b3bc895eaf6cffb45a5514768e7ecb84; later revisions need reinspection" + ], + "conditions": [ + "Record engine, quant_policy, attention architecture, head dimension and quantizer dependencies" + ] + }, + "limitations": [ + "Source quality slogans are not exactness guarantees. INT4/INT8 and TurboQuant are distinct techniques with different engine support.", + "The reported table is not accompanied here by raw request samples or frozen validators; its numbers are neither locally reproduced nor a general gain claim.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "lmdeploy", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/lmdeploy.cuda.llm.kv_quantization_capacity_cost.json", + "sha256": "873997b38981ccc03ff73e6fb84e96022f293a019843efd8c4aa50f27878ac9a" + }, + { + "url": "https://github.com/InternLM/lmdeploy/blob/822dddb8b3bc895eaf6cffb45a5514768e7ecb84/docs/en/quantization/kv_quant.md", + "type": "technical_document", + "commit": "822dddb8b3bc895eaf6cffb45a5514768e7ecb84", + "accessed_at": "2026-10-15", + "content_sha256": "58d41fe148d80b2b1ee4c8e3210a7ab6cf1d7f51943f1cb61690e6b1dde329e3" + } + ], + "attribution": [ + { + "url": "https://github.com/InternLM/lmdeploy/blob/822dddb8b3bc895eaf6cffb45a5514768e7ecb84/docs/en/quantization/kv_quant.md", + "type": "technical_document", + "commit": "822dddb8b3bc895eaf6cffb45a5514768e7ecb84", + "accessed_at": "2026-10-15", + "content_sha256": "58d41fe148d80b2b1ee4c8e3210a7ab6cf1d7f51943f1cb61690e6b1dde329e3" + } + ], + "id": "lmdeploy.cuda.llm.kv_quantization_capacity_cost", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original", + "revision": "sha256:5f8acbd6eb0b6529960c8eeaf75f682b4f6c95b628eac0a766b3b5e3b84240a0" + }, + "identity": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.identity", + "revision": "sha256:72fa72b6c07c814c613295a377cefb10108a3f42808cb381f205101e26e8b33f" + }, + "status": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.status", + "revision": "sha256:fdbce725c0dea9cf83986f0ccfab4aae9de561c4d72a90d4b17a8a3d72eaa7b8" + }, + "summary": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.summary", + "revision": "sha256:ca84726f77c398b3051616b18c082e82a2a57364bb297fa5bcb2c5bf82322838" + }, + "identity-2": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.identity-2", + "revision": "sha256:6983ffff726ff2e7330efa1cdca6d1d4d16c5b90154234d609e44339c180597b" + }, + "sources": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.sources", + "revision": "sha256:ca7bf1ec8d7e838a34a4b39958f065bb8f1c630deaa04186e06c2a6de49379a9" + }, + "scope": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.scope", + "revision": "sha256:187664eb8103b886e398473941910b4f2e391c2871a94ab371be28df09168d5b" + }, + "claim-0": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.claim-0", + "revision": "sha256:e2370752a8f65a2873d2db9d47b308b2c90e4e10e433ce6ddc18250a245ec625", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.claim-1", + "revision": "sha256:f65358053698773f4e56c766818dd3abe89c05aa90ead265249e926685fc133e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.transfer", + "revision": "sha256:8fc189a935479262be95e986aed3d31849aaad79b4004202989c34ad2b73792b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.actions", + "revision": "sha256:3f132987f8c1305d475cb08d4e765b6ca8af54d67e8d3b7f961ea4599e9f5c0a", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.validation", + "revision": "sha256:8d2b2912a29193075fee5be1c5d9bc2e19131ee14029d09b21a335ed83a45482" + }, + "limits": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.limits", + "revision": "sha256:637dc946087236f55d9d29953c5afbae8c0761a3be61fd4fbe0e8dee6ff7b2eb" + }, + "verification": { + "ref": "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost.original.verification", + "revision": "sha256:c4ba704c4ba3afeaab07d6d7d6f9a6b5605028cfd00cbd35e3786cb899443156" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/npu-skill-factory.json b/src/inferrsi/knowledge/compositions/npu-skill-factory.json new file mode 100644 index 000000000..ae17931f9 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/npu-skill-factory.json @@ -0,0 +1,301 @@ +{ + "authority": "checkout", + "metadata": { + "id": "npu-skill-factory", + "kind": "skill", + "entrypoint": "workflows/maintenance/npu-skill-factory/SKILL.md", + "title": "Design and operation of the InferRSI NPU skill factory: artifact lifecycle, skill evaluation contract, corpus selection, hide-and-re-distill procedure, and skill evolution cycle. Use when deciding where new skill artifacts belong, how to distill a candidate skill, or how to run the No-Skill vs Human-Skill vs Distilled-Skill comparison.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/npu-skill-factory/SKILL.md", + "sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183" + }, + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "applicability": { + "scope": "InferRSI skill lifecycle management", + "prerequisites": "Current candidate inventory and source/evaluation evidence; historical sibling execution interfaces are not required for read-only artifact admission", + "input_contract": "A candidate inventory plus the source and evaluation evidence for each candidate skill; read-only artifact admission needs no historical sibling execution interface", + "produced_artifact": "An admitted or refused skill candidate with its source, evidence and limitation record, and its stable id and owning path", + "failure_modes": [ + "A candidate admitted on an inventory line without source or evaluation evidence", + "A stable id or path assigned twice across owners", + "Indexing or admission reported as validation or promotion", + "Paper-to-code equivalence asserted without a pinned readset" + ], + "refusal_point": "Refuses admission when a candidate has neither source evidence nor a declared evaluation state, and records the refusal instead of leaving the field blank" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [ + { + "url": "https://github.com/VectorSpaceLab/AREX-Skill", + "commit": "ac3fe1af", + "paths": [ + "docs/disco-meta-skills.md", + "docs/disco-workflows.md", + "src/disco/skills/create-paper-module-skill/SKILL.md", + "src/disco/skills/create-paper-module-skill/scripts/create_skill_skeleton.py", + "src/disco/skills/create-paper-module-skill/scripts/validate_skill_tree.py", + "src/disco/modes/skill-policy.ts", + "src/core/repo-skills-library-manager.ts" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/SkillOpt/SkillOpt", + "commit": "343db229", + "paths": [ + "skillopt/evaluation/gate.py", + "skillopt/optimizer/skill.py", + "skillopt/optimizer/clip.py", + "skillopt_sleep/cycle.py", + "skillopt_sleep/harvest_sources.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/WillowMindIE/MindIE-SD", + "commit": "8481d39b", + "paths": [ + ".agents/skills/profiling-analyze/SKILL.md", + ".agents/skills/dit-perf-opt/SKILL.md", + ".agents/skills/perf-gate/SKILL.md", + ".agents/skills/dit-parallel-opt/SKILL.md" + ], + "type": "git", + "revision_precision": "prefix" + } + ], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/maintenance/npu-skill-factory/SKILL.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/QA.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/README.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/source-manifest.json", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md", + "workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:npu-skill-factory.original.navigation", + "revision": "sha256:709ed82e542e2f134c2d27e449fb32152a48270408d90ce74c1c4ee6b20cbce7" + }, + "decision": { + "ref": "checkout:npu-skill-factory.original.decision", + "revision": "sha256:a310dd98b685ca94561470c9320dc174b9fdd70045f15d3c79bda0ded11429b1" + }, + "procedure": { + "ref": "checkout:npu-skill-factory.original.procedure", + "revision": "sha256:12cd2a842d3119592858739ea8cb8a8f6cba14d101d07e555ef5f2793b5f753e", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:npu-skill-factory.original", + "revision": "sha256:9881e63c945bd4297dfe697e543ab084c13e032df18c46955abb31f3658211a3" + }, + "comparison": { + "ref": "checkout:npu-skill-factory.comparison", + "revision": "sha256:e4ca9448d9dc10eaaf15547bdba0decc59fe8fd1a6a5b2af2a9aa7c9e78a76b5" + }, + "integration_notes": { + "ref": "checkout:npu-skill-factory.integration_notes", + "revision": "sha256:c719f99c6bce7db23cdbf3b9d426b2920770986e600029ae7ded16dd02ffe3a4" + }, + "qa": { + "ref": "checkout:npu-skill-factory.qa", + "revision": "sha256:48afe1626a9eaf6e128b159aae26f051b7bcd1a59c596c19d5c69e47327c4904" + }, + "readme": { + "ref": "checkout:npu-skill-factory.readme", + "revision": "sha256:28874ef5f612e4cbe61568b92496fe7a836536fa80e78b6f9f3cb784be9f4bf1" + }, + "unread_leads": { + "ref": "checkout:npu-skill-factory.unread_leads", + "revision": "sha256:145ee3449f74655fcc181aaf1a956daef6429dede9d7032a6b37edbd548070e6" + }, + "methodology-counterexamples": { + "ref": "checkout:npu-skill-factory.methodology-counterexamples", + "revision": "sha256:7ac7f2203943180cab5a3a9015fad3efada043017fc8890ebe5d550356fa594e" + }, + "evidence-routing": { + "ref": "checkout:npu-skill-factory.evidence-routing", + "revision": "sha256:f161e29b72176d359a1a9ea252eed2205858875e9e74d6dd7c193f8a2d655f05" + }, + "learning-to-commit": { + "ref": "checkout:npu-skill-factory.learning-to-commit", + "revision": "sha256:8e6ec85047234d0f7c5a057a3ac5bf6c6e5e1f294219ab436343d2a8e8e24639" + }, + "protocol-details": { + "ref": "checkout:npu-skill-factory.protocol-details", + "revision": "sha256:72e778d1998ec4797d9dac462472d51d538871d7accfa5bddca79a55d361ff84" + }, + "readset": { + "ref": "checkout:npu-skill-factory.readset", + "revision": "sha256:86d4a00872b1ae983e37aa64dee5f5b34a077a5de0466bd26a92fc1c9a04ee67" + }, + "repo-to-skill": { + "ref": "checkout:npu-skill-factory.repo-to-skill", + "revision": "sha256:1761b1c7442557a52a960562ddcc3df553e9e612d3b17dfcc336068cedd5a948" + }, + "skillopt": { + "ref": "checkout:npu-skill-factory.skillopt", + "revision": "sha256:20314f010eef7d18cc4e514b8cdebd0c93321a84c2abd37d4faa687b8b162cde" + }, + "source-manifest": { + "ref": "checkout:npu-skill-factory.source-manifest", + "revision": "sha256:67186a8326dcc1f522772ddd94323c5c3fcfcd82c1e5ce56933d1443e7e51bde" + }, + "trace2skill": { + "ref": "checkout:npu-skill-factory.trace2skill", + "revision": "sha256:1292d3b5e931dc9bec5068c13d087fd8dfbab09ef4df231d13c300e5d07f0895" + }, + "bounded-updates": { + "ref": "checkout:npu-skill-factory.bounded-updates", + "revision": "sha256:90f88bfdc2a49046223a3eec7947983a598e4f28adc6dfabb4f337027a2b300f" + }, + "skill-factory-design-20261014": { + "ref": "checkout:npu-skill-factory.skill-factory-design-20261014", + "revision": "sha256:6e1e59a9eeee0128e0013636bb7a684ac4db92412c50e3ea974191c9a9689027" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "comparison", + "integration_notes", + "qa", + "readme", + "unread_leads", + "methodology-counterexamples", + "evidence-routing", + "learning-to-commit", + "protocol-details", + "readset", + "repo-to-skill", + "skillopt", + "source-manifest", + "trace2skill", + "bounded-updates", + "skill-factory-design-20261014" + ] + } + }, + "skill": { + "directory_entry": true + } + } + }, + "directory_resources": { + "workflows/maintenance/npu-skill-factory/SKILL.md": "original", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md": "comparison", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md": "integration_notes", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/QA.md": "qa", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/README.md": "readme", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md": "unread_leads", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md": "methodology-counterexamples", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md": "evidence-routing", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md": "learning-to-commit", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md": "protocol-details", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md": "readset", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md": "repo-to-skill", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md": "skillopt", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/source-manifest.json": "source-manifest", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md": "trace2skill", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md": "bounded-updates", + "workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md": "skill-factory-design-20261014" + } +} diff --git a/src/inferrsi/knowledge/compositions/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json b/src/inferrsi/knowledge/compositions/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json new file mode 100644 index 000000000..c3254e64b --- /dev/null +++ b/src/inferrsi/knowledge/compositions/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json @@ -0,0 +1,212 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Inductor CUDA graphs: distinguish compile guards, capture shapes and tensor lifetime", + "summary": "CUDA graph replay can reduce host launch overhead, but shape specialization, pointer stability and output lifetime remain independent constraints.", + "applicability": { + "hardware": [ + "CUDA devices supported by the pinned PyTorch/compiler stack" + ], + "software": [ + "pytorch/pytorch at f15b476814ebc5eade36fb40512e379ebf79dd60; later revisions need reinspection" + ], + "conditions": [ + "A torch.compile/Inductor path with launch overhead worth measuring", + "Representative shape distribution and input/output mutation behavior are known" + ] + }, + "limitations": [ + "A single warm fixed-shape run cannot establish service improvement or dynamic-shape stability.", + "Changing graph/compiler knobs may change memory use; no global mode is declared optimal.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "pytorch", + "backend": "cuda", + "scenario": "compiler.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.json", + "sha256": "7fef4122ff794967e61f55d02a4a6b558d7e498d9513607f5ca86db6386928a8" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/torch.compiler_cudagraph_trees.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0dbfcef13ad6baea52c6e989eaf6561440c02a26a6ef667da850439d3a88c6a5" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/compile/programming_model.recompilation.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0240bbc4fc9ead047c5039d4bcab93e201c65bd7768c8995e09ee3eb654eaf59" + } + ], + "attribution": [ + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/torch.compiler_cudagraph_trees.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0dbfcef13ad6baea52c6e989eaf6561440c02a26a6ef667da850439d3a88c6a5" + }, + { + "url": "https://github.com/pytorch/pytorch/blob/f15b476814ebc5eade36fb40512e379ebf79dd60/docs/source/user_guide/torch_compiler/compile/programming_model.recompilation.md", + "type": "technical_document", + "commit": "f15b476814ebc5eade36fb40512e379ebf79dd60", + "accessed_at": "2026-10-15", + "content_sha256": "0240bbc4fc9ead047c5039d4bcab93e201c65bd7768c8995e09ee3eb654eaf59" + } + ], + "id": "pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original", + "revision": "sha256:2825a002d2b2adb1db39c6fa7aac9ce1eb2268754593f257e5e2d2901eaa9580" + }, + "identity": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.identity", + "revision": "sha256:3438b4a745ea22d5acfe260461b44de843a17a799544e8f3c2d73c1bf3407d7b" + }, + "status": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.status", + "revision": "sha256:768d0b452ee2d56ec37b5736cd5e78ec6fddfa60812595acf58805434ac34be5" + }, + "summary": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.summary", + "revision": "sha256:f96ca8c7d4777125e7029cb7199a78b0ec3cfc4e821f1aacf4e8283e7eab2bc7" + }, + "identity-2": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.identity-2", + "revision": "sha256:8685b5f838e4a91702330a0f32e669558c8d6d2b29b7cfb0c78e25f91799ebad" + }, + "sources": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.sources", + "revision": "sha256:811bcb5d42de0781f0f948b5e99e920c9ea802acf47444c9dd8d9176edd161be" + }, + "scope": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.scope", + "revision": "sha256:ecb8cd822450f70be3c0114b7b981b2de270d630515c7fef6c18946af65ece53" + }, + "claim-0": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.claim-0", + "revision": "sha256:97fa540d46b339d23e8996a437969d7036f341b0e11dd0c213735403e8f15699", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.claim-1", + "revision": "sha256:1f90d2fed6fb931ffff772263c77f7d2e140d3f01a2fd08b32fc345e8d88fc53", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.transfer", + "revision": "sha256:5dc4f393f1599e167dc6118a950f1e44ebade281cb3c530f45c326d063819cf0", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.actions", + "revision": "sha256:8dcff034a69c834faa254c7ba1d252b8538d6a4fbc0f0f9cd3cc0782480f3c4e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.validation", + "revision": "sha256:6988295d6b063b43cf7a23e0cd1ff9dccedbd733e948b04c16a8a6c04b60fbea" + }, + "limits": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.limits", + "revision": "sha256:4a865ec215a011963eb9ad6799e9b4601b5492973dfb8cbc3f322b33f667ee94" + }, + "verification": { + "ref": "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes.original.verification", + "revision": "sha256:a1ce3ad1ba366a257fbc70be9f59f090fc199fe105a4962973cd6b8c2b1a2533" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json b/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json new file mode 100644 index 000000000..900177c0c --- /dev/null +++ b/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json @@ -0,0 +1,239 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen3-TTS codec: cache fixed codebooks and retain request-owned causal state", + "summary": "Avoid repeated codec normalization and history reconstruction under fixed evaluation weights; preserve per-request convolution and attention state.", + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "Frozen evaluation weights and a stable model/device/dtype for the cache lifetime.", + "Streaming decoder semantics and history window must match the reference model." + ] + }, + "limitations": [ + "The source helper assumes immutable evaluation weights and does not implement general cache invalidation.", + "Codec fusion can lose to eager execution for some shapes; do not infer an operator gain from whole-engine throughput.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "qwen3_tts_engine", + "backend": "ascend", + "scenario": "audio.tts", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.codec_constants_and_state.json", + "sha256": "1cecd7905fef5af3ef8952a4d803900a7df91d662ebae34db47cc0dbf352d4e7" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/cached_quantizer.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "75207d415dbe425f677c4974880b56a066785e10a1715e058a9e790507c0498a" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/incremental_codec.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "cb555a40604f06981db409f5fc0773b39a556eb87930aababb56299e37e7acc4" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "attribution": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/cached_quantizer.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "75207d415dbe425f677c4974880b56a066785e10a1715e058a9e790507c0498a" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/incremental_codec.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "cb555a40604f06981db409f5fc0773b39a556eb87930aababb56299e37e7acc4" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "id": "qwen3_tts_engine.ascend.audio.codec_constants_and_state", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original", + "revision": "sha256:f276fdd99ba6d212a29dd6f03b3a2c75fb78186c48b47a2d6633f2f366a9ef3e" + }, + "identity": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.identity", + "revision": "sha256:02548e4c718b1d0bbb5294af24b49c283f05f5977bcd4cccadcce296cbe0b581" + }, + "status": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.status", + "revision": "sha256:40ec7df3d22988c63780e46f117e76ae44347f0070868f0887eeba13ebdcdfaa" + }, + "summary": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.summary", + "revision": "sha256:0c6e4758fcd7611688fd3077af445827431212bb79eec5eb4595d363ef86c70c" + }, + "identity-2": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.identity-2", + "revision": "sha256:fb012ecf19a7b02968cc38dd7de24f6deca81ad57155c276fec0f0bbbf8bc83c" + }, + "sources": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.sources", + "revision": "sha256:d38a49f4164680098663d31a3eb0db5e047c3551a75d299f9f18dfa3c9e1ca81" + }, + "scope": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.scope", + "revision": "sha256:9b4e7b8f23ce89874bc736508ba3581ce2a2adc29918fc1582e167a801adda33" + }, + "claim-0": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.claim-0", + "revision": "sha256:45a8bb7c6a6233b7141da53ac51efd53b3df2fa5d384a240f1eaebdd2024e287", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.claim-1", + "revision": "sha256:890741eabd204be084e1f42ac504cc175e8aed9c485db3f16707e8bca76e2dcf", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.claim-2", + "revision": "sha256:d558b4161c0744c4ad546cbbab1ce7da37719fce19085590d02786a145ed54cb", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.transfer", + "revision": "sha256:cc872bbf92466ffdaeba3154e0c3e68929a2c4e474529732f3f4875cfcd20732", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.actions", + "revision": "sha256:788a59e250f410b8ff52be6af96a05d15d019302a2c4667c59423af8e601bb26", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.validation", + "revision": "sha256:f16aed8e1ae07fe64b4348486ddeba5d792cd5ba6814b818f9888ebc0449b8b7" + }, + "limits": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.limits", + "revision": "sha256:29001af76bb31b3f5ddf98da08bd19174afbae4058656f13d55e8ee711e7af86" + }, + "verification": { + "ref": "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state.original.verification", + "revision": "sha256:164120c45f3300468da46298ddb93f0af02d9404e11ba98942b35a1f84e26321" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json b/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json new file mode 100644 index 000000000..07390463e --- /dev/null +++ b/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json @@ -0,0 +1,213 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen3-TTS CustomVoice: cache only model-fixed prompt embeddings", + "summary": "Prepare CustomVoice prompt embeddings directly, reusing fixed special-token and speaker/language prefixes while recomputing request-dependent text and instruction projections.", + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "CustomVoice template and tokenizer behavior must match the inspected wrapper.", + "Model weights, device, dtype and speaker/language configuration stay fixed for the cache lifetime." + ] + }, + "limitations": [ + "This is a CustomVoice-specific template optimization, not a generic Qwen3-TTS task adapter.", + "Fixed-weight cache lifetime and hard-coded template slicing require revalidation after tokenizer or model updates.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "qwen3_tts_engine", + "backend": "ascend", + "scenario": "audio.tts", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.json", + "sha256": "ea5e8fdf54cb731b255b73aa0cf47ef53fac103baa2bd5246be45f95d54cb593" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/custom_voice_prompt.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "3c3b2d6a3c948159c85b0073d678b831b860f7c65aa68e6de43b7c3b9e64177c" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + } + ], + "attribution": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/custom_voice_prompt.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "3c3b2d6a3c948159c85b0073d678b831b860f7c65aa68e6de43b7c3b9e64177c" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + } + ], + "id": "qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original", + "revision": "sha256:010cb018d49eaab58a98eb2b0334e77e54c87f1626144e06cafc56d930531447" + }, + "identity": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.identity", + "revision": "sha256:4437ca087722fb6ac5dce7c0b4e0550e673045e4089c80eeccc98c5ec85e7d92" + }, + "status": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.status", + "revision": "sha256:c45a02bb70072acee876c0a527b69c17ea2b70efd6ddfd7108d570b999f4f4e3" + }, + "summary": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.summary", + "revision": "sha256:c5bd5e4458f4366c75bddb195f4169c3ca48325c65ec223225ff34ffb27b0b47" + }, + "identity-2": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.identity-2", + "revision": "sha256:f09338de4fda55fd85d147e936020f7c2ea327ddf272ac08f850166c35a0f8d9" + }, + "sources": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.sources", + "revision": "sha256:5e3dbf6d1168ece7456a8f7f8ddf87c6d63234cae1b322469313e970a0b3ca89" + }, + "scope": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.scope", + "revision": "sha256:286deb58b6a64e974feae88654fbefe5a09dfac91643d8b6d0a68b2822f53854" + }, + "claim-0": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.claim-0", + "revision": "sha256:797fffce5aa30299c029761a19b2a9eb9f6af5b13febe83cc417a09615bdefdb", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.claim-1", + "revision": "sha256:d70215c81ceecd82938e4ead6ebbc53b537a4f9ff2123bb214f65c60b2093957", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.transfer", + "revision": "sha256:816b30272ecfd7d9b0ad16c22f674329e4fa0b4270e0b820483e7b9a28d0cc18", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.actions", + "revision": "sha256:b7a0288b8fc057c615ac62057e66f6f01827a416db6b48ab45623b0647f92abf", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.validation", + "revision": "sha256:198f0cec5163912f53f79ea918bdc4e0cc0d5f4e7677c039c3a335783677eaee" + }, + "limits": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.limits", + "revision": "sha256:7c26efbc9e92115e09f36c0aa377a17aec5ee50e19583085374508cc51069d50" + }, + "verification": { + "ref": "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt.original.verification", + "revision": "sha256:c47a6888fcc734c6979ade470c84b9a38775023df61aadd6df578e5099837392" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json b/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json new file mode 100644 index 000000000..ed4a12e9c --- /dev/null +++ b/src/inferrsi/knowledge/compositions/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json @@ -0,0 +1,228 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen3-TTS NPU graphs: batch prefill while preserving request state", + "summary": "Amortize host dispatch with captured prefill/decode and codec graphs, bounded admission and reusable request slots.", + "applicability": { + "hardware": [ + "Ascend 910B1 source campaign; other devices require independent qualification" + ], + "software": [ + "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", + "InferMatrixLab/qwen3-tts-engine source snapshot; consult source evidence for measured revisions" + ], + "conditions": [ + "Ascend graph support and prepared buffers for supported shapes.", + "Decode capacity, prefill admission and codec batching must be tuned under the actual workload." + ] + }, + "limitations": [ + "Unseen shapes can incur capture work during service.", + "Larger admission batches may improve throughput while delaying first audio.", + "Standalone combined-stack measurements do not isolate graph or scheduler contributions.", + "Imported source guidance only; no InferRSI accelerator, audio-quality or end-to-end reproduction." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "qwen3_tts_engine", + "backend": "ascend", + "scenario": "audio.tts", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.json", + "sha256": "130741a9f7ac9d366784d6c4dd42860262235caff0c277de1e8a8f8ec933b37f" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/prefill_graph.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "7d2941dcf74e73168b3f6d4ecbda913532572a2b710c65053d08f1a32304fd2e" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "attribution": [ + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/continuous.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ad803c1ebe062fce51b647c1f8ebedc8bf5a3acfaa2e4366bcfacfecb1549b3b" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/prefill_graph.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "7d2941dcf74e73168b3f6d4ecbda913532572a2b710c65053d08f1a32304fd2e" + }, + { + "url": "https://github.com/InferMatrixLab/qwen3-tts-engine/blob/9f190577aa2a147c6840560a56c5996a6c4879a4/qwen3_tts_engine/codec_slots.py", + "type": "source_code", + "commit": "9f190577aa2a147c6840560a56c5996a6c4879a4", + "accessed_at": "2026-10-19", + "content_sha256": "ac2187d6c85e052c3c06f1a761eb6f59f7324f0b9c79635687a7cb6ea129f838" + } + ], + "id": "qwen3_tts_engine.ascend.audio.graph_batching_state_ownership", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original", + "revision": "sha256:0fa809e638031d0e1d53e6c828ec599069bca79bf1d0089db8c059b3e6831bce" + }, + "identity": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.identity", + "revision": "sha256:b0c041ca3148ac0996a41c7c89551f734d46ed3cc1fdb29e08be02a000f8c754" + }, + "status": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.status", + "revision": "sha256:9923a489eecb0a26a472917394de8b9b277d2fd4ceca25dabc1131a5b79a4bd7" + }, + "summary": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.summary", + "revision": "sha256:5b3599bf0476e1f6f1fed3f9a4307349a1e3fceb507c1c58de4affc8fbf624aa" + }, + "identity-2": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.identity-2", + "revision": "sha256:c666d8e5c3b97c8328e7749765ebc4ea70056c0b76c58dd11f462884254e87da" + }, + "sources": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.sources", + "revision": "sha256:bba92e68a66e5c25690375ba0e42b4bd4f1db4b8f95092e55c335fe8a376e3fa" + }, + "scope": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.scope", + "revision": "sha256:b568f22f9e2133a885f71b8bf1d413271bf29e69b824343346a0e5f7b192b4aa" + }, + "claim-0": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.claim-0", + "revision": "sha256:a0e218e62902336f676e9e478247f999e2f9f4a9b5c1d6a1ac34ae393c21b9b5", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.claim-1", + "revision": "sha256:b7af437ed460bb434b788edcf7709383dc3c035dca4b1c708b8fac9560117e4e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.transfer", + "revision": "sha256:7deff2292f7417fdb77d76e34eaa35435676e5f8558e190cfd5596507b2414f5", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.actions", + "revision": "sha256:9736aa0a7a5da6de971259d85933820f4a4354998baf5d1111cc00164a2c0935", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.validation", + "revision": "sha256:622286550c626472476f5dda390645cd232a8c6ca558d6446b53fe38658d0068" + }, + "limits": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.limits", + "revision": "sha256:2c4adc8783f4a26ae1f2122d92b1f2d96f14f0ba0d288cc1dd6f11dd57132cab" + }, + "verification": { + "ref": "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership.original.verification", + "revision": "sha256:7dd915ccdd46f4e7b5aa3c489c87c460cdc6d9956eb3a2ff31727e8b4613778c" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/repository-evolution-analysis.json b/src/inferrsi/knowledge/compositions/repository-evolution-analysis.json new file mode 100644 index 000000000..1ff7e00ed --- /dev/null +++ b/src/inferrsi/knowledge/compositions/repository-evolution-analysis.json @@ -0,0 +1,248 @@ +{ + "authority": "checkout", + "metadata": { + "id": "repository-evolution-analysis", + "kind": "skill", + "entrypoint": "workflows/research/repository-evolution-analysis/SKILL.md", + "title": "Analyze a repository's commit history to build a capability-evolution model: what the system can do, how it got there, and what patterns allow it to iterate quickly. Use to produce history-derived knowledge for agent skill conditioning, and to design temporal-split benchmarks for skill evaluation.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md", + "sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e" + }, + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "applicability": { + "scope": "any software repository with a recoverable git history", + "prerequisites": "git history access, optionally LearningToCommit-style benchmark for evaluation" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "The RTK transition is a learning example, not an independent heldout task; upstream tests were inspected, not executed.", + "Existing audit and synthetic KV comparison adapters are not a generic historical coding-task evaluator.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [ + { + "url": "https://github.com/LearningToCommit/LearningToCommit", + "commit": "7e5a1d77", + "paths": [ + "data_construction/s1_scan_commits.py", + "data_construction/s3_tag.py", + "data_construction/s4_sample.py", + "data_construction/s5_build.py", + "modules/agent.py", + "modules/prompt_builder.py", + "modules/trajectory_to_md.py", + "system_prompts/solve_with_skill.txt", + "system_prompts/learn_reflect.txt", + "evaluation/pairwise_judge.py", + "evaluation/programmatic_metrics.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "77800032", + "paths": [ + "internal/", + "docs/" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "4b5d6d725fae3d8a263f6e43c707400e3765b84f", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go" + ], + "type": "git", + "revision_precision": "full" + }, + { + "url": "https://github.com/yetone/magpie", + "commit": "9848a9062a65c49e074c09770dc7de73dd012bea", + "paths": [ + "internal/library/rtk.go", + "internal/library/rtk_upgrade.go", + "internal/proc/path_other.go", + "internal/proc/path_windows.go", + "internal/provider/install_windows.go", + "internal/library/rtk_path.go", + "internal/library/rtk_path_other.go", + "internal/library/rtk_path_windows.go", + "internal/library/rtk_path_test.go", + "internal/library/rtk_test.go", + "internal/library/rtk_upgrade_test.go", + "internal/library/library_test.go", + "internal/gui/library.go", + "internal/gui/assets/library.js", + "internal/gui/tests/library-rtk-path.test.cjs", + "library_cli.go", + "LICENSE" + ], + "type": "git", + "revision_precision": "full" + } + ], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/research/repository-evolution-analysis/SKILL.md", + "workflows/research/repository-evolution-analysis/references/capability-presence-audit.md", + "workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:repository-evolution-analysis.original.navigation", + "revision": "sha256:48f8a7deca581aa6517f0ddb6b02ddbdc0562d34dc243aafa82201b0736b1003" + }, + "decision": { + "ref": "checkout:repository-evolution-analysis.original.decision", + "revision": "sha256:9eacf6c23770465c9997a3bbc2679bcb91db5385e2122c4db8dc2e064cb840e0" + }, + "procedure": { + "ref": "checkout:repository-evolution-analysis.original.procedure", + "revision": "sha256:9384f41bb56baf15ebc692a82cc6c6f754593e9c90d8d1230b354d23861e3e5b", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:repository-evolution-analysis.original", + "revision": "sha256:cd610034cfb37c854ad70e2f16ab17d24511dfe018f9cd8787543984bd8c0106" + }, + "capability-presence-audit": { + "ref": "checkout:repository-evolution-analysis.capability-presence-audit", + "revision": "sha256:ce7271af12488bb77a2309c1ddff44567f06c1cf03b3458b3d2a7bab178efe6f" + }, + "rtk-consumer-path-transition": { + "ref": "checkout:repository-evolution-analysis.rtk-consumer-path-transition", + "revision": "sha256:8fa3a2be27eba6edc3260bd2ac977176cb7b5ed4d5a80119f8a4b06f630cbe1b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "rtk-consumer-path-transition" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "capability-presence-audit", + "rtk-consumer-path-transition" + ] + } + } + } + }, + "directory_resources": { + "workflows/research/repository-evolution-analysis/SKILL.md": "original", + "workflows/research/repository-evolution-analysis/references/capability-presence-audit.md": "capability-presence-audit", + "workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md": "rtk-consumer-path-transition" + } +} diff --git a/src/inferrsi/knowledge/compositions/rsi-evidence.json b/src/inferrsi/knowledge/compositions/rsi-evidence.json new file mode 100644 index 000000000..7131076e9 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/rsi-evidence.json @@ -0,0 +1,168 @@ +{ + "authority": "checkout", + "metadata": { + "id": "rsi-evidence", + "kind": "skill", + "entrypoint": "workflows/governance/rsi-evidence/SKILL.md", + "title": "Guide agents to establish acceptance criteria, freeze and cite RSI evidence using plan/results/patch/validator paths and PASS/FAIL/INCONCLUSIVE verdicts.", + "origin": [ + "first-party" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/SKILL.md", + "sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Preparing acceptance criteria, documenting or reviewing an optimization campaign whose verdict will be cited downstream", + "prerequisites": "For preparation, the user requirements and available model/hardware/workload evidence; for verdicts, pinned baseline and candidate SHAs and an evidence tree under evidence//; conclusions about LoopX goal authority additionally need its governance reference", + "input_contract": "Campaign artifacts in plan/, results/, patch/ and validator/, plus the RunSpec that fixes repo x revision x backend x device x model x scenario", + "produced_artifact": "An evidence record that links paths instead of pasting metrics, and states exactly one of PASS, FAIL or INCONCLUSIVE with its rationale", + "failure_modes": [ + "Metrics pasted into an issue comment with no link to an evidence path", + "A verdict vocabulary outside PASS/FAIL/INCONCLUSIVE", + "PASS recorded on a cleanup or integrity-probe failure", + "Output reused across trials, aliased into a reference, or written outside its own trial directory", + "Source fingerprint taken over a directory overlap that excludes changed tracked files", + "Org-wide default SHAs assumed in a skill or CI instead of read from the acceptance issue" + ], + "refusal_point": "Refuses PASS when the validator freeze, the results rationale or the pinned SHAs are missing, and reports INCONCLUSIVE for that campaign instead" + }, + "state": "candidate", + "limitations": [ + "Documents evidence discipline; it performs no measurement and certifies no campaign.", + "The LoopX goal-governance reference is a source-derived candidate and adds no execution permission or empirical validation.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/governance/rsi-evidence/SKILL.md", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/NOTICE.md", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/decision-cases.md", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/mechanisms.md", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/source-ledger.json", + "workflows/governance/rsi-evidence/references/omni-experiments.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:rsi-evidence.original.navigation", + "revision": "sha256:600c6680f42d521eee9727f7aea197b6be3d669ae7e96337b5dcd45f7190079a" + }, + "decision": { + "ref": "checkout:rsi-evidence.original.decision", + "revision": "sha256:e6dfa4f199733096bddec10f7024c25c0b030065c09a21cb970653150abc4e0b" + }, + "procedure": { + "ref": "checkout:rsi-evidence.original.procedure", + "revision": "sha256:5d9ccfa49ac55d3855b7c6af41142be3371c57f7e72602217eb8b6efb4164307", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:rsi-evidence.original", + "revision": "sha256:8f1f5835e75528adc8668a3b114b23b4270fb40e6deea596eb68dc8de8018df7" + }, + "license": { + "ref": "checkout:rsi-evidence.license", + "revision": "sha256:9e9faea75bf047ee5bbf25c0ba4d98c624d293425c54015b8f25969d9ea82e1a" + }, + "license-mit": { + "ref": "checkout:rsi-evidence.license-mit", + "revision": "sha256:21f15fa81cb5c361df0046d879f9615a2b5bb279c5be2e347662817cb60ad6e7" + }, + "notice": { + "ref": "checkout:rsi-evidence.notice", + "revision": "sha256:e8996f7f4f4b0280ae9c18f122fbd8534fca62a805577602622bf86586b153b7" + }, + "readme": { + "ref": "checkout:rsi-evidence.readme", + "revision": "sha256:e875756b5c56185ee85aeaa47efa830c7d2bdbd8703367a955b65dc68e4696e5" + }, + "decision-cases": { + "ref": "checkout:rsi-evidence.decision-cases", + "revision": "sha256:49e195212a299d9551a4d13b6d6ff6455d2b05053181ce491d0bb5de8f7389b7" + }, + "mechanisms": { + "ref": "checkout:rsi-evidence.mechanisms", + "revision": "sha256:77f19cd5b5c1888471a31080c45cf465ae6907f054dcf1f209ea5545bbbb6d9f" + }, + "source-ledger": { + "ref": "checkout:rsi-evidence.source-ledger", + "revision": "sha256:e5b5ffda7a73de20b30593ec591922b3f2f579cb9bb0e569488b0d5bb35d56b6" + }, + "omni-experiments": { + "ref": "checkout:rsi-evidence.omni-experiments", + "revision": "sha256:d9a3e28875876aa26b0d66700ddf9455b00807c9bb38b362eb33b173f1b79980" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "license", + "license-mit", + "notice", + "readme", + "decision-cases", + "mechanisms", + "source-ledger", + "omni-experiments" + ] + } + } + } + }, + "directory_resources": { + "workflows/governance/rsi-evidence/SKILL.md": "original", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE": "license", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md": "license-mit", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/NOTICE.md": "notice", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md": "readme", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/decision-cases.md": "decision-cases", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/mechanisms.md": "mechanisms", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/source-ledger.json": "source-ledger", + "workflows/governance/rsi-evidence/references/omni-experiments.md": "omni-experiments" + } +} diff --git a/src/inferrsi/knowledge/compositions/sglang.cuda.llm.hierarchical_prefix_cache.json b/src/inferrsi/knowledge/compositions/sglang.cuda.llm.hierarchical_prefix_cache.json new file mode 100644 index 000000000..a0edcb112 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/sglang.cuda.llm.hierarchical_prefix_cache.json @@ -0,0 +1,212 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "SGLang HiCache: reuse prefixes only when transfer beats recomputation", + "summary": "Move reusable prefix KV across device, host and storage tiers while accounting for sharing scope, layout conversion and prefetch policy.", + "applicability": { + "hardware": [ + "GPU plus CPU memory and optional storage/network backend; CUDA transfer path is the scope of this candidate" + ], + "software": [ + "sgl-project/sglang at f7ad4345b86d147a1c3095a3cebabca9a33ebaa1; later revisions need reinspection" + ], + "conditions": [ + "Repeated prefixes or long contexts with measurable reuse", + "Model/cache identity and distributed-rank agreement must be maintained" + ] + }, + "limitations": [ + "No SGLang benchmark gain is imported as an InferRSI result.", + "Larger private host caches do not create a shared distributed cache; low reuse or slow storage can regress latency.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "sglang", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/sglang.cuda.llm.hierarchical_prefix_cache.json", + "sha256": "b50ca58df28d4343545d07adf0da23f8f181297b30aba7870e5690630e7d7315" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_design.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "ea9e7896aeeba4f648c3484b382780ce735bba74e0a74dd5403bf7a0438305b5" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_best_practices.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "1b23cd3668a11a1dce0f8be6104afdc9c8b735d14b86c3c36387f303c2daf31b" + } + ], + "attribution": [ + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_design.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "ea9e7896aeeba4f648c3484b382780ce735bba74e0a74dd5403bf7a0438305b5" + }, + { + "url": "https://github.com/sgl-project/sglang/blob/f7ad4345b86d147a1c3095a3cebabca9a33ebaa1/docs/docs/advanced_features/hicache_best_practices.mdx", + "type": "technical_document", + "commit": "f7ad4345b86d147a1c3095a3cebabca9a33ebaa1", + "accessed_at": "2026-10-15", + "content_sha256": "1b23cd3668a11a1dce0f8be6104afdc9c8b735d14b86c3c36387f303c2daf31b" + } + ], + "id": "sglang.cuda.llm.hierarchical_prefix_cache", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original", + "revision": "sha256:77999d9c97b16741488be0f0d124f410eceb148992eab3b7381ab14addbc90e7" + }, + "identity": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.identity", + "revision": "sha256:ecf5ff573dd5664166c30e71f0545808753e4760ddc92cfaeec4140c76bc4493" + }, + "status": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.status", + "revision": "sha256:7816d7b946487fc66dbec25b67bd6be20ee52885fe7ca75595ebe48bd221ed32" + }, + "summary": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.summary", + "revision": "sha256:846ab53a096b214a16822cd57d9d57573bd2d86665a4763826c817808447fce2" + }, + "identity-2": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.identity-2", + "revision": "sha256:3d63c0f3faf08b085ed6fb0537fd3b11828703f0ca3c405b42dc880ebb22f5fe" + }, + "sources": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.sources", + "revision": "sha256:66a3528116eedd6c079035a8b77d20892dad47c8e6befa978099c3be0aec00a4" + }, + "scope": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.scope", + "revision": "sha256:280cf17654a3d62eb2eb59134d04eeba7ac969b792d2539360d79f35d77ef714" + }, + "claim-0": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.claim-0", + "revision": "sha256:6727da5a998a60e1be105dcea21d3773c17f61405062520252bebfa7b9c1d9f6", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.claim-1", + "revision": "sha256:b97c43af9dc8d29fe096115a3982b86b05595a54b234c719bd84ea01bee66421", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.transfer", + "revision": "sha256:f9d0b909a0168c121db2a44fc132109d95cf84290d6a5d204e0ec6da8d9c03b1", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.actions", + "revision": "sha256:5f3c188d78d5966e3af935fba67776ca05edfbdbffa22f951fd5faf55509dc29", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.validation", + "revision": "sha256:ffb0b51d214008e667cffd2f317e50a452b60e6d2e21f0e2501d2e3032b7d5d6" + }, + "limits": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.limits", + "revision": "sha256:5d87bb159637222270928ec66134181fd028cec5f0e008d5211c4e6fbdc70113" + }, + "verification": { + "ref": "package:sglang.cuda.llm.hierarchical_prefix_cache.original.verification", + "revision": "sha256:60f568c480f6c2ee0856f1631454e8593bb8bf8ca53ccd79e87f55088dfadb50" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/skill-evolution-playbook.json b/src/inferrsi/knowledge/compositions/skill-evolution-playbook.json new file mode 100644 index 000000000..16df171ba --- /dev/null +++ b/src/inferrsi/knowledge/compositions/skill-evolution-playbook.json @@ -0,0 +1,113 @@ +{ + "authority": "checkout", + "metadata": { + "id": "skill-evolution-playbook", + "kind": "skill", + "entrypoint": "workflows/maintenance/skill-evolution-playbook/SKILL.md", + "title": "Practical design choices for evolving agent skills from execution traces: when one trajectory should update a skill, how conflicting lessons are handled, how negative evidence is preserved, how large an edit should be, and when skills should split or merge. Drawn from Trace2Skill and SkillOpt. Use when designing or operating a skill evolution pipeline.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md", + "sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Design choices for evolving agent skills from execution traces, drawn from Trace2Skill and SkillOpt: when a trajectory should update a skill, how conflicting lessons are handled, how negative evidence is preserved, how large an edit should be and when skills split or merge; for designing or operating a skill evolution pipeline", + "prerequisites": "A final-test partition kept outside edit selection and the incumbent skill retained for rollback; changing a skill's scope first needs explicit review of its identity and consumers", + "input_contract": "Execution trajectories or trace IDs with the diagnosed causal failure and the successful behavior an amendment must preserve; the incumbent skill and its revision lineage; held-out evaluation results for candidate edits", + "produced_artifact": "A scoped case or amendment proposal, or a consolidated candidate edit, with rejection records and the versioned revision lineage; a candidate for independently evaluated acceptance, not a replacement decision or an efficacy claim", + "failure_modes": [ + "An anecdote, or agreement among analysts, is taken as efficacy", + "Consolidation output is treated as a replacement decision instead of a candidate awaiting independent acceptance", + "A tie or uncertain result is reported as improvement", + "A conflict is resolved by voting for whichever outcome appeared more often in the pool", + "A rejection is applied to every future use of an idea instead of the comparison it constrains", + "Paper-specific section counts or length budgets are used as universal defaults, or a skill is split on length alone", + "A stronger task solver is assumed to be a stronger improver, or replay rankings and private inner scores are read as outer generalization" + ], + "refusal_point": "Records a conflict that conditioning cannot resolve, where the same context produces different outcomes across runs, as INCONCLUSIVE and flags it for human review instead of choosing a lesson; claims no universal minimum trace count, paper-to-code equivalence or local efficacy" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "workflows/maintenance/skill-evolution-playbook/SKILL.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:skill-evolution-playbook.original.navigation", + "revision": "sha256:71c75dd0054b9ae8dfc152c1104c992a6a398d52c8d2d6b3eee84cf8ad1e97d4" + }, + "decision": { + "ref": "checkout:skill-evolution-playbook.original.decision", + "revision": "sha256:72c952b6f4153775d65cda7160a153ee00c449c0049bd6d8d535f5c6f704b769" + }, + "procedure": { + "ref": "checkout:skill-evolution-playbook.original.procedure", + "revision": "sha256:1bb67a476f20d6d15675bc24088a780b79e0c2a9e96e28885c0af86af11e5d93", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:skill-evolution-playbook.original", + "revision": "sha256:c527116d08710c491fdcb143dbfcb3615b3857255c76c58d9287b56349bd749d" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "directory_resources": { + "workflows/maintenance/skill-evolution-playbook/SKILL.md": "original" + } +} diff --git a/src/inferrsi/knowledge/compositions/task-accuracy-header.yaml b/src/inferrsi/knowledge/compositions/task-accuracy-header.yaml new file mode 100644 index 000000000..f4ee0fb10 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-accuracy-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-accuracy +description: Use when inference completes but tokens, audio, frames, tensors or a quality metric diverge from a reference. Trace the first divergence and verify end-to-end tolerance. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "accuracy" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-accuracy.json b/src/inferrsi/knowledge/compositions/task-accuracy.json new file mode 100644 index 000000000..d6a39e056 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-accuracy.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_accuracy", + "kind": "skill", + "title": "task-accuracy", + "summary": "Use when inference completes but tokens, audio, frames, tensors or a quality metric diverge from a reference. Trace the first divergence and verify end-to-end tolerance.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-accuracy/SKILL.md", + "sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3" + } + ], + "applicability": { + "scope": "Modality-specific reference parity and accuracy regression repair.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "First-divergence trace, before/after oracle results and held-out end-to-end quality checks.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-accuracy-navigation", + "revision": "sha256:957e4dbd31fc469dd133de54273bee6222958d36904c13994e8804353074939e" + }, + "condition": { + "ref": "package:task-accuracy-condition", + "revision": "sha256:f3379e53e78e4f00e0706f3eac90dd94ebe618ab28cca6fdf55f7fceb14b0b51" + }, + "procedure": { + "ref": "package:task-accuracy-procedure", + "revision": "sha256:996a2d7ff3508718b0d43778b77a8d5c87a7b9c0eb7e9f6c9fdb064b4078212b", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-accuracy-support", + "revision": "sha256:ee260b93bf898e478effc67ae1eb2e9b4c777949db5bdf3e9d7d1346a84db6d9" + }, + "acceptance": { + "ref": "package:task-accuracy-acceptance", + "revision": "sha256:3febd8ca99c151f3e13d329411b52d8fd017cc7875c749dac1e6d29f90e64d0f" + }, + "route-card": { + "ref": "package:task-accuracy-route-card", + "revision": "sha256:473013fb5d39462fe6ba92cb820c9a32a9de3c9d69e761a3a940f13e8af68d97" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-accuracy" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-accuracy" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-accuracy" + ] + } + } + }, + "skill": { + "name": "task-accuracy", + "description": "Use when inference completes but tokens, audio, frames, tensors or a quality metric diverge from a reference. Trace the first divergence and verify end-to-end tolerance.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-accuracy-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/task-day-0-header.yaml b/src/inferrsi/knowledge/compositions/task-day-0-header.yaml new file mode 100644 index 000000000..3c0422c37 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-day-0-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-day-0 +description: Use for Day-0 onboarding of a new checkpoint or architecture to a named inference engine. Produce a reproducible target run, stage parity evidence and a regression fixture. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "day-0" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-day-0.json b/src/inferrsi/knowledge/compositions/task-day-0.json new file mode 100644 index 000000000..aa5b8535a --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-day-0.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_day_0", + "kind": "skill", + "title": "task-day-0", + "summary": "Use for Day-0 onboarding of a new checkpoint or architecture to a named inference engine. Produce a reproducible target run, stage parity evidence and a regression fixture.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-day-0/SKILL.md", + "sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3" + } + ], + "applicability": { + "scope": "New model support in an existing inference engine.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Per-stage parity report, supported-feature matrix, end-to-end output and replayable regression fixture.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-day-0-navigation", + "revision": "sha256:90a46e63daf878e5c9d86afd3626276ef425efa0ecdb00dfcd5e0f257ddc285b" + }, + "condition": { + "ref": "package:task-day-0-condition", + "revision": "sha256:ce562871c48dcc73b7ea944be3386a5dc2423ecd06f4a8e3d1e22f2a6e00b1ef" + }, + "procedure": { + "ref": "package:task-day-0-procedure", + "revision": "sha256:19d25196b9a8ada22a8d4eee4e62f2cc2e155574b3f74e7da32ad9af98ff1c06", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-day-0-support", + "revision": "sha256:1a2072dbb25d0603f19d5be4a1955d890e7c55b3711f7d6a867242fe8f336e89" + }, + "acceptance": { + "ref": "package:task-day-0-acceptance", + "revision": "sha256:46751e02cef6af11bb9c0d2525a442a69dd9dd35df9fba3693d680e7e7bf4393" + }, + "route-card": { + "ref": "package:task-day-0-route-card", + "revision": "sha256:7dc5d7e17c95c37ab987161f5b735d2569c38b913f64d78644bb90280268d6c2" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-day-0" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-day-0" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-day-0" + ] + } + } + }, + "skill": { + "name": "task-day-0", + "description": "Use for Day-0 onboarding of a new checkpoint or architecture to a named inference engine. Produce a reproducible target run, stage parity evidence and a regression fixture.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-day-0-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/task-debug-header.yaml b/src/inferrsi/knowledge/compositions/task-debug-header.yaml new file mode 100644 index 000000000..3ba965852 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-debug-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-debug +description: Use for inference crashes, hangs, out-of-memory failures or execution-path errors. Localize the first failing boundary and verify recovery with the original reproducer. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "debug" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-debug.json b/src/inferrsi/knowledge/compositions/task-debug.json new file mode 100644 index 000000000..7e114421f --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-debug.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_debug", + "kind": "skill", + "title": "task-debug", + "summary": "Use for inference crashes, hangs, out-of-memory failures or execution-path errors. Localize the first failing boundary and verify recovery with the original reproducer.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-debug/SKILL.md", + "sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0" + } + ], + "applicability": { + "scope": "Run-specific failure reproduction, fault isolation and regression verification.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Minimal reproducer, passing control, localized cause and verified original-script replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-debug-navigation", + "revision": "sha256:16c9c8fc1632a4afdcbe3c516601160a2e796c49f35a34d3d320ed0a1e279593" + }, + "condition": { + "ref": "package:task-debug-condition", + "revision": "sha256:4d3371dedc197b02ad6e75cd1272934b7a49d9bb7dd7fac56a267dc17fa02382" + }, + "procedure": { + "ref": "package:task-debug-procedure", + "revision": "sha256:9fd1abb1babd13effbbcb8072046dab5ef8638e437d2bf61967ecb5beba1c003", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-debug-support", + "revision": "sha256:9cac09949a3390c458e4d4aecaefdf7d87ce1a93f1f0bcdc7a95536bc56c67bc" + }, + "acceptance": { + "ref": "package:task-debug-acceptance", + "revision": "sha256:6b9d5839c61be95237c0e7fa5ad588b6313b5d201d55a8b18e5ba089a96b2b9d" + }, + "route-card": { + "ref": "package:task-debug-route-card", + "revision": "sha256:b652dd060d2d299cdddea9da46279ff768c8bd729daf56cdce4b712a5c1e2928" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-debug" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-debug" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-debug" + ] + } + } + }, + "skill": { + "name": "task-debug", + "description": "Use for inference crashes, hangs, out-of-memory failures or execution-path errors. Localize the first failing boundary and verify recovery with the original reproducer.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-debug-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/task-derived-engine-header.yaml b/src/inferrsi/knowledge/compositions/task-derived-engine-header.yaml new file mode 100644 index 000000000..7ee732a53 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-derived-engine-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-derived-engine +description: Use for a fork or extension that retains an upstream inference execution core, including a vLLM or vLLM-Omni derivative. Verify inherited behavior and the intended delta separately. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "derived-engine" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-derived-engine.json b/src/inferrsi/knowledge/compositions/task-derived-engine.json new file mode 100644 index 000000000..3b0d330bc --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-derived-engine.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_derived_engine", + "kind": "skill", + "title": "task-derived-engine", + "summary": "Use for a fork or extension that retains an upstream inference execution core, including a vLLM or vLLM-Omni derivative. Verify inherited behavior and the intended delta separately.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-derived-engine/SKILL.md", + "sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942" + } + ], + "applicability": { + "scope": "Development and qualification of an engine that retains an upstream execution core.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Parent/fork behavior matrix, bounded extension and matched end-to-end results.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-derived-engine-navigation", + "revision": "sha256:d58c43da61a0a5384e5cc520dfcbeed2f68349b654d1b6f250ff0dbb8c53df9c" + }, + "condition": { + "ref": "package:task-derived-engine-condition", + "revision": "sha256:a6fe8ec011c12d15027c46c02b440166faf4045624a6e36ddf5728caea0e7d3b" + }, + "procedure": { + "ref": "package:task-derived-engine-procedure", + "revision": "sha256:3409ccf0b3c572e4a8217800299bad2bbdd03ec69c6255fa8b09f58780cbf6c7", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-derived-engine-support", + "revision": "sha256:72b9ff81e8e92ad3d34f0b71743cd212c51c6baa3c61620aa5be6d037a0ce9a3" + }, + "acceptance": { + "ref": "package:task-derived-engine-acceptance", + "revision": "sha256:fab1a8e59147b399fb0106fc92487325fd0fa1b46b7b7f0593c3dac1b310ec65" + }, + "route-card": { + "ref": "package:task-derived-engine-route-card", + "revision": "sha256:4b1b39c1c83cccbc43b1dc8b7cb8fed5907ee3c55db13560928a61317e6c8441" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-derived-engine" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-derived-engine" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-derived-engine" + ] + } + } + }, + "skill": { + "name": "task-derived-engine", + "description": "Use for a fork or extension that retains an upstream inference execution core, including a vLLM or vLLM-Omni derivative. Verify inherited behavior and the intended delta separately.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-derived-engine-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/task-independent-engine-header.yaml b/src/inferrsi/knowledge/compositions/task-independent-engine-header.yaml new file mode 100644 index 000000000..7b5fc0a04 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-independent-engine-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-independent-engine +description: Use when the deliverable owns its execution, memory and device integration on a target OS and hardware stack. Prove a native end-to-end path and measure its resource use. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "independent-engine" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-independent-engine.json b/src/inferrsi/knowledge/compositions/task-independent-engine.json new file mode 100644 index 000000000..da6b69966 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-independent-engine.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_independent_engine", + "kind": "skill", + "title": "task-independent-engine", + "summary": "Use when the deliverable owns its execution, memory and device integration on a target OS and hardware stack. Prove a native end-to-end path and measure its resource use.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-independent-engine/SKILL.md", + "sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e" + } + ], + "applicability": { + "scope": "Independent runtime bring-up across OS, model format, device and backend boundaries.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Operator/capability map, minimal native execution path, end-to-end parity and resource measurements.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-independent-engine-navigation", + "revision": "sha256:b42f92e770d83e1bc2391ca348a582ba9edb8d4ad186192c0d9e09b6fdcbe84e" + }, + "condition": { + "ref": "package:task-independent-engine-condition", + "revision": "sha256:8edb2bb5e3d2ddb933da296654dd3af59be165b61f3095aaeec94b77a2fd3075" + }, + "procedure": { + "ref": "package:task-independent-engine-procedure", + "revision": "sha256:93ed0d9ba49a3e7d7162cb2ca6f145928876070f5d4805a6de55e8a1641b2bb4", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-independent-engine-support", + "revision": "sha256:b72982d55a25b5bf279e2611a6d15c0a4e8a6513d8aac0f90dcb428982054294" + }, + "acceptance": { + "ref": "package:task-independent-engine-acceptance", + "revision": "sha256:738e35a44a2df1dff02e0abf4a1460863f943860329800cdfb865e53340260c1" + }, + "route-card": { + "ref": "package:task-independent-engine-route-card", + "revision": "sha256:21c6a577e796942cb7364015feb56f1d577fd8589c189dab22112d91b4aff396" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-independent-engine" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-independent-engine" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-independent-engine" + ] + } + } + }, + "skill": { + "name": "task-independent-engine", + "description": "Use when the deliverable owns its execution, memory and device integration on a target OS and hardware stack. Prove a native end-to-end path and measure its resource use.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-independent-engine-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/task-performance-header.yaml b/src/inferrsi/knowledge/compositions/task-performance-header.yaml new file mode 100644 index 000000000..c9f0c0904 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-performance-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-performance +description: Use when a correct inference baseline misses a latency, throughput, memory or cost target. Compare compatible changes under the user's workload and quality gate. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "performance" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-performance.json b/src/inferrsi/knowledge/compositions/task-performance.json new file mode 100644 index 000000000..4f09ea6cb --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-performance.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_performance", + "kind": "skill", + "title": "task-performance", + "summary": "Use when a correct inference baseline misses a latency, throughput, memory or cost target. Compare compatible changes under the user's workload and quality gate.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md", + "sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b" + } + ], + "applicability": { + "scope": "Optimization of a specified metric under fixed workload, quality and resource constraints.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Paired baseline/candidate measurements, quality checks, trade-offs and final replay.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-performance-navigation", + "revision": "sha256:fcead58f85b5a7f3b93ecf1600144c8cc4611d2d3d60f3c12588b6e52fcfdbf3" + }, + "condition": { + "ref": "package:task-performance-condition", + "revision": "sha256:de1ad1bfae3b28693dd2662ca096a3568036f440f85ed227b38c8ee82c132ba5" + }, + "procedure": { + "ref": "package:task-performance-procedure", + "revision": "sha256:7b9c4ba29df1feb9d4579b334414ba5e4c07b01ec4506e347e9404c9e6b41bd7", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-performance-support", + "revision": "sha256:7b4953fb421fc66dd3f6e6a151ce10b37e61d3949497903845b866d482891e06" + }, + "acceptance": { + "ref": "package:task-performance-acceptance", + "revision": "sha256:4d5c0df36abb1c3d73e70848587fdeaf6ff9f4a502a9167f17a68a9fbec1a273" + }, + "route-card": { + "ref": "package:task-performance-route-card", + "revision": "sha256:52cd3166acddb7536dd74461fbf3157541ac8ccbfd61e2ce3cb8b2a2e8748674" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-performance" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-performance" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-performance" + ] + } + } + }, + "skill": { + "name": "task-performance", + "description": "Use when a correct inference baseline misses a latency, throughput, memory or cost target. Compare compatible changes under the user's workload and quality gate.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-performance-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/task-version-alignment-header.yaml b/src/inferrsi/knowledge/compositions/task-version-alignment-header.yaml new file mode 100644 index 000000000..651eef994 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-version-alignment-header.yaml @@ -0,0 +1,32 @@ +--- +name: task-version-alignment +description: Use for upgrades spanning inference engines, plugins, drivers or operator libraries. Isolate the incompatible boundary and qualify the requested version combination on the same workload. +metadata: + inferrsi: | + { + "schema_version": 1, + "profile": "local-skill-v1", + "kind": "skill", + "discovery_role": "task-entry", + "status": "candidate", + "origin": [ + "first-party" + ], + "consumption_mode": "packaged", + "tags": [ + "inference-task", + "primary-task", + "version-alignment" + ], + "empirical_validation": "not_run", + "searchspace_not_applicable": "The procedure selects supporting evidence and tests within the caller's declared search space.", + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "provenance_readsets": [] + } +--- + diff --git a/src/inferrsi/knowledge/compositions/task-version-alignment.json b/src/inferrsi/knowledge/compositions/task-version-alignment.json new file mode 100644 index 000000000..a48cbfb19 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/task-version-alignment.json @@ -0,0 +1,133 @@ +{ + "metadata": { + "id": "inferrsi.common.skills.task_version_alignment", + "kind": "skill", + "title": "task-version-alignment", + "summary": "Use for upgrades spanning inference engines, plugins, drivers or operator libraries. Isolate the incompatible boundary and qualify the requested version combination on the same workload.", + "state": "candidate", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md", + "sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c" + } + ], + "applicability": { + "scope": "Compatibility of explicit working and target version combinations.", + "input_contract": "Actual hardware, model, engine, script and flags, benchmark, acceptance criteria, current diagnosis, permitted changes and budget.", + "produced_artifact": "Version matrix, first incompatible boundary, matched workload checks and rollback point.", + "refusal_point": "Record missing evidence or an exhausted search budget and identify the smallest discriminating test before declaring success." + }, + "limitations": [], + "attribution": "InferRSI contributors", + "empirical_validation": "not_run", + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "package:task-version-alignment-navigation", + "revision": "sha256:aeef4ae92da6cec0d7b09265bf0017c7722dabde239fc7c30db128a052b1ae58" + }, + "condition": { + "ref": "package:task-version-alignment-condition", + "revision": "sha256:ab0001edd9e56701f050f7f9761c683918b1319849ea6acacfac4ad1c263ea67" + }, + "procedure": { + "ref": "package:task-version-alignment-procedure", + "revision": "sha256:4f874d2b33ead344cd135532920f36a787668bd4e6be9ae7419185975219e94e", + "requires": [ + "condition", + "capture" + ] + }, + "support": { + "ref": "package:task-version-alignment-support", + "revision": "sha256:4fdfaf2e503104c418d5db4c75d3a5ed19bb7eb868f8bf9c7cbac6ce0ff2051d" + }, + "acceptance": { + "ref": "package:task-version-alignment-acceptance", + "revision": "sha256:54a2a7a80833f04affc1c7347a2145dd956826cb9bd809ba1c47e5c4e1dda67d" + }, + "route-card": { + "ref": "package:task-version-alignment-route-card", + "revision": "sha256:53f87fd923168f6ad65a49da91af8eed6788c8f1fae2605d2f2254999b53e331" + }, + "capture": { + "ref": "package:task-capture-run", + "revision": "sha256:4568b234dd60323423d75a563cf98236dfabfd8e34da0f04aa11dd552a6d741b" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "condition", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-version-alignment" + ] + } + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure", + "support", + "acceptance" + ], + "when": { + "task": [ + "task-version-alignment" + ] + } + }, + "route-card": { + "layer": "L3", + "required": [ + "route-card" + ], + "when": { + "task": [ + "task-version-alignment" + ] + } + } + }, + "skill": { + "name": "task-version-alignment", + "description": "Use for upgrades spanning inference engines, plugins, drivers or operator libraries. Isolate the incompatible boundary and qualify the requested version combination on the same workload.", + "frontmatter": "host-header.yaml", + "body": "navigation", + "sections": [ + "capture", + "procedure", + "support", + "acceptance" + ], + "resources": {} + } + } + }, + "content": { + "host-header.yaml": { + "path": "task-version-alignment-header.yaml" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json b/src/inferrsi/knowledge/compositions/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json new file mode 100644 index 000000000..2b39edf67 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json @@ -0,0 +1,197 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "TensorRT-LLM disaggregation trades phase interference for KV transfer", + "summary": "Separate prefill and decode resources when workload interference dominates the added transfer, queueing and layout-conversion costs.", + "applicability": { + "hardware": [ + "Separate NVIDIA GPU resources with a qualified KV transport such as RDMA or NVLink" + ], + "software": [ + "NVIDIA/TensorRT-LLM at c9b18eefa731dc59b0091bdfff6d890aa9d1e98e; later revisions need reinspection" + ], + "conditions": [ + "Serving workload has measured prefill/decode interference and compatible KV layouts" + ] + }, + "limitations": [ + "No numeric speedup or cost reduction is transferable from architecture alone.", + "Short prompts, weak interconnects or imbalanced pools can make disaggregation slower.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "tensorrt_llm", + "backend": "cuda", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/tensorrt_llm.cuda.llm.prefill_decode_disaggregation.json", + "sha256": "349856dd98628f94987e014889cd1b15d0e3ae6ab6c576cdde917f28fbafb102" + }, + { + "url": "https://github.com/NVIDIA/TensorRT-LLM/blob/c9b18eefa731dc59b0091bdfff6d890aa9d1e98e/docs/source/features/disagg-serving.md", + "type": "technical_document", + "commit": "c9b18eefa731dc59b0091bdfff6d890aa9d1e98e", + "accessed_at": "2026-10-15", + "content_sha256": "8b86780c4896ef07c597ec7ab0266fb491030f1d5cdc02adfe2db260973c39d8" + } + ], + "attribution": [ + { + "url": "https://github.com/NVIDIA/TensorRT-LLM/blob/c9b18eefa731dc59b0091bdfff6d890aa9d1e98e/docs/source/features/disagg-serving.md", + "type": "technical_document", + "commit": "c9b18eefa731dc59b0091bdfff6d890aa9d1e98e", + "accessed_at": "2026-10-15", + "content_sha256": "8b86780c4896ef07c597ec7ab0266fb491030f1d5cdc02adfe2db260973c39d8" + } + ], + "id": "tensorrt_llm.cuda.llm.prefill_decode_disaggregation", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original", + "revision": "sha256:bf07a36a88bd1721ba4e98f61deeb004b9710e2336df2285b9f140c0fac0a464" + }, + "identity": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.identity", + "revision": "sha256:ee822f72974204fba74a0208999f9d98e5bc2f40e65f41c98348cae7b760627e" + }, + "status": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.status", + "revision": "sha256:7cb724d5d9837f0514a88f9e7cfd134ec8a62978d25b3583c48a2fb7a4ade28f" + }, + "summary": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.summary", + "revision": "sha256:0fad8039ee955fcfcbfb2a947077255a9b8fe2cd4eaab25e145de2d80c241e37" + }, + "identity-2": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.identity-2", + "revision": "sha256:e5053cce5d90d3d0c553557c18600fa785d677aa26692347081244c7234b0734" + }, + "sources": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.sources", + "revision": "sha256:29c240dcfc48076d5c75ee917df718af5a44afadc8ccde659da1aa21162e8cb0" + }, + "scope": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.scope", + "revision": "sha256:32faf9e07cbb06a6456c17037be4aa854bde61fed4a79147c74e8edfc7ea8d68" + }, + "claim-0": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.claim-0", + "revision": "sha256:94a04355426be7a8945b75da0ed028a8fcaace3ab08a00a391756969dfa1f4b5", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.claim-1", + "revision": "sha256:a6cbf97e1a5bacbb93884edf7f9c501d7ad82a7cba48b0d14ecb3f0f89412211", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.transfer", + "revision": "sha256:890082b8ccb34c39388184a166947b5de40d22368344049af766b5bec31c2206", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.actions", + "revision": "sha256:17d35c09fa6140ac17f88102482f05eb40e568a82e7125bfa355dbe4f915b059", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.validation", + "revision": "sha256:94fa23c3add01ef0a28f16b404e5a68af3a4bda221005072618b312c06b3d772" + }, + "limits": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.limits", + "revision": "sha256:301683a5d6b1923d7c983ed820824908197f597df545b71a867ecaa465b24f16" + }, + "verification": { + "ref": "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation.original.verification", + "revision": "sha256:35caf50c9fefcdd310afb0a7083ef7c360a5b69576ccf32b25872594ba3dbcbb" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/training-resource-budget.json b/src/inferrsi/knowledge/compositions/training-resource-budget.json new file mode 100644 index 000000000..e6a405480 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/training-resource-budget.json @@ -0,0 +1,176 @@ +{ + "authority": "checkout", + "metadata": { + "id": "training-resource-budget", + "kind": "skill", + "entrypoint": "playbooks/planning/training-resource-budget/SKILL.md", + "title": "Choose training offload and resource-budget changes using pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case. Balance accelerator capacity, CPU work, pinned RAM and local storage; keep host/device transfer exposure distinct from collective network bottlenecks.\n", + "origin": [ + "external" + ], + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/playbooks/planning/training-resource-budget/SKILL.md", + "sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2" + }, + { + "type": "unknown", + "note": "Legacy provenance remains in procedure/readsets" + } + ], + "applicability": { + "scope": "Choosing training offload and resource-budget changes from pinned DeepSpeed configuration, attributed expert diagnosis and a historical MindSpeed case, balancing accelerator capacity, CPU work, pinned RAM and local storage while keeping host/device transfer exposure distinct from collective network bottlenecks", + "prerequisites": "The source boundaries are read; garbage-collection or affinity changes, privileged memlock changes and delayed parameter updates each need separate approval, and the skill authorizes no newest-wheel installation, scheduler-priority change, benchmark or failure injection; historical MindSpeed reuse requires compatible allocator symbols, tracked swappable storage, sufficient host capacity and verified device/NUMA/CPU mapping, not merely the presence of npu-smi and lspci", + "input_contract": "State attributed to parameters, optimizer state, gradients or activations with its current memory tier, lifetime and next consumer; whether the failure is allocation capacity or throughput; a per-host budget for input buffers, checkpoint snapshots, offloaded state, OS cache and CPU workers with the actual ranks sharing the host; the host/device link recorded apart from collective traffic; the exact source version and enabled execution mode", + "produced_artifact": "A candidate decision record per proposal: the observed limiting interval and owning state or resource, source version and execution mode, capacity released and resources consumed with units and uncertainty, overlap readiness and mutation boundaries with expected contention, and the fixed-workload step and correctness evidence required for later validation", + "failure_modes": [ + "A change that lets the model fit is presented as a speedup, although it can slow each step", + "A tensor copied to CPU is taken as an InfiniBand/RoCE bottleneck, or CPU/NVMe offload is counted as network evidence", + "Parameter max_in_cpu is read as a byte or total-host-memory cap instead of an element count", + "NVMe optimizer placement is assumed to remove CPU optimizer demand", + "The parameter buffer-pool count is transplanted to the optimizer, or all optimizers are assumed to hold identical states", + "Configuration presence or schema documentation is taken as evidence that a knob or overlap actually ran", + "Ordinary overlap is taken as permission for delayed, stale parameter updates" + ], + "refusal_point": "Claims no hardware validation, measured gain or current NPU compatibility, keeps source support and extracted coverage separate from measured improvement, and does not reuse the MindSpeed headline gain; historical source observations do not establish current-stack compatibility, whole-model correctness or measured benefit" + }, + "state": "candidate", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", + "Checkout-only local skill; no automatic execution or promotion.", + "Only declared references are required; other cross-skill links are navigation.", + "Historical revisions require a matching checkout or a retained store." + ], + "attribution": [], + "empirical_validation": "not_run", + "required_resources": [ + "playbooks/planning/training-resource-budget/SKILL.md", + "playbooks/planning/training-resource-budget/references/mindspeed-historical.md", + "playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md", + "playbooks/planning/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md", + "playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md", + "playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md", + "playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md", + "playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md", + "playbooks/planning/training-resource-budget/references/sources.md", + "playbooks/planning/training-resource-budget/references/stas-decision-notes.md" + ], + "composition": { + "when": {}, + "license": "Apache-2.0 AND CC-BY-SA-4.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "navigation": { + "ref": "checkout:training-resource-budget.original.navigation", + "revision": "sha256:b19739c8fc004b2c5170730dfad73e4f32c697491e9947a22b4fd2ccb1e4d265" + }, + "decision": { + "ref": "checkout:training-resource-budget.original.decision", + "revision": "sha256:9dcd3a132d7fa803876101fc771706ccfae58b8568a675f52993e8901687eb2c" + }, + "procedure": { + "ref": "checkout:training-resource-budget.original.procedure", + "revision": "sha256:bd56a9c7dbea94aef2f8da5f72f0a3621c83dcfdb2dd8fc2db6d34b8a33d9f89", + "requires": [ + "decision" + ] + }, + "original": { + "ref": "checkout:training-resource-budget.original", + "revision": "sha256:80065e316fe72be5795829d0d546f44d76fcc261578d0415558855ec74b0adbd" + }, + "mindspeed-historical": { + "ref": "checkout:training-resource-budget.mindspeed-historical", + "revision": "sha256:cd1389e4ce3954c068cbcd5426708af3a9bed2eab4a4d7bf3239c52941ecfd2d" + }, + "mindspeed-source-readset": { + "ref": "checkout:training-resource-budget.mindspeed-source-readset", + "revision": "sha256:e4ffe8d249d225e1f046d75ad67e168b78fb3b162f2f5dc035832e7ba94b9952" + }, + "integration-notes": { + "ref": "checkout:training-resource-budget.integration-notes", + "revision": "sha256:d83fd6a95cfd1642b772e995f0a2159d7f0f83a6b88be87440975f8eef2d6dbb" + }, + "paper-grounded-cases": { + "ref": "checkout:training-resource-budget.paper-grounded-cases", + "revision": "sha256:0f0247406022d43c95211471192fb477eb013c1cff273786f922b704793ac5ca" + }, + "offload-delta": { + "ref": "checkout:training-resource-budget.offload-delta", + "revision": "sha256:312d1730ff10ddd44bc2d9842fbbcc6cc7bd52317f382ee546a07cdb6d37e8be" + }, + "training-memory-scheduling": { + "ref": "checkout:training-resource-budget.training-memory-scheduling", + "revision": "sha256:b4ba8e0b8788c2b7a597202a4549653c64fcc9c09963912e2774e10672e9dcc6" + }, + "source-readset": { + "ref": "checkout:training-resource-budget.source-readset", + "revision": "sha256:7b406d2bce50493d9f1b06de5414b074f648c3219661c226e50954c29dc25920" + }, + "sources": { + "ref": "checkout:training-resource-budget.sources", + "revision": "sha256:9dc6255caf9dda0108ad1f64211e45d9213f8957a6e721e5fb19c60c6ed9570a" + }, + "stas-decision-notes": { + "ref": "checkout:training-resource-budget.stas-decision-notes", + "revision": "sha256:2e9f528f520f9d6c4aefcd503d74f9fa57f580ee8e39ae98661afcab36cf9a72" + } + }, + "routes": { + "navigation": { + "layer": "L0", + "required": [ + "navigation" + ] + }, + "decision": { + "layer": "L1", + "required": [ + "decision" + ] + }, + "procedure": { + "layer": "L2", + "required": [ + "procedure" + ] + }, + "originals": { + "layer": "L3", + "required": [ + "original", + "mindspeed-historical", + "mindspeed-source-readset", + "integration-notes", + "paper-grounded-cases", + "offload-delta", + "training-memory-scheduling", + "source-readset", + "sources", + "stas-decision-notes" + ] + } + } + } + }, + "directory_resources": { + "playbooks/planning/training-resource-budget/SKILL.md": "original", + "playbooks/planning/training-resource-budget/references/mindspeed-historical.md": "mindspeed-historical", + "playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md": "mindspeed-source-readset", + "playbooks/planning/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md": "integration-notes", + "playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md": "paper-grounded-cases", + "playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md": "offload-delta", + "playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md": "training-memory-scheduling", + "playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md": "source-readset", + "playbooks/planning/training-resource-budget/references/sources.md": "sources", + "playbooks/planning/training-resource-budget/references/stas-decision-notes.md": "stas-decision-notes" + } +} diff --git a/src/inferrsi/knowledge/compositions/transformers.common.llm.kv_cache_strategy_contracts.json b/src/inferrsi/knowledge/compositions/transformers.common.llm.kv_cache_strategy_contracts.json new file mode 100644 index 000000000..d3b1abe6c --- /dev/null +++ b/src/inferrsi/knowledge/compositions/transformers.common.llm.kv_cache_strategy_contracts.json @@ -0,0 +1,197 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Transformers cache strategies trade compilation, capacity and latency", + "summary": "Dynamic, static, offloaded and quantized KV caches have different contracts; select by workload and API support rather than a universal ranking.", + "applicability": { + "hardware": [ + "Device and quantization-backend support must be checked for the chosen model; this is API guidance" + ], + "software": [ + "huggingface/transformers at 2126f65b0ab267e113e78a002447fc7094de83d5; later revisions need reinspection" + ], + "conditions": [ + "Autoregressive generation with known length distribution, attention type and memory budget" + ] + }, + "limitations": [ + "Memory reduction alone is not throughput evidence.", + "This source documents Transformers interfaces; downstream serving-cache compatibility remains an unverified transfer hypothesis.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "transformers", + "backend": "common", + "scenario": "llm.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/transformers.common.llm.kv_cache_strategy_contracts.json", + "sha256": "a2df26052112a9f3fc6242b2bd636ab13991442db57e56646168d6c52032d38d" + }, + { + "url": "https://github.com/huggingface/transformers/blob/2126f65b0ab267e113e78a002447fc7094de83d5/docs/source/en/kv_cache.md", + "type": "technical_document", + "commit": "2126f65b0ab267e113e78a002447fc7094de83d5", + "accessed_at": "2026-10-15", + "content_sha256": "70b4f34a7a10862ac48a697f998f65ecf446f423ab9adbd9d23137a259ba7dd0" + } + ], + "attribution": [ + { + "url": "https://github.com/huggingface/transformers/blob/2126f65b0ab267e113e78a002447fc7094de83d5/docs/source/en/kv_cache.md", + "type": "technical_document", + "commit": "2126f65b0ab267e113e78a002447fc7094de83d5", + "accessed_at": "2026-10-15", + "content_sha256": "70b4f34a7a10862ac48a697f998f65ecf446f423ab9adbd9d23137a259ba7dd0" + } + ], + "id": "transformers.common.llm.kv_cache_strategy_contracts", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original", + "revision": "sha256:8d1224cacbcbfcc52f178ed23aa06386f0280c282a71e7e1f8052d823162fc79" + }, + "identity": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.identity", + "revision": "sha256:269dce76aeec8e2e7f529aaf09b84d1c9ae7b4d674e98da3e4d61797f76729a5" + }, + "status": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.status", + "revision": "sha256:14a995e81bbf0233a331b47bc941e816733837f6f56e42ef4433585eb6ab315e" + }, + "summary": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.summary", + "revision": "sha256:82952561e8d8cb884c35505ad0201ac5c86253e2dce6dfca91bb68b1da093c2e" + }, + "identity-2": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.identity-2", + "revision": "sha256:e531b14d0bcd2e93d6f05d74101991aeecd920ee6c65e2049755689fac0f1510" + }, + "sources": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.sources", + "revision": "sha256:16fa78fcf2e88a8450376cbfe5983cf7313c0cb23a613a815b20752d1ff4d0d7" + }, + "scope": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.scope", + "revision": "sha256:1546382db928cb5777e67094fd08e205d970961370134915a6b414d9826128da" + }, + "claim-0": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.claim-0", + "revision": "sha256:bada365c4373af2f3b794514ae711d0df7a586f17bdbd256f4beaafd8bfb4b1a", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.claim-1", + "revision": "sha256:c5578e96a5ffe20785b3deb1fc71658b3ecc3c0bc6295b070aa6c24031cea0fc", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.transfer", + "revision": "sha256:ef4bb2207ba660a434ff59517dec63b2500a1b21e702660d4320c3849bd57420", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.actions", + "revision": "sha256:28d22e065a0be81ba397def1eebe81247276d89b8a52702a52e30c15b70c7469", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.validation", + "revision": "sha256:48d15e0c9d42536f9682d3fc0696ff2b69bfa1e48635bad73dc91622f399a7ed" + }, + "limits": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.limits", + "revision": "sha256:d6706ca59a847880d4cd513db2e06081a286ff93814024114bebf94bba9776d1" + }, + "verification": { + "ref": "package:transformers.common.llm.kv_cache_strategy_contracts.original.verification", + "revision": "sha256:e00c8959119751d7e6a17206fe07595407f3ebfd16926ac8989a0dd74b81c1a8" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/triton.common.kernel.bandwidth_fusion_resource_limits.json b/src/inferrsi/knowledge/compositions/triton.common.kernel.bandwidth_fusion_resource_limits.json new file mode 100644 index 000000000..4052ac15d --- /dev/null +++ b/src/inferrsi/knowledge/compositions/triton.common.kernel.bandwidth_fusion_resource_limits.json @@ -0,0 +1,197 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Triton fusion trades memory traffic for register and shared-memory pressure", + "summary": "Fuse a bandwidth-bound reduction when its working set fits on chip; choose launch geometry using the compiled resource footprint.", + "applicability": { + "hardware": [ + "The tutorial includes CUDA and HIP target-specific occupancy calculations; each device still needs qualification" + ], + "software": [ + "triton-lang/triton at 4eda6cc91e86553a2517d1c764ea2967985553ad; later revisions need reinspection" + ], + "conditions": [ + "Rows fit the kernel resource envelope; the input stride and masked padded width are accounted for" + ] + }, + "limitations": [ + "Tutorial speedups are tied to its reference implementations and shapes; they are not predictions for current torch.compile or a service.", + "Fusion can regress when register pressure, padding or shared-memory demand reduces occupancy.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "triton", + "backend": "common", + "scenario": "kernel.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/triton.common.kernel.bandwidth_fusion_resource_limits.json", + "sha256": "6e9673d1a600a6ad34820e4325f2a6417f44f0f96d8ed0bcf21466d998f19ee4" + }, + { + "url": "https://github.com/triton-lang/triton/blob/4eda6cc91e86553a2517d1c764ea2967985553ad/python/tutorials/02-fused-softmax.py", + "type": "source_code", + "commit": "4eda6cc91e86553a2517d1c764ea2967985553ad", + "accessed_at": "2026-10-15", + "content_sha256": "4dbf82027df6149efaec19569e5b10b4c7600f53d4041dedc315a86c75b9141e" + } + ], + "attribution": [ + { + "url": "https://github.com/triton-lang/triton/blob/4eda6cc91e86553a2517d1c764ea2967985553ad/python/tutorials/02-fused-softmax.py", + "type": "source_code", + "commit": "4eda6cc91e86553a2517d1c764ea2967985553ad", + "accessed_at": "2026-10-15", + "content_sha256": "4dbf82027df6149efaec19569e5b10b4c7600f53d4041dedc315a86c75b9141e" + } + ], + "id": "triton.common.kernel.bandwidth_fusion_resource_limits", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original", + "revision": "sha256:7a048c09af62505b62fbe3a670376ab947aae9203fb10b874ba6a8b1db4c0f20" + }, + "identity": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.identity", + "revision": "sha256:cd990bfb0e2d251f6755c60dd4658dceba16d179b0b642d6149b634d6456ccbb" + }, + "status": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.status", + "revision": "sha256:302214f91159a0cd70a8020645e9127a41b5eeb530bb52e5fd18ce6be8a9448c" + }, + "summary": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.summary", + "revision": "sha256:6e48b19378a794eeae5ac33bda130491bd256c03229edcf21e2f4fa21bd2c1b8" + }, + "identity-2": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.identity-2", + "revision": "sha256:a2208ba6b89b593aa9502adc6d2b5f08243cd089395442986e71deaf76bdc8b9" + }, + "sources": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.sources", + "revision": "sha256:601dce11b06239328fc8b852ce92138d05a6341dc92dd6c6cce30569d77898c9" + }, + "scope": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.scope", + "revision": "sha256:0e79dacc230a4c0b3dfa915296cd7ad79ea59671e5fb1af26482472e9fe8be4d" + }, + "claim-0": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.claim-0", + "revision": "sha256:7235c9291424fbb85cbad658830d8b8052cf4e88222e056c53d0c00315bd27c6", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.claim-1", + "revision": "sha256:bddd59ef78eefb1eaa8219fde02aa969fd10f7b69bdb23a3e4c1ecba04fcf16c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.transfer", + "revision": "sha256:390341624de27930b2803289714c2442c438e3264f3276d8f9ce40fc9dea8ccc", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.actions", + "revision": "sha256:7a3653bdd5753d0fb620a7395ce6ea10ef46c4e5dcba3de952434aa1a991a74e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.validation", + "revision": "sha256:029959f47d8d6c537f5b8b1b4abfb8a8428989c6d2e7a50b112314758489d702" + }, + "limits": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.limits", + "revision": "sha256:c01daa2fb18060c3dbc55c03641dc69eeb53b3062f69671eee43bed92cbfee57" + }, + "verification": { + "ref": "package:triton.common.kernel.bandwidth_fusion_resource_limits.original.verification", + "revision": "sha256:a42c4b3188b530e53829fe95366a62e77566f04e2e2517f2d75d72aff53764e2" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json b/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json new file mode 100644 index 000000000..22872d0ae --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json @@ -0,0 +1,222 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 reference KV reuse must balance ownership after Ulysses", + "summary": "A reference-KV reuse candidate fixes a slower pre-Ulysses prototype by caching full reference sequences per local head shard after All-to-All; reuse remains quality-sensitive and evidence is one-shot.", + "applicability": { + "hardware": [ + "4× Ascend 910B3, 64 GiB HBM/device" + ], + "software": [ + "Hardware environment vLLM 0.28.0, vllm-omni abbreviated validation commit 85d63868", + "Rebased source revision at import 6de9a18572ba3211fc33f47c8e5beaea8d895e98 targets vLLM 0.30 APIs; local rebase environment was incompatible" + ], + "models": [ + "MiniMax-H3" + ], + "conditions": [ + "USP4/Ring1, 1344×768, 5-second output, 24 FPS, 50 steps", + "Tier2, refresh interval 8, ring size 2, unquantized BF16 host cache", + "4 images / 2-second reference video / 5-second reference video; one warmup then one measured request each" + ] + }, + "limitations": [ + "Unmerged candidate at import; hardware validation source differs from rebased Source revision.", + "One-shot measurements after warmup cannot establish variance or production tail latency.", + "Objective quality, host quantization E2E, remote reliability and cross-backend portability remain unverified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "ascend", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.json", + "sha256": "80b853fc594d387ab48bed04dca245e0a22b8cdaf7c9b853551ab3bafa302e84" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "6de9a18572ba3211fc33f47c8e5beaea8d895e98", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "6de9a18572ba3211fc33f47c8e5beaea8d895e98", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original", + "revision": "sha256:71b12258906d927face55e4d77c24c9646c4978b9c35e07e23dce212bad194d3" + }, + "identity": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.identity", + "revision": "sha256:674de1e0c10adf70cde88a3b52fc73804415e68b1f5e809160bd9380b50ac117" + }, + "summary": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.summary", + "revision": "sha256:3509e1c2140f9da197f53d51d8bee38002c80ab8f5c6fa237541c4fc008a9c00" + }, + "identity-2": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.identity-2", + "revision": "sha256:97d702f3635bae688dae5a6d5f715e122c8d9e99356b3b3604c377d41cee5f84" + }, + "sources": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.sources", + "revision": "sha256:8f278f0d4431548994337fba4aebaa86a2c6c31417877d31d3ccd985f1e86ddd" + }, + "scope": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.scope", + "revision": "sha256:532db1ce7a62e177eb1d95eff039a6c316aa82ffc12497efa553a64fb9687fac" + }, + "claim-0": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.claim-0", + "revision": "sha256:7f85aa00e40198920eef133bbf82f2045d88c8285694e63bd12185c9b85a4400", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.claim-1", + "revision": "sha256:efa2fd2a640513143c6d4b82ca7af4f98beb28fdaeccd42d44c1ae2c95c3d5f0", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.claim-2", + "revision": "sha256:712015696c2d2dc0e7f0411a239fdfb28e40994b8d59ee1ec6dcbba55f8048ac", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.claim-3", + "revision": "sha256:66f2a4e02050bf36231ca1aa8544f5bee66bfcca14695bd5f887825e4591099d", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.actions", + "revision": "sha256:155f63d13989867a0bd3e67603d97e2610e5be185eddae89bb37eab0942064f2", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.validation", + "revision": "sha256:28aaf29291bb25bfea72104ccca39c6a7a68668b1c6218386342bc62448bd796" + }, + "limits": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.limits", + "revision": "sha256:daf9d53ff4803137987fe4fcc532cc7a3935a8da59a54466ac84c7deda2a6256" + }, + "identity-3": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.identity-3", + "revision": "sha256:cb135f4de03de58fdcef348754fe0ae038da723b7e46a55a9d36dd6033f0884a" + }, + "status": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.status", + "revision": "sha256:30a15998cdc89ef6f56d597b67eb3f42456ee68f7856f60208e305be1260d745" + }, + "verification": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse.original.verification", + "revision": "sha256:bab63a249a7d5a33bdbcd3788d7b4f64465101198c2e9ee44e8c7710d56ef168" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json b/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json new file mode 100644 index 000000000..a7de68167 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json @@ -0,0 +1,222 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 SP head buckets reduce exposed All-to-All with quality still pending", + "summary": "An open Ascend head-bucket pipeline overlaps projection/attention with communication; reported latency improves against the same-round chunk path, but full-model output equivalence remains unproven.", + "applicability": { + "hardware": [ + "4× Ascend 910B" + ], + "software": [ + "vLLM 0.29.0, CANN 9.0.0", + "Reported E2E source c36a9b6979a890c4ec9c3e8bf54000174134bea9; imported source revision f9e5d544d33428e17b818be3a01cb7d0956e4ead" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "SP4, 1344×768, 124 frames, 24 FPS, 8 steps, seed 3100, guidance 1, flow shift 12", + "Chunk size 64 MiB unchanged; head buckets 0→4", + "Each arm: 2 warmups + formal + profile + formal; only unprofiled formal requests underpin latency comparison" + ] + }, + "limitations": [ + "Unmerged candidate at import, not a main-supported feature declaration.", + "Only two unprofiled formal samples per arm; current-head E2E and full-model quality need revalidation.", + "Ascend910B/CANN evidence does not validate NVIDIA or ROCm transport." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "ascend", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.json", + "sha256": "c4d29d1bceb5e2cf86151bf53c9dafb3d83428fb1e9d2a848d852bb8824bf857" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f9e5d544d33428e17b818be3a01cb7d0956e4ead", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f9e5d544d33428e17b818be3a01cb7d0956e4ead", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original", + "revision": "sha256:eeee306ddad1421e5f93e2ae4e9fe1b0eada65ad8ad100e2054b99a6552ccd1a" + }, + "identity": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.identity", + "revision": "sha256:fe5818788d5b890c5098a4300f1792ec530088b4998bd297c41f9d01a0b16de2" + }, + "summary": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.summary", + "revision": "sha256:cb6955c09b4709f5b576e9b5e0580a29ae885014adcea186b55ac435621cf0be" + }, + "identity-2": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.identity-2", + "revision": "sha256:fe05833d9c2e727606a11406c1f46062aeec082e5db5464f33293b2d735bd528" + }, + "sources": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.sources", + "revision": "sha256:e0754392fe67b887b911923d7bcde3e9a11611adbcfea3f72c53a6841feb74b9" + }, + "scope": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.scope", + "revision": "sha256:12bc3a80edd0c9eaafc04203d7b066c163b2deb9a9cfd9884bba035fedda76a1" + }, + "claim-0": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.claim-0", + "revision": "sha256:e1d73a5062414ab4250bb54616d8c10b35a0922ac646e2a9c83984092905712e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.claim-1", + "revision": "sha256:a12535a2ea6bb6e2ec0bbb7d2a2d9c811304e01347593e2904b3ff96c892a631", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.claim-2", + "revision": "sha256:738f2aea133cf04dd456a050ceb9856b1484ead1f266836df46ba232ba59a045", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.claim-3", + "revision": "sha256:7cfca29b383ef7eca7c5fcc6a5f9191516c0f21ea00ee29aa0bd61b8a51bbe10", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.actions", + "revision": "sha256:f3bc14f81631640f77b1db16e1857744f35df4838cc3d9da8c20205f14385797", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.validation", + "revision": "sha256:d9fc5c430c2d30e6fc8efd5e530a8ebee54939b0d4ffc7cfa7786247b245644e" + }, + "limits": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.limits", + "revision": "sha256:8b63e430eb9251b7b098ebb3e306dd2d3198188b8389e6be050fdbee08833534" + }, + "identity-3": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.identity-3", + "revision": "sha256:1852bc3497446f2a458101a9e79b5da2e80f9679279c0455a9c239a31c970b90" + }, + "status": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.status", + "revision": "sha256:36cfbf81681168f847ce54345d734544ebd705ee671b45dabd980907d72a54d0" + }, + "verification": { + "ref": "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets.original.verification", + "revision": "sha256:4c436b975f657e1ca3215b1b06ae646162ece748d4d92f72b0d2ac7a48325531" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json b/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json new file mode 100644 index 000000000..93540295b --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json @@ -0,0 +1,268 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Qwen-Image-2.1 eager text-to-image on one 910B1: reuse plus interleaved RoPE, 30% not met", + "summary": "The author reports: On one Ascend 910B1, conditioning reuse plus npu_rotary_mul interleaved RoPE cuts the eager BF16 1280×704 eight-step mean from 3111.5 ms to 2459.6 ms with identical RGBA. Opt-in VAE fastpath reaches 2425.5 ms and passes the quality gate without pixel identity. A 30% line at 2178 ms was not met.", + "applicability": { + "hardware": [ + "1× Ascend 910B1, 64 GiB HBM" + ], + "software": [ + "vLLM 0.31.0", + "vllm-omni branch amy/qwen-image-21-conditioning-reuse at 399cc01d1bc4542964d91aaa17fb43862a8cf3b3" + ], + "models": [ + "Qwen-Image-2.1-Turbo" + ], + "conditions": [ + "BF16, eager, TORCH_SDPA, CFG=1, 1280×704, checkpoint native 8 sigmas", + "Two warmup rounds, then three repeated prompts with seeds 42/43/44", + "Unoptimized baseline mean 3111.5 ms; 30% line is 2178 ms", + "QWEN21_NPU_ROPE defaults to fused; QWEN21_NPU_ROPE=eager restores the unflatten/stack path", + "QWEN21_VAE_FASTPATH, QWEN21_ATTN and QWEN21_CACHE_STEP_INPUTS stay off unless set" + ] + }, + "limitations": [ + "Single 910B1 eager cohort. Not a four-card B300 HTTP result and not a 30% PASS.", + "Three measured requests after warmup. No production tail claim.", + "Later repeats were blocked when the allocator could not reserve a small extra block and the NPU runtime reported insufficient compute resources.", + "Ascend 910B1 evidence does not transfer to CUDA, ROCm, or other Ascend SKUs.", + "Imported from amy-why-3459's report; raw per-request timings, RGBA outputs and a frozen validator are not included. No NPU rerun was performed for this import; InferRSI acceptance remains INCONCLUSIVE." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "ascend", + "scenario": "diffusion.image_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.json", + "sha256": "ef107d43cc448219eda4d64ab961b61cda6350e20d30d94de1ff7c4ffff7e775" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-12", + "authors": [ + "amy-why-3459" + ] + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "399cc01d1bc4542964d91aaa17fb43862a8cf3b3", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-12", + "authors": [ + "amy-why-3459" + ] + } + ], + "id": "vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original", + "revision": "sha256:5457a36647b1e44aa9ea54e34d89bdb994825d9e6441174621c93490305feb5e" + }, + "identity": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.identity", + "revision": "sha256:67024eccd919762f8822aa2da4f55111fb8fa706fc73da3fe84fb12319e81da8" + }, + "summary": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.summary", + "revision": "sha256:0f5b076747eee0a46b414b99916a10d531899bfc5fd545f96df1b167ee5184e8" + }, + "identity-2": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.identity-2", + "revision": "sha256:8b6fb08bffe8584fffb46d9145082f3035f72e574172cda1969792f4b8cb8293" + }, + "sources": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.sources", + "revision": "sha256:06ab579afe596295217b644e6b976085fc89b1a57b326d0fe3bf6a5f97163323" + }, + "scope": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.scope", + "revision": "sha256:4e49948841d32420766f6e95b94cedc153fabadd03eb72bf3141eb67d823f9da" + }, + "claim-0": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-0", + "revision": "sha256:6190f0e3597b014011a664d940b4ae2e3bf2805f7c4c9b5fb193a1624dce35c8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-1", + "revision": "sha256:a7c214e1cd1346c6228eb0d4faaaca9784167c9e311dc4ea9f7fe86765b3d562", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-2", + "revision": "sha256:cd052ea7c9897705a8925182c976e8840cda93c6615ebcb45b2a2aa209155910", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-3", + "revision": "sha256:c8147e9d31802195402923237276da51616a641b7bc385a3b472f562258fd6cf", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-4", + "revision": "sha256:f928cfb313c990cf2d94fee77780d7c623e3ad1e33a3f0a0111a8c227ce5404b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-5": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-5", + "revision": "sha256:a6230668bb35f2deb52e31053058e35dab7770d16d545373a40016bbe2691032", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-6": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.claim-6", + "revision": "sha256:f02a9c5d6c5b1716f3ea19e1babb6013cbad7376c6afd18b093890f5d382cc03", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.actions", + "revision": "sha256:3f3df24c486eb5ca2ff84882c1d361fcfeb6b84dfd21d066656174c084934a66", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.validation", + "revision": "sha256:a8b3a5fff25f750cc446472aa98df3848f0838d16c528d4f5e1a8931ae5f7e7e" + }, + "limits": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.limits", + "revision": "sha256:23835559714063d457ff53cf0aed284e7e6119b71a917d76630ad96552d69428" + }, + "identity-3": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.identity-3", + "revision": "sha256:25607edf1aff4d1bafd572075b034436dc1915538a8a098b41b5ae3d294543c9" + }, + "status": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.status", + "revision": "sha256:f291cb45dbb3b0b8178e9f43f2b239755460afa53d977af945b5955733803b31" + }, + "verification": { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i.original.verification", + "revision": "sha256:28fddfec881222f4dcdfb2eaa4c2bca47f56c279ebb75e4300c1df5bbe179479" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "claim-5", + "claim-6", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.measurement_and_profiling.json b/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.measurement_and_profiling.json new file mode 100644 index 000000000..6ad5aa742 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.measurement_and_profiling.json @@ -0,0 +1,226 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Diffusion measurement and profiling discipline", + "summary": "Freeze the serving, single-request and benchmark commands; measure performance without diagnostic profiler overhead, then use targeted traces to choose one-variable experiments.", + "applicability": { + "hardware": [], + "software": [ + "vllm-omni guidance snapshot ee81f33001922f8d91dd09da0a57ee1531a8df82; parser flags and model capabilities must be checked at the target revision" + ], + "models": [ + "Wan/Qwen/Flux-style image and video pipelines; adapt to other diffusion models" + ], + "conditions": [ + "Named device SKU/count/topology, model revision, assets, seed, shape, frames, schedule, dtype, attention backend and compile state are frozen", + "Backend-native profiler and low-overhead stage timings are available or their absence is recorded" + ] + }, + "limitations": [ + "This is imported methodological guidance, not a performance result.", + "Parallelism and compiler benefits depend on model implementation, shapes, topology and target software.", + "No remote device run or upstream tool execution was performed by InferRSI during this import." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.measurement_and_profiling.json", + "sha256": "c8b25583cd160024c7472a20debea34cb6d4bc79714b4bad2953555adc9f794e" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/references/optimization-playbook.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/diffusion-perf-opt/references/optimization-playbook.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.common.diffusion.measurement_and_profiling", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original", + "revision": "sha256:310624d59e560b8a11e14050831bcd814f7ca1114c9522abe30973e6720191e2" + }, + "identity": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.identity", + "revision": "sha256:20221702be4e3910e7f0f59d515f32fad8c2901da219cb3c5b56fec7c1819b0c" + }, + "summary": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.summary", + "revision": "sha256:465ac5cb3971d6195141e32694ac242d3d72092c06c8bbfb65e580adde1646c8" + }, + "identity-2": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.identity-2", + "revision": "sha256:32e9083bdd22a5336b4c7f38c59d985659e3df137f877be913af6aff4e61288b" + }, + "sources": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.sources", + "revision": "sha256:f0ed65ff0780108f8d30d72cfc1e86781247681d15e9d2f46258d4ea15682d01" + }, + "scope": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.scope", + "revision": "sha256:11f4bbb768240912dd4d4a719b8cfa7477ff3da41e1e8c688b360aa9b01c5d47" + }, + "claim-0": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.claim-0", + "revision": "sha256:90cd8e65dd3ada3d295f48ac7e9a179aebedb912f4029b65bf006984215959bb", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.claim-1", + "revision": "sha256:30c58ad927939448da854c06b1eae497ef4bfcbc8103acd45ac915f307302b9b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.claim-2", + "revision": "sha256:550d8dc62db1d37fc3f31e62a6f710bcab1a2d4bc69d0e9ff6fbae7629f82a7b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.claim-3", + "revision": "sha256:b45e66ac9341e5dbdf0167e401b8e50ebfec8ddffe97ca803237452ff6943d5c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.actions", + "revision": "sha256:1a34ee26230a8d9fc697410674cbce905be597b0d223811660cb5812244fff58", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.validation", + "revision": "sha256:398bfd3e1d84a77a9cbf4e70ae4753d1a825b901bb1f369b147432ad755a6a39" + }, + "limits": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.limits", + "revision": "sha256:1c6a916230019bdc2718c5f17119bd8dc7e8e876a0198c7612c14250f37e57d7" + }, + "identity-3": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.identity-3", + "revision": "sha256:bc0539a60fe8a282e67f180cb5a06ec31f93fd96e2db4ad99ca9f12ad24d6abb" + }, + "status": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.status", + "revision": "sha256:c306ad266b48b581174e86800d21e06067db277e429813b88909a4055f042277" + }, + "verification": { + "ref": "package:vllm_omni.common.diffusion.measurement_and_profiling.original.verification", + "revision": "sha256:0efe3593bd9c286aee0251fd74b86c8d66f3b3aac044bca224b7fc1a99fa0b6b" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.production_integration_gates.json b/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.production_integration_gates.json new file mode 100644 index 000000000..650fe1910 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.production_integration_gates.json @@ -0,0 +1,274 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Production diffusion integration and compatibility gates", + "summary": "Separate Day-0 loading support from production readiness; qualify exact task/backend/hardware combinations through API parity, strict loading, quality, offload/cache lifecycle, cancellation and load stability.", + "applicability": { + "hardware": [], + "software": [ + "vllm-omni source snapshot ee81f33001922f8d91dd09da0a57ee1531a8df82; online FP8/DLO/cache/batching support must be qualified at target commit" + ], + "models": [ + "New or existing diffusion integrations, including MiniMax-H3" + ], + "conditions": [ + "The initial pipeline/registry/loader vertical slice already works", + "Official implementation, checkpoint and target repository revisions are pinned independently" + ] + }, + "limitations": [ + "The source describes a target readiness process; it does not prove that every model or hardware satisfies the gates.", + "CUDA/ROCm/Ascend support, sparse attention, HWR/mmap, quantization and offload are independent scoped qualifications.", + "No local GPU/NPU, generated-media quality, real serving or soak validation was performed for this knowledge import." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.production_integration_gates.json", + "sha256": "649b49ff64d3e9e88bd620027dabf9d126ca69bbe91b448f28e845ecbe1f8e2f" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/api-and-recipes.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/feature-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/performance-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/production-validation.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/SKILL.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/api-and-recipes.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/feature-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/performance-patterns.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/ee81f33001922f8d91dd09da0a57ee1531a8df82/.claude/skills/production-add-diffusion-model/references/production-validation.md", + "type": "skill", + "commit": "ee81f33001922f8d91dd09da0a57ee1531a8df82", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.common.diffusion.production_integration_gates", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original", + "revision": "sha256:2086ee9230ca04a4a3f82330ebb78a5785a59db4b3a1dfaee9232eed85a9fe3f" + }, + "identity": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.identity", + "revision": "sha256:8c88522749c82e0542b4094d3e9080b7ccc2e7834495a72adf81cac618e92e0f" + }, + "summary": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.summary", + "revision": "sha256:29eb42d666c178a41890d88572e8fd9fd1836e01e9113fe7e5ac6006caac1ec1" + }, + "identity-2": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.identity-2", + "revision": "sha256:885fb593b416c6fb581eac7ac8d86cfbf5aa1a2921ba6a725817e3e653b29e1c" + }, + "sources": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.sources", + "revision": "sha256:b7b3419c1a9161faa210bd757892a3bb92cd01917111f1cbac64c39ab773e9d8" + }, + "scope": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.scope", + "revision": "sha256:d68d76c5eb2c122a7d018e057370079ad7dad96d06d49d6b639d95b0ef04499d" + }, + "claim-0": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.claim-0", + "revision": "sha256:ab5837665c7425d90d4fde282abd58444f443f27f8772e401fd3dfa6fe67a32f", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.claim-1", + "revision": "sha256:8438158f970062a04e8342f77fef31899f675a9c88e63ff43b8173545a2dc62d", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.claim-2", + "revision": "sha256:650d6dfab1fd25d587442e30f0eb1f5901308528e44811e832c1f11d9fe34be0", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.claim-3", + "revision": "sha256:85a9d12ec269813ed1d96b795409820b70833af561ca4f50160769d658fcec5b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.claim-4", + "revision": "sha256:40e2f798901d794282b1e5808788b723d1be360f22f50c533dfaef068ede2272", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.actions", + "revision": "sha256:84bd415aa92a90b507e995a844608b02cdadcbc8bf8d7fda536c72a57a3d9ce0", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.validation", + "revision": "sha256:d2a28c1c83d8fd99eec0993974207e03900af8e5a1d9169c7a44f1f6cfb6620e" + }, + "limits": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.limits", + "revision": "sha256:1f8770dca9efc9e0a6998c3ef9d2a7ebc583a31d6d902ef235511a1a1bf5e3ca" + }, + "identity-3": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.identity-3", + "revision": "sha256:2e992d659ee078500b6c0c5ad83c977b5f17c030ac292426e069b2ecdc0109a0" + }, + "status": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.status", + "revision": "sha256:f065df433c8492c83b4b5495c163aaa78e20d43db9539ce45f16b290d943a819" + }, + "verification": { + "ref": "package:vllm_omni.common.diffusion.production_integration_gates.original.verification", + "revision": "sha256:f0c0de2d0fec53d583cf1f766768d4ce4df39a8e08207428e029fa646d7912ae" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.upstream_review_gates.json b/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.upstream_review_gates.json new file mode 100644 index 000000000..4ef503cab --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.common.diffusion.upstream_review_gates.json @@ -0,0 +1,352 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Upstream review gates for optional acceleration and evidence ownership", + "summary": "Review framework policy boundaries, all shared-component consumers, optional backend prerequisites, request-state lifetime, portable reproduction, and independent artifact provenance before promoting an optimization.", + "applicability": { + "hardware": [], + "software": [ + "Diffusion frameworks with optional extensions and singleton model state" + ], + "models": [ + "Models sharing numerical operator contracts" + ], + "conditions": [ + "A candidate is being prepared for upstream review", + "Benchmarks emit per-trial artifact manifests" + ] + }, + "limitations": [ + "This record imports review guidance; it is not a benchmark or an accelerator support claim.", + "Local regression and E2E results belong to the review-response report and its pinned evidence, not this portable record." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "common", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.common.diffusion.upstream_review_gates.json", + "sha256": "5127709bb85ce31008d19468e1b4fcb5454a71776f69f991841cd9ef7558f9c4" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "443b3e97c09af3f5bd9399ef3b3ec8e7b0215852", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "d57480f5054e6c377a04225840b24e6355244dd9", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "6550e3f626e5c38fb7bf8a487f397797447fde33", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "e36d48ba47eef4b4954b6c4d97fd42471525fd30", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "443b3e97c09af3f5bd9399ef3b3ec8e7b0215852", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "d57480f5054e6c377a04225840b24e6355244dd9", + "accessed_at": "2026-10-12" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "6550e3f626e5c38fb7bf8a487f397797447fde33", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "review_guidance", + "commit": "e36d48ba47eef4b4954b6c4d97fd42471525fd30", + "authors": [ + "timzsu" + ], + "accessed_at": "2026-10-13" + } + ], + "id": "vllm_omni.common.diffusion.upstream_review_gates", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original", + "revision": "sha256:82fecab8acf09af62f4f14c57aba3e6a7bf8e7683b05c3584286964798b3e968" + }, + "identity": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.identity", + "revision": "sha256:7aca7ff004e5a373ed3a993cdf761751f94824a99240ac2e393f9b564c1944d8" + }, + "status": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.status", + "revision": "sha256:11c70598d65216484435c39b883c3c85a0ddc372c22e5b2c32486a8b3e1e2680" + }, + "summary": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.summary", + "revision": "sha256:0af191cf744e14ddce07bb7f9b597870a8fab5fe711f1505c110d2b395753271" + }, + "identity-2": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.identity-2", + "revision": "sha256:a58e22e71bbe99960f21952853ff3a176578eef499acdbbae97c1fb090250e2f" + }, + "sources": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.sources", + "revision": "sha256:591d119ab769ad0d14bbb34915e0692b605d2f522ad67192e10f167841085dfd" + }, + "scope": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.scope", + "revision": "sha256:7d62ce63dc7239a5b5f551007ce45f428a6ca05363848a72425d6ac9e30659fd" + }, + "claim-0": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-0", + "revision": "sha256:01cc1cd36e758d0bf59fa2ae1bab965102338fb4872d98b7fb3041f960ca8be2", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-1", + "revision": "sha256:5272ffd5f3944df4b1416c9b7cd80f97f1ed720d809ffe7db9bd31ace89b2659", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-2", + "revision": "sha256:9a60e39fb0ff859ace41485cfdc7fddb2f3c2a069155d42ed9359e824ea99426", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-3", + "revision": "sha256:ef673a83e1541177791e9f7a78a5b11a701c3a663c0e28a3d3f88abcf48e5dbc", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-4", + "revision": "sha256:d1a98461510d340aa644f4193b28b2de6f3a01667f86c4f9cc3deb54befb2869", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-5": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-5", + "revision": "sha256:d130eaf095ef340b5817c165ce0da1309c0cbc10e49530c99e408e00c04d4b13", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-6": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-6", + "revision": "sha256:d0d0145230ab89e58606405f00497d0cdc2f8347d24b554de14a031ead5385bb", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-7": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-7", + "revision": "sha256:7e2b8d822e70cac538d37278533454b6debc967b0ff0753e0e91349ee4fa6609", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-8": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-8", + "revision": "sha256:660f0e5ba431c0fd00541f4ff263b9c9a2e7e280da9244f95093d39997d5ce3a", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-9": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-9", + "revision": "sha256:7cb7ae3567e39d9eacb7427834e88702e9b4aa456b03f17d4bcb17cc25b98d67", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-10": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-10", + "revision": "sha256:40fb47e8ab5aac076bcd12aebf516e744ce1af5b22b81faa5dc7abd123f78530", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-11": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.claim-11", + "revision": "sha256:b1753197dd99d7e374d97e758613494324a8de331477d2ec7b88b968b515bc1e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.actions", + "revision": "sha256:85bd8131991505434d032811ddfe17eef2121db2f3bf96609fc52f9185c0254c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.validation", + "revision": "sha256:4f4bdcce21f6e033991a20046a9e460a68207a962ce85d6aa083bb309243f9b0" + }, + "limits": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.limits", + "revision": "sha256:8d5b6d481341326c7e466fc0d637d7db656c97d0797c3c4422421e1d66ab4fb4" + }, + "verification": { + "ref": "package:vllm_omni.common.diffusion.upstream_review_gates.original.verification", + "revision": "sha256:c5d8ad6362f80138c4e464ab3b416525188e356612884fc41b7f8ac1edb5ae1e" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "claim-5", + "claim-6", + "claim-7", + "claim-8", + "claim-9", + "claim-10", + "claim-11", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json new file mode 100644 index 000000000..7276b770b --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json @@ -0,0 +1,238 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "Audio concurrency scaling: mixed prefill, state ownership and codec overlap", + "summary": "Diagnose audio scaling with scheduler-step counts, admission/drain phases, mixed prefill/decode and codec overlap; isolate state, label and RNG ownership before qualifying same-source service throughput and complete audio quality.", + "applicability": { + "hardware": [ + "CUDA GPUs supported by the pinned runtime and operators; qualify the actual SKU separately" + ], + "software": [ + "vllm-project/vllm-omni source snapshot d6ed4f4844fbc41573ffc03247e5b2ff0a38d322" + ], + "conditions": [ + "The model uses autoregressive acoustic frames, a codebook tower, recurrent GDN state and a streaming codec.", + "Resolve effective stage settings, CUDA graph buckets, precision and dependencies from the selected revision; deployment comments are not local benchmark evidence." + ] + }, + "limitations": [ + "This record describes source-grounded mechanisms, not a reproduced speedup or a portable set of tuned constants.", + "A low-concurrency improvement does not imply high-concurrency improvement; reducing admission wait can also increase costly mixed steps.", + "Changing state precision, codec precision or FP8 execution can affect generated samples. Operator parity alone does not establish end-to-end audio quality.", + "A faster isolated operation can still regress service throughput. Recheck the unchanged serving configuration and complete audio quality before choosing a fused kernel or a different batch policy.", + "CUDA event spans can include host-submission gaps. Do not label their union as SM utilization, or count overlapped codec duration again as an available end-to-end speedup.", + "Qualification of another engine or a different GPU requires its own acceptance issue and complete evidence.", + "A whole-run average batch can be dominated by drain steps; a high batch in an admission subset does not establish an end-to-end speedup. Phase cuts are diagnostic scope, not permission to remove requests from acceptance metrics.", + "A shared-execution prototype may change GEMM shapes, MoE implementation or random-number consumption. Keep those changes explicit, and keep timing from a device with observed external work unqualified even when numerical checks pass.", + "A kernel reading nearly one active-expert weight footprint can remain bandwidth-limited despite low tensor activity; row padding or inactive experts must not be converted directly into a speedup claim.", + "A dedicated capture stream is a workspace-isolation hypothesis, not proof that prior quality failures were races. Require a fixed dynamic schedule and full service quality before attributing a cause or selecting overlap.", + "Configured or logged SM reservations may apply to a routing subkernel rather than expert GEMMs; inspect the actual dispatched branch before using such a setting as a resource-allocation explanation.", + "Native codec re-batching can change floating-point rounding. An error confined to a private scratch slot differs from a live-state error, but neither scratch analysis nor a high PCM SNR establishes full service quality.", + "A selected-phase delivery rate can explain a changing service score but is not GPU effective batch or a replacement acceptance metric. High client occupancy only rules out client starvation within its measured scope.", + "Repository-local issue evidence for the machine-code, live-metadata and complete-call lessons is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#complete-call-evidence-rejects-both-initial-native-moe-candidates. Its scoped results do not promote this imported guidance to a locally verified optimization.", + "Repository-local issue evidence for metadata-readiness graphs, loaded-library identity and zero-replacement comparisons is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#metadata-readiness-and-loaded-library-identity. Correctness evidence and a bounded feasibility screen do not establish a service gain or change this imported guidance status.", + "Repository-local issue evidence for occupancy versus issue, unresolved PC sampling, reference-ABI checks and staged causal-prefix reuse is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#measured-residency-and-staged-prefix-reuse. These diagnostic outcomes do not promote the imported guidance to a verified service optimization.", + "Repository-local issue evidence for inverse-row adapters and transparent compressed allocation is recorded in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#inverse-row-consumption-and-transparent-compressed-allocation. The scoped graph result and failed native allocation screen do not establish a service gain or change imported/unverified status.", + "Repository-local production-prefix and pause evidence is in evidence/drama3-b300-scale150/results/diagnostic-lessons.md#production-prefix-reuse-correct-graphs-can-still-lose-at-service-level. Historical workload tables and single later observations are not a matched three-framework acceptance matrix; imported guidance remains unverified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "audio.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.json", + "sha256": "cb47fabb232db81ed525cbb54371becc7e4a28b2bae9d8492f60dfb6f31563e8" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/deploy/fish_omni.yaml#L1-L100", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/gdn.py#L144-L246", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L1-L28", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/model_state.py#L264-L379", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L425-L478", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/deploy/fish_omni.yaml#L1-L100", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/gdn.py#L144-L246", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-15" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L1-L28", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/model_state.py#L264-L379", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/blob/d6ed4f4844fbc41573ffc03247e5b2ff0a38d322/vllm_omni/model_executor/models/fish_omni/fish_omni_model.py#L425-L478", + "type": "source", + "commit": "d6ed4f4844fbc41573ffc03247e5b2ff0a38d322", + "accessed_at": "2026-10-16" + } + ], + "id": "vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original", + "revision": "sha256:884ed1dea9fbb95837d14754a56c6349a308222cb04618bc53f7638a83717169" + }, + "identity": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.identity", + "revision": "sha256:01dc7333df4a89520012536d609426403fc27f4f7a954d1a32670be4a3880908" + }, + "status": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.status", + "revision": "sha256:e0bc1259fb15ed985ffc3c151cc0d1a09f34d5e723ac1702f8696af56c568b2a" + }, + "summary": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.summary", + "revision": "sha256:3398e045784e405df88e44db6bef4af4a7411ad83d6e409a8d7a1b12cc5f4acb" + }, + "translation": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.translation", + "revision": "sha256:f0f52efe20f8a13f4133b9a484d410702b9c83e3512fedd38209414e94da9023" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.identity-2", + "revision": "sha256:33edde5980b0d108a0aa7c420d0c147bf64ac93311a05facb01403d072701de0" + }, + "sources": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.sources", + "revision": "sha256:aeff76fef5b3fbacb2af31380d92418a86c79bc77d201ab4c55681fefb633c1a" + }, + "scope": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.scope", + "revision": "sha256:4e51298cfdd4d26d0894b350b909c5b04da9179aa667f79716d2e6d2fc481c54" + }, + "actions": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.actions", + "revision": "sha256:50a9e46abe84c87b3209a3a6ee14f91b000d34066249f44c9b0b26b197e13d05", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.validation", + "revision": "sha256:9adbf51f5fb4fd267e05941c95c6dd8e55153bf1b8ac4699a13be9071c926f54" + }, + "limits": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.limits", + "revision": "sha256:08fd03947b651f43555fe88ba69068b3ba65e34ffa3580154fc72bff1a81c87d" + }, + "verification": { + "ref": "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap.original.verification", + "revision": "sha256:f6bc8874fb832691a2001871c85e7f84aea1ca33ede5b7f2c1ce6b06cc0f4d0a" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + }, + "translated-navigation": { + "layer": "L0", + "when": { + "locale": [ + "zh-CN" + ] + }, + "required": [ + "translation" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json new file mode 100644 index 000000000..e7d58b649 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json @@ -0,0 +1,222 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 exact AdaLN schedule cache: capacity benefit can exceed latency benefit", + "summary": "A schedule-cache candidate precomputes finite-schedule AdaLN tables and can release projection weights; production-shape compiled measurements show capacity savings without a distinguishable speed gain.", + "applicability": { + "hardware": [ + "2× NVIDIA H20 98 GB for TP2; one H20 for the separately reported layerwise run" + ], + "software": [ + "Source/hardware revision 635215a96d3eaf6b5bac66020feae51b34daa5c9", + "Python 3.12, PyTorch 2.11.0+cu128, vLLM 0.26.0, FlashAttention" + ], + "models": [ + "MiniMax-H3 FL2VA / T2VA" + ], + "conditions": [ + "Small eager row: 448×256, 29 requested/39 aligned frames, 50 sigma points/49 forwards, seed 42, TP2/text-encoder TP2, flow shifts 12/3", + "Production regional-compile row: 1248×768, 209 frames, 50 steps, seed 2101, TP2", + "Single request in flight; schedule hits and cold misses measured separately" + ] + }, + "limitations": [ + "Source candidate unmerged at import; target main support is not implied.", + "Production-shape deltas are one-sample observations and sub-1% values do not establish statistically meaningful speed changes.", + "H20 and specific versions/schedules only; H200/B200 or another backend needs new validation." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.json", + "sha256": "ddbba3bb72b5789938595a82d3280e861f75f6ed54f05a1d2b7dcb1089d30f63" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "635215a96d3eaf6b5bac66020feae51b34daa5c9", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "635215a96d3eaf6b5bac66020feae51b34daa5c9", + "merge_commit": null, + "status": "open", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original", + "revision": "sha256:350b4b98faac52bc115180d20e54aace1a64d0bfff95f3cbf63a15d6a29ecae5" + }, + "identity": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.identity", + "revision": "sha256:9c665dd97879a5ae1b73bff628cbea62e0a7bee682ece8bf71fcb903bcefdff3" + }, + "summary": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.summary", + "revision": "sha256:1f590b1cb81333d1c34d8a39507f7c537a200c835ceb08f069f328c8aae26efa" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.identity-2", + "revision": "sha256:ce05529b569c50235b39bdab187e00ef826f736cc506be58586d53079d2b276f" + }, + "sources": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.sources", + "revision": "sha256:c787e2211f0a6d82d2a2097d98994329fd6a9eaed1c1d83ad09a92b36831e23d" + }, + "scope": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.scope", + "revision": "sha256:baf4e3db50ebba4150f6d37706637e4b8679e51c3271da5e4db230dc508bd5a6" + }, + "claim-0": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.claim-0", + "revision": "sha256:15aaf403a545c642846afa6f4ed96b58337903357fb35eb4344e40880c91513c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.claim-1", + "revision": "sha256:4696589cc4637d7cacc858a8f5cc952a4c1a86007ac74b991da22522ab944c1c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.claim-2", + "revision": "sha256:ffda1d4865f767cdd7b79a98650c2daa52c081b3c9d549fc71d44bca63b23b7b", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.claim-3", + "revision": "sha256:ecec1897484d5c046fb337fa0ec08f6dd73e2c597ed817256407c4b6cc411c10", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.actions", + "revision": "sha256:f46b95314b2e5b0fa75f9572324e78bac380ef65288fc116060402150397da60", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.validation", + "revision": "sha256:b6a8417f5ac9469fe7dfc8441d8d12dd33c544111acccc78aad84a27d608ef2c" + }, + "limits": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.limits", + "revision": "sha256:664bf22dcdd93b30a05081cc70beeb95fa7ddbd25d153687e137f996a0758766" + }, + "identity-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.identity-3", + "revision": "sha256:8f60505928f1bbc5baa0f43d3a4ed701487d8ea69a5cd4fd1898930e67d7814c" + }, + "status": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.status", + "revision": "sha256:0a56ee4045fba2c28afea3b0fc5833803151ee25226d96534e6c469e49f98150" + }, + "verification": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache.original.verification", + "revision": "sha256:dacb8deb88639b0a6f43a45943f41a715126bb92dc4a40528890f8d91c8b1d6d" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json new file mode 100644 index 000000000..311dc87cf --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json @@ -0,0 +1,235 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 online CUDA MXFP8 is an opt-in approximate deployment lane", + "summary": "A Blackwell MXFP8 candidate quantizes selected DiT projections after loading/fixed-adapter fusion and preserves sensitive components; small/shared-host observations do not establish stable speed or quality equivalence.", + "applicability": { + "hardware": [ + "NVIDIA device reported as NVIDIA Graphics Device, compute capability 12.0, approximately 71.12 GiB/device; exact SKU unspecified" + ], + "software": [ + "vLLM 0.29.0 wheel overlay, PyTorch 2.13.0+cu132, Python 3.12.13, driver 580.95.05", + "Source revision 0c248c848b5dfadef7066d54cfeae1d78c898757 based on c7cd37b61e44fb51c61212ac9a317f2be26fe638", + "Public PyTorch block-scaled scaled_mm; CUDA/partition capability guards" + ], + "models": [ + "Native FastH3 checkpoint with fixed vsa-datafree adapter" + ], + "conditions": [ + "TP2/USP2/text-encoder TP4, eager, VAE tiling, 448×256, 4.4 seconds, seed 1101, four denoise steps", + "Main DiT QKV/output/MLP quantized; conditioning/refiner/AdaLN/gates/output projections retain original precision", + "Runtime adapter switching after conversion is unqualified" + ] + }, + "limitations": [ + "Unmerged candidate at import; broad quality/performance coverage and human review remain pending.", + "Reported SM12.0 hardware is not evidence for H200 or B200.", + "Shared-host observations, one prompt and a microbenchmark do not support production speed/quality claims." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.json", + "sha256": "e4c538f03f4ab90a4acc8e3d8721bbd226aec1ee9bde45757a7c27d3d970821d" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0c248c848b5dfadef7066d54cfeae1d78c898757", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0c248c848b5dfadef7066d54cfeae1d78c898757", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original", + "revision": "sha256:19272bb3fdb1daf274eed40f1e544eed4d7034ff7f85f0abfffe7baa3bedc400" + }, + "identity": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.identity", + "revision": "sha256:271be436b959e38e6d5b7712459750c04be1708440757e72fd5310c746472f7b" + }, + "summary": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.summary", + "revision": "sha256:55559de55ad98b80bf5dc6f721ab7b7ed2a18016c75dd80f8acef6ca343c249a" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.identity-2", + "revision": "sha256:5286820a82078a45286001771336f11f97db422610c375246c759bb2d074b462" + }, + "sources": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.sources", + "revision": "sha256:1b1f56786baae0364d62f9ab9180bb6eca301040166d055d3b79e8abe2229311" + }, + "scope": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.scope", + "revision": "sha256:08ea081f5f9d50ef3c64eb6da6f5ba7333cd70a22341f2274ca36fb8820e4625" + }, + "claim-0": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.claim-0", + "revision": "sha256:6e5f908db92c68e5e8224ba4d6cc4cd7938db704bf7874fd9e01585026bb353e", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.claim-1", + "revision": "sha256:aa179af07de76b815e9aed7a6e98355a2564d3afba199211155f3c170e87b466", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.claim-2", + "revision": "sha256:9a0e424acfc753aeeb860e3b679b29b5a3ed951c32ef47e04ed6771f77897061", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.claim-3", + "revision": "sha256:377f8227b5d64464992996b6e74f793c03a9be72401f2ba2ff403ca3960117ee", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-4": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.claim-4", + "revision": "sha256:47450892933724b24a454414ba03d1ec63685940a1f678f46dd633e7540c4660", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.actions", + "revision": "sha256:e20e747b364e7902bdc51f759716dc30e8670eae79974d34c861526e962b7a38", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.validation", + "revision": "sha256:326fbc1f15430115e2c5eb793e0e9de8f99f70dd4bbf7a75a97101a08b5c0157" + }, + "limits": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.limits", + "revision": "sha256:15e0bd48ddcfacb3672e44ccae30f3b2120585688179a1400fab256b2db833b5" + }, + "identity-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.identity-3", + "revision": "sha256:08ce4340f47f644191e4effdf8895e7ac1f5e7f4a028c2e0d7a80ba91e66a40d" + }, + "status": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.status", + "revision": "sha256:c610a2e9dd650a4e332a3f508aaa7bc7941a4ad3a184d4295275877e2f06f4e9" + }, + "verification": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8.original.verification", + "revision": "sha256:f07ec15eceb007efab4ecd2d092044dce935284d045bced276c558b12cccb638" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "claim-4", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json new file mode 100644 index 000000000..b2b059b77 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json @@ -0,0 +1,209 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 modulation fusion changes rounding and requires platform guards", + "summary": "Merged FP32-accumulating modulation fusion reduces launch count but removes intermediate BF16 rounding; its numerical drift and historical non-CUDA dispatch finding must remain visible.", + "applicability": { + "hardware": [ + "CUDA GPU SKU not stated in source benchmark; do not substitute H200/B200" + ], + "software": [ + "Source revision 7d74126f0723d355d82b47e98f820394320e1a4a; merged 14f2c16fb28e1e0c8615372675f2757466260ad8", + "Triton modulation path, eager, USP4" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "5-second output, 49 denoise iterations; both configurations warmed up", + "Report hardware/driver/runtime identity before reproduction" + ] + }, + "limitations": [ + "Hardware SKU, repeat count and broader prompt coverage are not stated in the source report.", + "Merged code is not proof of quality equivalence or safe support on every backend.", + "Historical review findings may have changed later; source revision must be rechecked." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.json", + "sha256": "abb8d94a1b025f0e2c8e085275e96ee85d68aeb27cb12d0918e4647f8255b693" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "7d74126f0723d355d82b47e98f820394320e1a4a", + "merge_commit": "14f2c16fb28e1e0c8615372675f2757466260ad8", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "7d74126f0723d355d82b47e98f820394320e1a4a", + "merge_commit": "14f2c16fb28e1e0c8615372675f2757466260ad8", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original", + "revision": "sha256:215ea31298fc02d67f8bb1cb4e431a1a6adaf7b714926510d78d3e17d13ec65b" + }, + "identity": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.identity", + "revision": "sha256:f87ba3e6c88265ea60a820f10139f12bf426190ae1357940e8bce48c038246e3" + }, + "summary": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.summary", + "revision": "sha256:6b257da3a4fa79f2313b9570b7c0294a16ea9d6bd2350cd3a7afd10c222c81f8" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.identity-2", + "revision": "sha256:f245a0087143d8b447466cca045d8a3e3da91acc9d17b540a5043d3809846169" + }, + "sources": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.sources", + "revision": "sha256:8dadbd5cdc03892d8800a5a6d25a1f0fad12bc3fb53d5971633dcb03f1a8167d" + }, + "scope": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.scope", + "revision": "sha256:6fae74acb603f8a5c5099a3eeba406ba335db172116c068c2bca64ff50179435" + }, + "claim-0": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.claim-0", + "revision": "sha256:1ac88e7b815b2e81383e2d104ffca16b3809e09e01efa138d4120caa3e1620c2", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.claim-1", + "revision": "sha256:72d9d11fe193eb9bd1eca080c5683c01f02aa84912537c8166f87ff87695a6d9", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.claim-2", + "revision": "sha256:5899e35b18e81d416d1e6804dee7cf1b9eac8ad3b4a3e353a50835c5b3ac8151", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.actions", + "revision": "sha256:fc28b0d53a2542bf01bf58b27118a655ae6a4c0253c76de0b99292a0723e98db", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.validation", + "revision": "sha256:528c25bb51bf68455a9f55fcf2b980674be257e247f761a8ccd7009bdb3725d4" + }, + "limits": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.limits", + "revision": "sha256:df59a6cedda8cb124def2f393ae02bae2363f7031e64377c635bf9bb26f11a7c" + }, + "identity-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.identity-3", + "revision": "sha256:1c0b650e8a10a2d52859dfd5caed117b421398a3f3bc27b2406a8a905676b24d" + }, + "status": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.status", + "revision": "sha256:9c3c46d8611d9e144a800aed53a30cd91d292c822ddca4a8cbc1a9cfa29a8503" + }, + "verification": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation.original.verification", + "revision": "sha256:35bc5c50d3ccdaca06ba1132bbcad91c5346c47ab04bf3324a6da686af480053" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json new file mode 100644 index 000000000..029f0cf34 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json @@ -0,0 +1,210 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 guarded Q/K RMSNorm and packed RoPE fusion", + "summary": "A merged CUDA fusion avoids normalized-Q/K and rotary intermediates for a specific packed BF16 geometry; reported denoise benefit is small and limited to a B300 workload.", + "applicability": { + "hardware": [ + "4× NVIDIA B300 SXM6" + ], + "software": [ + "Source revision 0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd; merged as 596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "CUDA/Triton BF16 fast path; head_dim=128, rotary_dim=96; TP1, Ulysses4, Ring1, TRTLLM_ATTN" + ], + "models": [ + "MiniMax-H3" + ], + "conditions": [ + "Packed [tokens, heads, head_dim] with compatible non-interleaved [cos|sin] frequencies", + "1344×768, 243 frames, 50 configured steps, seed 0", + "One warmup followed by one measured request per revision" + ] + }, + "limitations": [ + "The reported benchmark is B300, not H200/B200, ROCm or Ascend evidence.", + "Only one measured request per arm was reported.", + "No objective full-model quality metric appears in the reviewed report; imported status does not mean locally verified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.json", + "sha256": "4c1c4acfb9cc0baa90bc28fed1903020ea1ea38755b84315711795db45e48bb6" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd", + "merge_commit": "596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "0d0d42fe7b4a07581cd45ac67bbe1a2f6194fcdd", + "merge_commit": "596c16a550aa134faf7f3dcfa0f8adf513ccd9ce", + "status": "merged", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original", + "revision": "sha256:27e42eba8acbc5ca2a3a10ccdc49a0db938de00bae97c3b45154d6fd63f9fbeb" + }, + "identity": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.identity", + "revision": "sha256:30205394464d5443131841811068e9cd31bd0871853d6081071e600c1157db93" + }, + "summary": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.summary", + "revision": "sha256:500da008676cb9f1a2de7473d16b1443ab0e1bd491a6d3e5c46e756ad0d5d259" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.identity-2", + "revision": "sha256:e7f14b56893555a267dec3cb79cb10dfbac754da479571197883847631c24884" + }, + "sources": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.sources", + "revision": "sha256:f130e8a910679dcec824a0d61f8e2e5e74ad5942529130ff382516e44c829d60" + }, + "scope": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.scope", + "revision": "sha256:5d907e4785b51790c8fe5d6a3875cb0c3fd2172ce10268012808b248406fb96a" + }, + "claim-0": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.claim-0", + "revision": "sha256:74e717461fe7374c83598e2bbafda4a6900da96393b10b58131dc60b440be8d8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.claim-1", + "revision": "sha256:369f33f03d3b834a80423717c4a0aed4225a84d3db5b5b03b9bdbeeb44e64a89", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.claim-2", + "revision": "sha256:e424a940b9543744c481fee036e1ca69fe96f12ca10d5f01e1d3859cf622b472", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.actions", + "revision": "sha256:9d605a425a7c0224cc05b36a176891612cd15ba54fb02169338b89f464446e51", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.validation", + "revision": "sha256:790ba6ff900b9346ca6eccb76ab686dee123d0bee03f6e83bbc9a8dba0c2d15a" + }, + "limits": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.limits", + "revision": "sha256:8dbf9a6ed1f993c12a4196cbcfed7ca07bca223bd90de864021ba86f572474d2" + }, + "identity-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.identity-3", + "revision": "sha256:aec1c3ca9ffdd1f2b9113c8e29ba31096edf4c280ba1c5acfc906e552dad1294" + }, + "status": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.status", + "revision": "sha256:a6c9ab77ccde0e1d35f23866517beb0abc263eeee5d5931da6ecdeb7cfa8ede0" + }, + "verification": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope.original.verification", + "revision": "sha256:04afa4da3ad973e2abe080a9ab1f660f8c28e6041f9b3440fbfc2142521658e9" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json new file mode 100644 index 000000000..984bde447 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json @@ -0,0 +1,222 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 Ref2VA TeaCache needs task-specific calibration and step defaults", + "summary": "A Ref2VA TeaCache candidate calibrates a conservative late-step budget; quality and speed depend on task/step policy, and some cases produce zero hits and no gain.", + "applicability": { + "hardware": [ + "1× NVIDIA B300" + ], + "software": [ + "Unmerged source revision at import f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "BF16, CUDNN_ATTN, task-specific TeaCache coefficients" + ], + "models": [ + "MiniMax-H3 Ref2VA" + ], + "conditions": [ + "448×256, 107 output frames, 50 configured steps; fixed-seed comparison", + "Calibration uses 15 full-compute Ref2VA cases: 6 image, 6 image+audio, 3 video+audio", + "35 initial full-compute denoise calls, then at most five cache hits; other step counts remain uncached" + ] + }, + "limitations": [ + "Unmerged candidate at import; no claim of main support or InferRSI reproduction.", + "Reported quality results are a small same-seed sample set; full perception/temporal quality acceptance remains user-specific.", + "TeaCache and Cache-DiT are separate mutually exclusive backend choices in the reviewed branch." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.json", + "sha256": "8aeb3f99ac4227cf8b3a5cece13d938b19082e265a557eddae27b7e495bcc22e" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "f86bd6ad7bfc7e6eb04df0aaacd35ec68643d6a2", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original", + "revision": "sha256:5e1d40009c6ad09bb8536ac345e836e56148a5b881051e4191ba0f39aec7299e" + }, + "identity": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.identity", + "revision": "sha256:6a6b9c41306f8d0c12affea21d6839ea4aac7d75a17c8fb65b40b7ef452b5564" + }, + "summary": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.summary", + "revision": "sha256:98ee33a6e164fcfe85edab4e39beb1db7ad4374f018c61c26fba835ea1a9c031" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.identity-2", + "revision": "sha256:44a40715115e15fec9295ccd29b88db799a5b92e85146579abc46ae62cafd987" + }, + "sources": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.sources", + "revision": "sha256:1357cf7c8e81e38210ee7e4f3c57d6a926e525d70e29dd9eb52ffba77b957e2f" + }, + "scope": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.scope", + "revision": "sha256:26bcabd7e3c748cfa09a722c6f41d6a6bf0df253430788f108f774f44ed6d60a" + }, + "claim-0": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.claim-0", + "revision": "sha256:2a9c6b931bd0ea1c1448191275b3b00559782c1e7221ee75452974a4fd19b969", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.claim-1", + "revision": "sha256:ff8d5fd94d7f4491abf0a4a5afd3841dbdf5317fae2a256b30ea12f3fc7b31da", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.claim-2", + "revision": "sha256:53e64458c41819a8666514bec589c012a6dab72a4fa2e889dbf3aad2c87445c6", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.claim-3", + "revision": "sha256:bdc3b39449bfc8fe3140d80b2ebd9cde96e8ea0c6a856521d7e499f8026e18b8", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.actions", + "revision": "sha256:9d92d98f59ea83f9b8f924c0742f5d89d526bbde9c2bc13a789f1c33daac60c5", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.validation", + "revision": "sha256:48e8312d5dde71743158384e6c01072af95719fec4ca5efa3608ca76fd60b08f" + }, + "limits": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.limits", + "revision": "sha256:bf9db6d8dd39621ddfde22e95aea5c5f92cd0b930a5f1d3cdbf8c36ec9e5c053" + }, + "identity-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.identity-3", + "revision": "sha256:0e1d03e8e6fef4b4fb4447087be32b2044fd2b9441cd2a2191251a0b7a499e1b" + }, + "status": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.status", + "revision": "sha256:64e0be714be64de30d1cf08eaca8822d9a9db49ded61856a782d45230ecaaea9" + }, + "verification": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache.original.verification", + "revision": "sha256:564def8ba0308d98488a4ad7575fb8185e7bc108ce623afcfd330149a4ef9c20" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "claim-3", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json new file mode 100644 index 000000000..1a658f10f --- /dev/null +++ b/src/inferrsi/knowledge/compositions/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json @@ -0,0 +1,211 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "MiniMax-H3 stacked VAE tiling trades activation memory for fewer decode calls", + "summary": "A stacked-tiling candidate batches rank-local spatial tiles into one decoder call per temporal window; measured decode gains are exact for the reported latent but PP1 memory rises.", + "applicability": { + "hardware": [ + "NVIDIA B300 SXM6, SM103; PP4 uses GPUs 0–3" + ], + "software": [ + "vLLM 0.28.0 benchmark environment", + "Base dff28e686711add0e929ce0c5660b09ef26c8c88 + Source revision b188874539903ecc04a8874b782d7d1a898d191c", + "Exact decoder kernels from #6607; FP16 CUDA autocast" + ], + "models": [ + "MiniMax-H3 video VAE" + ], + "conditions": [ + "Fixed latent (1,24,62,48,84), 768×1344 decode, same latent broadcast to ranks", + "One warmup + three measured decodes; PP latency is max rank wall-clock", + "Remote VAE implements native stack_tiling; auto requires at least two global tiles per VAE rank" + ] + }, + "limitations": [ + "Unmerged candidate at import; branch/default/options may differ from current main.", + "Clean current-branch PP2/PP8 latency is reported pending.", + "Reported exactness applies to this latent, autocast mode and decoder revision; portability is unverified." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "upstream_reported" + }, + "repo": "vllm_omni", + "backend": "cuda", + "scenario": "diffusion.video_generation", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.json", + "sha256": "8cc18eacbbfd8fc4d3a6b4152c4b584d559fc9b15377da56ef072e542d807c93" + }, + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "b188874539903ecc04a8874b782d7d1a898d191c", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "attribution": [ + { + "url": "https://github.com/vllm-project/vllm-omni/", + "type": "upstream_report", + "commit": "b188874539903ecc04a8874b782d7d1a898d191c", + "merge_commit": null, + "status": "open_draft", + "accessed_at": "2026-10-09" + } + ], + "id": "vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original", + "revision": "sha256:44d70d739775626a354ac34c0798c2c8bc3b371eb3b4b9a508cf4384001737df" + }, + "identity": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.identity", + "revision": "sha256:9aca9ea5cc32b8a0ee11df57acf9f0cfb8fabb6f2dbf3b7a2b475f34a05b9878" + }, + "summary": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.summary", + "revision": "sha256:15403f349773c95aeabb97c74ec6fb8e5ba44ff900aded6275201d73a28584e1" + }, + "identity-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.identity-2", + "revision": "sha256:1f3a2817aaa8bef52c3aa0ddfd7782502065a4f4b89cab90daa3b5926e767aa5" + }, + "sources": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.sources", + "revision": "sha256:580147e92448fed3126c1684fdffedd0f4cdd5aa181b2a05205b6151f3ce6aac" + }, + "scope": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.scope", + "revision": "sha256:adc3fd64a6da95dd620bf9fa10415695b28c9d788dd8746c66136af78c95f697" + }, + "claim-0": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.claim-0", + "revision": "sha256:55f10f68bb3b73ba3f289d326a7cd99beed9e3803005800552b46c574d830a68", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.claim-1", + "revision": "sha256:e98f770ab1b107eb9bbfb2d1540c4981891cbf902943567cea1849484a74e42c", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-2": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.claim-2", + "revision": "sha256:2bba332a6e270b3675ca6f697877aa94e4cbe2ed449bfd6fb300b0269af7e284", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.actions", + "revision": "sha256:1b53ea37e75deabb94406d3b11200a8fe2a64c9344a4fc93bc1ef09f1e1dadb4", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.validation", + "revision": "sha256:826247f11559f69d58ec33864b7b45dff65c07fd6059b3472cb954a5efc24855" + }, + "limits": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.limits", + "revision": "sha256:efae33a9c17ca61479fd23998d774d77e8468631208ad9c7676be09de6ccc49b" + }, + "identity-3": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.identity-3", + "revision": "sha256:8109ad76bccef6480b58cb677a1854fbf9e2b0eae9eb21190b3d8e4dfb9cff5c" + }, + "status": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.status", + "revision": "sha256:d05c1ddec0f2398142f1a8f935c34959e5a37eab2e9f7af043b3a3d4a3b68282" + }, + "verification": { + "ref": "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling.original.verification", + "revision": "sha256:232d1e32b644dd44cff83a8f4a482d9cb3b4a64b5291500b8a4edea1e69f74b8" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "summary", + "identity-2", + "identity-3", + "status", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "claim-2", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/compositions/xdit.cuda.diffusion.parallelism_freshness_and_topology.json b/src/inferrsi/knowledge/compositions/xdit.cuda.diffusion.parallelism_freshness_and_topology.json new file mode 100644 index 000000000..82be38d15 --- /dev/null +++ b/src/inferrsi/knowledge/compositions/xdit.cuda.diffusion.parallelism_freshness_and_topology.json @@ -0,0 +1,198 @@ +{ + "metadata": { + "kind": "knowledge", + "title": "xDiT parallelism: separate current-state attention from stale-state pipelines", + "summary": "USP, CFG splitting and PipeFusion have different topology, memory and quality tradeoffs; qualify each before combining them.", + "applicability": { + "hardware": [ + "Multiple CUDA GPUs with recorded interconnect topology; model support is method-specific" + ], + "software": [ + "xdit-project/xDiT at f7c16aa958379a9f0a0302350fe0e1bfcec5f23c; later revisions need reinspection" + ], + "conditions": [ + "A supported diffusion pipeline and compatible sequence/head partitioning", + "Record CFG setting, denoising schedule and all parallel degrees" + ] + }, + "limitations": [ + "Backend-specific implementations and model matrices do not transfer with the high-level method.", + "Current-state attention still requires numerical validation; stale-state methods must not be advertised as lossless from a speed benchmark.", + "Point-in-time source extraction, not a historical commit-delta audit. No local accelerator or model-quality reproduction was run." + ], + "state": "imported", + "verification": { + "locally_verified": false, + "evidence_level": "guidance" + }, + "repo": "xdit", + "backend": "cuda", + "scenario": "diffusion.*", + "sources": [ + { + "type": "git", + "repo": "https://github.com/InferMatrixLab/InferRSI", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "path": "src/inferrsi/knowledge/data/skill_library/records/xdit.cuda.diffusion.parallelism_freshness_and_topology.json", + "sha256": "3674b5916cb7b384951bf3e449b6796b161878daabcc1d7e7f6d6f8ff861cc17" + }, + { + "url": "https://github.com/xdit-project/xDiT/blob/f7c16aa958379a9f0a0302350fe0e1bfcec5f23c/README.md", + "type": "technical_document", + "commit": "f7c16aa958379a9f0a0302350fe0e1bfcec5f23c", + "accessed_at": "2026-10-15", + "content_sha256": "07bfd6874db892623db179ca9cc7e51d3b7c2036bf624e50b7a6e314081979e9" + } + ], + "attribution": [ + { + "url": "https://github.com/xdit-project/xDiT/blob/f7c16aa958379a9f0a0302350fe0e1bfcec5f23c/README.md", + "type": "technical_document", + "commit": "f7c16aa958379a9f0a0302350fe0e1bfcec5f23c", + "accessed_at": "2026-10-15", + "content_sha256": "07bfd6874db892623db179ca9cc7e51d3b7c2036bf624e50b7a6e314081979e9" + } + ], + "id": "xdit.cuda.diffusion.parallelism_freshness_and_topology", + "entrypoint": "record.json", + "required_resources": [ + "record.json" + ], + "composition": { + "when": {}, + "license": "Apache-2.0", + "permissions": { + "read": true, + "retain": true, + "redistribute": true + }, + "nodes": { + "original": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original", + "revision": "sha256:08789d1ecd9709303f1272d817456de6962ee4cf2283f0c6caf4e6c6889726ac" + }, + "identity": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.identity", + "revision": "sha256:528a5025ee04319aec0e29dff272b8b5d5ebe18089de8ed710ec441dac1bd624" + }, + "status": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.status", + "revision": "sha256:1d6f99afc39fee08739d358796575f305daa8a3adb842533b757ee6fc7a3f4ef" + }, + "summary": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.summary", + "revision": "sha256:93c6caad467a2fc41807888d93832e2ef25eaf0bf9bbf82ad899c437d60c23ed" + }, + "identity-2": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.identity-2", + "revision": "sha256:dea5827edd0d8410da87377249aef4be54e00d41822d0f548fa806486268f8e4" + }, + "sources": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.sources", + "revision": "sha256:fa989088ace1b98f4d97ee2c162e90c9f9680748ffbd668920495bd579c106b9" + }, + "scope": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.scope", + "revision": "sha256:a0086cd389b53513dd2878f39a67e5c6f1e09ee44030b4869299fd6e8e0bfd3c" + }, + "claim-0": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.claim-0", + "revision": "sha256:dd801ac9e06645071ca796741a8e73b6da4bd66243d81990c83aa56b65434b38", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "claim-1": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.claim-1", + "revision": "sha256:2d8deadb27959b0e65aaa4bdbdb2aed552ebf6c8cbbcd94cbc3b7f4fd07a4a2d", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "transfer": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.transfer", + "revision": "sha256:dc4a41485e777be6ccda1722737a2e006da14c49c54cdd094735177718a50da0", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "actions": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.actions", + "revision": "sha256:c3940e3c9feb6bfc5edab444659f5f1d8f634082e8360b529f872a7c56286002", + "requires": [ + "scope", + "limits", + "verification", + "sources", + "status" + ] + }, + "validation": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.validation", + "revision": "sha256:ad02ef20214d0f1cb1411391169c02ca31c8aa05893190ba8a4dd148fe5b07b2" + }, + "limits": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.limits", + "revision": "sha256:a72a6ed36ae95bdfe57d12eadefe5894759d9b79a8763f8dd4c59026173a372a" + }, + "verification": { + "ref": "package:xdit.cuda.diffusion.parallelism_freshness_and_topology.original.verification", + "revision": "sha256:45727d1ae05b7bfeada0d300e81f8156aafd858aefdf108567e4b651402c3636" + } + }, + "routes": { + "navigate": { + "layer": "L0", + "required": [ + "identity", + "status", + "summary", + "identity-2", + "verification" + ] + }, + "decide": { + "layer": "L1", + "required": [ + "summary", + "claim-0", + "claim-1", + "transfer", + "actions", + "validation" + ] + }, + "act": { + "layer": "L2", + "required": [ + "actions", + "validation" + ] + }, + "source": { + "layer": "L3", + "required": [ + "original" + ] + } + } + } + }, + "content": { + "record.json": { + "record_node": "original" + } + } +} diff --git a/src/inferrsi/knowledge/context_projection.py b/src/inferrsi/knowledge/context_projection.py index 0c5660bce..63a5aa8bc 100644 --- a/src/inferrsi/knowledge/context_projection.py +++ b/src/inferrsi/knowledge/context_projection.py @@ -12,9 +12,10 @@ def assemble_context_text(contexts: list[dict]) -> str: for context in contexts: for resource in context["resources"]: content = resource["content"] + encoding = " [base64]" if resource.get("content_encoding") == "base64" else "" lines.append( f"--- begin context {context['ref']} @ {context['revision']} " - f"{resource['path']} ---\n" + f"{resource['path']}{encoding} ---\n" ) lines.append(content if content.endswith("\n") else content + "\n") lines.append(f"--- end context {resource['path']} ---\n") diff --git a/src/inferrsi/knowledge/decision_cards.py b/src/inferrsi/knowledge/decision_cards.py index 69c513ea7..fe435d00f 100644 --- a/src/inferrsi/knowledge/decision_cards.py +++ b/src/inferrsi/knowledge/decision_cards.py @@ -38,6 +38,10 @@ def project_decision_card( ) +class UnknownFinding(ValueError): + """The requested selector does not identify one finding in this revision.""" + + @dataclass(frozen=True) class DecisionSource: ref: str @@ -110,7 +114,7 @@ def finding(self, selector: str) -> tuple[int, dict]: match = re.fullmatch(r"case\.json#/findings/(0|[1-9][0-9]*)", selector) if match and (index := int(match[1])) < len(findings): return index, findings[index] - raise ValueError(f"Unknown or ambiguous finding at {self.revision}: {selector}") + raise UnknownFinding(f"Unknown or ambiguous finding at {self.revision}: {selector}") def project( self, *, finding: str | None = None, max_bytes: int | None = None, compact: bool = False, diff --git a/src/inferrsi/knowledge/knowledge_operations.py b/src/inferrsi/knowledge/knowledge_operations.py index 3b5af8a67..9a94c8eb0 100644 --- a/src/inferrsi/knowledge/knowledge_operations.py +++ b/src/inferrsi/knowledge/knowledge_operations.py @@ -56,6 +56,20 @@ def safe_path(value: str) -> str: return value +def case_required_resources(record: dict) -> list[str]: + """Return the complete Case resource list in its public read order.""" + for field in ("references", "dependencies"): + if field in record: + raise ValueError(f"Case {field} are not supported; declare required_resources") + declared = record.get("required_resources", []) + if not isinstance(declared, list) or any(not isinstance(p, str) for p in declared): + raise ValueError("Case required_resources must be a string list") + if len(set(declared)) != len(declared): + raise ValueError("Case required_resources must not repeat a path") + relative = record["content"] + return [relative, "case.json", *(p for p in declared if p != relative)] + + def case_resource_path(root: Path, record_path: Path, resource: object) -> Path: """Resolve a resource a case record names, refusing anything outside `root`. @@ -572,16 +586,8 @@ def _checkout(self, identity: str) -> Bundle: record = json.loads(original.decode("utf-8")) if record.get("id") != identity or record.get("kind") != "case": raise ValueError(f"Case identity changed during read: {identity}") - for field in ("references", "dependencies"): - if field in record: - raise ValueError(f"Case {field} are not supported; declare required_resources") - declared = record.get("required_resources", []) - if not isinstance(declared, list) or any(not isinstance(p, str) for p in declared): - raise ValueError("Case required_resources must be a string list") - if len(set(declared)) != len(declared): - raise ValueError("Case required_resources must not repeat a path") + required = case_required_resources(record) relative = record["content"] - required = [relative, "case.json", *(p for p in declared if p != relative)] content = {"case.json": original} for resource in [relative, *required[2:]]: resource_path = case_resource_path(self.skill_root, path, resource) diff --git a/tests/apps/test_optimization_session.py b/tests/apps/test_optimization_session.py index 30557fdae..d1886dbf4 100644 --- a/tests/apps/test_optimization_session.py +++ b/tests/apps/test_optimization_session.py @@ -1709,3 +1709,127 @@ def scoreless(*args, **kwargs): assert assessment["status"] == "infrastructure_failure" and assessment["score"] is None assert "finite positive score" in assessment["reason"] assert view["best"]["kind"] == "baseline" + + +def test_pinned_case_finding_matches_ordinary_read_and_registers_only_returned_bytes( + session, capsys, tmp_path, +): + from inferrsi.apps.workflows import campaign, knowledge + from inferrsi.harness.records.knowledge_capture import resource_bytes + from inferrsi.knowledge.knowledge_store import KnowledgeStore + from tests.fixtures.atomic_composition import case_fixture + + store_root = tmp_path / "atomic-store" + store_root.mkdir() + store = KnowledgeStore(store_root, skill_root=None) + pin, expected = case_fixture(store) + reader = store.reader() + + def permits(pin, op): + return op in ("read", "retain") + + for index, selector in ((0, "id:target"), (1, "case.json#/findings/1")): + assert main(["read", pin.ref, "--store", str(store_root), "--layer", "L1", + "--revision", pin.revision, "--finding", selector]) == 0 + old_card = json.loads(capsys.readouterr().out)["card"] + assert old_card["atom"]["selector"] == selector + for layer in ("L0", "L1", "L2", "L3"): + atom_pin, body = expected[index, layer] + request = dict(revision=pin.revision, layer=layer, max_bytes=len(body), + context={}, finding=f"case.json#/findings/{index}") + ordinary = knowledge.read_selection(reader, pin.ref, permits=permits, **request) + assert ordinary.bodies == (body,) + result = campaign.capture_selection(session, reader, pin.ref, permits=permits, + **request) + record, reference = result["context"], result["reference"] + assert reference["kind"] == "delivered_context" + assert record["diagnosis_binding"]["diagnosis_id"] + assert record["selection"] == ordinary.receipt + assert record["selection"]["selection"]["canonical_finding"] == selector + assert record["items"] == [{"ref": atom_pin.ref, "revision": atom_pin.revision}] + resource, = record["contexts"][0]["resources"] + assert resource_bytes(resource) == body + if layer == "L1": + assert json.loads(body) == old_card["declared"]["finding"] + if layer == "L3": + assert resource["content_encoding"] == "base64" + assert record["context_bytes_used"] == len(body) + raw = (session / reference["path"]).read_bytes() + assert hashlib.sha256(raw).hexdigest() == reference["sha256"] + assert campaign.verify_capture(raw) == (record, "verified") + record["selection"]["delivered"][0]["ref"] = "store:sibling" + assert campaign.verify_capture(json.dumps(record).encode())[1] == ( + "atomic_receipt_mismatch" + ) + state = json.loads((session / "state.json").read_text(encoding="utf-8")) + assert len(state["contexts"]) == 8 + optimization.status(session) + + +def test_required_selection_refusals_remain_uncitable_in_the_running_session(session, tmp_path): + from inferrsi.apps.workflows import campaign, knowledge + from inferrsi.knowledge.knowledge_store import KnowledgeStore + from tests.fixtures.atomic_composition import case_fixture + + store = KnowledgeStore(tmp_path, skill_root=None) + pin, expected = case_fixture(store) + atom, body = expected[0, "L1"] + for reason in ("over_budget", "permission_denied", "unavailable_revision", "not_applicable"): + request = dict(revision="sha256:" + "0" * 64 if reason == "unavailable_revision" + else pin.revision, layer="L1", context={}, + max_bytes=len(body) - (reason == "over_budget"), + finding="id:missing" if reason == "not_applicable" else "id:target") + + def permits(selected, op): + return reason != "permission_denied" or selected != atom or op != "retain" + + if reason == "permission_denied": + ordinary = knowledge.read_selection(store.reader(), pin.ref, permits=permits, **request) + assert ordinary.bodies == (body,) + result = campaign.capture_selection(session, store.reader(), pin.ref, permits=permits, + **request) + record, ref = result["context"], result["reference"] + assert ref["kind"] == "knowledge_refusal" + assert record["selection"]["status"] == reason + assert record["selection"]["delivered"] == record["contexts"] == record["items"] == [] + assert record["context_bytes_used"] == 0 and record["assembled_text"] == "" + state = json.loads((session / "state.json").read_text(encoding="utf-8")) + assert state["contexts"][-1]["path"] == ref["path"] + with pytest.raises(ValueError, match="Cite a delivered context"): + optimization._validate_knowledge_refs(session, state["contexts"], [ref["path"]]) + optimization.status(session) + + +@pytest.mark.parametrize("damage", ["bytes", "selection", "count", "span"]) +def test_managed_reader_rejects_mismatched_receipt_before_writing(tmp_path, damage): + from types import SimpleNamespace + + from inferrsi.harness.records.atomic_capture import retain_selection + from inferrsi.knowledge.atomic_reader import AtomicReader, GroupDelivery + from inferrsi.knowledge.knowledge_store import KnowledgeStore + from tests.fixtures.atomic_composition import case_fixture + + store = KnowledgeStore(tmp_path, skill_root=None) + pin, _ = case_fixture(store) + reader = AtomicReader(store.reader(), permits=lambda pin, op: True) + request = dict(revision=pin.revision, layer="L1", finding="id:target", + max_bytes=1024, context={}) + valid = reader.read_selection(pin.ref, **request) + receipt = valid.receipt + if damage == "bytes": + receipt["delivered"][0]["sha256"] = "0" * 64 + elif damage == "selection": + receipt["selection"]["revision"] = "sha256:" + "0" * 64 + elif damage == "span": + receipt["delivered"][0]["source_byte_range"][1] += 1 + else: + receipt["delivered"].clear() + root = tmp_path / "managed" + root.mkdir() + (root / "campaign.json").write_text('{"campaign_id":"test"}', encoding="utf-8") + forged = SimpleNamespace(read_selection=lambda *args, **kwargs: + GroupDelivery(valid.bodies, receipt)) + with pytest.raises(ValueError): + retain_selection(root, reader=forged, context_id="example", reference=pin.ref, + assemble_text=lambda contexts: "", **request) + assert [p.name for p in root.iterdir()] == ["campaign.json"] diff --git a/tests/fixtures/atomic-reader/casebook-domain-v0.3.4.json b/tests/fixtures/atomic-reader/casebook-domain-v0.3.4.json new file mode 100644 index 000000000..1245f8fdf --- /dev/null +++ b/tests/fixtures/atomic-reader/casebook-domain-v0.3.4.json @@ -0,0 +1,836 @@ +{ + "files": { + "casebooks/ascend/ascend-optimization-casebook/SKILL.md": { + "bytes": 11126, + "sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a" + }, + "casebooks/inference/inference-optimization-casebook/SKILL.md": { + "bytes": 10247, + "sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8" + }, + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json": { + "bytes": 3602, + "sha256": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e" + }, + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": { + "bytes": 3134, + "sha256": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27" + }, + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json": { + "bytes": 6270, + "sha256": "a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a" + }, + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md": { + "bytes": 3557, + "sha256": "6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf" + }, + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json": { + "bytes": 5299, + "sha256": "b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a" + }, + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md": { + "bytes": 2564, + "sha256": "be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552" + }, + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json": { + "bytes": 5023, + "sha256": "90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122" + }, + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md": { + "bytes": 2656, + "sha256": "cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738" + } + }, + "refs": { + "checkout:ascend-optimization-casebook": { + "decision": { + "atom": { + "kind": "skill", + "resource": "casebooks/ascend/ascend-optimization-casebook/SKILL.md" + }, + "card_bytes": 3543, + "card_sha256": "52399e16c9862a21ce6dba1bcbd101ecf1e313f285d8f46da9d6e16e2a1b5727", + "missing_fields": [ + "validation" + ], + "status": "partial" + }, + "dependencies": {}, + "entry_sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a", + "entry_source": "casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "kind": "skill", + "legacy_entrypoint": "casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "legacy_entrypoint_sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a", + "required_count": 1, + "resource_count": 1, + "resource_set_sha256": "056b4ae5ebcefa8b02176c80b830161fd5c1dff6e50862a54902e4bc279b0972", + "revision": "sha256:17deaadcc3ea337e2a45b9c413d9846e6744caf75699b90f45c4f8f00f171285" + }, + "checkout:case.admission-drain-occupancy": { + "case_aliases": { + "admission-drain-occupancy.json": "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json", + "admission-drain-occupancy.md": "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "case.json": "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json" + }, + "case_file_sha256": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e", + "dependencies": {}, + "entry_sha256": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27", + "entry_source": "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "findings": [ + { + "card_bytes": 3166, + "card_sha256": "689c00516ee278ba6dbe393b151b562013b561e93fcdb876dc47f81571c241a6", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2249, + "finding_sha256": "b2fe60e96379bf493e95159f6a583b7946e3c31295aa49b57983876d27948946", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "82a530dd7402fa10f0d445609238cc0451779afa5ebc0b02feb182f8e8c518e4", + "start_byte": 1394, + "status": "complete" + }, + { + "card_bytes": 2894, + "card_sha256": "dff26a9a34531f6f0ac9850f936ffa37b689a4f486b5330c9b668b2526851b3d", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2911, + "finding_sha256": "4bc408e09078bf693b3d144149d6081ab48c39f9732245b5a74f65746347d0e4", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "29844fbb80c01fedfa2d1499f6b647c39624fb23008809870f815c5fbe86b9e9", + "start_byte": 2255, + "status": "complete" + }, + { + "card_bytes": 2927, + "card_sha256": "f44a38f78d8fca892a5810b20287658a096cc5bb12919ff174cb157cb673cb65", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3595, + "finding_sha256": "711fd3747ab01b31348494c27187af5f4f2ff0aff5e5360281e2e5a9b0fe2094", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "a48329e4a1aa6d303ed6bfe65b967f0b0ec4972d66d7e42f339e5d31e078cd16", + "start_byte": 2917, + "status": "complete" + } + ], + "kind": "case", + "required_count": 3, + "resource_count": 3, + "resource_set_sha256": "7ba0364976fddce235bedcfe86b5147ae6691249c5030ef1be4af1f59a54701a", + "revision": "sha256:9219b7fec8bd72877925a27956b394e36b85c54775c8b97b35f0bd843830cb03" + }, + "checkout:case.drama3-rejected-directions": { + "case_aliases": { + "case.json": "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json", + "drama3-rejected-directions.json": "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json", + "drama3-rejected-directions.md": "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md" + }, + "case_file_sha256": "a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a", + "dependencies": {}, + "entry_sha256": "6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf", + "entry_source": "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md", + "findings": [ + { + "card_bytes": 3123, + "card_sha256": "895d493a35400fca6e4e0ebb44eb4bf89a145aa5e0a099805e77d773c85c7294", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2154, + "finding_sha256": "bbb61af22cb2cb8db8f8be8147894dedcaa5307e269b19da2e1c96419d10300c", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "4cae0fad3460d28e4176d079c1246dcd88af21fefcc1191412c153dc5696e075", + "start_byte": 1499, + "status": "complete" + }, + { + "card_bytes": 3307, + "card_sha256": "344d9eb6ce56d13086efa89003aec35f43ec59f3e3d3439ff4c9c4667a7a835e", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2910, + "finding_sha256": "71adae00b999348e4618d85a92f4e0b4823a59347351cbf7359ed6b7e972c6be", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "e02ff5d0a442030bb8a6d8a8a6901670ab0f92ec8d2c841536ea72b63cbaac1a", + "start_byte": 2160, + "status": "complete" + }, + { + "card_bytes": 3145, + "card_sha256": "12335f7e9202106756d144342c137f0deca2da83c7e7c167f26a4e590d075e57", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3583, + "finding_sha256": "e6db8b0be31835afd7d09a553c2a73bf651ea0d4d3ec7d156a050e978caa7db6", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "0eeabdcdbdaef2a15186186d1b2649be9dcd651f94038c0a5dc4136876a7cd1a", + "start_byte": 2916, + "status": "complete" + }, + { + "card_bytes": 3155, + "card_sha256": "c5b16087d07cacf52950f09f27a51b094af8309bb809cd737d97569a66e4265b", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4342, + "finding_sha256": "0e2f7900c60c214630018a20e40d653c7a42aeb4ab8c6194880f79d362238b59", + "missing_fields": [], + "pointer": "case.json#/findings/3", + "selector": "case.json#/findings/3", + "span_sha256": "d9c5f1ab879b45558322e5ef73833d1a6aad3e8db7eb2c02ba78bd3eff9bb76b", + "start_byte": 3589, + "status": "complete" + }, + { + "card_bytes": 3162, + "card_sha256": "fa7e1f5483683f9f5ed13f60a835181e94a254d70f102b2bbe210f123e051f33", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5027, + "finding_sha256": "6904d347ddf2de158fd297d8b2b76483cf77651faa8d41b0f52abe32d4f0d710", + "missing_fields": [], + "pointer": "case.json#/findings/4", + "selector": "case.json#/findings/4", + "span_sha256": "c687cb2d1b8bfe3d1c5b0c2d192fe9b7f64f8d6a2c5a8421a37a2a1c42914882", + "start_byte": 4348, + "status": "complete" + }, + { + "card_bytes": 3058, + "card_sha256": "250b9159a5b11546812402a6c2b1d2554aae0c592a37e01a6f11d52f9259095b", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5658, + "finding_sha256": "06532019ed9001629747659667bea4e471546173a0419ce32b304989e0475827", + "missing_fields": [], + "pointer": "case.json#/findings/5", + "selector": "case.json#/findings/5", + "span_sha256": "7964442a9f13413d3d97125b3faece7abc39803dab979900fc6db3bab9fd1f17", + "start_byte": 5033, + "status": "complete" + }, + { + "card_bytes": 3020, + "card_sha256": "5059242f8619c6bfddd64677be1386360679cfec7970e9e04bcdec46265a9de4", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 6263, + "finding_sha256": "d1b91f9f857a39922354453d6ce294a77db5b091b0018403190479d9167fd936", + "missing_fields": [], + "pointer": "case.json#/findings/6", + "selector": "case.json#/findings/6", + "span_sha256": "d345b2c36452eea31e6ae4a6c530142a6ce543116c86c4cd6be043bad4c08b87", + "start_byte": 5664, + "status": "complete" + } + ], + "kind": "case", + "required_count": 3, + "resource_count": 3, + "resource_set_sha256": "c8763555957d7dd08d1a14b189fc636d1cd57eca3ebadb49d2d6f4076ef41c25", + "revision": "sha256:4cd73101fe76691a6a7360242925fe731cd01db167ea0b485940e835e2ebafe7" + }, + "checkout:case.qwen-ascend-rejected-directions": { + "case_aliases": { + "case.json": "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json", + "qwen-ascend-rejected-directions.json": "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json", + "qwen-ascend-rejected-directions.md": "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md" + }, + "case_file_sha256": "b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a", + "dependencies": {}, + "entry_sha256": "be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552", + "entry_source": "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md", + "findings": [ + { + "card_bytes": 2838, + "card_sha256": "f6efabd0310c884915e0ed7d857159274f340f2b6859e83a91e519b838de0244", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 1963, + "finding_sha256": "f30ae8b8d58972622c69a336d1651f753f8c51ebd448f2eca4be6ed4816548f9", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "23e07b6c577590ee246e90b000b767fde6aa14b348486dc7beb9ccb054c6fa96", + "start_byte": 1335, + "status": "complete" + }, + { + "card_bytes": 2891, + "card_sha256": "80a2e75f308bc068c5316701e154d699e0833f1c2da8ab0ad8f1ff28ba4c53e3", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2623, + "finding_sha256": "3ae5fa9d8d35e3b2c1e300857635bae86cb1de51d17ab803b20d811b0c4f16d6", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "d3cf6b89c6ee8c3dbfe5b9b23e33496b789a4d78cad25a7e7ccbe6f6cbab73cb", + "start_byte": 1969, + "status": "complete" + }, + { + "card_bytes": 2879, + "card_sha256": "9141f296670a145136c26cd33a93b13a48b392b0b6d4fedff7c4eacf279c5264", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3269, + "finding_sha256": "eae6ba404da54956cc4e12379f48fdb8074e81629a5fba7bf124bb64b9f0798b", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "3acd18f9972685069e6959936a32fdd47ef2de547cec239f9a4ba73f1c928fb9", + "start_byte": 2629, + "status": "complete" + }, + { + "card_bytes": 2764, + "card_sha256": "c52ae105af548daf62e98e052f383ceaa1cc287f7ee1c13712e8ffa85190e4fd", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3867, + "finding_sha256": "fa1891c37e25fa3c0f5556d5438183116c76d2f1fb9e79c033bbe4776ac3d72e", + "missing_fields": [], + "pointer": "case.json#/findings/3", + "selector": "case.json#/findings/3", + "span_sha256": "504ae42f29f5131a4d3f28781713aa3a3225dc7ea39fcd458619c088fb565901", + "start_byte": 3275, + "status": "complete" + }, + { + "card_bytes": 2908, + "card_sha256": "50d53c084c49233403fe289d8eb514695073f44388dd2de3f6fd9617cd8679b2", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4602, + "finding_sha256": "8ed6e1556b9d8a6a989555da2e4eb56c2ac53d76a19dee3d5b3a85cf8f3de85b", + "missing_fields": [], + "pointer": "case.json#/findings/4", + "selector": "case.json#/findings/4", + "span_sha256": "8d218fa1850583227973494d0966db8c2e8d2bbe4c7e8317c71c0466c7e8b627", + "start_byte": 3873, + "status": "complete" + }, + { + "card_bytes": 2818, + "card_sha256": "8e20119cb609100b6dad3b3c636d447972989cf60374f80199e3223b7212a4ae", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5292, + "finding_sha256": "9c821396f59d2dddcb6f9452813a2ea3e8a7469954754783b66367cc0875b3a4", + "missing_fields": [], + "pointer": "case.json#/findings/5", + "selector": "case.json#/findings/5", + "span_sha256": "33d1462dd3b2f2b71d0ae352b19eb513d9a83066ffe54f54c2bb253fb581d536", + "start_byte": 4608, + "status": "complete" + } + ], + "kind": "case", + "required_count": 3, + "resource_count": 3, + "resource_set_sha256": "c98365f5d345edac58368d216243514a39bb4b85be00d7177cfb9141c7fba2c3", + "revision": "sha256:86209f049d3f7bc7f5e09e6262a93ede238e14923cd411c9d2130eb83c0277e1" + }, + "checkout:case.qwen-b300-rejected-directions": { + "case_aliases": { + "case.json": "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json", + "qwen-b300-rejected-directions.json": "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json", + "qwen-b300-rejected-directions.md": "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md" + }, + "case_file_sha256": "90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122", + "dependencies": {}, + "entry_sha256": "cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738", + "entry_source": "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md", + "findings": [ + { + "card_bytes": 2647, + "card_sha256": "3b53f8641d37ca8aeca4eedf3c6729c538abdc05c50135d69679dc821fb83acf", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 1859, + "finding_sha256": "61ba3d068957e2c4553dafb5ff79d42057179a1c35ceb62bdc473119b956a5c7", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "7d711ac3744ab38a229eee69a1f60da33d7773ef0544b34287cf62f9dc0dfb24", + "start_byte": 1236, + "status": "complete" + }, + { + "card_bytes": 2602, + "card_sha256": "0d3bafc8ec368203c84a8efd701027e845e869a4f8dfa9175d619ad8469a9ba5", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2458, + "finding_sha256": "c65f9e73c66f591771ec62ddec8928ef6dada36861f3e4f091ed0c259dfc4097", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "76aa1bba6a163af8333859c17cbb9f4b47a5e00d7df4d2bad76dc4ba87af604f", + "start_byte": 1865, + "status": "complete" + }, + { + "card_bytes": 2689, + "card_sha256": "4b11c97a996ffde0e91845347621c0d9adbaf376709a06c59b258960779da222", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3117, + "finding_sha256": "f7e59fd5d3b16ccd0009d1179b3a32d2164ff80cb3ac5ed752bb45492b2b4851", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "c8ca005cf69d7d0ab0b24e326334fa5d0c24023185d14688cd7d777633e06d94", + "start_byte": 2464, + "status": "complete" + }, + { + "card_bytes": 2675, + "card_sha256": "68228c60a43c11c7dba2b908045595874d38e1301af9e167ed058755f199dd19", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3770, + "finding_sha256": "ea9d0c1bca1e95c2e0ddfcdd67d5b4c17e8886087c181833183b6294e89c4214", + "missing_fields": [], + "pointer": "case.json#/findings/3", + "selector": "case.json#/findings/3", + "span_sha256": "cbbd0b5045b47d0f02bd4a9f84633475ce97082e26a03f4f33727d599c5a5304", + "start_byte": 3123, + "status": "complete" + }, + { + "card_bytes": 2493, + "card_sha256": "026e1dcf91665f42bc8d78287f29ff4fc9ab3532bf167584776eb3aeb9ad3848", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4389, + "finding_sha256": "b0d95da536e2c229d824a86d41a0c2b1700268abd8423203caa8198b2f1a899e", + "missing_fields": [], + "pointer": "case.json#/findings/4", + "selector": "case.json#/findings/4", + "span_sha256": "a9c171fb370b31e9478754c820efa9c0b6a9403ffeaa4e3710d74a730f1bf18b", + "start_byte": 3776, + "status": "complete" + }, + { + "card_bytes": 2639, + "card_sha256": "c564925ce4beb97a893500286db1e8b80b997f470c4fa682d2cda621d47198ce", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5016, + "finding_sha256": "17c8932d85b90b7ad3a1f64d4ff12d788ba392b96cde473e0fe4f37284f10a15", + "missing_fields": [], + "pointer": "case.json#/findings/5", + "selector": "case.json#/findings/5", + "span_sha256": "40ea7d9e88d04d550b448d5a68b5f6b3b5bad6ddff198275a97275f2c4380471", + "start_byte": 4395, + "status": "complete" + } + ], + "kind": "case", + "required_count": 3, + "resource_count": 3, + "resource_set_sha256": "318e2578716ce7e6dd9815c43a21f0d12ea2ab4b17bd65d4e619b73d10d4be11", + "revision": "sha256:c6fbc3bc68158a174b687d360d6c74fb19b33204029e3c791690376b193752fe" + }, + "checkout:inference-optimization-casebook": { + "decision": { + "atom": { + "kind": "skill", + "resource": "casebooks/inference/inference-optimization-casebook/SKILL.md" + }, + "card_bytes": 7645, + "card_sha256": "641e80a7fa243d7eaff436e2ab6443b885b2bad9d0f838e1d6cd36a116aba11d", + "missing_fields": [ + "validation" + ], + "status": "partial" + }, + "dependencies": {}, + "entry_sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8", + "entry_source": "casebooks/inference/inference-optimization-casebook/SKILL.md", + "kind": "skill", + "legacy_entrypoint": "casebooks/inference/inference-optimization-casebook/SKILL.md", + "legacy_entrypoint_sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8", + "required_count": 9, + "resource_count": 9, + "resource_set_sha256": "acbff18fd5d8d53e270aedc0ce8c54a026de19b8e2cba0cfc24b6cd185b68d81", + "revision": "sha256:af6b98cf6a8a140075e2511bf21bfb783954c89111dbc94e2d30bd7b86179abb" + }, + "package:inferrsi.ascend.skills.ascend_optimization_casebook": { + "decision": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/casebooks/ascend/ascend-optimization-casebook/SKILL.md" + }, + "card_bytes": 3584, + "card_sha256": "731014f5585ec42d6be81596f67f94e976dff32c85d2ba426bcbd91d06fa0444", + "missing_fields": [ + "validation" + ], + "status": "partial" + }, + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "b1ffddd0784743840606c151e7cf23f6eb5466e90f93f6d91214fded73c0be4a", + "entry_source": "casebooks/ascend/ascend-optimization-casebook/SKILL.md", + "kind": "knowledge", + "legacy_entrypoint": "record.json", + "legacy_entrypoint_sha256": "8b36d24ebeefdc1b6e093fe0550ff3dc0d1c7bad939ccfc2326c35557c09a575", + "required_count": 716, + "resource_count": 716, + "resource_set_sha256": "4999290e09960fe9635ded6a1679cd5466b1cd6b12d5b0878d362325edf0a944", + "revision": "sha256:be745b9ccf05f4e357628995237dfe2b99c59bd8ea63a9b06d3c213ba086b684" + }, + "package:inferrsi.common.skills.inference_optimization_casebook": { + "decision": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/casebooks/inference/inference-optimization-casebook/SKILL.md" + }, + "card_bytes": 7686, + "card_sha256": "abbc6e65d68c265b9e370d3cd977ea73a3b32a0deae4abc42f3d6ff6bf50e0b8", + "missing_fields": [ + "validation" + ], + "status": "partial" + }, + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "cec75f3a721dd13e6913b597d5373833a14c39d9048951a30c4864dd2c49aac8", + "entry_source": "casebooks/inference/inference-optimization-casebook/SKILL.md", + "kind": "knowledge", + "legacy_entrypoint": "record.json", + "legacy_entrypoint_sha256": "c44a40a3a5917af4d73494ee86944a303314d96bfebba4cc3902a305a2cc8c84", + "required_count": 716, + "resource_count": 716, + "resource_set_sha256": "35373bd4464163c66e53deaa7264b0389e43ea6984f6aa59553b0971956025b3", + "revision": "sha256:c00ec12e6e664f43fc21ba509bc008018fbf8c7af91a11c145abf517687b4ab1" + } + }, + "release": "v0.3.4", + "wheel_sha256": "9a1015f2c1e1347f46d1ca899d2cb8e32c8279a75e88669b9de1a8c8bda5b6c9" +} diff --git a/tests/fixtures/atomic-reader/casebook-sources-v0.3.4.zip b/tests/fixtures/atomic-reader/casebook-sources-v0.3.4.zip new file mode 100644 index 000000000..462b3bcf1 Binary files /dev/null and b/tests/fixtures/atomic-reader/casebook-sources-v0.3.4.zip differ diff --git a/tests/fixtures/atomic-reader/playbook-domain-v0.3.4.json b/tests/fixtures/atomic-reader/playbook-domain-v0.3.4.json new file mode 100644 index 000000000..62dba32f8 --- /dev/null +++ b/tests/fixtures/atomic-reader/playbook-domain-v0.3.4.json @@ -0,0 +1,2638 @@ +{ + "files": { + "playbooks/measurement/audit-fixed-workload-claim/SKILL.md": { + "bytes": 6184, + "sha256": "30d5303418fd5748649fa38ffd525a885749ee8d93a02b41b7efc27ae74fb471" + }, + "playbooks/measurement/calibrate-serving-simulation/SKILL.md": { + "bytes": 9239, + "sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb" + }, + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/README.md": { + "bytes": 10194, + "sha256": "fe614b1c62f1d4a9db797a85d9b11931ae32169c40109c7b69ecd648fb6e9d1e" + }, + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/source-record.json": { + "bytes": 14690, + "sha256": "61fafa5e92ae6312f8792e4630a35c78da4c1810fac4bf9cde385824c3894f36" + }, + "playbooks/measurement/calibrate-serving-simulation/references/source-notes.md": { + "bytes": 8415, + "sha256": "9696d3c0ef96b6611787446bd6f96d4d6255ca8d107105de8c1d9af83edb9fa5" + }, + "playbooks/measurement/dense-performance-evidence/SKILL.md": { + "bytes": 11935, + "sha256": "8fc261fce4be42ef66b3f98cf35bf3b5f8ee6f622494083ddb343f2645d6bf15" + }, + "playbooks/measurement/inference-benchmark-design/SKILL.md": { + "bytes": 50871, + "sha256": "d2a78d46556eb49eb711e0ae842ddf248dd00966a3837489d7762f6a2abff641" + }, + "playbooks/measurement/inference-benchmark-design/references/autotunebench-source.json": { + "bytes": 22172, + "sha256": "bc343ece2bf40c4e8aa4bd8d84f32465d00633255557feda5fe7799ce24e8688" + }, + "playbooks/measurement/inference-benchmark-design/references/autotunebench-trial-validity.md": { + "bytes": 11278, + "sha256": "cb3a7a5d94d056f868af07f92a16a6fef31eafd3199ed07ae79e93798e320b1d" + }, + "playbooks/measurement/inference-benchmark-design/references/benchmark-commands.md": { + "bytes": 8466, + "sha256": "0898424e0bff3a6246e1eeeda6abd6c5bd974c047fe32f3bbd5ab9d31ce17cd3" + }, + "playbooks/measurement/inference-benchmark-design/references/cache-aware-asr-stream-boundaries.md": { + "bytes": 16440, + "sha256": "4e0ea9c1bf6b096a49a91ad5266e90b8a456f4f5aca15eba8ac270a53c2309b5" + }, + "playbooks/measurement/inference-benchmark-design/references/dependency-aware-tts-playout.md": { + "bytes": 14774, + "sha256": "e94866e718adc3bd7e272a4856e9a90b6f27cbc0ff3a44101e68e6995ed79e2c" + }, + "playbooks/measurement/inference-benchmark-design/references/embodied-cpp-boundary-and-quality.md": { + "bytes": 13563, + "sha256": "0bc3ca87159cce960c7b32f62b82c275f850b98077ae07da0481bd554a3cd71d" + }, + "playbooks/measurement/inference-benchmark-design/references/embodied-cpp-source.json": { + "bytes": 20165, + "sha256": "056985be689554570a9f12b8e228ce71bdca5be940f9a2d7f6e1963e15a48130" + }, + "playbooks/measurement/inference-benchmark-design/references/faster-cosyvoice-source.json": { + "bytes": 34652, + "sha256": "9efe8918208adddfb9a31d2abed080923a5ae0dfb6332438179af0de66f54e13" + }, + "playbooks/measurement/inference-benchmark-design/references/gpu-measurement-validity.md": { + "bytes": 12200, + "sha256": "af8808e4ffab71eb285750630f76a54f910b98ae62367c03808d9f9716c071a1" + }, + "playbooks/measurement/inference-benchmark-design/references/justgoal-evaluation-contracts.md": { + "bytes": 11547, + "sha256": "d25df795fd301e8a1bb436e5f8122d0bac2441c43104e59a3b310fd5a64f2f3e" + }, + "playbooks/measurement/inference-benchmark-design/references/justgoal-source.json": { + "bytes": 12555, + "sha256": "60f2784384ea1a3b08a2ecafb60207d8e3707247dc7bc177b95b463d81f1cc16" + }, + "playbooks/measurement/inference-benchmark-design/references/ninfer-source.json": { + "bytes": 22613, + "sha256": "ccda0fc6781e3c4dceb41521ab952445840b4afcc9f5a7d968857f76e8db6272" + }, + "playbooks/measurement/inference-benchmark-design/references/ninfer-state-and-completion-contracts.md": { + "bytes": 13473, + "sha256": "3be946daf69d0b56f4fa56ccbc301dacb076473169f4921376a100dc64b57caf" + }, + "playbooks/measurement/inference-benchmark-design/references/task-benchmark-selection.md": { + "bytes": 25118, + "sha256": "9866457c245ca9f351e8c0f3688dda688ebb1a08c25a1e9665ff1a3bbde12007" + }, + "playbooks/measurement/inference-benchmark-design/references/xeforge-source.json": { + "bytes": 19576, + "sha256": "6c21791b9c8ecbc9645c6deb659bd897e17f70525536ea25e884a62fc5fb6b25" + }, + "playbooks/measurement/inference-benchmark-design/references/xeforge-trial-evidence.md": { + "bytes": 11621, + "sha256": "802c4dfe83983cbd6740231d5d0e2b459792b685de8dfbefb6dc51a912e23604" + }, + "playbooks/measurement/model-sol-analysis/SKILL.md": { + "bytes": 23157, + "sha256": "b7a2dc5cc051427b12e195652c20f7ee337326a6954a44f811f8b06d21b63e8a" + }, + "playbooks/measurement/model-sol-analysis/references/huggingarch-model-sol.md": { + "bytes": 19954, + "sha256": "79d5f350964a578fea199c1d77b0c767bb73e85e0fefbb4cebb3f8e0e6264504" + }, + "playbooks/measurement/model-sol-analysis/references/huggingarch-source-identity.json": { + "bytes": 18566, + "sha256": "40ef6bd6d0d11e48aea4f2b30fcad11d226c32e869ea7e97fe8431b55c8dc65f" + }, + "playbooks/measurement/model-sol-analysis/references/model-sol-contract.md": { + "bytes": 9719, + "sha256": "2a5babea1f744f124d3f234c741dae2fb6e5b48b7fd04285e6b3a476c065b34d" + }, + "playbooks/measurement/model-sol-analysis/references/model-sol-example.json": { + "bytes": 3552, + "sha256": "557ac952af65c907e5c08f55c3b15f5fd24317308b0b4ed317d4eb9217a02ac8" + }, + "playbooks/measurement/model-sol-analysis/references/qwen38-h200-tp4.json": { + "bytes": 2964, + "sha256": "e7a8648c2a9b2dde4dee3f360dd256508fe15ee9867d4a7be3b9f4e889259a6c" + }, + "playbooks/measurement/model-sol-analysis/references/qwen38-h200-tp4.md": { + "bytes": 7855, + "sha256": "5b310fc546522f71dc882eff4f44df490955735474bc3d165a36e89556059749" + }, + "playbooks/measurement/model-sol-analysis/scripts/model_sol.py": { + "bytes": 25400, + "sha256": "e3810ff5afafeded34a59ee3fb64093f5e39448e76bde8afa68c5f8238eba63e" + }, + "playbooks/measurement/model-sol-analysis/scripts/qwen38_checkpoint.py": { + "bytes": 4234, + "sha256": "bc022056cad77941987a4f79647c0890ada808f7f0129522d137f51bcc16b1b7" + }, + "playbooks/measurement/model-sol-analysis/scripts/qwen38_h200_tp4.py": { + "bytes": 15468, + "sha256": "0265ee13d9ca354745af261b35682b674b8c3f68538a3bf8ceead34b70724f84" + }, + "playbooks/measurement/performance-ceiling-analysis/SKILL.md": { + "bytes": 30244, + "sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f" + }, + "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md": { + "bytes": 5917, + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + }, + "playbooks/measurement/performance-ceiling-analysis/references/flexgen-offload-feasibility.md": { + "bytes": 8087, + "sha256": "5c72ae959c6cc72aa9e96a17a2934d6bfcfb055b25fda3221c99382dc09910d9" + }, + "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md": { + "bytes": 18645, + "sha256": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e" + }, + "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-source-identity.json": { + "bytes": 5913, + "sha256": "c4c000cf25e990d5fedbfaa206c9ee1e48429da50251c0553975ac2ff3efe0b5" + }, + "playbooks/measurement/performance-ceiling-analysis/references/mooncake-prefix-reuse-feasibility.md": { + "bytes": 6229, + "sha256": "6df0843a5fbe7cc6b05e58835b65976db5ce9fff526e9c7ed9a9d70c021c71bc" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/INTEGRATION_NOTES.md": { + "bytes": 7349, + "sha256": "083e462e0a204dce599362d46712fcfb392d053c5cda56216e22e28d4b8fa0fa" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/MECHANISMS.md": { + "bytes": 4003, + "sha256": "742c249082ceca230326f4407a40130fe624553b796ae5a157a8a4c15a7e1398" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/README.md": { + "bytes": 1204, + "sha256": "17b2d1c7c14124d59ac8a0d5ad4200ad2803d991e784a1a98cd97188cc364999" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/READSET.md": { + "bytes": 3937, + "sha256": "66459ce393858b2b2160f1e2973373bfc4b9902a12644631934b4ebe3140296a" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/STATIC_CHECKS.md": { + "bytes": 1111, + "sha256": "cb0aa7d148352ebb7b1678fc42a557a099575054716a341dfa25b6a998029064" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/cases/decision-cases.md": { + "bytes": 5491, + "sha256": "781a675a6533e0a18c044aaaee0d010da7013b6504654b8b8292a35176db801e" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/procedure.md": { + "bytes": 3823, + "sha256": "ce036a4d8a0908da204515c47e2ff9623548d09de264fa65bd58fedce52a78a0" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/references/source-notes.md": { + "bytes": 21659, + "sha256": "f9a8254e45473ddb2b73e576957b6d3db83c62b99dff1922f4d1e606e569559e" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/knowledge/bounds-predictions-and-decisions.md": { + "bytes": 5297, + "sha256": "5780d6eb5257612ec45deb94f85f334a6ecabf7e466d1678706041f6549bda79" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/redirect-cross-layer-optimization/procedure.md": { + "bytes": 3648, + "sha256": "6593a63fce9c474b515663a560c94b7df048dc5f6e77a95b8e54e4a64cd10a09" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/redirect-cross-layer-optimization/references/source-notes.md": { + "bytes": 26469, + "sha256": "6ff3a7bc31f1172db92aedaf7df1f1aac688bf769227b583a4cd82bfad52da67" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/agentic-kernel.md": { + "bytes": 41353, + "sha256": "7190573b85f94a4391bb0d887ccbd37a31b3f08bb0531114ad7afd72fe1567a7" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/flashvector.md": { + "bytes": 9830, + "sha256": "3926369acd88ff3c370bee5718e74dd15f3219c3e4f6311095e30e917bffa4cf" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/inferencebench.md": { + "bytes": 9294, + "sha256": "21f47111197a0b7f8d6384ea918d139dc8318a62ca3313ce060048271f50b639" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/prior-coverage.md": { + "bytes": 3254, + "sha256": "35d47ac078591221fcb666219bcd824f9400fc17aafecdc0499d8336f7178238" + }, + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/vidur.md": { + "bytes": 7736, + "sha256": "d38602af5219f5feeb49e6cd6bf53d66098c77fad141dae676f1d8a6743cf25d" + }, + "playbooks/measurement/performance-ceiling-analysis/references/roofline-contract.md": { + "bytes": 7091, + "sha256": "419ec4bcaec45ac579a133bce083d4f48779f26e664d7a86f720fa65f343b1d1" + }, + "playbooks/measurement/performance-ceiling-analysis/references/roofline-example.json": { + "bytes": 2015, + "sha256": "597cd3205df043cff3ae9d15924c77934e8d8eb300c00c4840f6bb2921f90faf" + }, + "playbooks/measurement/performance-ceiling-analysis/references/xllm-pd-handoff.md": { + "bytes": 6679, + "sha256": "66226190ab90cab2057cdd867714725a084396fa9ccaa87efab8b14ca021bd2a" + }, + "playbooks/measurement/performance-ceiling-analysis/scripts/roofline.py": { + "bytes": 9004, + "sha256": "524de48a6764401695fe1444f1fa3d38f363069b0cd2fba4715a86ca4b28a5d4" + }, + "playbooks/optimization/kernel-writing-guide/SKILL.md": { + "bytes": 27927, + "sha256": "c6a4ef16ca5b0daf3b69221788eceafac33709a063a0885cd2e3dff315c81643" + }, + "playbooks/optimization/kernel-writing-guide/cases/causal-conv1d-dispatch-state.md": { + "bytes": 7875, + "sha256": "2eb67dd522021bb2234616d7f660e6ba99acb43676f48cb23141bc69bf3e0029" + }, + "playbooks/optimization/kernel-writing-guide/cases/hf-qwen35-gdn-binding.md": { + "bytes": 4953, + "sha256": "b3a55af3f45f01c48e1cb18c8b029e5949a494c3e51dc444a5cccbad9acbba0a" + }, + "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.json": { + "bytes": 6197, + "sha256": "5237ac437eb76e910bb1d08bfcc364b87dea1b947de5e67eebce511ea1ef1d23" + }, + "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.md": { + "bytes": 6850, + "sha256": "8b093faf0ab775d5605ecdd9653fb3689c2b839cba2641c5d5cda17c721bb2ac" + }, + "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-causal-conv-contract.md": { + "bytes": 16188, + "sha256": "2f3dcee66e2dfe7a98bee21a36b892538998de5de3caf1bc63257137f9984236" + }, + "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.json": { + "bytes": 5038, + "sha256": "31cfac1e780113c8233b451af7a7562af983aa2f4209938017cc67347ee5dd66" + }, + "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.md": { + "bytes": 6245, + "sha256": "7f9ebe8de7e55d3db2a119b6a56e15c37448fd7d4e022a47122a143206d31687" + }, + "playbooks/optimization/kernel-writing-guide/references/akg-affine-tail-guards.md": { + "bytes": 11941, + "sha256": "113deb2db10b171db3425bb3f1792bee763706b794c8cc2e222b4cc0d0114118" + }, + "playbooks/optimization/kernel-writing-guide/references/causal-conv1d-contract.md": { + "bytes": 17351, + "sha256": "b3a6245cf5e9deeba0dffd4a15ddcf97da6a4315f4d3131921779438832663ad" + }, + "playbooks/optimization/kernel-writing-guide/references/hf-qwen35-gdn-binding.md": { + "bytes": 13753, + "sha256": "848d3c99b47ef711e8820bbc4f6bcbd1db7211197811c9d855201025448d806b" + }, + "playbooks/optimization/kernel-writing-guide/references/hf-qwen35-gdn-source.json": { + "bytes": 9867, + "sha256": "df3f4650b5cf92d4fd3d5a4cc8aefb91dd4b0c2affaa0c873138d5651c50e6bd" + }, + "playbooks/optimization/kernel-writing-guide/references/licenses/sglang-LICENSE.md": { + "bytes": 11346, + "sha256": "1495e1e757ef4d0925a2350563cf5754bb23c51701a8ec4fb3c5cdcbedae6747" + }, + "playbooks/optimization/kernel-writing-guide/references/pplx-gdn-caller-context.json": { + "bytes": 3051, + "sha256": "0219fc9ad785da4e638c1680bc9eaf28672aa32313824f52bdcaed61d29bca87" + }, + "playbooks/optimization/kernel-writing-guide/references/sglang-gdn-causal-conv-contract.md": { + "bytes": 30428, + "sha256": "c9f27b0231ddec3d14d6fa0831d1494ffd8e11bd8ad704e04be3bc4a4ffc0e58" + }, + "playbooks/optimization/kernel-writing-guide/references/sglang-gdn-source-files.json": { + "bytes": 12500, + "sha256": "4c7ec2cfd2c29297e185ce09b4d9b2040fbe3635943c112f9ebb71dca8ab381b" + }, + "playbooks/optimization/kernel-writing-guide/references/vllm-gdn-causal-conv-contract.md": { + "bytes": 16197, + "sha256": "eec09a6e95983c46b67d5f066d34419c17819899f5d8e3c65f2f163f2ada0fde" + }, + "playbooks/optimization/training-input-pipeline/SKILL.md": { + "bytes": 10544, + "sha256": "779478e854aa1ffcc453609b1c8c67477154f478dc360f6541c182940f67fd0e" + }, + "playbooks/optimization/training-input-pipeline/references/sources.md": { + "bytes": 2637, + "sha256": "60e0f3e88655d8e1d5eb4797f39ca4370deda01614f265b8d2ea4559d8ac020f" + }, + "playbooks/optimization/video-diffusion-optimization/SKILL.md": { + "bytes": 14020, + "sha256": "6466f46b63f6149e9692fdc344fca5f3af9e1961b59fd48f25b778256089c203" + }, + "playbooks/optimization/video-diffusion-optimization/assets/campaign.template.json": { + "bytes": 1089, + "sha256": "1a37f1d136612143ddab8f0cbbf424c80433b4da5312edb18d07c0b9d87ef657" + }, + "playbooks/optimization/video-diffusion-optimization/scripts/evaluate_target.py": { + "bytes": 8368, + "sha256": "9e84df051e03d567746fd73ae7243efb2f3c5ec806fef824d3c4d42a8eb9704c" + }, + "playbooks/optimization/weight-loading-optimization/SKILL.md": { + "bytes": 41025, + "sha256": "e5be547a1ddac312be09a5d8a8d61645f4de1c8e3f23e432cd297bcef677cc8e" + }, + "playbooks/optimization/weight-loading-optimization/references/deepseek-expert-cache-oracles.md": { + "bytes": 9522, + "sha256": "5e42c4a01f9ac810663979dee0658c4cbe87060594c16622ae6ec0b854e44b29" + }, + "playbooks/optimization/weight-loading-optimization/references/deepseek-expert-cache-source.json": { + "bytes": 16564, + "sha256": "65bf0623616b4f633d8f51b30134798cbf71176716c8a8613209e2fc48ff84bd" + }, + "playbooks/optimization/weight-loading-optimization/references/fastsafetensors-transfer-readset.md": { + "bytes": 8656, + "sha256": "5a39f14b102b0cee304541e011aa31e44e6b13527d1bee9987c3f3b66c064d3d" + }, + "playbooks/optimization/weight-loading-optimization/references/flare-preparation-boundary.md": { + "bytes": 5388, + "sha256": "c0d787522451f5b69a6d20b188d573183fa6d67de30f695ea668ca1ab7108929" + }, + "playbooks/optimization/weight-loading-optimization/references/llama-loading-readset.md": { + "bytes": 6392, + "sha256": "6c640f28ee3f0253a17b81461c865cb9f947367002cb75bf72550c4572d02e97" + }, + "playbooks/planning/assess-serving-preemption/SKILL.md": { + "bytes": 10170, + "sha256": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570" + }, + "playbooks/planning/assess-serving-preemption/references/source-notes.md": { + "bytes": 30405, + "sha256": "f29fcecfba0490008a354c11b42403983fe165e56ff907ad61cc6040d2b6407f" + }, + "playbooks/planning/assess-split-backward-schedule/SKILL.md": { + "bytes": 6631, + "sha256": "f777607e0158371f4025efff3fa63e57e1622e2a86ec087cc580f076681e9ac5" + }, + "playbooks/planning/assess-split-backward-schedule/references/source-notes.md": { + "bytes": 10548, + "sha256": "61b1609f71c37b61d136b8c4d39f793de87cffb1cf31c8ec737a1c3fa6fb1b4e" + }, + "playbooks/planning/checkpoint-recovery-consistency/SKILL.md": { + "bytes": 10100, + "sha256": "cc53f838da409daff0f85c3d4d3867307c00b4f7822cdc042274bd1aea8a95c1" + }, + "playbooks/planning/checkpoint-recovery-consistency/references/dlrover-persistence-replicas.md": { + "bytes": 8398, + "sha256": "055f4357f79026fcbcc766bbe77db610376ec353623f8898f5d14a30ee69e7bc" + }, + "playbooks/planning/checkpoint-recovery-consistency/references/sources.md": { + "bytes": 7984, + "sha256": "9425b1aab963a2c8d35f3db897bd15ee69699bf5b0d0c8425c3c8bba3e9a0233" + }, + "playbooks/planning/choose-parallel-training-plan/SKILL.md": { + "bytes": 6132, + "sha256": "0e56b44e712af224252fdd8061cc9c0dfc2b22c54f010664644ca61c93f4b27f" + }, + "playbooks/planning/choose-parallel-training-plan/references/source-notes.md": { + "bytes": 8521, + "sha256": "9f9184d46b19312138a6e805e439e43dc0594a0cc6b46675255a582dc946ca5b" + }, + "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md": { + "bytes": 10205, + "sha256": "8668e20cea75717fe536cd310b40b5cc1b94e0a25ad097675d3bdaae7c7d8886" + }, + "playbooks/planning/evaluate-elastic-serving-placement/references/source-notes.md": { + "bytes": 44796, + "sha256": "ea416831fd7d0874e06d0a76fb0c7196df53072b717673a0cdf635db6bfd917b" + }, + "playbooks/planning/optimization-search-policy/SKILL.md": { + "bytes": 22604, + "sha256": "1ad13f1f5dbef1a25810d1f77a3c79c6dbce85683af6796cc9ddd708bfb6c470" + }, + "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.json": { + "bytes": 6558, + "sha256": "681871983ec4033ef9861ad270bc0d312f9134a76933b8f7ce740659ef1e4dd5" + }, + "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.md": { + "bytes": 5271, + "sha256": "2c2a8147001d24d1abc8672f15cf0ca759ae461b734413c8dcb7497634bb6821" + }, + "playbooks/planning/optimization-search-policy/references/distserve-phase-placement/README.md": { + "bytes": 6511, + "sha256": "56e16efce447dfd4990a024ff1d6f7cb428f8e3e1f7b32a7e4d05f57139b836a" + }, + "playbooks/planning/optimization-search-policy/references/distserve-phase-placement/source-record.json": { + "bytes": 6054, + "sha256": "21cc9562f1c19d6b57957c01b53e0adf8700d05ffaaa7764afe07c4da1284de1" + }, + "playbooks/planning/optimization-search-policy/references/papers-20261015/INTEGRATION_NOTES.md": { + "bytes": 3597, + "sha256": "157e74ba180426b279b548a729769f152bf18f9a78ffca4ebfcaf26b7d0c5292" + }, + "playbooks/planning/optimization-search-policy/references/papers-20261015/MECHANISMS.md": { + "bytes": 5875, + "sha256": "18bb2f5d7e52773c516420a142edfb531d0b9c822a2934d60f3234ac1cb9d40e" + }, + "playbooks/planning/optimization-search-policy/references/papers-20261015/NEXT_GATE_LEADS.md": { + "bytes": 941, + "sha256": "16a264c7159f9c2c700ce8ba46e63f3e636b277c987da4970f6d2fa085fcb053" + }, + "playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md": { + "bytes": 3893, + "sha256": "5e761957cb5ecd93926e6ffc13deee7c830c6e8f0ee3c3846e9dd3b50dc74446" + }, + "playbooks/planning/optimization-search-policy/references/papers-20261015/references/source-notes.md": { + "bytes": 13370, + "sha256": "54d83c3713045d59a48821bcf93598374ba4a630e3891ad39498f919317c4fb8" + }, + "playbooks/planning/optimization-search-policy/references/papers-20261015/updates/optimization-search-policy.md": { + "bytes": 4238, + "sha256": "d3db44fa9a6831b86a02c638b323ed943e69fe256866213f10d68c72d762879e" + }, + "playbooks/planning/plan-activation-residency/SKILL.md": { + "bytes": 6755, + "sha256": "c1918b60480a34e7cf1a1a431b089f42288f860a7b50f7df1ba0bce2658d3fe0" + }, + "playbooks/planning/plan-activation-residency/references/source-notes.md": { + "bytes": 13907, + "sha256": "5ff52655cfd06fcf970ed2a7d4d4fe1c31115b102af2d41497de0c74848ed2b3" + }, + "playbooks/planning/training-resource-budget/SKILL.md": { + "bytes": 12306, + "sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2" + }, + "playbooks/planning/training-resource-budget/references/mindspeed-historical.md": { + "bytes": 7580, + "sha256": "ad65c27f278c3d0ca3599a7630c02d3e529477a05b71b7703bd2d75f0d8fdd2c" + }, + "playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md": { + "bytes": 7158, + "sha256": "4462d69ed6a941a03639c756968be3ce54f947e51f6ca618f4fb1cd43b643b35" + }, + "playbooks/planning/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md": { + "bytes": 7368, + "sha256": "c55c6ad2131ef788866411dcc7056f221420ebff30c95c6bc919b09a4818cb73" + }, + "playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md": { + "bytes": 5649, + "sha256": "19bd25b1a944adb2351ebc6b1d795150ea033041a44f6cc261e881677812a101" + }, + "playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md": { + "bytes": 2026, + "sha256": "f8740fc5c8bbbe5ac13ff1cfec7ca499569d0b46e8cd56cf1f5a44c3a5e72242" + }, + "playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md": { + "bytes": 18660, + "sha256": "9aa6d3e01452dff95c8a8940ff62ead8c146ce215c9175b78c9f2ef508a7b2de" + }, + "playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md": { + "bytes": 22946, + "sha256": "2a5c166767f56fa47e7eba7386f1f36da8cb73702e5b5bbe14d6a456ca9ebfae" + }, + "playbooks/planning/training-resource-budget/references/sources.md": { + "bytes": 3502, + "sha256": "53d70671a183de4aaa3369f9caf2383a23b6f8a0a7b04464a8d8a639150afc6a" + }, + "playbooks/planning/training-resource-budget/references/stas-decision-notes.md": { + "bytes": 4086, + "sha256": "f1a993e6c4ca9a035a2effcaf5500081f227b0cc56cc885a6b22fda0041fc744" + } + }, + "refs": { + "checkout:assess-serving-preemption": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/assess-serving-preemption/SKILL.md" + }, + "card_bytes": 7882, + "card_sha256": "cd1378d8b2094aedef630394dd5d20d17ee61d8c1a46f9669ab74512e8ba5b06", + "dependencies": {}, + "entry_sha256": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570", + "entry_source": "playbooks/planning/assess-serving-preemption/SKILL.md", + "entrypoint": "playbooks/planning/assess-serving-preemption/SKILL.md", + "guide": "playbooks/planning/assess-serving-preemption/SKILL.md", + "guide_sha256": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/source-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/assess-serving-preemption/references/source-notes.md", + "sha256": "f29fcecfba0490008a354c11b42403983fe165e56ff907ad61cc6040d2b6407f" + } + }, + "required_count": 2, + "required_resources": { + "playbooks/planning/assess-serving-preemption/SKILL.md": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570", + "playbooks/planning/assess-serving-preemption/references/source-notes.md": "f29fcecfba0490008a354c11b42403983fe165e56ff907ad61cc6040d2b6407f" + }, + "resource_set": "04e59a78bdd0b7ec878f9ae0b327697493e35dc54c349b375ac1903e449ed454", + "revision": "sha256:57c8da67b15123f52947bb55abec8beae6f25abcefb9881535a72de3556df0d9", + "status": "partial" + }, + "checkout:assess-split-backward-schedule": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/assess-split-backward-schedule/SKILL.md" + }, + "card_bytes": 7561, + "card_sha256": "90562802f9fa88063572c636b83359f4980c01b89035270126b91da59c77db69", + "dependencies": {}, + "entry_sha256": "f777607e0158371f4025efff3fa63e57e1622e2a86ec087cc580f076681e9ac5", + "entry_source": "playbooks/planning/assess-split-backward-schedule/SKILL.md", + "entrypoint": "playbooks/planning/assess-split-backward-schedule/SKILL.md", + "guide": "playbooks/planning/assess-split-backward-schedule/SKILL.md", + "guide_sha256": "f777607e0158371f4025efff3fa63e57e1622e2a86ec087cc580f076681e9ac5", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/source-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/assess-split-backward-schedule/references/source-notes.md", + "sha256": "61b1609f71c37b61d136b8c4d39f793de87cffb1cf31c8ec737a1c3fa6fb1b4e" + } + }, + "required_count": 2, + "required_resources": { + "playbooks/planning/assess-split-backward-schedule/SKILL.md": "f777607e0158371f4025efff3fa63e57e1622e2a86ec087cc580f076681e9ac5", + "playbooks/planning/assess-split-backward-schedule/references/source-notes.md": "61b1609f71c37b61d136b8c4d39f793de87cffb1cf31c8ec737a1c3fa6fb1b4e" + }, + "resource_set": "b484316459ff61ae36c0f914f9f0f104b87663b559f090bb62da29f3c762812d", + "revision": "sha256:15019511215b7111ba697999ccc14f6b7ce27b0ff21de7ab2e1be7752d4d4078", + "status": "partial" + }, + "checkout:audit-fixed-workload-claim": { + "atom": { + "kind": "skill", + "resource": "playbooks/measurement/audit-fixed-workload-claim/SKILL.md" + }, + "card_bytes": 5880, + "card_sha256": "318b06204379cc575882be2ea38b68863572dad60e614989ed85d68772f4438b", + "dependencies": {}, + "entry_sha256": "30d5303418fd5748649fa38ffd525a885749ee8d93a02b41b7efc27ae74fb471", + "entry_source": "playbooks/measurement/audit-fixed-workload-claim/SKILL.md", + "entrypoint": "playbooks/measurement/audit-fixed-workload-claim/SKILL.md", + "guide": "playbooks/measurement/audit-fixed-workload-claim/SKILL.md", + "guide_sha256": "30d5303418fd5748649fa38ffd525a885749ee8d93a02b41b7efc27ae74fb471", + "kind": "skill", + "missing_fields": [ + "prerequisites", + "validation" + ], + "relative_guide_links": {}, + "required_count": 1, + "required_resources": { + "playbooks/measurement/audit-fixed-workload-claim/SKILL.md": "30d5303418fd5748649fa38ffd525a885749ee8d93a02b41b7efc27ae74fb471" + }, + "resource_set": "cbae08ec84e1fb690bff200e8fa6b96439a62cddb70a1aa0fc62430a600d1bd0", + "revision": "sha256:c3de5160f4e66d255c147798e720849bcb69ce528fc4d62cc366cebc6ac43454", + "status": "partial" + }, + "checkout:calibrate-serving-simulation": { + "atom": { + "kind": "skill", + "resource": "playbooks/measurement/calibrate-serving-simulation/SKILL.md" + }, + "card_bytes": 8115, + "card_sha256": "58007ca4d5aa296216af36f64f2f42160966c20b1da7b49952eb65b6d55d8d43", + "dependencies": {}, + "entry_sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb", + "entry_source": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "entrypoint": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "guide": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "guide_sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/infera-serving-search/README.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/README.md", + "sha256": "fe614b1c62f1d4a9db797a85d9b11931ae32169c40109c7b69ecd648fb6e9d1e" + }, + "references/infera-serving-search/source-record.json": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/source-record.json", + "sha256": "61fafa5e92ae6312f8792e4630a35c78da4c1810fac4bf9cde385824c3894f36" + }, + "references/source-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/references/source-notes.md", + "sha256": "9696d3c0ef96b6611787446bd6f96d4d6255ca8d107105de8c1d9af83edb9fa5" + } + }, + "required_count": 4, + "required_resources": { + "playbooks/measurement/calibrate-serving-simulation/SKILL.md": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb", + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/README.md": "fe614b1c62f1d4a9db797a85d9b11931ae32169c40109c7b69ecd648fb6e9d1e", + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/source-record.json": "61fafa5e92ae6312f8792e4630a35c78da4c1810fac4bf9cde385824c3894f36", + "playbooks/measurement/calibrate-serving-simulation/references/source-notes.md": "9696d3c0ef96b6611787446bd6f96d4d6255ca8d107105de8c1d9af83edb9fa5" + }, + "resource_set": "772dfe0e7c12046c153c0d05fd2a528d9a7fef96baff281c40ff096ea0041a85", + "revision": "sha256:4aef85416ac96b566b929bd0e45d387a173af99e057dfbbe181951cc4cd44684", + "status": "partial" + }, + "checkout:case.sarathi-chunk-budget": { + "case_aliases": { + "case.json": "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.json", + "sarathi-chunk-budget.json": "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.json", + "sarathi-chunk-budget.md": "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.md" + }, + "case_file_sha256": "681871983ec4033ef9861ad270bc0d312f9134a76933b8f7ce740659ef1e4dd5", + "dependencies": {}, + "entry_sha256": "2c2a8147001d24d1abc8672f15cf0ca759ae461b734413c8dcb7497634bb6821", + "entry_source": "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.md", + "findings": [ + { + "card_bytes": 5061, + "card_sha256": "a77cb551ba31c65aa77b086775e1397db0e8d0fab4dd5d073e88943c2a684b03", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "empirical_validation", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3531, + "finding_sha256": "d87e5e1f28407aab4414e2946d20218669623eb8c3ac6e4c95443dfefc518bb2", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "754737441053cbc8cbe35f109dc93b5180c395da88c086d76a5cbc1a519c62f8", + "start_byte": 2778, + "status": "complete" + }, + { + "card_bytes": 5029, + "card_sha256": "9d7b950913abdcc8f029a3cb6d533bb32013bb498d44d3587871403d55cb6351", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "empirical_validation", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4263, + "finding_sha256": "268e2109586e67ddff63ad2182620e43237214fcf9f6fb7c0f8db22a0213990c", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "dee83cebccd374cc8d44bf63019c1c065a613cfa859f53cb31bcd56ae1bf0628", + "start_byte": 3537, + "status": "complete" + }, + { + "card_bytes": 4947, + "card_sha256": "d776defb41c9125c779c17857e8496566cec9631dad759fc53c80720e75ec13d", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "empirical_validation", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4949, + "finding_sha256": "d8ae943ebc013358ee4f258d1a48cfd7c566cddfadbe839ea4e96313c9c68113", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "d49de22ff9d75cbc6700f4da7fc41da2ad8e7750734c2a0999660dda56446556", + "start_byte": 4269, + "status": "complete" + }, + { + "card_bytes": 4864, + "card_sha256": "fbbc06bbea51d927c0d52f97165b339a2e39ac402f2cb65f842be37ed9cd6a87", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "empirical_validation", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5722, + "finding_sha256": "14fce91fea7dbb7d538778bf57beeb1e219df2b84670c1dd07a29e6dc6ed0a3f", + "missing_fields": [], + "pointer": "case.json#/findings/3", + "selector": "case.json#/findings/3", + "span_sha256": "5f1ffa5bf6f98ff69b31712af0f02623e3e306df19a894eb5dfe1f3cce1ff3e2", + "start_byte": 4955, + "status": "complete" + }, + { + "card_bytes": 5183, + "card_sha256": "8262d92b627cf162f09c56657037c1dfe654d4dec1290f325edb0a782559e875", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "empirical_validation", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 6551, + "finding_sha256": "ffd1b0834c8db8414d7115bc346251ce0709b9cf8a508be06a075839c4cf3a0c", + "missing_fields": [], + "pointer": "case.json#/findings/4", + "selector": "case.json#/findings/4", + "span_sha256": "402505c9062a9c1f9f11e8e13c386beac751dff81f8f967e35190769f84ec8fd", + "start_byte": 5728, + "status": "complete" + } + ], + "kind": "case", + "required": [ + "sarathi-chunk-budget.md", + "case.json", + "sarathi-chunk-budget.json" + ], + "required_count": 3, + "resource_count": 3, + "resource_set_sha256": "a9a07e3ae0b858606f51eeedeb226fdb448a56c8bfb3a5585f11eba4c78e181c", + "revision": "sha256:f453054229ae7978890dbddf90c656f73d6cf9650a3230c5ec01570e92d5c462" + }, + "checkout:case.sglang-gdn-source-contract": { + "case_aliases": { + "case.json": "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.json", + "sglang-gdn-source-contract.json": "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.json", + "sglang-gdn-source-contract.md": "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.md" + }, + "case_file_sha256": "5237ac437eb76e910bb1d08bfcc364b87dea1b947de5e67eebce511ea1ef1d23", + "dependencies": {}, + "entry_sha256": "8b093faf0ab775d5605ecdd9653fb3689c2b839cba2641c5d5cda17c721bb2ac", + "entry_source": "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.md", + "findings": [ + { + "card_bytes": 4784, + "card_sha256": "12053c24f2bc45b50ef6a42da4cc115ead0ca1339405c934770b507d34448ea3", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3879, + "finding_sha256": "1c5da9896b4c3eb8c0b26e3f2d2e10b02269bf2692a5e6ac65659a0143b593c6", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "e5113555c05b0d4b93a5bd8e454f2ece03616b80b2eabd85477b86bfd757abef", + "start_byte": 3090, + "status": "complete" + }, + { + "card_bytes": 4711, + "card_sha256": "68a077cca454d0acf5b27aa84ab7b704dd6bcbc3f4f7ccb4be3ace65196838f5", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4636, + "finding_sha256": "e0a4b079ab8340f51c0347fdc0338a41e60cba15d36a41c53a28fb390f7442f8", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "1a9431f34da3901309de2839a2f7dfe1bafb52ad2837b14fc644bf6d49f3ba86", + "start_byte": 3885, + "status": "complete" + }, + { + "card_bytes": 4778, + "card_sha256": "a87f903e112411157141ce0849ffe58abab44eed5ae2b813f1982f99bfd42020", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5429, + "finding_sha256": "4e36a9dc9a7df2ac597b88792737826d1240619318125002d62838ac238345c1", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "f2fad52999d69faa084b00de45026902f33407e323bfe275951cc02ddc2b600b", + "start_byte": 4642, + "status": "complete" + }, + { + "card_bytes": 4723, + "card_sha256": "48b88e7cfcdd2a45a347c4bf5ea95feffaf0bd9a83f6de64816f63de160d7465", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 6190, + "finding_sha256": "8941a5bd3f3c78c97897fc2c3d8d7b1a2fc15f193ec2b35a28f5510f12171bb1", + "missing_fields": [], + "pointer": "case.json#/findings/3", + "selector": "case.json#/findings/3", + "span_sha256": "91a0396b88f0e4f69bb7182d86f4bdeaf4d25f01869f33e914274686957d20ea", + "start_byte": 5435, + "status": "complete" + } + ], + "kind": "case", + "required": [ + "sglang-gdn-source-contract.md", + "case.json", + "sglang-gdn-source-contract.json" + ], + "required_count": 3, + "resource_count": 3, + "resource_set_sha256": "a05afaf171fcc7c4ac1d4a3707a2ddde58e1bf5c1cd6d2fe5bfd603c625e9016", + "revision": "sha256:2bef40d1b32a842c5afa24d4d2a43c972e4288aec0731f17d1c6d4b5dc10556f" + }, + "checkout:case.vllm-gdn-source-contract": { + "case_aliases": { + "case.json": "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.json", + "vllm-gdn-causal-conv-contract.md": "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-causal-conv-contract.md", + "vllm-gdn-source-contract.json": "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.json", + "vllm-gdn-source-contract.md": "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.md" + }, + "case_file_sha256": "31cfac1e780113c8233b451af7a7562af983aa2f4209938017cc67347ee5dd66", + "dependencies": {}, + "entry_sha256": "7f9ebe8de7e55d3db2a119b6a56e15c37448fd7d4e022a47122a143206d31687", + "entry_source": "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.md", + "findings": [ + { + "card_bytes": 3616, + "card_sha256": "d4c011cf952fdbbd1ae8aa5695dc8c145a1450340932d10e0ea1ad56f7416423", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 2654, + "finding_sha256": "6c554296309f067697af8a5a5b1c1ef8f656d3fe87d750b7f4713ed092e64546", + "missing_fields": [], + "pointer": "case.json#/findings/0", + "selector": "case.json#/findings/0", + "span_sha256": "a0ee546aa45803aef8175f283ccbae4fc513b0688b5aeee5a7b414361bd97ba7", + "start_byte": 1890, + "status": "complete" + }, + { + "card_bytes": 3663, + "card_sha256": "06f7b2b933db4b1e582429fe15a27e8501a6385cbc28556cf3e7b2ad66c53b9b", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 3459, + "finding_sha256": "10e86fed978789062de03da95ed2af7698225182a7bc4615a58ccea710fa059b", + "missing_fields": [], + "pointer": "case.json#/findings/1", + "selector": "case.json#/findings/1", + "span_sha256": "bad52c253c6d5f4b84e1098d9064e3f9083071e1f0c0d44d54db49d13335a9c5", + "start_byte": 2660, + "status": "complete" + }, + { + "card_bytes": 3641, + "card_sha256": "9128cdb133187315c371e843c559a89f8f880e1c6d50b0d0803220eae101977c", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 4252, + "finding_sha256": "5eb8222e31f3832124e51ac32bc5a58eeeed7b08ad8fc3cc8eb0e122ba4f75c5", + "missing_fields": [], + "pointer": "case.json#/findings/2", + "selector": "case.json#/findings/2", + "span_sha256": "7e993d03cb7cc9c44a956f45f25339e477bd2f7a5ee44888242e87948be753b7", + "start_byte": 3465, + "status": "complete" + }, + { + "card_bytes": 3641, + "card_sha256": "205919d982d93ea33f2f98f0a894c2f01062305b41ffda7a0a8d32430698046b", + "decision": [ + "applicability", + "prerequisites", + "recommendation", + "refusal_or_limits", + "validation" + ], + "declared": [ + "applicability", + "attribution", + "finding", + "limitations", + "origin", + "sources", + "state" + ], + "end_byte": 5031, + "finding_sha256": "641826e755f497a04c963bbffcda261ebba57a20ba368924ae123003006f3486", + "missing_fields": [], + "pointer": "case.json#/findings/3", + "selector": "case.json#/findings/3", + "span_sha256": "acd4aab867b10801ca14320b6819ccda71fe077418e4a332c5238d681d55ab66", + "start_byte": 4258, + "status": "complete" + } + ], + "kind": "case", + "required": [ + "vllm-gdn-source-contract.md", + "case.json", + "vllm-gdn-source-contract.json", + "vllm-gdn-causal-conv-contract.md" + ], + "required_count": 4, + "resource_count": 4, + "resource_set_sha256": "e6f116b75fef6c83d21f3642f649442f1e1c3585d7b0ead5cd3fbb37d586da11", + "revision": "sha256:6046e9d41bb2e85fe9cf9f97c9aab1ed9e4dcd22c476eac68fee7099b027c2eb" + }, + "checkout:checkpoint-recovery-consistency": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/checkpoint-recovery-consistency/SKILL.md" + }, + "card_bytes": 7473, + "card_sha256": "9e33ce304a0aa87771618cd0bc0120d3a37c85c082483120ae643be8d5f8ac99", + "dependencies": {}, + "entry_sha256": "cc53f838da409daff0f85c3d4d3867307c00b4f7822cdc042274bd1aea8a95c1", + "entry_source": "playbooks/planning/checkpoint-recovery-consistency/SKILL.md", + "entrypoint": "playbooks/planning/checkpoint-recovery-consistency/SKILL.md", + "guide": "playbooks/planning/checkpoint-recovery-consistency/SKILL.md", + "guide_sha256": "cc53f838da409daff0f85c3d4d3867307c00b4f7822cdc042274bd1aea8a95c1", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/dlrover-persistence-replicas.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/checkpoint-recovery-consistency/references/dlrover-persistence-replicas.md", + "sha256": "055f4357f79026fcbcc766bbe77db610376ec353623f8898f5d14a30ee69e7bc" + }, + "references/sources.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/checkpoint-recovery-consistency/references/sources.md", + "sha256": "9425b1aab963a2c8d35f3db897bd15ee69699bf5b0d0c8425c3c8bba3e9a0233" + } + }, + "required_count": 3, + "required_resources": { + "playbooks/planning/checkpoint-recovery-consistency/SKILL.md": "cc53f838da409daff0f85c3d4d3867307c00b4f7822cdc042274bd1aea8a95c1", + "playbooks/planning/checkpoint-recovery-consistency/references/dlrover-persistence-replicas.md": "055f4357f79026fcbcc766bbe77db610376ec353623f8898f5d14a30ee69e7bc", + "playbooks/planning/checkpoint-recovery-consistency/references/sources.md": "9425b1aab963a2c8d35f3db897bd15ee69699bf5b0d0c8425c3c8bba3e9a0233" + }, + "resource_set": "af973cd7abef3eaa646a493d1270ec4d7e94013859ac541084fc4c7d5f530385", + "revision": "sha256:d0f9d6bd0594a0c4de8d734f1a88508faefd282511a4bc175e9bfd492a907a96", + "status": "partial" + }, + "checkout:choose-parallel-training-plan": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/choose-parallel-training-plan/SKILL.md" + }, + "card_bytes": 6483, + "card_sha256": "d51f7721b4caa3d763149dffb03192e99ab64016fbba1e506e74ed5f9c088dd7", + "dependencies": {}, + "entry_sha256": "0e56b44e712af224252fdd8061cc9c0dfc2b22c54f010664644ca61c93f4b27f", + "entry_source": "playbooks/planning/choose-parallel-training-plan/SKILL.md", + "entrypoint": "playbooks/planning/choose-parallel-training-plan/SKILL.md", + "guide": "playbooks/planning/choose-parallel-training-plan/SKILL.md", + "guide_sha256": "0e56b44e712af224252fdd8061cc9c0dfc2b22c54f010664644ca61c93f4b27f", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/source-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/choose-parallel-training-plan/references/source-notes.md", + "sha256": "9f9184d46b19312138a6e805e439e43dc0594a0cc6b46675255a582dc946ca5b" + } + }, + "required_count": 2, + "required_resources": { + "playbooks/planning/choose-parallel-training-plan/SKILL.md": "0e56b44e712af224252fdd8061cc9c0dfc2b22c54f010664644ca61c93f4b27f", + "playbooks/planning/choose-parallel-training-plan/references/source-notes.md": "9f9184d46b19312138a6e805e439e43dc0594a0cc6b46675255a582dc946ca5b" + }, + "resource_set": "84fcde33ef3e5f380e16fab37b56ebc0bc8843670aba5203769cab868406aebb", + "revision": "sha256:0d80fdea8ad2b6a9880848d0d0bf07a255871fb0d8778dd0e2944bd222495cd8", + "status": "partial" + }, + "checkout:dense-performance-evidence": { + "atom": { + "kind": "skill", + "resource": "playbooks/measurement/dense-performance-evidence/SKILL.md" + }, + "card_bytes": 6784, + "card_sha256": "8aa56119155c7e2392a1470b93a3fe485607c5225bf22cc64b7cbc406b7503d3", + "dependencies": { + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json": "sha256:4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": "sha256:e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27" + }, + "entry_sha256": "8fc261fce4be42ef66b3f98cf35bf3b5f8ee6f622494083ddb343f2645d6bf15", + "entry_source": "playbooks/measurement/dense-performance-evidence/SKILL.md", + "entrypoint": "playbooks/measurement/dense-performance-evidence/SKILL.md", + "guide": "playbooks/measurement/dense-performance-evidence/SKILL.md", + "guide_sha256": "8fc261fce4be42ef66b3f98cf35bf3b5f8ee6f622494083ddb343f2645d6bf15", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": { + "in_directory": false, + "owner": "casebooks", + "path": "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "sha256": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27" + }, + "../../../workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md", + "sha256": "38587678a96581f5c2dc697d982127343565504bffa191352811dffcc165aa23" + }, + "../../../workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md", + "sha256": "41298c6bde3a28f0712fa06a18bbc4ac59aea6d17cc9eb1318744f4121e3bab6" + }, + "../performance-ceiling-analysis/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f" + } + }, + "required_count": 3, + "required_resources": { + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27", + "playbooks/measurement/dense-performance-evidence/SKILL.md": "8fc261fce4be42ef66b3f98cf35bf3b5f8ee6f622494083ddb343f2645d6bf15" + }, + "resource_set": "9773f1a77a5334863481ca704ab878cc4029a3ace289696d01be4411d8aba077", + "revision": "sha256:4a5cea1fc88bfd0a92302db79f668bc0bcb032ebe2e353beee3969715e24e533", + "status": "partial" + }, + "checkout:evaluate-elastic-serving-placement": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md" + }, + "card_bytes": 7604, + "card_sha256": "51dedde73c20db6bced01eefac42cca988e2bb9ee446050116f893a75696f487", + "dependencies": {}, + "entry_sha256": "8668e20cea75717fe536cd310b40b5cc1b94e0a25ad097675d3bdaae7c7d8886", + "entry_source": "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md", + "entrypoint": "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md", + "guide": "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md", + "guide_sha256": "8668e20cea75717fe536cd310b40b5cc1b94e0a25ad097675d3bdaae7c7d8886", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/source-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/evaluate-elastic-serving-placement/references/source-notes.md", + "sha256": "ea416831fd7d0874e06d0a76fb0c7196df53072b717673a0cdf635db6bfd917b" + } + }, + "required_count": 2, + "required_resources": { + "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md": "8668e20cea75717fe536cd310b40b5cc1b94e0a25ad097675d3bdaae7c7d8886", + "playbooks/planning/evaluate-elastic-serving-placement/references/source-notes.md": "ea416831fd7d0874e06d0a76fb0c7196df53072b717673a0cdf635db6bfd917b" + }, + "resource_set": "32c7d7315d5479661fb837b9b240862d3ad64b0790974d10e2bd49f11694fd23", + "revision": "sha256:0e10a38dbb353e98116d3478e59899c4b8fc0aa9fc19a823c2176bf4932c9d73", + "status": "partial" + }, + "checkout:inference-benchmark-design": { + "atom": { + "kind": "skill", + "resource": "playbooks/measurement/inference-benchmark-design/SKILL.md" + }, + "card_bytes": 46351, + "card_sha256": "be880ff7cdacdeb37edd6c9afe230797a31ea07090525227ac14d1f9735043d3", + "dependencies": { + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json": "sha256:4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": "sha256:e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27", + "systems/engines/deepinfer/budget-speculative-verification/SKILL.md": "sha256:6e0dfacc7aa59b383761798656fd52e99b66fc7794c65dc3fc4f1c180b73072c", + "systems/engines/vllm-rlt/audit-recurrent-kv-finalization/SKILL.md": "sha256:fb59f58e1c1ee9490f9c933b9c5ac7788bff367511e6f947c96f53939fc8f521" + }, + "entry_sha256": "d2a78d46556eb49eb711e0ae842ddf248dd00966a3837489d7762f6a2abff641", + "entry_source": "playbooks/measurement/inference-benchmark-design/SKILL.md", + "entrypoint": "playbooks/measurement/inference-benchmark-design/SKILL.md", + "guide": "playbooks/measurement/inference-benchmark-design/SKILL.md", + "guide_sha256": "d2a78d46556eb49eb711e0ae842ddf248dd00966a3837489d7762f6a2abff641", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": { + "in_directory": false, + "owner": "casebooks", + "path": "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md", + "sha256": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27" + }, + "../performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/procedure.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/procedure.md", + "sha256": "ce036a4d8a0908da204515c47e2ff9623548d09de264fa65bd58fedce52a78a0" + }, + "../performance-ceiling-analysis/references/papers-20261015/references/inferencebench.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/inferencebench.md", + "sha256": "21f47111197a0b7f8d6384ea918d139dc8318a62ca3313ce060048271f50b639" + }, + "references/autotunebench-trial-validity.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/autotunebench-trial-validity.md", + "sha256": "cb3a7a5d94d056f868af07f92a16a6fef31eafd3199ed07ae79e93798e320b1d" + }, + "references/benchmark-commands.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/benchmark-commands.md", + "sha256": "0898424e0bff3a6246e1eeeda6abd6c5bd974c047fe32f3bbd5ab9d31ce17cd3" + }, + "references/cache-aware-asr-stream-boundaries.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/cache-aware-asr-stream-boundaries.md", + "sha256": "4e0ea9c1bf6b096a49a91ad5266e90b8a456f4f5aca15eba8ac270a53c2309b5" + }, + "references/dependency-aware-tts-playout.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/dependency-aware-tts-playout.md", + "sha256": "e94866e718adc3bd7e272a4856e9a90b6f27cbc0ff3a44101e68e6995ed79e2c" + }, + "references/embodied-cpp-boundary-and-quality.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/embodied-cpp-boundary-and-quality.md", + "sha256": "0bc3ca87159cce960c7b32f62b82c275f850b98077ae07da0481bd554a3cd71d" + }, + "references/gpu-measurement-validity.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/gpu-measurement-validity.md", + "sha256": "af8808e4ffab71eb285750630f76a54f910b98ae62367c03808d9f9716c071a1" + }, + "references/justgoal-evaluation-contracts.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/justgoal-evaluation-contracts.md", + "sha256": "d25df795fd301e8a1bb436e5f8122d0bac2441c43104e59a3b310fd5a64f2f3e" + }, + "references/ninfer-state-and-completion-contracts.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/ninfer-state-and-completion-contracts.md", + "sha256": "3be946daf69d0b56f4fa56ccbc301dacb076473169f4921376a100dc64b57caf" + }, + "references/task-benchmark-selection.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/task-benchmark-selection.md", + "sha256": "9866457c245ca9f351e8c0f3688dda688ebb1a08c25a1e9665ff1a3bbde12007" + }, + "references/xeforge-trial-evidence.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/references/xeforge-trial-evidence.md", + "sha256": "802c4dfe83983cbd6740231d5d0e2b459792b685de8dfbefb6dc51a912e23604" + } + }, + "required_count": 21, + "required_resources": { + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.json": "4f8544292b2cc3391f4d4d75994cb81fdd295eff99e55b7e60374c6c122de09e", + "casebooks/inference/inference-optimization-casebook/cases/admission-drain-occupancy.md": "e88bbac5d253a8e7e3a3d5e21047f23f2970c11ac23887d4303ab94fca52dd27", + "playbooks/measurement/inference-benchmark-design/SKILL.md": "d2a78d46556eb49eb711e0ae842ddf248dd00966a3837489d7762f6a2abff641", + "playbooks/measurement/inference-benchmark-design/references/autotunebench-source.json": "bc343ece2bf40c4e8aa4bd8d84f32465d00633255557feda5fe7799ce24e8688", + "playbooks/measurement/inference-benchmark-design/references/autotunebench-trial-validity.md": "cb3a7a5d94d056f868af07f92a16a6fef31eafd3199ed07ae79e93798e320b1d", + "playbooks/measurement/inference-benchmark-design/references/benchmark-commands.md": "0898424e0bff3a6246e1eeeda6abd6c5bd974c047fe32f3bbd5ab9d31ce17cd3", + "playbooks/measurement/inference-benchmark-design/references/cache-aware-asr-stream-boundaries.md": "4e0ea9c1bf6b096a49a91ad5266e90b8a456f4f5aca15eba8ac270a53c2309b5", + "playbooks/measurement/inference-benchmark-design/references/dependency-aware-tts-playout.md": "e94866e718adc3bd7e272a4856e9a90b6f27cbc0ff3a44101e68e6995ed79e2c", + "playbooks/measurement/inference-benchmark-design/references/embodied-cpp-boundary-and-quality.md": "0bc3ca87159cce960c7b32f62b82c275f850b98077ae07da0481bd554a3cd71d", + "playbooks/measurement/inference-benchmark-design/references/embodied-cpp-source.json": "056985be689554570a9f12b8e228ce71bdca5be940f9a2d7f6e1963e15a48130", + "playbooks/measurement/inference-benchmark-design/references/faster-cosyvoice-source.json": "9efe8918208adddfb9a31d2abed080923a5ae0dfb6332438179af0de66f54e13", + "playbooks/measurement/inference-benchmark-design/references/gpu-measurement-validity.md": "af8808e4ffab71eb285750630f76a54f910b98ae62367c03808d9f9716c071a1", + "playbooks/measurement/inference-benchmark-design/references/justgoal-evaluation-contracts.md": "d25df795fd301e8a1bb436e5f8122d0bac2441c43104e59a3b310fd5a64f2f3e", + "playbooks/measurement/inference-benchmark-design/references/justgoal-source.json": "60f2784384ea1a3b08a2ecafb60207d8e3707247dc7bc177b95b463d81f1cc16", + "playbooks/measurement/inference-benchmark-design/references/ninfer-source.json": "ccda0fc6781e3c4dceb41521ab952445840b4afcc9f5a7d968857f76e8db6272", + "playbooks/measurement/inference-benchmark-design/references/ninfer-state-and-completion-contracts.md": "3be946daf69d0b56f4fa56ccbc301dacb076473169f4921376a100dc64b57caf", + "playbooks/measurement/inference-benchmark-design/references/task-benchmark-selection.md": "9866457c245ca9f351e8c0f3688dda688ebb1a08c25a1e9665ff1a3bbde12007", + "playbooks/measurement/inference-benchmark-design/references/xeforge-source.json": "6c21791b9c8ecbc9645c6deb659bd897e17f70525536ea25e884a62fc5fb6b25", + "playbooks/measurement/inference-benchmark-design/references/xeforge-trial-evidence.md": "802c4dfe83983cbd6740231d5d0e2b459792b685de8dfbefb6dc51a912e23604", + "systems/engines/deepinfer/budget-speculative-verification/SKILL.md": "6e0dfacc7aa59b383761798656fd52e99b66fc7794c65dc3fc4f1c180b73072c", + "systems/engines/vllm-rlt/audit-recurrent-kv-finalization/SKILL.md": "fb59f58e1c1ee9490f9c933b9c5ac7788bff367511e6f947c96f53939fc8f521" + }, + "resource_set": "e7e36d88be5a8a19b6a5247b36df4407d7ab519111eb78c99896ee6b05c09fc9", + "revision": "sha256:a623f2e44fa0904d14baa5c2387061014bff20618a7b966c2d8b0676effac1b3", + "status": "partial" + }, + "checkout:kernel-writing-guide": { + "atom": { + "kind": "skill", + "resource": "playbooks/optimization/kernel-writing-guide/SKILL.md" + }, + "card_bytes": 23742, + "card_sha256": "1c74ea90a8840b80446a78eaa4237ccd74400e1752e4ad25fe284b218ecc82ad", + "dependencies": {}, + "entry_sha256": "c6a4ef16ca5b0daf3b69221788eceafac33709a063a0885cd2e3dff315c81643", + "entry_source": "playbooks/optimization/kernel-writing-guide/SKILL.md", + "entrypoint": "playbooks/optimization/kernel-writing-guide/SKILL.md", + "guide": "playbooks/optimization/kernel-writing-guide/SKILL.md", + "guide_sha256": "c6a4ef16ca5b0daf3b69221788eceafac33709a063a0885cd2e3dff315c81643", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../systems/platforms/cuda/diagnose-attention-bottlenecks/SKILL.md": { + "in_directory": false, + "owner": "systems/platforms", + "path": "systems/platforms/cuda/diagnose-attention-bottlenecks/SKILL.md", + "sha256": "dabb1e8f06875a72dfa78c4d684fb4bf380667d34151dbc1a6355b355a432df9" + }, + "../../../systems/platforms/cuda/diagnose-attention-bottlenecks/references/mechanisms.md": { + "in_directory": false, + "owner": "systems/platforms", + "path": "systems/platforms/cuda/diagnose-attention-bottlenecks/references/mechanisms.md", + "sha256": "fe08b2292fa587be3874774ddf41063b84c579a0085df422ec6710d8aa90b8b7" + }, + "../../../systems/platforms/cuda/diagnose-attention-bottlenecks/references/papers-20261015/cases/overlap-and-fp8-counter-signals.md": { + "in_directory": false, + "owner": "systems/platforms", + "path": "systems/platforms/cuda/diagnose-attention-bottlenecks/references/papers-20261015/cases/overlap-and-fp8-counter-signals.md", + "sha256": "80c8a60a6df55f3d84fab23e03567d8b38e23bcdbd63cc09881e46db1e2888ab" + }, + "cases/causal-conv1d-dispatch-state.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/cases/causal-conv1d-dispatch-state.md", + "sha256": "2eb67dd522021bb2234616d7f660e6ba99acb43676f48cb23141bc69bf3e0029" + }, + "cases/hf-qwen35-gdn-binding.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/cases/hf-qwen35-gdn-binding.md", + "sha256": "b3a55af3f45f01c48e1cb18c8b029e5949a494c3e51dc444a5cccbad9acbba0a" + }, + "cases/sglang-gdn-source-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.md", + "sha256": "8b093faf0ab775d5605ecdd9653fb3689c2b839cba2641c5d5cda17c721bb2ac" + }, + "cases/vllm-gdn-source-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.md", + "sha256": "7f9ebe8de7e55d3db2a119b6a56e15c37448fd7d4e022a47122a143206d31687" + }, + "references/akg-affine-tail-guards.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/references/akg-affine-tail-guards.md", + "sha256": "113deb2db10b171db3425bb3f1792bee763706b794c8cc2e222b4cc0d0114118" + }, + "references/causal-conv1d-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/references/causal-conv1d-contract.md", + "sha256": "b3a6245cf5e9deeba0dffd4a15ddcf97da6a4315f4d3131921779438832663ad" + }, + "references/hf-qwen35-gdn-binding.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/references/hf-qwen35-gdn-binding.md", + "sha256": "848d3c99b47ef711e8820bbc4f6bcbd1db7211197811c9d855201025448d806b" + }, + "references/sglang-gdn-causal-conv-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/references/sglang-gdn-causal-conv-contract.md", + "sha256": "c9f27b0231ddec3d14d6fa0831d1494ffd8e11bd8ad704e04be3bc4a4ffc0e58" + }, + "references/sglang-gdn-causal-conv-contract.md#map-the-inspected-hf-workers-to-vllm-and-sglang": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/references/sglang-gdn-causal-conv-contract.md", + "sha256": "c9f27b0231ddec3d14d6fa0831d1494ffd8e11bd8ad704e04be3bc4a4ffc0e58" + }, + "references/vllm-gdn-causal-conv-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/kernel-writing-guide/references/vllm-gdn-causal-conv-contract.md", + "sha256": "eec09a6e95983c46b67d5f066d34419c17819899f5d8e3c65f2f163f2ada0fde" + } + }, + "required_count": 17, + "required_resources": { + "playbooks/optimization/kernel-writing-guide/SKILL.md": "c6a4ef16ca5b0daf3b69221788eceafac33709a063a0885cd2e3dff315c81643", + "playbooks/optimization/kernel-writing-guide/cases/causal-conv1d-dispatch-state.md": "2eb67dd522021bb2234616d7f660e6ba99acb43676f48cb23141bc69bf3e0029", + "playbooks/optimization/kernel-writing-guide/cases/hf-qwen35-gdn-binding.md": "b3a55af3f45f01c48e1cb18c8b029e5949a494c3e51dc444a5cccbad9acbba0a", + "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.json": "5237ac437eb76e910bb1d08bfcc364b87dea1b947de5e67eebce511ea1ef1d23", + "playbooks/optimization/kernel-writing-guide/cases/sglang-gdn-source-contract.md": "8b093faf0ab775d5605ecdd9653fb3689c2b839cba2641c5d5cda17c721bb2ac", + "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-causal-conv-contract.md": "2f3dcee66e2dfe7a98bee21a36b892538998de5de3caf1bc63257137f9984236", + "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.json": "31cfac1e780113c8233b451af7a7562af983aa2f4209938017cc67347ee5dd66", + "playbooks/optimization/kernel-writing-guide/cases/vllm-gdn-source-contract.md": "7f9ebe8de7e55d3db2a119b6a56e15c37448fd7d4e022a47122a143206d31687", + "playbooks/optimization/kernel-writing-guide/references/akg-affine-tail-guards.md": "113deb2db10b171db3425bb3f1792bee763706b794c8cc2e222b4cc0d0114118", + "playbooks/optimization/kernel-writing-guide/references/causal-conv1d-contract.md": "b3a6245cf5e9deeba0dffd4a15ddcf97da6a4315f4d3131921779438832663ad", + "playbooks/optimization/kernel-writing-guide/references/hf-qwen35-gdn-binding.md": "848d3c99b47ef711e8820bbc4f6bcbd1db7211197811c9d855201025448d806b", + "playbooks/optimization/kernel-writing-guide/references/hf-qwen35-gdn-source.json": "df3f4650b5cf92d4fd3d5a4cc8aefb91dd4b0c2affaa0c873138d5651c50e6bd", + "playbooks/optimization/kernel-writing-guide/references/licenses/sglang-LICENSE.md": "1495e1e757ef4d0925a2350563cf5754bb23c51701a8ec4fb3c5cdcbedae6747", + "playbooks/optimization/kernel-writing-guide/references/pplx-gdn-caller-context.json": "0219fc9ad785da4e638c1680bc9eaf28672aa32313824f52bdcaed61d29bca87", + "playbooks/optimization/kernel-writing-guide/references/sglang-gdn-causal-conv-contract.md": "c9f27b0231ddec3d14d6fa0831d1494ffd8e11bd8ad704e04be3bc4a4ffc0e58", + "playbooks/optimization/kernel-writing-guide/references/sglang-gdn-source-files.json": "4c7ec2cfd2c29297e185ce09b4d9b2040fbe3635943c112f9ebb71dca8ab381b", + "playbooks/optimization/kernel-writing-guide/references/vllm-gdn-causal-conv-contract.md": "eec09a6e95983c46b67d5f066d34419c17819899f5d8e3c65f2f163f2ada0fde" + }, + "resource_set": "c0e51aeacd422b6cb9aff29fb5a084d84805b802044a97553927f8196684b9ed", + "revision": "sha256:3ac2feac032b7fb661559311b1d44ea26fd20383e764c785a6a6ab661697e94c", + "status": "partial" + }, + "checkout:model-sol-analysis": { + "atom": { + "kind": "skill", + "resource": "playbooks/measurement/model-sol-analysis/SKILL.md" + }, + "card_bytes": 11661, + "card_sha256": "2565d4a42be60a0e4c527b65ad1f6d06e3952f718dd707ce1321935bcae0068c", + "dependencies": {}, + "entry_sha256": "b7a2dc5cc051427b12e195652c20f7ee337326a6954a44f811f8b06d21b63e8a", + "entry_source": "playbooks/measurement/model-sol-analysis/SKILL.md", + "entrypoint": "playbooks/measurement/model-sol-analysis/SKILL.md", + "guide": "playbooks/measurement/model-sol-analysis/SKILL.md", + "guide_sha256": "b7a2dc5cc051427b12e195652c20f7ee337326a6954a44f811f8b06d21b63e8a", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../optimization/weight-loading-optimization/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/optimization/weight-loading-optimization/SKILL.md", + "sha256": "e5be547a1ddac312be09a5d8a8d61645f4de1c8e3f23e432cd297bcef677cc8e" + }, + "../calibrate-serving-simulation/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb" + }, + "../performance-ceiling-analysis/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f" + }, + "../performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md", + "sha256": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e" + }, + "../performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md#which-bound-may-reject-a-measurement-the-two-threshold-rule": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md", + "sha256": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e" + }, + "references/huggingarch-model-sol.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/references/huggingarch-model-sol.md", + "sha256": "79d5f350964a578fea199c1d77b0c767bb73e85e0fefbb4cebb3f8e0e6264504" + }, + "references/huggingarch-source-identity.json": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/references/huggingarch-source-identity.json", + "sha256": "40ef6bd6d0d11e48aea4f2b30fcad11d226c32e869ea7e97fe8431b55c8dc65f" + }, + "references/model-sol-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/references/model-sol-contract.md", + "sha256": "2a5babea1f744f124d3f234c741dae2fb6e5b48b7fd04285e6b3a476c065b34d" + }, + "references/model-sol-example.json": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/references/model-sol-example.json", + "sha256": "557ac952af65c907e5c08f55c3b15f5fd24317308b0b4ed317d4eb9217a02ac8" + }, + "references/qwen38-h200-tp4.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/references/qwen38-h200-tp4.md", + "sha256": "5b310fc546522f71dc882eff4f44df490955735474bc3d165a36e89556059749" + }, + "scripts/model_sol.py": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/scripts/model_sol.py", + "sha256": "e3810ff5afafeded34a59ee3fb64093f5e39448e76bde8afa68c5f8238eba63e" + } + }, + "required_count": 10, + "required_resources": { + "playbooks/measurement/model-sol-analysis/SKILL.md": "b7a2dc5cc051427b12e195652c20f7ee337326a6954a44f811f8b06d21b63e8a", + "playbooks/measurement/model-sol-analysis/references/huggingarch-model-sol.md": "79d5f350964a578fea199c1d77b0c767bb73e85e0fefbb4cebb3f8e0e6264504", + "playbooks/measurement/model-sol-analysis/references/huggingarch-source-identity.json": "40ef6bd6d0d11e48aea4f2b30fcad11d226c32e869ea7e97fe8431b55c8dc65f", + "playbooks/measurement/model-sol-analysis/references/model-sol-contract.md": "2a5babea1f744f124d3f234c741dae2fb6e5b48b7fd04285e6b3a476c065b34d", + "playbooks/measurement/model-sol-analysis/references/model-sol-example.json": "557ac952af65c907e5c08f55c3b15f5fd24317308b0b4ed317d4eb9217a02ac8", + "playbooks/measurement/model-sol-analysis/references/qwen38-h200-tp4.json": "e7a8648c2a9b2dde4dee3f360dd256508fe15ee9867d4a7be3b9f4e889259a6c", + "playbooks/measurement/model-sol-analysis/references/qwen38-h200-tp4.md": "5b310fc546522f71dc882eff4f44df490955735474bc3d165a36e89556059749", + "playbooks/measurement/model-sol-analysis/scripts/model_sol.py": "e3810ff5afafeded34a59ee3fb64093f5e39448e76bde8afa68c5f8238eba63e", + "playbooks/measurement/model-sol-analysis/scripts/qwen38_checkpoint.py": "bc022056cad77941987a4f79647c0890ada808f7f0129522d137f51bcc16b1b7", + "playbooks/measurement/model-sol-analysis/scripts/qwen38_h200_tp4.py": "0265ee13d9ca354745af261b35682b674b8c3f68538a3bf8ceead34b70724f84" + }, + "resource_set": "9135637de4d13da683d3fe311fd5949504b218fbea06549025063c1d0e391fce", + "revision": "sha256:b1e267d257c0b856ac9e990fc057b1adbe0f483783615ff103a717571bba7a52", + "status": "partial" + }, + "checkout:optimization-search-policy": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/optimization-search-policy/SKILL.md" + }, + "card_bytes": 9371, + "card_sha256": "8f2b15d1730b67e0480dd535bc8e9ebd7cca5ff1fa268c4be5a9c47e548a8716", + "dependencies": { + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json": "sha256:a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a", + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md": "sha256:6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json": "sha256:b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md": "sha256:be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json": "sha256:90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md": "sha256:cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738", + "playbooks/measurement/calibrate-serving-simulation/SKILL.md": "sha256:36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb", + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/README.md": "sha256:fe614b1c62f1d4a9db797a85d9b11931ae32169c40109c7b69ecd648fb6e9d1e", + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/source-record.json": "sha256:61fafa5e92ae6312f8792e4630a35c78da4c1810fac4bf9cde385824c3894f36", + "playbooks/measurement/performance-ceiling-analysis/SKILL.md": "sha256:baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "playbooks/planning/assess-serving-preemption/SKILL.md": "sha256:7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570", + "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.json": "sha256:681871983ec4033ef9861ad270bc0d312f9134a76933b8f7ce740659ef1e4dd5", + "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.md": "sha256:2c2a8147001d24d1abc8672f15cf0ca759ae461b734413c8dcb7497634bb6821", + "systems/engines/vllm/audit-vllm-kv-lifetimes/SKILL.md": "sha256:10f7ad0b6c04089fa32e9d08b2e0b45b159659ac0e42de8fb91eb19bfe07bb06", + "systems/engines/vllm/diagnose-vllm-admission-pressure/SKILL.md": "sha256:e0dc4374adaf70324bd21f7a5bde5d7cadd7fd84167bcec5ca5004191b1a5cc3", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md": "sha256:c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + }, + "entry_sha256": "1ad13f1f5dbef1a25810d1f77a3c79c6dbce85683af6796cc9ddd708bfb6c470", + "entry_source": "playbooks/planning/optimization-search-policy/SKILL.md", + "entrypoint": "playbooks/planning/optimization-search-policy/SKILL.md", + "guide": "playbooks/planning/optimization-search-policy/SKILL.md", + "guide_sha256": "1ad13f1f5dbef1a25810d1f77a3c79c6dbce85683af6796cc9ddd708bfb6c470", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md": { + "in_directory": false, + "owner": "casebooks", + "path": "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md", + "sha256": "6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf" + }, + "../../../casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md": { + "in_directory": false, + "owner": "casebooks", + "path": "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md", + "sha256": "be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552" + }, + "../../../casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md": { + "in_directory": false, + "owner": "casebooks", + "path": "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md", + "sha256": "cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738" + }, + "../../../systems/engines/vllm/diagnose-vllm-admission-pressure/SKILL.md": { + "in_directory": false, + "owner": "systems/engines", + "path": "systems/engines/vllm/diagnose-vllm-admission-pressure/SKILL.md", + "sha256": "e0dc4374adaf70324bd21f7a5bde5d7cadd7fd84167bcec5ca5004191b1a5cc3" + }, + "../../../workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md", + "sha256": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + }, + "../../measurement/calibrate-serving-simulation/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb" + }, + "../../measurement/calibrate-serving-simulation/references/infera-serving-search/README.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/README.md", + "sha256": "fe614b1c62f1d4a9db797a85d9b11931ae32169c40109c7b69ecd648fb6e9d1e" + }, + "../../measurement/performance-ceiling-analysis/references/acceptance-criteria.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md", + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + }, + "../../measurement/performance-ceiling-analysis/references/papers-20261015/cases/decision-cases.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/cases/decision-cases.md", + "sha256": "781a675a6533e0a18c044aaaee0d010da7013b6504654b8b8292a35176db801e" + }, + "../../measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/procedure.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/procedure.md", + "sha256": "ce036a4d8a0908da204515c47e2ff9623548d09de264fa65bd58fedce52a78a0" + }, + "../assess-serving-preemption/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/planning/assess-serving-preemption/SKILL.md", + "sha256": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570" + }, + "cases/sarathi-chunk-budget.json": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.json", + "sha256": "681871983ec4033ef9861ad270bc0d312f9134a76933b8f7ce740659ef1e4dd5" + }, + "cases/sarathi-chunk-budget.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.md", + "sha256": "2c2a8147001d24d1abc8672f15cf0ca759ae461b734413c8dcb7497634bb6821" + }, + "references/distserve-phase-placement/README.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/references/distserve-phase-placement/README.md", + "sha256": "56e16efce447dfd4990a024ff1d6f7cb428f8e3e1f7b32a7e4d05f57139b836a" + }, + "references/papers-20261015/MECHANISMS.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/references/papers-20261015/MECHANISMS.md", + "sha256": "18bb2f5d7e52773c516420a142edfb531d0b9c822a2934d60f3234ac1cb9d40e" + }, + "references/papers-20261015/knowledge/adaptation-interfaces.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md", + "sha256": "5e761957cb5ecd93926e6ffc13deee7c830c6e8f0ee3c3846e9dd3b50dc74446" + }, + "references/papers-20261015/references/source-notes.md#f1--rrsi": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/references/papers-20261015/references/source-notes.md", + "sha256": "54d83c3713045d59a48821bcf93598374ba4a630e3891ad39498f919317c4fb8" + } + }, + "required_count": 25, + "required_resources": { + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.json": "a2dc5db8aba62081c5743b12f854e74ae500c53bd57e2486260d0b5ae478638a", + "casebooks/inference/inference-optimization-casebook/cases/drama3-rejected-directions.md": "6f143bc363a3290fc008c08e57cb075f1776d1c8cca8a6a59297d5b1fbbf61bf", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.json": "b2c1808919ae525efb82148a24b465459799422fefc6d420891d7dbeb36cd31a", + "casebooks/inference/inference-optimization-casebook/cases/qwen-ascend-rejected-directions.md": "be396983812262515899a3e2ba4f01b23ff92e1b836881882c7580372b8ae552", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.json": "90e3cdca085e2d122e648aae527bd6a61de6d4fddb66c393ca25ac4541cd9122", + "casebooks/inference/inference-optimization-casebook/cases/qwen-b300-rejected-directions.md": "cce2930f544a0f78f21797fba4d8ded298e4a81f76c34d7977b0e31d361bc738", + "playbooks/measurement/calibrate-serving-simulation/SKILL.md": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb", + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/README.md": "fe614b1c62f1d4a9db797a85d9b11931ae32169c40109c7b69ecd648fb6e9d1e", + "playbooks/measurement/calibrate-serving-simulation/references/infera-serving-search/source-record.json": "61fafa5e92ae6312f8792e4630a35c78da4c1810fac4bf9cde385824c3894f36", + "playbooks/measurement/performance-ceiling-analysis/SKILL.md": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "playbooks/planning/assess-serving-preemption/SKILL.md": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570", + "playbooks/planning/optimization-search-policy/SKILL.md": "1ad13f1f5dbef1a25810d1f77a3c79c6dbce85683af6796cc9ddd708bfb6c470", + "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.json": "681871983ec4033ef9861ad270bc0d312f9134a76933b8f7ce740659ef1e4dd5", + "playbooks/planning/optimization-search-policy/cases/sarathi-chunk-budget.md": "2c2a8147001d24d1abc8672f15cf0ca759ae461b734413c8dcb7497634bb6821", + "playbooks/planning/optimization-search-policy/references/distserve-phase-placement/README.md": "56e16efce447dfd4990a024ff1d6f7cb428f8e3e1f7b32a7e4d05f57139b836a", + "playbooks/planning/optimization-search-policy/references/distserve-phase-placement/source-record.json": "21cc9562f1c19d6b57957c01b53e0adf8700d05ffaaa7764afe07c4da1284de1", + "playbooks/planning/optimization-search-policy/references/papers-20261015/INTEGRATION_NOTES.md": "157e74ba180426b279b548a729769f152bf18f9a78ffca4ebfcaf26b7d0c5292", + "playbooks/planning/optimization-search-policy/references/papers-20261015/MECHANISMS.md": "18bb2f5d7e52773c516420a142edfb531d0b9c822a2934d60f3234ac1cb9d40e", + "playbooks/planning/optimization-search-policy/references/papers-20261015/NEXT_GATE_LEADS.md": "16a264c7159f9c2c700ce8ba46e63f3e636b277c987da4970f6d2fa085fcb053", + "playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md": "5e761957cb5ecd93926e6ffc13deee7c830c6e8f0ee3c3846e9dd3b50dc74446", + "playbooks/planning/optimization-search-policy/references/papers-20261015/references/source-notes.md": "54d83c3713045d59a48821bcf93598374ba4a630e3891ad39498f919317c4fb8", + "playbooks/planning/optimization-search-policy/references/papers-20261015/updates/optimization-search-policy.md": "d3db44fa9a6831b86a02c638b323ed943e69fe256866213f10d68c72d762879e", + "systems/engines/vllm/audit-vllm-kv-lifetimes/SKILL.md": "10f7ad0b6c04089fa32e9d08b2e0b45b159659ac0e42de8fb91eb19bfe07bb06", + "systems/engines/vllm/diagnose-vllm-admission-pressure/SKILL.md": "e0dc4374adaf70324bd21f7a5bde5d7cadd7fd84167bcec5ca5004191b1a5cc3", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + }, + "resource_set": "3a7c0f6fee729ec4c3dbb0e11848857e2a185352d0d8d13e96498efc16928b8b", + "revision": "sha256:b519c49f3f76d8d0e39fedbe0b14bc7f792604291bc3db7470c3a558239ca709", + "status": "partial" + }, + "checkout:performance-ceiling-analysis": { + "atom": { + "kind": "skill", + "resource": "playbooks/measurement/performance-ceiling-analysis/SKILL.md" + }, + "card_bytes": 9794, + "card_sha256": "b39d67dcdd5ab2c89ae196622a9e74c587af78a6f91c1f48fc3f87ce0ee6df1a", + "dependencies": {}, + "entry_sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "entry_source": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "entrypoint": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "guide": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "guide_sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../systems/platforms/cuda/diagnose-attention-bottlenecks/SKILL.md": { + "in_directory": false, + "owner": "systems/platforms", + "path": "systems/platforms/cuda/diagnose-attention-bottlenecks/SKILL.md", + "sha256": "dabb1e8f06875a72dfa78c4d684fb4bf380667d34151dbc1a6355b355a432df9" + }, + "../calibrate-serving-simulation/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb" + }, + "../model-sol-analysis/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/model-sol-analysis/SKILL.md", + "sha256": "b7a2dc5cc051427b12e195652c20f7ee337326a6954a44f811f8b06d21b63e8a" + }, + "references/acceptance-criteria.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md", + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + }, + "references/flexgen-offload-feasibility.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/flexgen-offload-feasibility.md", + "sha256": "5c72ae959c6cc72aa9e96a17a2934d6bfcfb055b25fda3221c99382dc09910d9" + }, + "references/huggingarch-checkpoint-anchor.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md", + "sha256": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e" + }, + "references/huggingarch-checkpoint-anchor.md#which-bound-may-reject-a-measurement-the-two-threshold-rule": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md", + "sha256": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e" + }, + "references/huggingarch-source-identity.json": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-source-identity.json", + "sha256": "c4c000cf25e990d5fedbfaa206c9ee1e48429da50251c0553975ac2ff3efe0b5" + }, + "references/mooncake-prefix-reuse-feasibility.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/mooncake-prefix-reuse-feasibility.md", + "sha256": "6df0843a5fbe7cc6b05e58835b65976db5ce9fff526e9c7ed9a9d70c021c71bc" + }, + "references/papers-20261015/MECHANISMS.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/MECHANISMS.md", + "sha256": "742c249082ceca230326f4407a40130fe624553b796ae5a157a8a4c15a7e1398" + }, + "references/papers-20261015/READSET.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/READSET.md", + "sha256": "66459ce393858b2b2160f1e2973373bfc4b9902a12644631934b4ebe3140296a" + }, + "references/papers-20261015/cases/decision-cases.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/cases/decision-cases.md", + "sha256": "781a675a6533e0a18c044aaaee0d010da7013b6504654b8b8292a35176db801e" + }, + "references/papers-20261015/knowledge/bounds-predictions-and-decisions.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/knowledge/bounds-predictions-and-decisions.md", + "sha256": "5780d6eb5257612ec45deb94f85f334a6ecabf7e466d1678706041f6549bda79" + }, + "references/papers-20261015/redirect-cross-layer-optimization/procedure.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/redirect-cross-layer-optimization/procedure.md", + "sha256": "6593a63fce9c474b515663a560c94b7df048dc5f6e77a95b8e54e4a64cd10a09" + }, + "references/roofline-contract.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/roofline-contract.md", + "sha256": "419ec4bcaec45ac579a133bce083d4f48779f26e664d7a86f720fa65f343b1d1" + }, + "references/xllm-pd-handoff.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/xllm-pd-handoff.md", + "sha256": "66226190ab90cab2057cdd867714725a084396fa9ccaa87efab8b14ca021bd2a" + }, + "scripts/roofline.py": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/scripts/roofline.py", + "sha256": "524de48a6764401695fe1444f1fa3d38f363069b0cd2fba4715a86ca4b28a5d4" + } + }, + "required_count": 26, + "required_resources": { + "playbooks/measurement/performance-ceiling-analysis/SKILL.md": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638", + "playbooks/measurement/performance-ceiling-analysis/references/flexgen-offload-feasibility.md": "5c72ae959c6cc72aa9e96a17a2934d6bfcfb055b25fda3221c99382dc09910d9", + "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e", + "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-source-identity.json": "c4c000cf25e990d5fedbfaa206c9ee1e48429da50251c0553975ac2ff3efe0b5", + "playbooks/measurement/performance-ceiling-analysis/references/mooncake-prefix-reuse-feasibility.md": "6df0843a5fbe7cc6b05e58835b65976db5ce9fff526e9c7ed9a9d70c021c71bc", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/INTEGRATION_NOTES.md": "083e462e0a204dce599362d46712fcfb392d053c5cda56216e22e28d4b8fa0fa", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/MECHANISMS.md": "742c249082ceca230326f4407a40130fe624553b796ae5a157a8a4c15a7e1398", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/README.md": "17b2d1c7c14124d59ac8a0d5ad4200ad2803d991e784a1a98cd97188cc364999", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/READSET.md": "66459ce393858b2b2160f1e2973373bfc4b9902a12644631934b4ebe3140296a", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/STATIC_CHECKS.md": "cb0aa7d148352ebb7b1678fc42a557a099575054716a341dfa25b6a998029064", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/cases/decision-cases.md": "781a675a6533e0a18c044aaaee0d010da7013b6504654b8b8292a35176db801e", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/procedure.md": "ce036a4d8a0908da204515c47e2ff9623548d09de264fa65bd58fedce52a78a0", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/govern-optimization-experiments/references/source-notes.md": "f9a8254e45473ddb2b73e576957b6d3db83c62b99dff1922f4d1e606e569559e", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/knowledge/bounds-predictions-and-decisions.md": "5780d6eb5257612ec45deb94f85f334a6ecabf7e466d1678706041f6549bda79", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/redirect-cross-layer-optimization/procedure.md": "6593a63fce9c474b515663a560c94b7df048dc5f6e77a95b8e54e4a64cd10a09", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/redirect-cross-layer-optimization/references/source-notes.md": "6ff3a7bc31f1172db92aedaf7df1f1aac688bf769227b583a4cd82bfad52da67", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/agentic-kernel.md": "7190573b85f94a4391bb0d887ccbd37a31b3f08bb0531114ad7afd72fe1567a7", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/flashvector.md": "3926369acd88ff3c370bee5718e74dd15f3219c3e4f6311095e30e917bffa4cf", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/inferencebench.md": "21f47111197a0b7f8d6384ea918d139dc8318a62ca3313ce060048271f50b639", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/prior-coverage.md": "35d47ac078591221fcb666219bcd824f9400fc17aafecdc0499d8336f7178238", + "playbooks/measurement/performance-ceiling-analysis/references/papers-20261015/references/vidur.md": "d38602af5219f5feeb49e6cd6bf53d66098c77fad141dae676f1d8a6743cf25d", + "playbooks/measurement/performance-ceiling-analysis/references/roofline-contract.md": "419ec4bcaec45ac579a133bce083d4f48779f26e664d7a86f720fa65f343b1d1", + "playbooks/measurement/performance-ceiling-analysis/references/roofline-example.json": "597cd3205df043cff3ae9d15924c77934e8d8eb300c00c4840f6bb2921f90faf", + "playbooks/measurement/performance-ceiling-analysis/references/xllm-pd-handoff.md": "66226190ab90cab2057cdd867714725a084396fa9ccaa87efab8b14ca021bd2a", + "playbooks/measurement/performance-ceiling-analysis/scripts/roofline.py": "524de48a6764401695fe1444f1fa3d38f363069b0cd2fba4715a86ca4b28a5d4" + }, + "resource_set": "d29da9960f8e6d886e493bf814c5b68ac3556122bbfcf0e5768809b1759cba25", + "revision": "sha256:a9d4b8dff612d5274398a57202fe0907b310675c5106b1333138f6365a42bf19", + "status": "partial" + }, + "checkout:plan-activation-residency": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/plan-activation-residency/SKILL.md" + }, + "card_bytes": 6971, + "card_sha256": "4250834677bcac19bee8537254bccabebf4a7ceb28742a3c231b32aa67a55a7c", + "dependencies": {}, + "entry_sha256": "c1918b60480a34e7cf1a1a431b089f42288f860a7b50f7df1ba0bce2658d3fe0", + "entry_source": "playbooks/planning/plan-activation-residency/SKILL.md", + "entrypoint": "playbooks/planning/plan-activation-residency/SKILL.md", + "guide": "playbooks/planning/plan-activation-residency/SKILL.md", + "guide_sha256": "c1918b60480a34e7cf1a1a431b089f42288f860a7b50f7df1ba0bce2658d3fe0", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/source-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/plan-activation-residency/references/source-notes.md", + "sha256": "5ff52655cfd06fcf970ed2a7d4d4fe1c31115b102af2d41497de0c74848ed2b3" + } + }, + "required_count": 2, + "required_resources": { + "playbooks/planning/plan-activation-residency/SKILL.md": "c1918b60480a34e7cf1a1a431b089f42288f860a7b50f7df1ba0bce2658d3fe0", + "playbooks/planning/plan-activation-residency/references/source-notes.md": "5ff52655cfd06fcf970ed2a7d4d4fe1c31115b102af2d41497de0c74848ed2b3" + }, + "resource_set": "9540d3bacb40e262160e00e5dc618c741e3773968de89a2753de22139fd859fd", + "revision": "sha256:a8551582fdfdb107a2d635e35cd043042d6578512cf301a4940f390385002f17", + "status": "partial" + }, + "checkout:training-input-pipeline": { + "atom": { + "kind": "skill", + "resource": "playbooks/optimization/training-input-pipeline/SKILL.md" + }, + "card_bytes": 7583, + "card_sha256": "2e3deba02831ba402047a0d30828547d9b3574b5b8de409a2b56ae1e1d419694", + "dependencies": {}, + "entry_sha256": "779478e854aa1ffcc453609b1c8c67477154f478dc360f6541c182940f67fd0e", + "entry_source": "playbooks/optimization/training-input-pipeline/SKILL.md", + "entrypoint": "playbooks/optimization/training-input-pipeline/SKILL.md", + "guide": "playbooks/optimization/training-input-pipeline/SKILL.md", + "guide_sha256": "779478e854aa1ffcc453609b1c8c67477154f478dc360f6541c182940f67fd0e", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/sources.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/training-input-pipeline/references/sources.md", + "sha256": "60e0f3e88655d8e1d5eb4797f39ca4370deda01614f265b8d2ea4559d8ac020f" + } + }, + "required_count": 2, + "required_resources": { + "playbooks/optimization/training-input-pipeline/SKILL.md": "779478e854aa1ffcc453609b1c8c67477154f478dc360f6541c182940f67fd0e", + "playbooks/optimization/training-input-pipeline/references/sources.md": "60e0f3e88655d8e1d5eb4797f39ca4370deda01614f265b8d2ea4559d8ac020f" + }, + "resource_set": "3d82a99dbce9350ee7f6355c1db5910c8cb2561ed80db5d74d6772b3e8f0602b", + "revision": "sha256:c4f9ec76f0d0562338b7ac300f88ec44940f9b2166dd605b07940d5bd96ec7b8", + "status": "partial" + }, + "checkout:training-resource-budget": { + "atom": { + "kind": "skill", + "resource": "playbooks/planning/training-resource-budget/SKILL.md" + }, + "card_bytes": 9244, + "card_sha256": "f388169498d8a4feded138926f537a78886af92756d5609b196c156e2959bca2", + "dependencies": {}, + "entry_sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2", + "entry_source": "playbooks/planning/training-resource-budget/SKILL.md", + "entrypoint": "playbooks/planning/training-resource-budget/SKILL.md", + "guide": "playbooks/planning/training-resource-budget/SKILL.md", + "guide_sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../assess-split-backward-schedule/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/planning/assess-split-backward-schedule/SKILL.md", + "sha256": "f777607e0158371f4025efff3fa63e57e1622e2a86ec087cc580f076681e9ac5" + }, + "../choose-parallel-training-plan/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/planning/choose-parallel-training-plan/SKILL.md", + "sha256": "0e56b44e712af224252fdd8061cc9c0dfc2b22c54f010664644ca61c93f4b27f" + }, + "../plan-activation-residency/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/planning/plan-activation-residency/SKILL.md", + "sha256": "c1918b60480a34e7cf1a1a431b089f42288f860a7b50f7df1ba0bce2658d3fe0" + }, + "references/mindspeed-historical.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/mindspeed-historical.md", + "sha256": "ad65c27f278c3d0ca3599a7630c02d3e529477a05b71b7703bd2d75f0d8fdd2c" + }, + "references/mindspeed-source-readset.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md", + "sha256": "4462d69ed6a941a03639c756968be3ce54f947e51f6ca618f4fb1cd43b643b35" + }, + "references/papers-20261015/cases/paper-grounded-cases.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md", + "sha256": "19bd25b1a944adb2351ebc6b1d795150ea033041a44f6cc261e881677812a101" + }, + "references/papers-20261015/knowledge/offload-delta.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md", + "sha256": "f8740fc5c8bbbe5ac13ff1cfec7ca499569d0b46e8cd56cf1f5a44c3a5e72242" + }, + "references/papers-20261015/notes/training-memory-scheduling.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md", + "sha256": "9aa6d3e01452dff95c8a8940ff62ead8c146ce215c9175b78c9f2ef508a7b2de" + }, + "references/papers-20261015/references/source-readset.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md", + "sha256": "2a5c166767f56fa47e7eba7386f1f36da8cb73702e5b5bbe14d6a456ca9ebfae" + }, + "references/sources.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/sources.md", + "sha256": "53d70671a183de4aaa3369f9caf2383a23b6f8a0a7b04464a8d8a639150afc6a" + }, + "references/stas-decision-notes.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/planning/training-resource-budget/references/stas-decision-notes.md", + "sha256": "f1a993e6c4ca9a035a2effcaf5500081f227b0cc56cc885a6b22fda0041fc744" + } + }, + "required_count": 10, + "required_resources": { + "playbooks/planning/training-resource-budget/SKILL.md": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2", + "playbooks/planning/training-resource-budget/references/mindspeed-historical.md": "ad65c27f278c3d0ca3599a7630c02d3e529477a05b71b7703bd2d75f0d8fdd2c", + "playbooks/planning/training-resource-budget/references/mindspeed-source-readset.md": "4462d69ed6a941a03639c756968be3ce54f947e51f6ca618f4fb1cd43b643b35", + "playbooks/planning/training-resource-budget/references/papers-20261015/INTEGRATION_NOTES.md": "c55c6ad2131ef788866411dcc7056f221420ebff30c95c6bc919b09a4818cb73", + "playbooks/planning/training-resource-budget/references/papers-20261015/cases/paper-grounded-cases.md": "19bd25b1a944adb2351ebc6b1d795150ea033041a44f6cc261e881677812a101", + "playbooks/planning/training-resource-budget/references/papers-20261015/knowledge/offload-delta.md": "f8740fc5c8bbbe5ac13ff1cfec7ca499569d0b46e8cd56cf1f5a44c3a5e72242", + "playbooks/planning/training-resource-budget/references/papers-20261015/notes/training-memory-scheduling.md": "9aa6d3e01452dff95c8a8940ff62ead8c146ce215c9175b78c9f2ef508a7b2de", + "playbooks/planning/training-resource-budget/references/papers-20261015/references/source-readset.md": "2a5c166767f56fa47e7eba7386f1f36da8cb73702e5b5bbe14d6a456ca9ebfae", + "playbooks/planning/training-resource-budget/references/sources.md": "53d70671a183de4aaa3369f9caf2383a23b6f8a0a7b04464a8d8a639150afc6a", + "playbooks/planning/training-resource-budget/references/stas-decision-notes.md": "f1a993e6c4ca9a035a2effcaf5500081f227b0cc56cc885a6b22fda0041fc744" + }, + "resource_set": "7edad97a1c917569b96cce2e7cda6ca8c95927fcb267a0151d6c4bae2b498f50", + "revision": "sha256:6518ed8ac0acb6a115f268ad92cb00fbd4dd1facbd75f3637017b87d30edf766", + "status": "partial" + }, + "checkout:video-diffusion-optimization": { + "atom": { + "kind": "skill", + "resource": "playbooks/optimization/video-diffusion-optimization/SKILL.md" + }, + "card_bytes": 2568, + "card_sha256": "dfb44d964b9020512fcd8087d390ece788a93b2f99bef70df5254a5512e58de8", + "dependencies": {}, + "entry_sha256": "6466f46b63f6149e9692fdc344fca5f3af9e1961b59fd48f25b778256089c203", + "entry_source": "playbooks/optimization/video-diffusion-optimization/SKILL.md", + "entrypoint": "playbooks/optimization/video-diffusion-optimization/SKILL.md", + "guide": "playbooks/optimization/video-diffusion-optimization/SKILL.md", + "guide_sha256": "6466f46b63f6149e9692fdc344fca5f3af9e1961b59fd48f25b778256089c203", + "kind": "skill", + "missing_fields": [ + "recommendation", + "validation" + ], + "relative_guide_links": { + "../../../workflows/governance/rsi-evidence/SKILL.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/governance/rsi-evidence/SKILL.md", + "sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a" + }, + "../../measurement/inference-benchmark-design/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/inference-benchmark-design/SKILL.md", + "sha256": "d2a78d46556eb49eb711e0ae842ddf248dd00966a3837489d7762f6a2abff641" + } + }, + "required_count": 3, + "required_resources": { + "playbooks/optimization/video-diffusion-optimization/SKILL.md": "6466f46b63f6149e9692fdc344fca5f3af9e1961b59fd48f25b778256089c203", + "playbooks/optimization/video-diffusion-optimization/assets/campaign.template.json": "1a37f1d136612143ddab8f0cbbf424c80433b4da5312edb18d07c0b9d87ef657", + "playbooks/optimization/video-diffusion-optimization/scripts/evaluate_target.py": "9e84df051e03d567746fd73ae7243efb2f3c5ec806fef824d3c4d42a8eb9704c" + }, + "resource_set": "8211447aa74c65ef81307af09a09bdad415abc299758b441ce21787ed8de048b", + "revision": "sha256:ecab0de13854a7cb554664a4990324da330aa0cd072d38ad86357855d1c571bc", + "status": "partial" + }, + "checkout:weight-loading-optimization": { + "atom": { + "kind": "skill", + "resource": "playbooks/optimization/weight-loading-optimization/SKILL.md" + }, + "card_bytes": 22126, + "card_sha256": "a0d2f6faf51361c8332274f7bb791d19d78351ed409338a9b2718f7bde587d9b", + "dependencies": {}, + "entry_sha256": "e5be547a1ddac312be09a5d8a8d61645f4de1c8e3f23e432cd297bcef677cc8e", + "entry_source": "playbooks/optimization/weight-loading-optimization/SKILL.md", + "entrypoint": "playbooks/optimization/weight-loading-optimization/SKILL.md", + "guide": "playbooks/optimization/weight-loading-optimization/SKILL.md", + "guide_sha256": "e5be547a1ddac312be09a5d8a8d61645f4de1c8e3f23e432cd297bcef677cc8e", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md#choose-the-scope": { + "in_directory": false, + "owner": "systems/engines", + "path": "systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md", + "sha256": "fb53c38204f3eb5fcadaa4870cc8b111bf2f3b92696a0a2dd2d9b41d4a905e88" + }, + "../../measurement/performance-ceiling-analysis/SKILL.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f" + }, + "../../measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/huggingarch-checkpoint-anchor.md", + "sha256": "ca03747be29a93b579849ee361b67632e541218a68310e0f3369868c6a45da7e" + }, + "references/deepseek-expert-cache-oracles.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/weight-loading-optimization/references/deepseek-expert-cache-oracles.md", + "sha256": "5e42c4a01f9ac810663979dee0658c4cbe87060594c16622ae6ec0b854e44b29" + }, + "references/fastsafetensors-transfer-readset.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/weight-loading-optimization/references/fastsafetensors-transfer-readset.md", + "sha256": "5a39f14b102b0cee304541e011aa31e44e6b13527d1bee9987c3f3b66c064d3d" + }, + "references/flare-preparation-boundary.md": { + "in_directory": true, + "owner": "playbooks", + "path": "playbooks/optimization/weight-loading-optimization/references/flare-preparation-boundary.md", + "sha256": "c0d787522451f5b69a6d20b188d573183fa6d67de30f695ea668ca1ab7108929" + } + }, + "required_count": 6, + "required_resources": { + "playbooks/optimization/weight-loading-optimization/SKILL.md": "e5be547a1ddac312be09a5d8a8d61645f4de1c8e3f23e432cd297bcef677cc8e", + "playbooks/optimization/weight-loading-optimization/references/deepseek-expert-cache-oracles.md": "5e42c4a01f9ac810663979dee0658c4cbe87060594c16622ae6ec0b854e44b29", + "playbooks/optimization/weight-loading-optimization/references/deepseek-expert-cache-source.json": "65bf0623616b4f633d8f51b30134798cbf71176716c8a8613209e2fc48ff84bd", + "playbooks/optimization/weight-loading-optimization/references/fastsafetensors-transfer-readset.md": "5a39f14b102b0cee304541e011aa31e44e6b13527d1bee9987c3f3b66c064d3d", + "playbooks/optimization/weight-loading-optimization/references/flare-preparation-boundary.md": "c0d787522451f5b69a6d20b188d573183fa6d67de30f695ea668ca1ab7108929", + "playbooks/optimization/weight-loading-optimization/references/llama-loading-readset.md": "6c640f28ee3f0253a17b81461c865cb9f947367002cb75bf72550c4572d02e97" + }, + "resource_set": "585d9f42b9451ae0e792eafdb3a972e8404c07b7bf7aae1b08db471a57181856", + "revision": "sha256:b95ee5bf364ad8dac5b61af745acb588f591f3cf21c2a79a1c2cb3d59a045dbe", + "status": "partial" + }, + "package:inferrsi.common.skills.assess_serving_preemption": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/assess-serving-preemption/SKILL.md" + }, + "card_bytes": 7923, + "card_sha256": "20be1d85ef226d159b3bb4fb7314cf2e5477c7cdf4b9e45d157567cd929495c7", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "8e9ae5b813351ab419ec8a72772abf575c789f26a26a16f86f09685c834433e5", + "entry_source": "playbooks/planning/assess-serving-preemption/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/assess-serving-preemption/SKILL.md", + "guide_sha256": "7167ef93338f5acdf2eab867372748259bfd7cfc8480ea7ddefe166882e04570", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "1127bd1451149deeda1916112b226781314f03cddd5e37644c5fcd7ecdab49a7", + "revision": "sha256:5f7b8c06d472e5c5710009b39ec6c42ddeebf3e72c3b023e167f6e3ffd399e02", + "status": "partial" + }, + "package:inferrsi.common.skills.assess_split_backward_schedule": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/assess-split-backward-schedule/SKILL.md" + }, + "card_bytes": 7602, + "card_sha256": "0cd8b5ad3ef15730057611fc04e17a618cf9d1daacbaa1e1c384adb6373fec63", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "94b8695fd505b80d1661ee23b7b57b5a8b87776ccb56683aa16a6c0481696dee", + "entry_source": "playbooks/planning/assess-split-backward-schedule/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/assess-split-backward-schedule/SKILL.md", + "guide_sha256": "f777607e0158371f4025efff3fa63e57e1622e2a86ec087cc580f076681e9ac5", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "c8d54440a404d795f7dc6ba83aa448e6b8182c257f54550c613d572b49e04ab8", + "revision": "sha256:55b3e45aeecf2c6a6d4cb043eca4344970245bf080753a03199c08002b5a5382", + "status": "partial" + }, + "package:inferrsi.common.skills.audit_fixed_workload_claim": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/measurement/audit-fixed-workload-claim/SKILL.md" + }, + "card_bytes": 5921, + "card_sha256": "64d52d899e71b41abd3342b5171e7376cbf8b194fe4943712b12249e345de961", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "bb145d21d30b45de21084978652d7d71ddeddebf7a84fff34f5efd71d95c9732", + "entry_source": "playbooks/measurement/audit-fixed-workload-claim/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/measurement/audit-fixed-workload-claim/SKILL.md", + "guide_sha256": "30d5303418fd5748649fa38ffd525a885749ee8d93a02b41b7efc27ae74fb471", + "kind": "knowledge", + "missing_fields": [ + "prerequisites", + "validation" + ], + "required_count": 716, + "resource_set": "c87e31722d7f11ff75e0dc91d8e758e388f8134bb1bb0c55419435a0df6350d2", + "revision": "sha256:b649ce79823f19e4908ad0cd91dd02568b47a458e6766cf3bbb7da3bb7fcdfa1", + "status": "partial" + }, + "package:inferrsi.common.skills.calibrate_serving_simulation": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/measurement/calibrate-serving-simulation/SKILL.md" + }, + "card_bytes": 8156, + "card_sha256": "99d73634e20ceb386ad2bf1e31e4d95b1af94f9ec4ede273335f7fbc6f1be40f", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "eca013e46313777980e2cb49ed61a28fc5e9b63530b7a1beb2f18f506468e511", + "entry_source": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/measurement/calibrate-serving-simulation/SKILL.md", + "guide_sha256": "36c1a9f9723347e77e6076b4efb1e35c5967b21c0fd44eaf003ab176c5786bbb", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "b635753422d5cd6a4e1ce485ca6bb4950ab513d8e6aacfb350bcd479ffc25f8c", + "revision": "sha256:51276f57b6884729328531482d8c5193631bc0cb62d2d5b1411bd78c1e679bc3", + "status": "partial" + }, + "package:inferrsi.common.skills.checkpoint_recovery_consistency": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/checkpoint-recovery-consistency/SKILL.md" + }, + "card_bytes": 7514, + "card_sha256": "b1060484e6eab51279792e73579bf01a4ce275f05d7fdba12e6a334b62c10cbd", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "392aab6fa24d03dd477210f37c7b3a5196179143ba5ae9b84cdb14bee0a2c518", + "entry_source": "playbooks/planning/checkpoint-recovery-consistency/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/checkpoint-recovery-consistency/SKILL.md", + "guide_sha256": "cc53f838da409daff0f85c3d4d3867307c00b4f7822cdc042274bd1aea8a95c1", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "abe3f0b304bcf2b0a1167d5efa4afa2f886ed389b4fe503e55e0a8e842813180", + "revision": "sha256:a332e1554e068b828acd4a881d54f789cfc0d4347fe6c9f7f44279586d35fa59", + "status": "partial" + }, + "package:inferrsi.common.skills.choose_parallel_training_plan": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/choose-parallel-training-plan/SKILL.md" + }, + "card_bytes": 6524, + "card_sha256": "90aff775721927c0184ff35ab49026503e8f3a9c0de864d6181b20b37fafc992", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "513e9dd9d6f621a96d1ec7af1f1d7ba3c9eee9cdc90c5d8a6845adeb1f6233fa", + "entry_source": "playbooks/planning/choose-parallel-training-plan/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/choose-parallel-training-plan/SKILL.md", + "guide_sha256": "0e56b44e712af224252fdd8061cc9c0dfc2b22c54f010664644ca61c93f4b27f", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "d8304f1a6ed5b3fa0216d4364953cc4a41c8e92a2a3f7472ed26caf169fe90fe", + "revision": "sha256:ef6bba558a1dab5fcd173efc53c4b451baaaee2541c53d458b539924e3977661", + "status": "partial" + }, + "package:inferrsi.common.skills.dense_performance_evidence": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/measurement/dense-performance-evidence/SKILL.md" + }, + "card_bytes": 6825, + "card_sha256": "7982d26ad413fb49d2bd9623a58611402361df8f0f80acbc537b0af478c43eea", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "ba319d337acad12d40514902a6cc0fcf351c4c10df728a72ec74675abd6819e3", + "entry_source": "playbooks/measurement/dense-performance-evidence/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/measurement/dense-performance-evidence/SKILL.md", + "guide_sha256": "8fc261fce4be42ef66b3f98cf35bf3b5f8ee6f622494083ddb343f2645d6bf15", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "985b5474229843ccf70ac87920ab86a7559b0017395cbe90603b8f7c8671c513", + "revision": "sha256:a912b676b63d3fc9e9baed31b06ed3c8b13fc29054027e6c41730d6e69af153b", + "status": "partial" + }, + "package:inferrsi.common.skills.evaluate_elastic_serving_placement": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/evaluate-elastic-serving-placement/SKILL.md" + }, + "card_bytes": 7645, + "card_sha256": "b3bac452a0e931aa7f21e5f4e23dd594e1cb76c094ced7a4b3f035f9a9c0bb90", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "077aa447ba343589e3cb2c55197ce72703ab07bb550e4aaef8c8f8330d1e7578", + "entry_source": "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/evaluate-elastic-serving-placement/SKILL.md", + "guide_sha256": "8668e20cea75717fe536cd310b40b5cc1b94e0a25ad097675d3bdaae7c7d8886", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "d9146b6e808a9f4d5c6565080ceb45bb26c0348d181328347e17d8e9f9e37504", + "revision": "sha256:ec902644ba5a97ea4703fda1b505776ff3770c830556bdb1b7d5e49397119ae2", + "status": "partial" + }, + "package:inferrsi.common.skills.inference_benchmark_design": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/measurement/inference-benchmark-design/SKILL.md" + }, + "card_bytes": 46392, + "card_sha256": "73d4838370c6f335ede44b10714f3c28f7bd687d5a49229f10941127cb3804c6", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "260d57f2b007108891091dcc0d4a74f608816439bd7d7881c5a6b56ea24bddb8", + "entry_source": "playbooks/measurement/inference-benchmark-design/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/measurement/inference-benchmark-design/SKILL.md", + "guide_sha256": "d2a78d46556eb49eb711e0ae842ddf248dd00966a3837489d7762f6a2abff641", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "4f412de7089591d91fa4ad09956bbc0e448fba243e06ccc6e85d5d686724d5d9", + "revision": "sha256:9a32b7ab41d3aa2445539436fbcc589407d3c87c0e344a9395f6625e77332b73", + "status": "partial" + }, + "package:inferrsi.common.skills.kernel_writing_guide": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/optimization/kernel-writing-guide/SKILL.md" + }, + "card_bytes": 23783, + "card_sha256": "0dc19c995191c7fb94b33e6e8ec21b10b9dfd8ac196eef65107f2f815bd2c89f", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "39921307c58e317ed9a9f80222833f431bc54bdc30c8e2c34fdc2350d6341398", + "entry_source": "playbooks/optimization/kernel-writing-guide/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/optimization/kernel-writing-guide/SKILL.md", + "guide_sha256": "c6a4ef16ca5b0daf3b69221788eceafac33709a063a0885cd2e3dff315c81643", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "250bd809633aafdefe94400f2f1375727f7a18b07b712ba86860552cd2f15092", + "revision": "sha256:c41905f6908ffb7ae796f61bda9ff2bebc2594dffc7b596ca62edd3a3b43102b", + "status": "partial" + }, + "package:inferrsi.common.skills.model_sol_analysis": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/measurement/model-sol-analysis/SKILL.md" + }, + "card_bytes": 11702, + "card_sha256": "fbe2258d27950f6f7fe656c1cac4e8f60c29087957b7d7cb73c010645956a2f0", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "32c798bb799fb5cb6c08969541d2e93e2886c7aa24921f19b1d8a77563d1f7a4", + "entry_source": "playbooks/measurement/model-sol-analysis/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/measurement/model-sol-analysis/SKILL.md", + "guide_sha256": "b7a2dc5cc051427b12e195652c20f7ee337326a6954a44f811f8b06d21b63e8a", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "4b77a3cc597b607280da93bfb207ca71abf2fca73effc512d4d37eff5e901793", + "revision": "sha256:f69b64958623542b2f7016e3d7c1bf68c07928adacc4112e7e20c5f165139c8f", + "status": "partial" + }, + "package:inferrsi.common.skills.optimization_search_policy": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/optimization-search-policy/SKILL.md" + }, + "card_bytes": 9412, + "card_sha256": "16ac6a8e8fc633eefba98a83d91f80788559766e571342ec0ef68ec1c98fcde4", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "0b9164df876902e554f473010939ff1df98e8c090a1386fa4ebb515396f5f78e", + "entry_source": "playbooks/planning/optimization-search-policy/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/optimization-search-policy/SKILL.md", + "guide_sha256": "1ad13f1f5dbef1a25810d1f77a3c79c6dbce85683af6796cc9ddd708bfb6c470", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "9ea97935c83eb8745b0726e34c533ab20f77949f84a762d6962dbf2f38e526a0", + "revision": "sha256:9ec98cb6a5cadc23cb3b073ac4ffd6ade49f4baeeddc2d68d7a29473458fd51f", + "status": "partial" + }, + "package:inferrsi.common.skills.performance_ceiling_analysis": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/measurement/performance-ceiling-analysis/SKILL.md" + }, + "card_bytes": 9835, + "card_sha256": "baf938c48ac625a1491ea0701d58ba82f4560ef7840af144118ba76af2964012", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "e67e60c120bb5ec97ea4e944e5295a3efd2c06de5149b4ac03cab8c4e639c36a", + "entry_source": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/measurement/performance-ceiling-analysis/SKILL.md", + "guide_sha256": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "d3ffde6307c6eccacbc7cde322c3555c06d7ed14835b177f991f8959f931b859", + "revision": "sha256:2f0948f1679b778099a58f8daf2eaa046a629386514eee027b1944fd7bac4b6a", + "status": "partial" + }, + "package:inferrsi.common.skills.plan_activation_residency": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/plan-activation-residency/SKILL.md" + }, + "card_bytes": 7012, + "card_sha256": "1f8794ad1982d0f69129291ba4e1b14429d7334fcf03b401c60be36789b08cb3", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "fa3cb1a7a1da2ceaa1121e860da5811a6ae332fbe618ee2410699de1ccd99304", + "entry_source": "playbooks/planning/plan-activation-residency/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/plan-activation-residency/SKILL.md", + "guide_sha256": "c1918b60480a34e7cf1a1a431b089f42288f860a7b50f7df1ba0bce2658d3fe0", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "9bdacb8437776599bf4a7766510ec309f9f1f9647499d0a2f371d641720204fa", + "revision": "sha256:b412c5d5d1b18d4717af48f6d9878fc1398207bdbc15a687c43fdea914fa0c77", + "status": "partial" + }, + "package:inferrsi.common.skills.training_input_pipeline": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/optimization/training-input-pipeline/SKILL.md" + }, + "card_bytes": 7624, + "card_sha256": "b88ce592574a6889d5787bd347a68dda5b3bf131278ea6360d06cd96391288d5", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "46ab95ced8eb16fb765fb09c0853e097e4f647b626410460553324816b1d7233", + "entry_source": "playbooks/optimization/training-input-pipeline/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/optimization/training-input-pipeline/SKILL.md", + "guide_sha256": "779478e854aa1ffcc453609b1c8c67477154f478dc360f6541c182940f67fd0e", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "1646892f84bab4cb18c81e85caf9bf3014023e77c17e9837d468964e81205d9c", + "revision": "sha256:e543756dc84b61d4322ae1e000a44217f2ca6ee293ff9623fb8d525ef2ded26a", + "status": "partial" + }, + "package:inferrsi.common.skills.training_resource_budget": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/planning/training-resource-budget/SKILL.md" + }, + "card_bytes": 9285, + "card_sha256": "ebdc5bb9b1c4de418e464e135adde200088f75916192b79a30b9ed604b3acfcb", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "4d980f9a34255e75687ca45068a2ad0768b47a46810fbf0d4c468b08b39a193b", + "entry_source": "playbooks/planning/training-resource-budget/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/planning/training-resource-budget/SKILL.md", + "guide_sha256": "e8adf9d115975844d6c7a1b1809c1cbc2baeabc1318198a777050f159a0fe8e2", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "cef3aadffd109343dd006771a7b5148fa3c6f5ec8abaf488cffca4a8f0384854", + "revision": "sha256:8b34efb6b0ecd8edb46b082022f00c56607fd9187e961b7eec14aa2ae5b28e91", + "status": "partial" + }, + "package:inferrsi.common.skills.video_diffusion_optimization": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/optimization/video-diffusion-optimization/SKILL.md" + }, + "card_bytes": 2609, + "card_sha256": "de2d98e6677ffc14a6472f11a882c958966130d60be0f8e5eeacd969311e5f2f", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "4126a1aeb838214583a2c49aad72736f6b1763098664a074a58a1769d74509da", + "entry_source": "playbooks/optimization/video-diffusion-optimization/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/optimization/video-diffusion-optimization/SKILL.md", + "guide_sha256": "6466f46b63f6149e9692fdc344fca5f3af9e1961b59fd48f25b778256089c203", + "kind": "knowledge", + "missing_fields": [ + "recommendation", + "validation" + ], + "required_count": 716, + "resource_set": "5bd94453400ad3b8724c01d95dd82f85a8b1201c77c05644d9a5dfa0d602bc8c", + "revision": "sha256:5ad701aa7ced6409e06586120ead2b85d72e8b9442f09dd93669b52d2997e2f2", + "status": "partial" + }, + "package:inferrsi.common.skills.weight_loading_optimization": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/playbooks/optimization/weight-loading-optimization/SKILL.md" + }, + "card_bytes": 22167, + "card_sha256": "473302662bb359aa45e52e4b9fdde94c7b96e494550822e5e21cd12560949f7b", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "056f0d266b44ba34b6f3303b32006bf394db5f3758ca74d84834526ebb8aa2f1", + "entry_source": "playbooks/optimization/weight-loading-optimization/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/playbooks/optimization/weight-loading-optimization/SKILL.md", + "guide_sha256": "e5be547a1ddac312be09a5d8a8d61645f4de1c8e3f23e432cd297bcef677cc8e", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "70bc46dae047790ba7c6d8200daa5a4373559527e746aa6712322e6ffe7d6872", + "revision": "sha256:c09493078cf2f52b5d866fcfa6a04f8f2f1ca400c9837051c6c74474a10a5f4d", + "status": "partial" + } + }, + "release": "v0.3.4", + "shared_dependency": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d", + "shared_members": 715, + "source_commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "wheel_sha256": "9a1015f2c1e1347f46d1ca899d2cb8e32c8279a75e88669b9de1a8c8bda5b6c9", + "workflow_navigation_targets": { + "checkout:optimization-search-policy": "playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md", + "checkout:performance-ceiling-analysis": "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md" + } +} diff --git a/tests/fixtures/atomic-reader/record-domain-v0.3.4.json b/tests/fixtures/atomic-reader/record-domain-v0.3.4.json new file mode 100644 index 000000000..01a9300e4 --- /dev/null +++ b/tests/fixtures/atomic-reader/record-domain-v0.3.4.json @@ -0,0 +1,931 @@ +{ + "author_guide_sha256": "dedf76059d40179265453a352aa758ca9fc431153c1d26bb767822655ee2c92f", + "l1_coverage_sha256": "da2854903c7363524579129db66fc0d406b26ca210559bc703e5b31418b155c9", + "records": { + "package:cache_dit.common.diffusion.residual_cache_calibration": { + "l1_card_bytes": 4814, + "l1_card_sha256": "24ae15ad73688d6978afdd4993ed2ed1a1568b26607c887b988388d9e480f1d8", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "bb9509ad0225a91b52bc6787477581d05f0ecd5e44fa59f08f718eea36a2ac45", + "record_sha256": "4444093dd3ccd3665874a11f2528b6b43e7594716f4d9f18247d1ed92be2a211", + "revision": "sha256:165910903a0a93c75bbcfb4973bcfba6c11c6baac889e359bd455d2eafc17062" + }, + "package:deepinfer.common.llm.bounded_windowed_replay": { + "l1_card_bytes": 12759, + "l1_card_sha256": "b4d1b88fc659017b83a00b61b903aed5737287edc9b722dd1dcca91ba8bb3b64", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "43613225e9ccdbd34c0f7e3e0767887b9bbfd0f38b2c21684677d99e31a432f0", + "record_sha256": "1f2f9808f9933d9026770032e71090b291189107a0fbaea485e4af68bd774f52", + "revision": "sha256:26559217e0de990eca3bfe9892314b377a0250c52a3b639780ce05d068950db1" + }, + "package:deepinfer.common.llm.speculative_verification_budget": { + "l1_card_bytes": 11859, + "l1_card_sha256": "ee7dd2a2f22b9785cd6a3a75e2130a7d6129e368405c2239ea67ce5159194d0e", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "a729e1fc00be44e1480a5dc65bbcdd58df8599681df74dbc651a5a49f27e9028", + "record_sha256": "6952b1c2b05d559fbbdea1c3f6a43b77232ded789c2b79c34b30e248db190c48", + "revision": "sha256:0442ffa3ec05329a267b6c8dd1ca39feb75804dd204e2e4b3301c137f8693cbd" + }, + "package:deepinfer.common.llm.zero_overhead_deferred_scheduling": { + "l1_card_bytes": 9486, + "l1_card_sha256": "cebdbe511057fa773bce67fbc9f4131579bd2f99aa9ff4bb371046436cc8ea77", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "ed5426af145f066f6183bd316c4073c46f324f5ee83aa9bd616387c0d0e7149c", + "record_sha256": "ee5ea4858b1e82f88767ac1486017973d98dbf9e58ee565aea3a7ca325a8a256", + "revision": "sha256:7029d6dde8ef502020dd98fb48a489fd7abe8bd2152f5177eb5ad7dbe2f7c700" + }, + "package:diffusers.cuda.diffusion.group_offload_transfer_overlap": { + "l1_card_bytes": 4031, + "l1_card_sha256": "26987ab5b73653af419be2ed2963c7255c6ed543ca033e2e9e8a13835c9b20a0", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "9bec3d912192efa2f2c853d3fb70bdae21a75875630a02294fcd084b18c30414", + "record_sha256": "1ac5a9f1d32ccbc0a2d4f92d96a088c3d0dadf06b11b174815b74c666151261a", + "revision": "sha256:eced8768347646528fe6d4b9afff1f4e9d81a2443a0ef9e79317fc9f3ad67991" + }, + "package:flashattention.cuda.attention.generation_specific_dispatch": { + "l1_card_bytes": 3839, + "l1_card_sha256": "f9c69f793634253488e8d29374415f0124948ebcfe2fef864eb6c13e7f48a207", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "90290d7bc80b1626863e0520c91bb196d93ebfe08190a450e9de59c6505ae8ad", + "record_sha256": "885a743784f3630368532a33cbbfdaffd82ebcce92c6cc97b585b585168c9595", + "revision": "sha256:bb4a82dcec8c3eaaca0671df2310eb488de5ab01b690a35a9995d93388eec64e" + }, + "package:flashinfer.cuda.llm.paged_decode_dispatch": { + "l1_card_bytes": 4548, + "l1_card_sha256": "256e850b05d74cdbf79c025ab1b18f53ea43cd822a6fdf934a51aad794e82bf1", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "0f2986494fcc9b751df71e598fd61caa68e28bc4b0ac401e4cc763bc3f75283b", + "record_sha256": "9a6c8ee6fc41a0efff607c25f9d28c18bb0bb735eb545000200f5be9442d32c6", + "revision": "sha256:4fa5c07a18cc55362d0d3ffe1fd3b1de983663d39f33bd3f1bc2f074e004c16a" + }, + "package:lmdeploy.cuda.llm.kv_quantization_capacity_cost": { + "l1_card_bytes": 4154, + "l1_card_sha256": "48a8402bd7bb510568caf141ff4aa4dc0eceb86a324866d7c1c8af9c7dff46f6", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "873997b38981ccc03ff73e6fb84e96022f293a019843efd8c4aa50f27878ac9a", + "record_sha256": "633f9bae31d07f938a7b3b9a1299a5a66e0ffd75be14ca0b3fe394d7d9b9de65", + "revision": "sha256:bacaefff4a473aff446799c5ef1e0e3552393665d75bfbcd3400b35d5fb46ce5" + }, + "package:mlx.mlx.execution.cross_stream_dependency": { + "l1_card_bytes": 4236, + "l1_card_sha256": "83057ae1264a695c4c69ba2d9f512f719827138e0c558000cd1e037644cf2778", + "l1_required_pointers": [ + "/applicability", + "/attribution", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "f113f4ffade1b63f84c742568a7a1c2446c3be4ab6e432674cccf19b3afed2cd", + "record_sha256": "4f0d4462e07c6cfa9f3ac477e06b45356f49661790c01557a3ff5189a24404b7", + "revision": "sha256:1648fc553dca603920a3da99af6a55254f91a91efc29b1cf8f61306e21b05087" + }, + "package:mlx.mlx.execution.evaluation_completion": { + "l1_card_bytes": 4211, + "l1_card_sha256": "417424ab5139d12bbc6071e1883e88384343ad16704a65c08c85374330697e81", + "l1_required_pointers": [ + "/applicability", + "/attribution", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "905b19439dc967c22e21253bab17180f60d05dd456a2dfe2aeb34da5de51b878", + "record_sha256": "e3c37661b1df6e00e7c4e9e2d9a6634fa4ea2efc4eb59225b035ba702f7a4e09", + "revision": "sha256:f7ba5c3f9e9477cb3963fee2c17b85830fa1e52e7ff1dfef4a90cac93bdb16a1" + }, + "package:mlx.mlx.execution.post_detachment_buffer_lifetime": { + "l1_card_bytes": 4983, + "l1_card_sha256": "0639dc65082ea64e0d6713ac7b888c1030c5c8e50c0bf5d169d9b942947f6239", + "l1_required_pointers": [ + "/applicability", + "/attribution", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "5ab5884303691c795f50985bf9ab49fcce33cc633d73bc740e25af738086c81a", + "record_sha256": "48095c04a834deb1ae2691aeb62b432f16b9486f2100d42e7c08da622dda9f84", + "revision": "sha256:996b2a02f626bbc51677b0aedfc87223dc38a47e118a23ab0ade454a1986e965" + }, + "package:pytorch.cuda.compiler.cudagraph_shapes_and_lifetimes": { + "l1_card_bytes": 4303, + "l1_card_sha256": "812629c41d1541b7fd116681072a8c5281b9d30d77113c69bf675479c1fef143", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "7fef4122ff794967e61f55d02a4a6b558d7e498d9513607f5ca86db6386928a8", + "record_sha256": "61c60c6aab93b0967af91d9edf46c46a341e190c4e01af2bf92a8feda3ae2bb7", + "revision": "sha256:fe1393e5e2eb863f55eaf540ba49def604069c58435a3ac0834e5657e97aa412" + }, + "package:qwen3_tts_engine.ascend.audio.codec_constants_and_state": { + "l1_card_bytes": 5058, + "l1_card_sha256": "36917a227de05f21be18cb2879df26a35f08b8fc726d529dde3f49702180fc44", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "1cecd7905fef5af3ef8952a4d803900a7df91d662ebae34db47cc0dbf352d4e7", + "record_sha256": "c9bd6bf60b6de6366fdad8cfc4beb8146190f9afe887ce7c85781ec12a8a4e6d", + "revision": "sha256:c99b2c6d1cd8e3c89927bce56826e5a7effeaa8fb27487128944254cbf96c8fd" + }, + "package:qwen3_tts_engine.ascend.audio.fixed_customvoice_prompt": { + "l1_card_bytes": 4608, + "l1_card_sha256": "eb2bcb223e9623442f800a81f60871f861c05a454de4a0781472a3c407573ddc", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "ea5e8fdf54cb731b255b73aa0cf47ef53fac103baa2bd5246be45f95d54cb593", + "record_sha256": "0399732d93df869e9945190aec7ce2a2792f6a753aad1e3ae3060908529041a4", + "revision": "sha256:53bb111b87f8389e0dcbe4380dad78620dee2b967bb2debbdbfc165f5721e597" + }, + "package:qwen3_tts_engine.ascend.audio.graph_batching_state_ownership": { + "l1_card_bytes": 4814, + "l1_card_sha256": "7d11b1245ba1ca47c25a3b9a99ec6a7c82919a83e867bb779de095daf4e24f43", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "130741a9f7ac9d366784d6c4dd42860262235caff0c277de1e8a8f8ec933b37f", + "record_sha256": "aa2a6cf33085a0a05b06b53a479f2b7c219dd5f610122029f3451bcd3d692830", + "revision": "sha256:e7493f749905b72523576494d8999a2f23932db69117287805a79159a5ae396f" + }, + "package:sglang.common.llm.parallelism_and_extension": { + "l1_card_bytes": 4171, + "l1_card_sha256": "889bf2766fb2c4f98f8d835057b973349040b09b974da4b232c5850c204f4579", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "cf4d78a32a3464b5d41225bf5df2fc715ab6f38b12838f528293c55422169b90", + "record_sha256": "161ff4942a192515b44333f0941f043885849ed4fcc431c5e967cd7c0ce07928", + "revision": "sha256:3ccac26ab4fcd2013a1f99bc3772c80ba6061bb8da83fdadeeb4298202c4e324" + }, + "package:sglang.common.llm.runtime_radix_hicache": { + "l1_card_bytes": 3980, + "l1_card_sha256": "40c7bbd8c5bafdfcef259a36ac1396fc0f41afe294ce6775b3387e1aaa392eb0", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "92536f18ceba815208e7301a833769aa902b7f9f64999bea5e2ecad86fc9e205", + "record_sha256": "4045136f2fe0d13aeddc6e86bf733e8bb73f37440aba95145e41ab34059db679", + "revision": "sha256:a28d8e2045fb0607050239809310db97d390e2b5c84149d23c6fab5426c423a4" + }, + "package:sglang.common.llm.tuning_and_validation": { + "l1_card_bytes": 4201, + "l1_card_sha256": "d9ea1d89faa8f3a1bf2eb58ecb56a716a20ccfdc2c6e726f3e9b46dbf4136698", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "31f8cfbdc66bb0002e1622f8ec5e2a3a43239b6a59712667fdfd322bd4087eee", + "record_sha256": "9fa2146015290e0937503c2b2481e02e3e8419a62ef477ae780edaa6b1b50fc5", + "revision": "sha256:49de7de1ded880950dfd35f235942825b721d0abb65eac1a2b367937a0e25a25" + }, + "package:sglang.cuda.llm.hierarchical_prefix_cache": { + "l1_card_bytes": 4369, + "l1_card_sha256": "9dd793a2bf7f1a4d06f78b2654d1d8412784e42cefa579f6b37d5055e4707af9", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "b50ca58df28d4343545d07adf0da23f8f181297b30aba7870e5690630e7d7315", + "record_sha256": "642c28a7f57764be6675ab1d45020a4101cb5419b8d57378ce917ca615ca7897", + "revision": "sha256:8ebd9bed5e11a1b85b676cf42fab8b37304b61528e76fc877098e75164c8655e" + }, + "package:sglang_omni.common.audio.serving_and_streaming_quality": { + "l1_card_bytes": 4260, + "l1_card_sha256": "61321dac736c49c05d508cd4027cc32acb8d47f072974d7a0c44070d25c071e8", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "e06b632e61cc6d6ba8ee06cc1d647a8dce75913aa38f3720ca63e9533f22aa87", + "record_sha256": "38cc0272aecb19b4851534c4fd399418592b51d74934b624162f7ec587a451ca", + "revision": "sha256:613795ca66b69562bab9f75ec68b3be7cd614892a36aaea28fa1143f68fa4fda" + }, + "package:sglang_omni.common.omni.extension_lifecycle_validation": { + "l1_card_bytes": 4247, + "l1_card_sha256": "b94f35457729c040bc86daf14905f8ed435d18808e89934162e310db51d40973", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "561346497fe5e6032c22cd5df3930cd2f340aea6a3500e372307b912a688d0ac", + "record_sha256": "ff87990d3c1236d89375aeac944c5eec353eb62bbe6b2a0ccd239187e619bbf4", + "revision": "sha256:cbb8ab90330d6daf80bdaecd6aa4881b3b5eb27cbf1d81e763b02b391a829f87" + }, + "package:sglang_omni.common.omni.pipeline_state_and_transport": { + "l1_card_bytes": 4178, + "l1_card_sha256": "214e38c4d5e0d23a0c51b822a863b99a1cb281269447cd07778dcf962ee8b178", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "f91c05821a0f0db079b5d00a13761e972311c4752c82ea510a49e304a410af71", + "record_sha256": "65c2b54d5870ec657607ff0123413e4a0f0bc691ba23429a4fc2d1727a34219f", + "revision": "sha256:49ccfceb4f353ab1caee3f8741567552b890f25ecfab356ff319e07bc6a19649" + }, + "package:strata.common.llm.architecture_search_space": { + "l1_card_bytes": 4085, + "l1_card_sha256": "a19db88036b390b6a99f38068b63c2400df3426cb3dbd5873b07bd0d49a0dd3d", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "78ae2ba868ca225d2e80a545c684d012aaa34cd780bb18dd7ed1ddb10e94acfb", + "record_sha256": "4c0a0ba1f43200bff5029ac1a0d544918338630f4e6cb96f092ee306fca7be31", + "revision": "sha256:e15672d143a11d34832129394512ff32a40b60e77f8df25aeff4c214ca57be46" + }, + "package:strata.common.llm.controlled_execution_tuning": { + "l1_card_bytes": 4019, + "l1_card_sha256": "07b68da38c298cd078342ebb7b02e945218acac8d57c33f5b44df74f9de5a6b0", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "a234592da3f06892625fedc9d7b81b679696c50b0bcd3c28343a3cb3c5563d3f", + "record_sha256": "27f0f4a198d3ed411a91536e07b93668c8c5467b2943ea79b5dde901fb810e26", + "revision": "sha256:f64dd9d6558b9f3bca58420e729f79b06858dfd8c65d9d4382961fe2ea8b6021" + }, + "package:strata.common.llm.engine_validation_contract": { + "l1_card_bytes": 4118, + "l1_card_sha256": "b8598c9bd922e7612c9432fe0523df260775315a138250a43ee0fc8e5fd2ffa0", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "15b0d2c2f5fd76219a4bc85c04e96c09573f1c4ed6513df8d924bd71de4dabc8", + "record_sha256": "f6671235431665b0977145baba78b7e659d7a1d41eba63189f6b651386a7c61b", + "revision": "sha256:026b9aad8e6f68d6ebabe0d70f8f1bf1da270307d7fa269316c34575037ac3fc" + }, + "package:tensorrt_llm.cuda.llm.prefill_decode_disaggregation": { + "l1_card_bytes": 3615, + "l1_card_sha256": "48eef31389b4e962804e2a8040858a40a19ec2951f5c16bd45363496c63da5d9", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "349856dd98628f94987e014889cd1b15d0e3ae6ab6c576cdde917f28fbafb102", + "record_sha256": "e361614dfc16ad1cecc8816673bfcbcdc4bd1c52dc6f17e7bef0f76f4a1a91a6", + "revision": "sha256:66d49b2d63d7f90eb1bbff7cc3d99169f0d5243e6e26208679bc61106727ed71" + }, + "package:transformers.common.llm.kv_cache_strategy_contracts": { + "l1_card_bytes": 3705, + "l1_card_sha256": "7414b4f72be331232cc5341a227f5abfa953937cd727bc5d84019bd5a7ebe1cd", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "a2df26052112a9f3fc6242b2bd636ab13991442db57e56646168d6c52032d38d", + "record_sha256": "9388c63aed3ecaf4ab39cf54c1c920d20c728043d2ba1e127a728851421bf965", + "revision": "sha256:2a785b3c5573b546904f33a2dad74cffe2c5a524cd1a450255d9ce74d9990e21" + }, + "package:triton.common.kernel.bandwidth_fusion_resource_limits": { + "l1_card_bytes": 3669, + "l1_card_sha256": "02b542c69b6e1ef6a2cffd7ed1c0ef9f9482d2a6aba5cbf9e5d9c99caac1b7cb", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "6e9673d1a600a6ad34820e4325f2a6417f44f0f96d8ed0bcf21466d998f19ee4", + "record_sha256": "de4ac125d056ab21c717c30938d168f3dd19c1c6a9b23fe24c63ec971a8e5b89", + "revision": "sha256:0658fcff916203f3bc370a147fbeccfe51ba55db469babdbd56af0732ab77127" + }, + "package:vllm.common.llm.bounded_serving_measurement": { + "l1_card_bytes": 3953, + "l1_card_sha256": "3b6365021b9b4a3d6a110e29ffac4b28ac329dbb6ae2e4c49160596f91c5af54", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "f9711ecd3baf59f5f2e13fe9435c03c69961f706747220b3b51ca80258187b14", + "record_sha256": "9cc619bdca925b52517ca0d30064988b4a74882157ca1741136c7927b4d198a2", + "revision": "sha256:1733f1f77c782ffb459c4926c02246b209bdb6be7efa7ed0cb95d1b1d33b51e0" + }, + "package:vllm.common.llm.extension_correctness_gates": { + "l1_card_bytes": 4082, + "l1_card_sha256": "b3ade14a40e8075325a74401925f4d877f8ac35091b086b1d7a0436d3fcab623", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "9434c947b8512332db9cece2d7ff5bf1578dc5797194e9c2991361e022d62aca", + "record_sha256": "ad34943da11af2a3e223885fddac2ab44898d34c93cc668b8ec2c58d7c1051cd", + "revision": "sha256:7e2e6f21e1670b9cfcc38a712335b9b52ac6ef686f7d5dbf5405fd540f7ee78e" + }, + "package:vllm.common.llm.runtime_and_kv_ownership": { + "l1_card_bytes": 4020, + "l1_card_sha256": "052292c2319d1bf4d347a86be32ce7cc2e9a226006f34069c82e17bf6be945be", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "fc0a7ebad55f60b6e0459e0fb34cacbf7ac739f1a801c480c80294ef7d2935a3", + "record_sha256": "3b546f5b18c5f2b898e09546090d98731991b3f09edee68c285fb0be3a56c61a", + "revision": "sha256:9c84106ebaaa42a8b55739361c5818aa336dbe6256960f07a08ae53d8baa272f" + }, + "package:vllm_omni.ascend.diffusion.minimax_h3_reference_kv_reuse": { + "l1_card_bytes": 5380, + "l1_card_sha256": "d904e3521c0bb4bb809d03e4d68b717efe8ce019603b72ae2ec73d4f5d9d43b8", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "80b853fc594d387ab48bed04dca245e0a22b8cdaf7c9b853551ab3bafa302e84", + "record_sha256": "b6b30ccbb8ca51ef3f5ce4d1f1438a75a0d9fc56a0ed98684506260034dd5481", + "revision": "sha256:421d7e108cf3558d4e4b1d430721c0ddee0910c4a2984f87ffb6bbd73887cfb0" + }, + "package:vllm_omni.ascend.diffusion.minimax_h3_sp_head_buckets": { + "l1_card_bytes": 4936, + "l1_card_sha256": "4e3b8d8a657771dc303e4574c839ada76d24421b07dd8f21fd317c19042361b7", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "c4d29d1bceb5e2cf86151bf53c9dafb3d83428fb1e9d2a848d852bb8824bf857", + "record_sha256": "13cd264225bfae07ce3cd627ca6c8310f65de4eb5534215de59f82e2f41abce2", + "revision": "sha256:6d08d7501c295ee2612289f1fe3c5bb198c627213b18c459aab488351077a5ad" + }, + "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i": { + "l1_card_bytes": 6626, + "l1_card_sha256": "76aa3e7c6abebcbebd76c263a92a7a86de617812f0cd3da379a1a4efafb74f73", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "ef107d43cc448219eda4d64ab961b61cda6350e20d30d94de1ff7c4ffff7e775", + "record_sha256": "315f37b94e657ee826529f4d3e44e905a921fe8520203180cc90cd723e5fd9ea", + "revision": "sha256:b1740d8dd28f3c2f7ec2e4fbb9233a7ce311f52210fa3c6365bb320ad191e142" + }, + "package:vllm_omni.common.audio.streaming_serving_measurement": { + "l1_card_bytes": 4154, + "l1_card_sha256": "4ea1f320c106b8d9ffcd7a488de4009bc8e849485b1814bd301ab5575a862c4c", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "c0fa74dca995748280ef053eae2159e1557c42a98502e631524b1c6d16000a69", + "record_sha256": "e079bde825b4848f516c546675f7c5bcf9fd820bf00ae03ad984e7c8a4d25e59", + "revision": "sha256:4442be8845a7a7fc18c96896beab80a8d85f27c86783dea0e498bfdbd48ece5a" + }, + "package:vllm_omni.common.diffusion.measurement_and_profiling": { + "l1_card_bytes": 6168, + "l1_card_sha256": "0f121c978c4c76418b38880ff3d74fb60262654304c4967589ce225994867110", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "c8b25583cd160024c7472a20debea34cb6d4bc79714b4bad2953555adc9f794e", + "record_sha256": "85b07238fd216a798ba5ca1954535fc2607a0ded5d806af9c77a82a6b3f691da", + "revision": "sha256:321e798065884868b0809d44faca82b1d69a52e512c250d24c30712fc10e932a" + }, + "package:vllm_omni.common.diffusion.production_integration_gates": { + "l1_card_bytes": 7761, + "l1_card_sha256": "f904b91a2d8f07118494245e9f9342fae0a37bf5015f9c9a9f570de69c108f65", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "649b49ff64d3e9e88bd620027dabf9d126ca69bbe91b448f28e845ecbe1f8e2f", + "record_sha256": "1ec647250770d46579de418a18f27babea60bef5f2243e136e3cbf3477824fa5", + "revision": "sha256:b0d4b1c1e4c6e3d7a3d4951cef56d881c19432c67de04e551dc51b101b3db1ca" + }, + "package:vllm_omni.common.diffusion.step_state_and_output_validation": { + "l1_card_bytes": 6368, + "l1_card_sha256": "658ae7bacf0a3d04f25c20fae324fbe41cc82e6107a21d458f4047671ddf490e", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "f4e1d6bc4afc7a22d6b2de5969da4e675d1e96ff392399fda8c42a0bc8d2db74", + "record_sha256": "642af0c084cb9ed609997ba8ece056fd23691da61fb62a4caa94fe2b6415763d", + "revision": "sha256:a04d4cb489582cb41ffb7a3cea16e19621bb8e01353e09f4472f19f97549e7cf" + }, + "package:vllm_omni.common.diffusion.upstream_review_gates": { + "l1_card_bytes": 9000, + "l1_card_sha256": "fa10178dd35b61730d8e486e9633fbab8925c5a1d46f27d18ddf473a82165261", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "5127709bb85ce31008d19468e1b4fcb5454a71776f69f991841cd9ef7558f9c4", + "record_sha256": "b6ec7b6f9479954ee760f77962012ff6fccd725262da12e7962b964c907395cf", + "revision": "sha256:404222df7782b8230ec2428a9922e64285c3fb7e84c17602d62b351ad3794fa6" + }, + "package:vllm_omni.common.omni.stage_ownership_and_search": { + "l1_card_bytes": 4224, + "l1_card_sha256": "c0de37f6ee58b7207d505a4136b2dc8b9e7383084730262c273ca9a6227dcb46", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 716, + "original_sha256": "1d82d50dfdfa694e9a4207e4da2da935854e1fdd632a0fbe22c076cbaf7c9bcb", + "record_sha256": "1b4b1b676d46210666ac29ec4385a08046a098a422490ee708177ec58640e97b", + "revision": "sha256:574447b987527fdbd515f4aa078f77fd7fa63713e067cf5c69509e042cee0e2c" + }, + "package:vllm_omni.cuda.audio.concurrency_scaling_state_and_overlap": { + "l1_card_bytes": 45016, + "l1_card_sha256": "c9aa70329531f7461347c77281e495648c9cd9764480ff4f8d5df75d5c8db5de", + "l1_required_pointers": [ + "/applicability", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "cb47fabb232db81ed525cbb54371becc7e4a28b2bae9d8492f60dfb6f31563e8", + "record_sha256": "c45c8ff62b9e26421c20a2b28f209ff04b3642d473c7511eee70797caedcf22d", + "revision": "sha256:87cf22c140b5ce1ed04e13ae3d241fe7cf5594735802c119a92fd223442ffb03" + }, + "package:vllm_omni.cuda.diffusion.minimax_h3_adaln_schedule_cache": { + "l1_card_bytes": 5701, + "l1_card_sha256": "9a1682adaa8cfc3940544ee44789d8124ebb1bf6000287e2d2c4af6fe23435be", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "ddbba3bb72b5789938595a82d3280e861f75f6ed54f05a1d2b7dcb1089d30f63", + "record_sha256": "d7945c707260064616c27701709d37763acf0a955dea9ebe6934f2070ff03930", + "revision": "sha256:e3ab584ee89965e82f2105d827417161493710fb37517bb294c34ed55e64f689" + }, + "package:vllm_omni.cuda.diffusion.minimax_h3_cuda_mxfp8": { + "l1_card_bytes": 5957, + "l1_card_sha256": "348fd98579f97d18d41ce21c1ad72320b03fda2e19ca06bfdd71fa6320273ada", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "e4c538f03f4ab90a4acc8e3d8721bbd226aec1ee9bde45757a7c27d3d970821d", + "record_sha256": "e302ee175148934c04e4715e75c6cb5f7c146bd7488c6325a3a5ebf3b8d4d928", + "revision": "sha256:913da39946ec2b2aa6902b96e102b69e965a5de2c354506ef0e4904ea9aa31e0" + }, + "package:vllm_omni.cuda.diffusion.minimax_h3_fp32_modulation": { + "l1_card_bytes": 4652, + "l1_card_sha256": "afd8fc40bad8b070b835d816ad2808a04b970d76e31f95836d43c397e629570f", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "abb8d94a1b025f0e2c8e085275e96ee85d68aeb27cb12d0918e4647f8255b693", + "record_sha256": "2a7203ede3bbc6cb9cd9290e777a1c46f8262913cbafe8aaa3527487b5bf75c8", + "revision": "sha256:7b10c6c462badf699bd50d69012bf83aebc68df8175f0fc219bdbc6f7515bd6e" + }, + "package:vllm_omni.cuda.diffusion.minimax_h3_qk_norm_rope": { + "l1_card_bytes": 4918, + "l1_card_sha256": "fd9e7a9f6fd6e1276c7ac62787fb5f92460c7c8acc782a51770c8008878263bb", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "4c1c4acfb9cc0baa90bc28fed1903020ea1ea38755b84315711795db45e48bb6", + "record_sha256": "7277cd148f6aced8995adfe829396641963e31cd7d9e0d36a67b64897a1f21ab", + "revision": "sha256:e0e99dcc6ae672cd7ddb51039fa59152bf59ae5a33f385121bcde2b6335ffa70" + }, + "package:vllm_omni.cuda.diffusion.minimax_h3_ref2va_teacache": { + "l1_card_bytes": 5136, + "l1_card_sha256": "c9f4b57644020b12b251f4a87ab85d7116e35d34f3778de8f805c84a8fa1581f", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "8aeb3f99ac4227cf8b3a5cece13d938b19082e265a557eddae27b7e495bcc22e", + "record_sha256": "fcf03be06b186a7cfe1cbae417b6c3821a87fd1f2f0972f7766f8ffd98f0cca9", + "revision": "sha256:1aa834970e1ae7eed3d3e1bb2b28e779b69f744ded07fac56a47ee187db3b219" + }, + "package:vllm_omni.cuda.diffusion.minimax_h3_vae_stacked_tiling": { + "l1_card_bytes": 4686, + "l1_card_sha256": "c75618ea5e08977b1d073c23116dd934919d34653ec41ee6f72bd3a17a2ada35", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "8cc18eacbbfd8fc4d3a6b4152c4b584d559fc9b15377da56ef072e542d807c93", + "record_sha256": "9b7c18c7228e9ae5ff86bd139bf30c01111bf1543b6817617a707df513850bac", + "revision": "sha256:67b960532bb60b39a4e3a35c9c6f9a58744df09cb460502798e0b29d0d6799ac" + }, + "package:xdit.cuda.diffusion.parallelism_freshness_and_topology": { + "l1_card_bytes": 4034, + "l1_card_sha256": "81b7713781db4d32a36757c211e7922aae7b8a76ed7113a5603abea6cdbb6def", + "l1_required_pointers": [ + "/applicability", + "/claims", + "/downstream_impact", + "/limitations", + "/recommendations", + "/sources", + "/status", + "/summary", + "/validation_plan", + "/verification" + ], + "old_required_count": 1, + "original_sha256": "3674b5916cb7b384951bf3e449b6796b161878daabcc1d7e7f6d6f8ff861cc17", + "record_sha256": "abb9f66904ddd2ab60fcecbaf2b11ce150f2255ec1e5b9e219e67eca9179bfa4", + "revision": "sha256:02268232dc6a61195d2cead7201aa7ade44665c440abc2468e50577a7a558df9" + } + }, + "release": "v0.3.4", + "release_commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "release_record_files_sha256": "fcffbb16a60632e3dadfd0f5d9b41666aa0f40543a5e4a22035c5d82cf52c16d", + "shared_dependency_sha256": "502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d", + "shared_resource_count": 715, + "wheel_sha256": "9a1015f2c1e1347f46d1ca899d2cb8e32c8279a75e88669b9de1a8c8bda5b6c9" +} diff --git a/tests/fixtures/atomic-reader/record-sources-v0.3.4.zip b/tests/fixtures/atomic-reader/record-sources-v0.3.4.zip new file mode 100644 index 000000000..531499d9d Binary files /dev/null and b/tests/fixtures/atomic-reader/record-sources-v0.3.4.zip differ diff --git a/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/SKILL.md b/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/SKILL.md new file mode 100644 index 000000000..48542c287 --- /dev/null +++ b/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/SKILL.md @@ -0,0 +1,605 @@ +--- +name: performance-ceiling-analysis +description: 'Estimate optimization headroom before modifying an inference system. Produces a three-level ceiling model (analytical, empirical component, end-to-end) and a prioritized measurement plan. Use to formulate acceptance targets when the user has not supplied them, assess a requested speedup, or identify the binding bottleneck. + + ' +metadata: + inferrsi: | + { + "schema_version": 1, + "status": "candidate", + "sources": [ + { + "url": "https://github.com/NVIDIA/TensorRT-LLM", + "commit": "f33e0e5fd55b", + "paths": [ + ".claude/skills/perf-analysis/SKILL.md", + ".claude/skills/perf-nsight-compute-analysis/references/roofline-analysis.md", + ".claude/skills/perf-workload-profiling/SKILL.md", + ".claude/skills/perf-optimization/SKILL.md", + ".claude/skills/perf-optimization-casebook/SKILL.md", + ".claude/skills/exec-env-check/SKILL.md", + ".claude/skills/exec-remote-slurm/SKILL.md", + ".claude/agents/perf-profiling-specialist.md" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/hahnyuan/LLM-Viewer", + "commit": "1893e4b5705d", + "paths": [ + "roofline_model.py", + "model_analyzer.py", + "hardwares/hardware_params.py", + "configs/DiT.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "url": "https://github.com/ebugger/Empirical-Roofline-Toolkit", + "commit": "0771fa9621d0", + "paths": [ + "Empirical_Roofline_Tool-1.1.0/README.md", + "Empirical_Roofline_Tool-1.1.0/Drivers/driver1.c", + "Empirical_Roofline_Tool-1.1.0/Kernels/kernel1.c", + "Empirical_Roofline_Tool-1.1.0/Scripts/roofline.py" + ], + "type": "git", + "revision_precision": "prefix" + }, + { + "type": "paper", + "id": "usenix:fast25-qin", + "version": "FAST '25 proceedings, February 25-27, 2025, pp. 155-170", + "url": "https://www.usenix.org/system/files/fast25-qin.pdf", + "content_sha256": "543e56c541523c5e807d2231370f96749b2294bc901266397a7265b18ae2c130", + "sections": [ + "2.2, Table 1, Equations 1-2", + "3.1 and 5.3 (storage-scope limits only)" + ], + "readset": "references/mooncake-prefix-reuse-feasibility.md", + "license": "UNKNOWN" + }, + { + "type": "paper", + "id": "pmlr-v202-sheng23a", + "version": "ICML 2023 official ten-author edition, PMLR 202:31094-31116", + "url": "https://proceedings.mlr.press/v202/sheng23a/sheng23a.pdf", + "content_sha256": "7cd9673c37640011d38ef4b8595f5e1e09a85b1f803a3734f19c97ca66c75b9e", + "sections": [ + "1 and 3; 4.1-4.3, Figures 1-3, Algorithm 1, Equation 1", + "4.4 (scope boundary only); 6 and 6.1, Tables 2-3 (denominators and ablations)", + "Appendix A.3 selected cost/peak-memory formulas, PDF pages 15-17; A.2 ending only (theorem boundary)" + ], + "readset": "references/flexgen-offload-feasibility.md", + "license": "CC-BY-4.0" + }, + { + "type": "git", + "url": "https://github.com/shenh10/HuggingArch", + "commit": "facbbbc96856e558b9084a94a5070b2e2c86cf0b", + "paths": [ + "docs/validation.md", + "backend/arch/validate/_matching.py", + "backend/arch/validate/_weight_ledger.py", + "backend/arch/validate/_ablation.py", + "docs/parallelism.md", + "docs/evaluation_model.md", + "docs/measured_calibration.md", + "docs/known_limitations.md", + "kernel_bench/emit.py", + "backend/inference/op_calibration.py", + "backend/measure/scope.py", + "LICENSE" + ], + "readset": "references/huggingarch-checkpoint-anchor.md", + "identity": "references/huggingarch-source-identity.json", + "license": "MIT" + }, + { + "type": "document", + "url": "https://shenhan.cc/blog/huggingarch", + "displayed_publication_date": "2026-10-08", + "accessed": "2026-11-10", + "sha256": "31d0e0a9bbf9e32723fb6ab09179fbefb2fbba1043863f1475ecc7ea7ce24ed4", + "readset": "references/huggingarch-checkpoint-anchor.md", + "scope": "Live, unversioned companion post; sections 2.5, 2.6, 3.6 and 3.7 read from one retrieval, whose HTML bytes the sha256 identifies. Published before the pinned commit, so not attributable to it; figures absent from the repository are recorded as unverified.", + "license": "UNKNOWN" + }, + { + "type": "git", + "url": "https://github.com/xLLM-AI/xllm", + "commit": "90f6f13ea3d94334d4b5bd73d9fb23fc66bef1e4", + "paths": [ + "LICENSE", + "THIRDPARTYNOTICES.md", + "docs/src/content/docs/en/features/disagg_pd.md", + "docs/src/content/docs/en/hardware/ascend_npu.md", + "tests/core/scheduler/pd_scheduler_test.cpp", + "version.txt", + "xllm/core/disaggregation/pd_scheduler.cpp", + "xllm/core/disaggregation/pd_service_impl.cpp", + "xllm/core/scheduler/scheduler_factory.cpp", + "xllm/core/scheduler/scheduler_factory.h", + "xllm/core/scheduler/scheduler_policy.cpp" + ], + "readset": "references/xllm-pd-handoff.md", + "license": "Apache-2.0 with component-specific notices" + } + ], + "verification": { + "locally_verified": false, + "evidence_level": "source_grounded", + "note": "Historical repository methods plus reviewed paper extensions: references/papers-20261015/READSET.md records exact paper versions and inspection scope. Physical/conditional bounds, observed envelopes, simulator predictions and application measurements remain distinct. The bundled pure helper computes supplied L1 counts only; no automatic workload estimation, local accelerator measurements or E2E qualification. references/huggingarch-checkpoint-anchor.md records the checkpoint gates and the two-threshold rule from HuggingArch at a full commit, with per-file digests and inspection scope in references/huggingarch-source-identity.json; per-rank weight bytes are anchored only after the second gate passes." + }, + "applicability": { + "scope": "inference serving systems (LLM, diffusion, audio)", + "hardware": "any; CUDA examples from sources, NPU adaptation required", + "prerequisites": "profiler access (nsys/ncu or NPU equivalent), or willingness to work at L1 analytical only" + }, + "tags": [ + "performance", + "roofline", + "profiling", + "bottleneck", + "inference" + ], + "profile": "local-skill-v1", + "kind": "skill", + "origin": [ + "external" + ], + "empirical_validation": "not_run", + "limitations": [ + "Source-derived candidate; no local efficacy validation.", + "Acceptance-target preparation is agent guidance: the CLI and pure L1 helper do not infer gates, and unsupported estimates cannot replace user criteria or qualify campaign outcomes.", + "Mooncake's prefix-reuse condition is an analytical approximation; current cache validity, placement, effective rates, overlap and SLO outcomes remain unverified.", + "FlexGen's cross-tier feasibility comparison assumes fitted rates and perfect overlap; relaxed placements may OOM, the printed bls wording remains unresolved, and current compatibility, latency and efficacy are unverified.", + "The HuggingArch checkpoint anchor covers stored weights only. KV size and growth, activation traffic, collectives and end-to-end serving performance stay unanchored by it. Per-rank weight bytes stay unanchored until the second gate passes, and that gate checks the declared layout and format, not the placement a framework uses at run time." + ], + "provenance_readsets": [ + "references/flexgen-offload-feasibility.md", + "references/huggingarch-checkpoint-anchor.md", + "references/huggingarch-source-identity.json", + "references/mooncake-prefix-reuse-feasibility.md", + "references/papers-20261015/cases/decision-cases.md", + "references/papers-20261015/govern-optimization-experiments/procedure.md", + "references/papers-20261015/govern-optimization-experiments/references/source-notes.md", + "references/papers-20261015/INTEGRATION_NOTES.md", + "references/papers-20261015/knowledge/bounds-predictions-and-decisions.md", + "references/papers-20261015/MECHANISMS.md", + "references/papers-20261015/README.md", + "references/papers-20261015/READSET.md", + "references/papers-20261015/redirect-cross-layer-optimization/procedure.md", + "references/papers-20261015/redirect-cross-layer-optimization/references/source-notes.md", + "references/papers-20261015/references/agentic-kernel.md", + "references/papers-20261015/references/flashvector.md", + "references/papers-20261015/references/inferencebench.md", + "references/papers-20261015/references/prior-coverage.md", + "references/papers-20261015/references/vidur.md", + "references/papers-20261015/STATIC_CHECKS.md", + "references/xllm-pd-handoff.md" + ], + "consumption_mode": "packaged", + "recommendations": [ + "Use supplied acceptance criteria unchanged. When absent, follow references/acceptance-criteria.md to derive targets from matching baseline, calibrated attainable performance and uncertainty; retain partial requirements and label derived fields.", + "Read the full procedure and linked resources; preserve the distinction between analytical bounds, observed attainable envelopes, predictions and measured application outcomes." + ] + } +--- + +# Performance Ceiling Analysis + +Status: candidate. Procedures have not been evaluated against a real campaign. + +## When to use this skill + +Use this skill before modifying an inference serving system when you need to +answer: *does meaningful headroom exist, where is it, and is a requested +speedup such as 2× plausible?* + +When preparing a task, preserve user-provided acceptance criteria. If none were +supplied, follow [acceptance-criteria preparation](references/acceptance-criteria.md) +to derive and freeze targets from this analysis. Preserve partial requirements, +label derived fields and retain evidence gaps; a theoretical ceiling alone does +not establish an attainable target or a quality tolerance. + +Do not use it to benchmark or compare two already-built candidates — that is +the job of InferRSI's AB/BA harness and `rsi-evidence` skill. + +For whole-model prefill and decode composition, use [model-sol-analysis](../model-sol-analysis/SKILL.md). + +## Evidence to inspect first + +Before profiling, gather what you can analytically: + +1. Model architecture config (layer counts, hidden dims, attention heads, + batch sizes, sequence/frame lengths, codec/VAE structure). +2. Hardware specification: peak FP16/BF16/INT8 FLOP/s, peak memory bandwidth, + L2 size. For NVIDIA B300: INSUFFICIENT_EVIDENCE (no local datasheet values; + must be resolved via vendor documentation or an empirical measurement). +3. Existing benchmark numbers if available: throughput frames/s, TTFA p50/p95, + RTF mean. Label their provenance (author-reported, local measurement, etc.). +4. The checkpoint, whenever L1 prices weight traffic. Of the two gates in + [checkpoint anchoring](references/huggingarch-checkpoint-anchor.md), pass + Gate 1 before reporting any figure derived from weight bytes, and also + Gate 2 before reporting any per-rank or per-degree weight figure: + - **Gate 1, the per-tensor join.** Every tensor in the safetensors headers + must be selected by a name in the analysis, and every non-buffer name must + select a header tensor. Report both residuals. For each name, sum the stored + tensors that share it and compare physical elements with the header; a packed + format counts its container's elements. Only the byte totals, compared after + the join, switch to bytes. They are a checksum: equal totals do not pass a + join with a residual or a mismatch. + - **Gate 2, the per-rank weight ledger.** Gate 1 needs no layout, so passing + it says nothing about per-rank bytes. Before any per-rank or per-degree + weight figure, every stored weight needs a declared placement per stored axis + (replicated, or split on a named parallel world with its part count) and a + format. A degree that does not divide the part count follows a declared + policy: refuse, co-own or pad. Never substitute a divisor that divides. + Gate 2 checks the declared layout and format, not the placement a framework + uses at run time. + + A gate that cannot be judged, such as an unreadable header or a weight with no + placement, counts as failed; the dependent figure is `INSUFFICIENT_EVIDENCE`. + The anchor covers stored weights only. A sliding-window and a global attention + with the same head dimensions have byte-identical weights, so KV size and + growth need their own evidence. + +## Three-level ceiling model + +### L1 — Analytical ceiling + +Requires model config and a hardware table entry. A figure derived from weight +bytes additionally requires the checkpoint to pass Gate 1, the global per-tensor +join, which needs no parallelism layout. A per-rank or per-degree weight figure +also requires Gate 2, the per-rank weight ledger, which needs a declared layout. +Both gates are in item 4 of *Evidence to inspect first*; a gate that cannot be +judged leaves the dependent figure `INSUFFICIENT_EVIDENCE`. + +For supplied single-resource work/traffic counts, the bundled +[pure helper](scripts/roofline.py) implements the arithmetic under an explicit +[input/output contract and synthetic attachment example](references/roofline-contract.md). +It preserves sources and unknowns; it does not collect hardware facts, estimate +model work or establish attainable speedup, goal acceptance or E2E performance. + +For a remotely reusable input prefix, the +[Mooncake source comparison](references/mooncake-prefix-reuse-feasibility.md) +relates KV loading time to saved prefill work. Its paper-specific inequality +screens a candidate; current cache validity, effective rates, exposed costs and +service outcomes still require evidence. + +For disaggregated prefill and decode, the [xLLM handoff procedure](references/xllm-pd-handoff.md) separates prefill work saved through prefix reuse from decode-side reservation and KV transfer. Account for failed restoration before estimating headroom. + +For throughput-oriented offline inference with CPU/disk offload, use the +[FlexGen feasibility comparison](references/flexgen-offload-feasibility.md) to +check joint weights/KV/activation placement, resident plus working-memory peaks, +and exposed transfer/CPU costs against the latency objective. Its fitted, +overlap-dependent prediction is separate from the L1 helper and requires +current resource and execution evidence before a throughput recommendation. + +**FLOPs per forward pass:** + +For a linear projection of shape (batch × seq, in_channels, out_channels): +``` +FLOPs = 2 × batch × seq × in_channels × out_channels +``` +For multi-head attention QK projection + softmax + SV projection: +``` +FLOPs_QK = 2 × batch × heads × seq² × head_dim +FLOPs_SV = 2 × batch × heads × seq² × head_dim +FLOPs_attn ≈ 4 × batch × heads × seq² × head_dim +``` +For a DiT model, the dominant stages are the attention and MLP blocks inside +each transformer layer, plus the VAE encoder/decoder. LLM-Viewer's +`model_analyzer.py` (function `analyze_model`) walks each layer type and sums +FLOPs using these formulas. +Source: `hahnyuan/LLM-Viewer` @ 1893e4b5, `model_analyzer.py`. + +**Memory traffic per forward pass:** + +Traffic = bytes read (weights + KV) + bytes written (activations). For +inference with a frozen model, weight traffic dominates; KV cache traffic +dominates in decode-heavy workloads. Use bytes_per_element = 2 for FP16/BF16, +1 for INT8/FP8. + +**Arithmetic intensity (AI):** +``` +AI = FLOPs / bytes_transferred +``` + +**Roofline bound:** +``` +perf_roof = min(peak_FLOP_s, AI × peak_bandwidth) +ridge_point = peak_FLOP_s / peak_bandwidth # FLOP/byte +``` +If `AI < ridge_point` → memory-bound; if `AI > ridge_point` → compute-bound. + +**Adding a new hardware entry (NPU or B300):** +LLM-Viewer's `hardware_params.py` uses a flat dict keyed by device name. Each +entry requires: +```python +{ + "name": str, # display name + "peak_flops": float, # theoretical peak FLOP/s (FP16 or target dtype) + "memory_bandwidth": float, # peak DRAM bandwidth (bytes/s) + "memory_capacity": float, # total DRAM (bytes); optional +} +``` +All values must be FP16 (or the dtype you measure at). Use vendor datasheet +peaks. For empirically-measured roofs, see L2 below. +Source: `hahnyuan/LLM-Viewer` @ 1893e4b5, `hardwares/hardware_params.py`. + +**DiT vs decoder LLM differences:** +- DiT models process full-frame tokens in every denoising step, not a growing + KV cache. Sequence length is fixed (number of spatial tokens per frame). +- Each denoising step is a full forward pass; the performance measure is + steps/second × frames/step, or directly frames/second. +- The VAE decoder adds a significant one-time cost per output; it must be + included in the E2E breakdown (see L3). +- For an audio model such as fishaudio/drama-3, add vocoder/codec decode cost. +Source: `hahnyuan/LLM-Viewer` @ 1893e4b5, `configs/DiT.py`, `model_params/DiT.py`. + +**Known L1 limitations:** +- L1 uses vendor datasheet peaks as conditional bounds for a stated algorithm, + dtype, memory hierarchy and work/traffic count. No universal achievable + percentage follows; calibrate a workload-specific attainable envelope in L2. +- L1 treats the full model as one roof; it cannot distinguish kernel-level + variation, mixed operation-class throughput or scheduling overhead. Changing + the algorithm can change both work and traffic, so proximity to the old roof + does not rule out improvement. +- L1 never looks at the model again after counting, so a wrong count reaches the + floor unchallenged. The checkpoint gates (item 4 of *Evidence to inspect first*) anchor stored weight + bytes only. KV size and growth, activation traffic, collectives and achieved + rates stay unanchored by them. + +**Measurements against L1.** Reject a measured row only when it contradicts its +own record: its work over its time exceeds the peak it recorded, so its +numerator or its peak is wrong. A row faster than a separately computed L1 floor +is flagged, not rejected; re-derive the count (through the checkpoint gates) and +the peak (at the clock the device actually ran). Any tolerance for the flag +belongs to the acceptance issue. The source rule and its reading are in +[the two-threshold rule](references/huggingarch-checkpoint-anchor.md#which-bound-may-reject-a-measurement-the-two-threshold-rule). + +### L2 — Empirical component ceiling + +Requires hardware access. All values in this section are REMOTE MEASUREMENTS +to be taken; none can be filled in on a machine with no accelerator. + +**What to measure:** + +| Metric | Method | Required | +|--------|--------|---------| +| Empirical peak FLOP/s | ERT-style kernel sweep (see below) | REMOTE | +| Empirical peak memory bandwidth | ERT-style bandwidth kernel sweep | REMOTE | +| Kernel SOL% (Speed of Light) | nsys + ncu (CUDA) or vendor profiler (NPU) | REMOTE | +| SM/CU occupancy | ncu `sm__warps_active` or vendor equivalent | REMOTE | +| L1/L2/DRAM bandwidth per kernel | ncu hierarchical roofline section | REMOTE | +| Host-GPU/CPU-NPU transfer time | profiler timeline | REMOTE | + +**Empirical peak measurement procedure (ERT method):** +The Empirical Roofline Toolkit (ERT) measures peak FLOP/s by running a FMA +loop kernel with variable trial counts; the alpha-update `alpha *= (1 - 1e-8)` +prevents compiler elimination. Peak is the maximum observed across a sweep of +working-set sizes and GFlops configurations. The config file (`Config/`) must +supply: compiler, GPU/NPU API, working set range, number of ERT trials, output +directory. For NPU, the `driver1.c` CUDA kernel must be ported to the vendor +compute API (CANN, Triton-Ascend, etc.); this is an open design decision. +Source: `ebugger/Empirical-Roofline-Toolkit` @ 0771fa9621d0, +`Empirical_Roofline_Tool-1.1.0/Drivers/driver1.c`, +`Empirical_Roofline_Tool-1.1.0/Scripts/roofline.py`. + +**Bottleneck classification from profiler counters (CUDA / Nsight Compute):** + +| Counter / metric | Bottleneck | +|-----------------|-----------| +| Memory SOL% high, Compute SOL% low | memory-bound | +| Compute SOL% high, Memory SOL% low | compute-bound | +| Both SOL% low, many small kernels, high CPU time | launch-overhead | +| Both SOL% low, significant collective operation time | communication-bound | +| Both SOL% low, excessive CPU-GPU sync events | sync-bound | + +SOL% (Speed of Light %) = actual throughput / hardware peak throughput × 100. +Source: `NVIDIA/TensorRT-LLM` @ f33e0e5f, +`.claude/skills/perf-analysis/SKILL.md`, +`.claude/skills/perf-nsight-compute-analysis/references/roofline-analysis.md`. + +### L3 — End-to-end ceiling + +Requires at minimum wall-clock tracing of each stage. + +**Stage breakdown for a diffusion serving system:** + +| Stage | What to measure | Can be estimated? | +|-------|----------------|-------------------| +| Request scheduling | Time from request arrival to first GPU submission | CPU timer | +| Prefill (prompt encode) | Conditional encode time | profiler | +| Denoising steps | Per-step time × num_steps | profiler | +| Attention per step | QKV projection + attention kernel time | profiler | +| MLP per step | Linear projection time | profiler | +| AdaLN/conditioning | Conditioning injection time | profiler | +| VAE decode | VAE decoder latency | profiler | +| Audio/vocoder | Vocoder/codec decode time | profiler | +| Communication (multi-device) | NCCL/HCCL allreduce time | profiler | +| Serialization/transfer | Token/frame encode, network send time | profiler | +| Idle gaps | GPU idle between requests | profiler | + +**Amdahl-style speedup formula:** + +Given per-stage fractions of total time f_i (Σ f_i = 1), and a speedup s_i +achievable on each stage: +``` +S_total = 1 / Σ_i (f_i / s_i) +``` + +Headroom attributed to stage i: +``` +H_i = f_i × (1 - 1/s_i) # fraction of total time recovered if s_i is achieved +``` + +Example (INSUFFICIENT_EVIDENCE — all values are placeholders): +If denoising steps = 70% of time with achievable speedup 1.4×, VAE = 15% with +1.2×, scheduling = 10% at 1.0×, other = 5% at 1.0×: +``` +S = 1 / (0.70/1.4 + 0.15/1.2 + 0.10/1.0 + 0.05/1.0) = 1.26× +``` +Without real profiling, this formula cannot produce a trustworthy number. + +## Escalation rule: L1 → L2 → L3 + +Escalate from L1 to L2 when: +- The L1 roof predicts headroom but you cannot determine whether the system is + memory-bound or compute-bound analytically (AI is near the ridge point). +- You need to confirm that a specific kernel is the bottleneck before + committing to an optimization. + +Escalate from L2 to L3 when: +- Kernel-level L2 measurements show individual kernels near their ceilings + but E2E throughput is still lower than expected (scheduler, communication, + or serialization losses). +- A single stage (e.g. VAE decode) dominates the Amdahl estimate and you need + its real fraction. + +Do not escalate unless the question requires it. L1 alone is often enough to +decide whether a 2× claim is plausible. + +## How to express uncertainty + +Never report a single speedup number without stating: +- Which ceiling level the estimate comes from (L1/L2/L3). +- The evidence basis: source-grounded analysis, author-reported, CPU test, + device measurement, or end-to-end measurement. +- The assumptions (hardware peaks, stage fractions, whether profiler numbers + came from the actual deployment configuration). +- A range: if stage fractions are ±20%, compute the best-case and worst-case + Amdahl speedup explicitly. + +Mark any empirical field as `INSUFFICIENT_EVIDENCE` when no accelerator +measurement exists. Do not interpolate from a different hardware SKU. + +## Measurement plan: drama-3 / B300 case + +This is a plan only. No empirical values exist on the local machine. +All "REMOTE" fields require execution on the target B300 system. + +```yaml +baseline: + model: fishaudio/drama-3 # diffusion audio/speech model + engines: + - vLLM-Omni (revision: TBD, freeze before measurement) + - SGLang-Omni (revision: TBD, freeze before measurement) + hardware: single NVIDIA B300 + concurrency_levels: [1, 2, 4, 8, 16] # to be determined from capacity + +workload: + metrics: + - throughput_frames_per_s + - ttfa_p50_ms + - ttfa_p95_ms + - rtf_mean + repetitions: ≥3 per concurrency level + warmup: required; exclude from statistics + +analytical_roof: + status: INSUFFICIENT_EVIDENCE + blocker: B300 peak FP16 FLOP/s and memory bandwidth not on this machine + action: resolve from NVIDIA B300 datasheet or measure empirically via ERT + +empirical_roof: + status: INSUFFICIENT_EVIDENCE + action: > + REMOTE: run ERT-style FMA kernel sweep on B300; record empirical peak + FLOP/s and peak memory bandwidth; compare to datasheet; record achievable + fraction for this workload, without assuming a universal percentage. + +stage_breakdown: + status: INSUFFICIENT_EVIDENCE + action: > + REMOTE: run nsys to capture full timeline; extract per-stage wall-clock + fractions for denoising, VAE, conditioning, communication, scheduling, + idle. Report as f_i values for Amdahl formula. + +bottlenecks: + status: INSUFFICIENT_EVIDENCE + action: > + REMOTE: run ncu on the denoising kernel and VAE kernel; record SOL%, + arithmetic intensity, bottleneck classification, occupancy. + +headroom: + speedup_range: INSUFFICIENT_EVIDENCE + action: compute Amdahl S_total from measured f_i and achievable s_i + +target_feasibility: + verdict: INSUFFICIENT_EVIDENCE + note: > + A 2× E2E speedup requires either the dominant stage (likely denoising) + to achieve >2× improvement (which implies near-doubling compute or + memory efficiency), or several stages together to contribute. This is + analytically possible but cannot be confirmed without stage fractions. + +recommended_experiments: + - hypothesis: Denoising step is memory-bound; fusing AdaLN conditioning + reduces memory traffic. + evidence: INSUFFICIENT_EVIDENCE (measure AI and SOL% first) + expected_gain: unknown + measurement: REMOTE — ncu AI vs ridge point on denoising kernel + priority: 1 + + - hypothesis: VAE decode fraction is significant; offloading or tiling + reduces peak latency. + evidence: INSUFFICIENT_EVIDENCE (measure VAE fraction of E2E first) + expected_gain: unknown + measurement: REMOTE — nsys stage fraction for VAE decode + priority: 2 + + - hypothesis: Multi-engine scheduling introduces idle gaps at concurrency>1. + evidence: INSUFFICIENT_EVIDENCE + measurement: REMOTE — nsys idle gap analysis at concurrency 4 and 8 + priority: 3 +``` + +## How to decide whether further optimization is worthwhile + +1. Compare the conditional Amdahl headroom with the actual target and measured + uncertainty. Use nonoverlapping exposed-time fractions; a sum of overlapping + kernel durations is not an end-to-end decomposition. +2. Check the dominant stage against operation-specific attainable envelopes. + High utilization can constrain local tuning of the current algorithm while + fusion, materialization removal, work ownership or a different algorithm + changes its work and traffic. No universal SOL% cutoff establishes saturation. +3. Treat low utilization as a question: distinguish work supply, scalar versus + matrix work, dependency stalls, launch overhead and memory movement before + selecting a change. Occupancy, throughput and utilization are different metrics. +4. Keep four evidence types separate: physical/conditional bound, observed + attainable envelope, empirical simulator prediction, and measured application + outcome. A predictor needs a matching calibration domain and held-out load + coverage, especially near capacity; prediction error does not establish a bound. +5. Redirect when the expected removable time cannot exceed locally measured + noise, or when a change exposes a new owner. Preserve a valid incumbent and + verify the final artifact under the application objective and all SLOs. + +### Reviewed paper resources + +The [modeling comparison](references/papers-20261015/MECHANISMS.md), +[exact readset](references/papers-20261015/READSET.md), +[bounds and predictions](references/papers-20261015/knowledge/bounds-predictions-and-decisions.md), +[cross-layer procedure](references/papers-20261015/redirect-cross-layer-optimization/procedure.md) +and [decision cases](references/papers-20261015/cases/decision-cases.md) retain +paper-specific costs, counter-signals and unresolved metric discrepancies. +Use [simulator calibration](../calibrate-serving-simulation/SKILL.md) for a +prediction-based shortlist and [attention diagnosis](../../../systems/platforms/cuda/diagnose-attention-bottlenecks/SKILL.md) +for algorithm/operation-class changes. These remain candidate guidance, not local +performance measurements. The bundled helper only computes explicitly supplied +L1 inputs under the contract above. + +### Reviewed implementation source + +[Checkpoint anchoring](references/huggingarch-checkpoint-anchor.md) distills the +checkpoint gates and the two-threshold rule from HuggingArch's validator and +measured calibration, read at one full commit. The +[source identity record](references/huggingarch-source-identity.json) gives each +file's digests and the part that was read. Claims carry `[code]`, `[doc]`, +`[tree]` or `[blog]` markers with locators. HuggingArch was not run, and no +predicted figure was compared with a measurement. diff --git a/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md b/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md new file mode 100644 index 000000000..9a29ebeda --- /dev/null +++ b/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md @@ -0,0 +1,94 @@ +# Establish acceptance criteria before search + +Use this procedure when preparing an inference-optimization task. The agent +resolves criteria and writes the campaign contract; the CLI does not invoke a +skill or infer thresholds when a flag is omitted. + +## Select the source + +1. Read the user's request and any referenced acceptance issue or frozen plan. + **Use supplied criteria unchanged:** retain metrics, units, timing boundaries, + statistics, workload coverage, thresholds and quality/resource constraints. + An estimate may flag an infeasible target but must not replace or relax it. + Conflicting requests and frozen records need resolution by their authorized + owner; do not choose whichever target is easier to pass. +2. If criteria are absent, use [performance-ceiling-analysis](../SKILL.md) to + formulate workload-specific acceptance criteria before candidate search. + Retain partial requirements: derive only missing performance targets and + measurement details, labelling each derived field separately. An unspecified + primary objective that cannot be resolved from task context is a missing + input, not permission to optimize a different objective. +3. Reuse the target's existing correctness/quality contract and retain baseline + semantics. Hardware ceilings cannot determine quality tolerances, an + application SLO or permission to change precision, steps or useful work. + Resolve missing quality requirements from the task and reference validators; + if still unknown, record the gap rather than invent a tolerance. + +Do not add a confirmation round when the user has already delegated goal +formulation and campaign preparation. Use the existing freeze authority; record +agent-derived targets as such, never as user-supplied or user-confirmed numbers. + +## Derive a target when none was supplied + +1. Establish the model, exact hardware/resources, workload, objective and timing + boundary. Measure a comparable baseline and its variation; keep profiler runs + separate from acceptance timing. Collect only within the authorized budget. +2. Apply the skill's analytical, empirical-component and end-to-end levels as + needed. Preserve sources, scope, assumptions and unknowns. These ceiling + levels are distinct from the repository's L0–L4 validation ladder. A pure L1 + Roofline result is a conditional bound, not an attainable service target. +3. Estimate an attainable range using matching component measurements and + exposed critical-path costs. For a serial latency decomposition with + nonoverlapping fractions `f_i` and supported stage speedups `s_i`, compute + `S = 1 / sum(f_i / s_i)` across the uncertainty range. Include unchanged + stages with `s_i = 1`. Overlap, queueing and bottleneck migration require the + corresponding critical-path/capacity analysis instead of summing durations. +4. Choose a conservative target supported by that attainable range and separated + from measured baseline noise. Explain the selected point and any margin in + terms of calibration evidence and the task budget; no universal fraction of + peak or fixed improvement percentage applies. For baseline latency `T0` and + a justified target speedup `S_target`, the absolute target is + `T0 / S_target`, and the relative reduction is `100 * (1 - 1 / S_target)`. + State whether the contract requires an absolute target, a relative gain or + both. A throughput target needs evidence for its own workload and load regime; + do not infer it by inverting service latency. +5. Define the per-workload combination rule, quality checks, guard metrics, + repetitions/statistics and stopping conditions. If no positive target can be + distinguished from noise, retain the incumbent and identify the next useful + calibration or report insufficient headroom. Do not turn that into PASS. + +Missing inputs required by the selected analysis or acceptance contract remain +`INSUFFICIENT_EVIDENCE` in the analysis and `INCONCLUSIVE` for campaign acceptance. +For example, analytical work/traffic bounds need model counts; a supported +empirical stage estimate need not. Comparable baseline, calibration, uncertainty +and quality coverage are still needed for a derived acceptance target. List the +missing measurements and their bounded cost. +Continue authorized preparation/calibration, but do not freeze a made-up number +or start candidate search under unresolved gates. Never use a similar SKU, the +CLI's default threshold, a theoretical maximum or a later candidate result to +fill the gap. + +## Record and freeze the contract + +Write the result into the existing acceptance issue and campaign plan, not a +second goal registry. Record: + +- source per criterion: `user` or `ceiling-derived`, with the request/plan + reference; use `mixed` for a contract retaining both; +- metric, unit, direction, statistic, timing boundary and each workload target; +- baseline identity and samples, analysis/skill revision, input sources, + attainable range, uncertainty and the reason for the selected target; +- quality/resource constraints, required validation coverage, evidence gaps, + budget/stop conditions and who has authority to freeze the contract. + +Freeze the resolved contract and validator/input hashes before candidate search. +Existing frozen campaigns retain their criteria. Changing a frozen goal follows +the campaign's revision policy and preserves prior evidence; it cannot +retroactively qualify an earlier result. + +Map a resolved relative primary-metric target to `--metric-key`, `--metric-unit`, +`--direction`, `--comparison-scope` and `--min-improvement-pct`. Put quality and +additional campaign gates in the appropriate validators; the generic evaluator +does not automatically enforce absolute targets or a multi-workload contract. +`plan` is a preview, not a freeze or a full campaign acceptance check. Only +complete measured evidence satisfying the frozen gates can establish PASS. diff --git a/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/roofline-example.json b/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/roofline-example.json new file mode 100644 index 000000000..de06fdbdf --- /dev/null +++ b/tests/fixtures/atomic-reader/release-v0.3.4/src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/references/roofline-example.json @@ -0,0 +1,72 @@ +{ + "workload": { + "workload_id": "synthetic-component-v1", + "shape": "one synthetic matrix operation", + "boundary": "one invocation; stated compute and HBM traffic only", + "hardware_id": "synthetic-reference", + "resource_scope": "logical-device-0", + "operation": { + "dtype": "bfloat16", + "accumulator_dtype": "float32", + "op_class": "matrix", + "sparsity": "dense", + "fma_flops": 2 + }, + "work": { + "value": 600, + "unit": "FLOP", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "traffic": { + "value": 100, + "unit": "byte", + "tier": "HBM", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "assumptions": ["Counts are synthetic and apply only to this stated invocation."] + }, + "hardware": { + "hardware_id": "synthetic-reference", + "resource_scope": "logical-device-0", + "device_count": 1, + "operation": { + "dtype": "bfloat16", + "accumulator_dtype": "float32", + "op_class": "matrix", + "sparsity": "dense", + "fma_flops": 2 + }, + "peak_compute": { + "value": 100, + "unit": "FLOP/s", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "bandwidth": { + "value": 10, + "unit": "byte/s", + "tier": "HBM", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "assumptions": ["Rates are synthetic references, not measured or rated device facts."] + } +} diff --git a/tests/fixtures/atomic-reader/roofline-example.json b/tests/fixtures/atomic-reader/roofline-example.json new file mode 100644 index 000000000..de06fdbdf --- /dev/null +++ b/tests/fixtures/atomic-reader/roofline-example.json @@ -0,0 +1,72 @@ +{ + "workload": { + "workload_id": "synthetic-component-v1", + "shape": "one synthetic matrix operation", + "boundary": "one invocation; stated compute and HBM traffic only", + "hardware_id": "synthetic-reference", + "resource_scope": "logical-device-0", + "operation": { + "dtype": "bfloat16", + "accumulator_dtype": "float32", + "op_class": "matrix", + "sparsity": "dense", + "fma_flops": 2 + }, + "work": { + "value": 600, + "unit": "FLOP", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "traffic": { + "value": 100, + "unit": "byte", + "tier": "HBM", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "assumptions": ["Counts are synthetic and apply only to this stated invocation."] + }, + "hardware": { + "hardware_id": "synthetic-reference", + "resource_scope": "logical-device-0", + "device_count": 1, + "operation": { + "dtype": "bfloat16", + "accumulator_dtype": "float32", + "op_class": "matrix", + "sparsity": "dense", + "fma_flops": 2 + }, + "peak_compute": { + "value": 100, + "unit": "FLOP/s", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "bandwidth": { + "value": 10, + "unit": "byte/s", + "tier": "HBM", + "source": { + "kind": "synthetic", + "locator": "fixture:roofline-example", + "revision": "v1", + "time_unknown_reason": "Undated synthetic arithmetic fixture" + } + }, + "assumptions": ["Rates are synthetic references, not measured or rated device facts."] + } +} diff --git a/tests/fixtures/atomic-reader/rule.md b/tests/fixtures/atomic-reader/rule.md new file mode 100644 index 000000000..efd07fbe9 --- /dev/null +++ b/tests/fixtures/atomic-reader/rule.md @@ -0,0 +1,17 @@ +## When to use this skill + +Use this skill before modifying an inference serving system when you need to +answer: *does meaningful headroom exist, where is it, and is a requested +speedup such as 2× plausible?* + +When preparing a task, preserve user-provided acceptance criteria. If none were +supplied, follow [acceptance-criteria preparation](references/acceptance-criteria.md) +to derive and freeze targets from this analysis. Preserve partial requirements, +label derived fields and retain evidence gaps; a theoretical ceiling alone does +not establish an attainable target or a quality tolerance. + +Do not use it to benchmark or compare two already-built candidates — that is +the job of InferRSI's AB/BA harness and `rsi-evidence` skill. + +For whole-model prefill and decode composition, use [model-sol-analysis](../model-sol-analysis/SKILL.md). + diff --git a/tests/fixtures/atomic-reader/steps.md b/tests/fixtures/atomic-reader/steps.md new file mode 100644 index 000000000..22a65fc75 --- /dev/null +++ b/tests/fixtures/atomic-reader/steps.md @@ -0,0 +1,24 @@ +## Select the source + +1. Read the user's request and any referenced acceptance issue or frozen plan. + **Use supplied criteria unchanged:** retain metrics, units, timing boundaries, + statistics, workload coverage, thresholds and quality/resource constraints. + An estimate may flag an infeasible target but must not replace or relax it. + Conflicting requests and frozen records need resolution by their authorized + owner; do not choose whichever target is easier to pass. +2. If criteria are absent, use [performance-ceiling-analysis](../SKILL.md) to + formulate workload-specific acceptance criteria before candidate search. + Retain partial requirements: derive only missing performance targets and + measurement details, labelling each derived field separately. An unspecified + primary objective that cannot be resolved from task context is a missing + input, not permission to optimize a different objective. +3. Reuse the target's existing correctness/quality contract and retain baseline + semantics. Hardware ceilings cannot determine quality tolerances, an + application SLO or permission to change precision, steps or useful work. + Resolve missing quality requirements from the task and reference validators; + if still unknown, record the gap rather than invent a tolerance. + +Do not add a confirmation round when the user has already delegated goal +formulation and campaign preparation. Use the existing freeze authority; record +agent-derived targets as such, never as user-supplied or user-confirmed numbers. + diff --git a/tests/fixtures/atomic-reader/task-domain-v0.3.4.json b/tests/fixtures/atomic-reader/task-domain-v0.3.4.json new file mode 100644 index 000000000..acb3c6371 --- /dev/null +++ b/tests/fixtures/atomic-reader/task-domain-v0.3.4.json @@ -0,0 +1,208 @@ +{ + "release": "v0.3.4", + "commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "wheel_sha256": "9a1015f2c1e1347f46d1ca899d2cb8e32c8279a75e88669b9de1a8c8bda5b6c9", + "entries": { + "task-accuracy": { + "source": "tasks/task-accuracy/SKILL.md", + "original_sha256": "a441eb5565cd39674307f2cc870cb0d8d4c90314bb7df80245162df1dc3d1ae3", + "original_bytes": 4767, + "header_sha256": "0a02fb52d03847f788db18ef7f321b9314626603661855548962c5483bbeb5c1", + "body_sha256": "d69abc5b0decfa559adbb926a48d1e5ef8da587372bba3aa2a784a6f65d6ccbc", + "target": "package:inferrsi.common.skills.task_accuracy", + "original_refs": { + "checkout:task-accuracy": "sha256:5267d2773666629bdc6c49d5b79de77da70297722bd53f99ec1268c57a5848bb", + "package:inferrsi.common.skills.task_accuracy": "sha256:9bf40fbe608fc676778186a1c455bf594d34d1e4c9a20fedfe0a595b68a47866" + }, + "enter_instruction_bytes": 3633, + "enter_instruction_sha256": "684f9f5d106a8d5fc7b2c61e9409e9ade7b7490d435efb7c4844c005e096da00", + "route_card": { + "bytes": 1411, + "choose_when": "Inference completes but output violates a reference, quality metric or tolerance.", + "public_relative_path": "references/routes/accuracy.json", + "seed_owners": { + "audit-fixed-workload-claim": "playbooks/measurement/audit-fixed-workload-claim", + "claim-contract": "workflows/governance/claim-contract", + "diffusers-invocation-state": "systems/frameworks/diffusers/diffusers-invocation-state", + "torch-npu": "systems/frameworks/torch-npu/torch-npu" + }, + "sha256": "5a672842ec26262d8827f7ce8d92de9bd956859ff5244189c0519b8f0dd188e3", + "source": "tasks/inference-task-router/references/routes/accuracy.json" + } + }, + "task-day-0": { + "source": "tasks/task-day-0/SKILL.md", + "original_sha256": "ca187de2205b3aa86b4ca5123fb0107a8235aa84f9d942d3771a8a665df1a0a3", + "original_bytes": 4496, + "header_sha256": "6084ce34325c8275508a6190e81a9a278af20b5212aee173b7c526bea49d883c", + "body_sha256": "dec6cec5b9ec2aca541ed4264520e92347890af24abdd0b7590f766b7115549f", + "target": "package:inferrsi.common.skills.task_day_0", + "original_refs": { + "checkout:task-day-0": "sha256:50c42cedf843870e6a8fa17219e7e3ce5049dd2b7cefa8305f8c3683b8833e95", + "package:inferrsi.common.skills.task_day_0": "sha256:48c3747738f0a84ac45fe2a1c1fac1395e59b841d639f9940e3ab9f316d4d236" + }, + "enter_instruction_bytes": 3369, + "enter_instruction_sha256": "ed376f482eab265de2b3883a97c6cc095f5376c457adb85446410805ae8c56b4", + "route_card": { + "bytes": 871, + "choose_when": "First usable support for a new checkpoint or model architecture in an existing engine.", + "public_relative_path": "references/routes/day0-model.json", + "seed_owners": { + "ascend-model-adaptation": "systems/platforms/ascend/ascend-model-adaptation", + "claim-contract": "workflows/governance/claim-contract", + "diffusers-invocation-state": "systems/frameworks/diffusers/diffusers-invocation-state" + }, + "sha256": "77b26d1300e5535d8b595cef95c6c803ea1322e92f38b68ae2905f69355a814f", + "source": "tasks/inference-task-router/references/routes/day0-model.json" + } + }, + "task-debug": { + "source": "tasks/task-debug/SKILL.md", + "original_sha256": "2e1e91cf429384c7cb3de68cb9a896a645853f819b23bbe2c10792b2813ae5f0", + "original_bytes": 4686, + "header_sha256": "ed65c6d5570ee324fafbe959575b45bbc175007ed92af57fc19e25b7309aeb35", + "body_sha256": "21b16e409d7d0e2cdd326ef08429fe5fa6c751cabd4354de813570b56d3c084f", + "target": "package:inferrsi.common.skills.task_debug", + "original_refs": { + "checkout:task-debug": "sha256:9345d416516f3325ffe415b05d0e9e2e5a7c9144aa10a81ba6407b3ef8213879", + "package:inferrsi.common.skills.task_debug": "sha256:44157caad01d02b45cf7f2e6675db64e1411a0e9a41bc1891b148806af1c12d6" + }, + "enter_instruction_bytes": 3544, + "enter_instruction_sha256": "01707debe5adc0e5ffe8ad4f79acef5848544043f2aeede57f5b200a433326ba", + "route_card": { + "bytes": 782, + "choose_when": "A hang, crash, OOM or execution-path failure needs a reproducible cause.", + "public_relative_path": "references/routes/debug.json", + "seed_owners": { + "ascend-device-health": "systems/platforms/ascend/ascend-device-health", + "audit-afd-p2p-exchanges": "systems/engines/afd-plugin/audit-afd-p2p-exchanges", + "audit-vllm-kv-lifetimes": "systems/engines/vllm/audit-vllm-kv-lifetimes", + "inference-optimization-casebook": "casebooks/inference/inference-optimization-casebook" + }, + "sha256": "75241e43d12fb961d3f48d1b683e4df321c0f18e683959aedca9722e78a8b78f", + "source": "tasks/inference-task-router/references/routes/debug.json" + } + }, + "task-derived-engine": { + "source": "tasks/task-derived-engine/SKILL.md", + "original_sha256": "976a01cf23e626fb2112fa637bb76da3f59532d27ee93f22365ea2c752dd0942", + "original_bytes": 4606, + "header_sha256": "de59a1744dbde57f6a01b439099aa008f3c59f55555c858e02f1ffa760f91632", + "body_sha256": "2289d24186c69a26917b89f860db541998fb694494ec91ef7c031fcada1429ec", + "target": "package:inferrsi.common.skills.task_derived_engine", + "original_refs": { + "checkout:task-derived-engine": "sha256:ea82623db3db137d9e195f4e5c8cf3be42f0bc6199444f8a9a5530f65bbd0f75", + "package:inferrsi.common.skills.task_derived_engine": "sha256:032ffbbdb0deded77a9ddd08caccc3f83ca5508b2bbe7c37b37bba9721869f45" + }, + "enter_instruction_bytes": 3462, + "enter_instruction_sha256": "757fb5644051e8aba790fcdb1265244fbd29f3007ba5970adc88b60e8567c09a", + "route_card": { + "bytes": 983, + "choose_when": "The deliverable reuses the execution core of vLLM, vLLM-Omni or another pinned parent, as in a DeepInfer-like extension.", + "public_relative_path": "references/routes/derived-engine.json", + "seed_owners": { + "bound-windowed-attention-replay": "systems/engines/deepinfer/bound-windowed-attention-replay", + "budget-speculative-verification": "systems/engines/deepinfer/budget-speculative-verification", + "inference-benchmark-design": "playbooks/measurement/inference-benchmark-design", + "repository-evolution-analysis": "workflows/research/repository-evolution-analysis" + }, + "sha256": "3ab030bcd04db76781d20dccb27b62963b4fd996e05edfb0c38e2680018d8222", + "source": "tasks/inference-task-router/references/routes/derived-engine.json" + } + }, + "task-independent-engine": { + "source": "tasks/task-independent-engine/SKILL.md", + "original_sha256": "37e122098f2df35edc466d5b70598039ae640c8f4bb683b694d9195b0a83089e", + "original_bytes": 5045, + "header_sha256": "22a9a34eebbccf5a6a7e7a174750e88a01d37a2a249f9382a7c401da38edd121", + "body_sha256": "413df7de2562e0eb343bfa3d1ad6f84e17c28bbafecee1b5c6789d5d005eb339", + "target": "package:inferrsi.common.skills.task_independent_engine", + "original_refs": { + "checkout:task-independent-engine": "sha256:f3e551786fe01450fdc827e1cd4ca22441a7231ea84421c0997dcd5733793800", + "package:inferrsi.common.skills.task_independent_engine": "sha256:6e6858d74a33e8e6e088ff94dc7e23cd95ad47c01d2c3b8bfad4d183e65bbdb2" + }, + "enter_instruction_bytes": 3874, + "enter_instruction_sha256": "6e698e4512a7934c7555d6e03c17035f808e892889f55320c5ba5be307d9a2f0", + "route_card": { + "bytes": 960, + "choose_when": "A new runtime must own execution, memory and device integration on a distinct OS, model or hardware stack.", + "public_relative_path": "references/routes/independent-engine.json", + "seed_owners": { + "audit-llama-runtime-state": "systems/engines/llama-cpp/audit-llama-runtime-state", + "inference-benchmark-design": "playbooks/measurement/inference-benchmark-design", + "local-dream": "systems/engines/local-dream", + "mlc-llm": "systems/engines/mlc-llm", + "os-process-placement": "systems/platforms/host/os-process-placement" + }, + "sha256": "f2208c40871306fe4be21f84a099c551013eda26e55bff02d95ba60739b8fade", + "source": "tasks/inference-task-router/references/routes/independent-engine.json" + } + }, + "task-performance": { + "source": "tasks/task-performance/SKILL.md", + "original_sha256": "bf5a137504566b6ee4eeaee18400d52aae99a1db3c8247dea7247d653103df0b", + "original_bytes": 4809, + "header_sha256": "3fc97a98c2feed125812c904f90c1fb75184be162014205bc116222a0463d925", + "body_sha256": "a1b150bee5d83822c4221f0883e3b862972c0006297ee0797297df78a774cf51", + "target": "package:inferrsi.common.skills.task_performance", + "original_refs": { + "checkout:task-performance": "sha256:38f6e79eb4c8cc728ed6a0cd71923c22f81e112b82ce23ddd6f773cb2e799f74", + "package:inferrsi.common.skills.task_performance": "sha256:325c70d067f2b7580094222d13217f0517d4fdea34019bcb574184c67f2536f9" + }, + "enter_instruction_bytes": 3655, + "enter_instruction_sha256": "f13b0a77f1263c372d007de8cdcb3ac28199eb23eed2bcc2200544f56d94fcc2", + "route_card": { + "bytes": 843, + "choose_when": "A correct baseline misses a specified latency, throughput, memory or cost objective.", + "public_relative_path": "references/routes/performance.json", + "seed_owners": { + "inference-benchmark-design": "playbooks/measurement/inference-benchmark-design", + "inference-optimization-casebook": "casebooks/inference/inference-optimization-casebook", + "optimization-search-policy": "playbooks/planning/optimization-search-policy", + "performance-ceiling-analysis": "playbooks/measurement/performance-ceiling-analysis" + }, + "sha256": "4904e6b403f8390ddc6d11c962491ec42683ec7e29eb4a2be4075bb052bd31fa", + "source": "tasks/inference-task-router/references/routes/performance.json" + } + }, + "task-version-alignment": { + "source": "tasks/task-version-alignment/SKILL.md", + "original_sha256": "114a2f41ce5b45f61b7cbb55d1cf9fa99a7c9aaff5e5597e563d9a00a7727c8c", + "original_bytes": 4568, + "header_sha256": "179323d23c0875b602b2d086ec29716ab9adea9800fae70140b75e66f6162536", + "body_sha256": "79c789b6097b61f3815e742e2887f348d36608b8f940b3d303a62a67f804b167", + "target": "package:inferrsi.common.skills.task_version_alignment", + "original_refs": { + "checkout:task-version-alignment": "sha256:fe85ab688e4ff47dcf5b39304d04a20c5a71891e0e86452edd6132f368324553", + "package:inferrsi.common.skills.task_version_alignment": "sha256:7bd59f139173c66e1b0aecfdfe927b0357bb70e4a74cc9d1a8de61f84d0ef02a" + }, + "enter_instruction_bytes": 3428, + "enter_instruction_sha256": "d0685657b7a7ce02130276284a0e68b6998cf3aab55ee96a40d979975a8e7924", + "route_card": { + "bytes": 919, + "choose_when": "A dependency or engine upgrade must preserve API, ABI, operator or runtime behavior across a stack.", + "public_relative_path": "references/routes/version-align.json", + "seed_owners": { + "audit-afd-p2p-exchanges": "systems/engines/afd-plugin/audit-afd-p2p-exchanges", + "claim-contract": "workflows/governance/claim-contract", + "repository-evolution-analysis": "workflows/research/repository-evolution-analysis", + "vllm-ascend": "systems/engines/vllm-ascend" + }, + "sha256": "4243e305578e50ddc88bf4465447e716bbe9d22e4a0122189ad58a50e2267bf1", + "source": "tasks/inference-task-router/references/routes/version-align.json" + } + }, + "inference-task-router": { + "source": "tasks/inference-task-router/SKILL.md", + "original_sha256": "3dae791f61b26810332e05fbabe6fd7113abf9ed8609aef663535a267525849c", + "original_bytes": 6199, + "header_sha256": "9eebc1eb5ad5ad6829dc4a0d855cd9fd21093ad77216fe3022e7b3da40cb5e4f", + "body_sha256": "9c772738cb587b8b45250b36eb1ff42db11277cfc6c28f7120a422667aaf00e7", + "target": "package:inferrsi.common.skills.inference_task_router", + "original_refs": { + "checkout:inference-task-router": "sha256:e1803be3152e6f90320357364f305deeb8cd4ef52f3a6a5b5db9167226d3f7a1", + "package:inferrsi.common.skills.inference_task_router": "sha256:4d9216ccdf398375295e52ea01dcc2e7a6f9343a6107d04c6507d95d0b8773d3" + } + } + } +} diff --git a/tests/fixtures/atomic-reader/task-sources-v0.3.4.zip b/tests/fixtures/atomic-reader/task-sources-v0.3.4.zip new file mode 100644 index 000000000..3ef578b85 Binary files /dev/null and b/tests/fixtures/atomic-reader/task-sources-v0.3.4.zip differ diff --git a/tests/fixtures/atomic-reader/workflow-domain-v0.3.4.json b/tests/fixtures/atomic-reader/workflow-domain-v0.3.4.json new file mode 100644 index 000000000..219c19a38 --- /dev/null +++ b/tests/fixtures/atomic-reader/workflow-domain-v0.3.4.json @@ -0,0 +1,718 @@ +{ + "files": { + "workflows/governance/cite-check-downstream-pr/SKILL.md": { + "bytes": 3534, + "sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858" + }, + "workflows/governance/claim-contract/SKILL.md": { + "bytes": 3223, + "sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670" + }, + "workflows/governance/draft-acceptance-issue/SKILL.md": { + "bytes": 4373, + "sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497" + }, + "workflows/governance/rsi-evidence/SKILL.md": { + "bytes": 8927, + "sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE": { + "bytes": 11358, + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md": { + "bytes": 1075, + "sha256": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/NOTICE.md": { + "bytes": 308, + "sha256": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md": { + "bytes": 4701, + "sha256": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/decision-cases.md": { + "bytes": 7035, + "sha256": "c2c1d3d75c4fcb515dd36ff84d8dc940c25d54c5757a29a80d1af88eb8b66115" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/mechanisms.md": { + "bytes": 16696, + "sha256": "4fa09099d362a8088fdb0e6a767f72aae6218b92fe5fd75b6fb78c2bb2a318fb" + }, + "workflows/governance/rsi-evidence/references/loopx-goal-governance/source-ledger.json": { + "bytes": 20966, + "sha256": "4a0f1f02134af5b7d54a1f13e104b8066372d3d4a1a4a9e717514632fff05893" + }, + "workflows/governance/rsi-evidence/references/omni-experiments.md": { + "bytes": 5380, + "sha256": "8fafc1e05ef21ab60158fc626c73ca1b8c615ada59f90fd23199496daa46ac48" + }, + "workflows/maintenance/npu-skill-factory/SKILL.md": { + "bytes": 11624, + "sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md": { + "bytes": 4267, + "sha256": "38587678a96581f5c2dc697d982127343565504bffa191352811dffcc165aa23" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md": { + "bytes": 5557, + "sha256": "fbc4a96b6f6c477706eed83eaa4fcc29a14f881637629d6c004601ed049f2523" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/QA.md": { + "bytes": 1853, + "sha256": "3f3785ec39a6938a5d1f2e874e99153fe92c0e666dd3e78a499c8b47d891346a" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/README.md": { + "bytes": 2151, + "sha256": "221785e91c45588f82b3caab6d52f1ea1d102b16139c20a0802921e2789e6d28" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md": { + "bytes": 1038, + "sha256": "6c1d87ebe491d27666703149eb05ad582c7e5aff77f0ac5c11a7b89c946f96ee" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md": { + "bytes": 5213, + "sha256": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md": { + "bytes": 5282, + "sha256": "406d5d74c3fef4c1a23d495492e21a084c3c46495a1a84b385703ed104358874" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md": { + "bytes": 2847, + "sha256": "9c2d1d738e896d05c00f53e6adf14c9df2501ecc3f0020e71b5a1c2192547086" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md": { + "bytes": 6520, + "sha256": "41298c6bde3a28f0712fa06a18bbc4ac59aea6d17cc9eb1318744f4121e3bab6" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md": { + "bytes": 7086, + "sha256": "6f953d20d8958c68339c9ceeae348604d0fea3e9c6ccb9b64a63d3b210426a22" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md": { + "bytes": 3151, + "sha256": "5ebdac2a2bbbe6614f9d4096bc9895bd685acdf76414e2c3c1fb7b50d57c738d" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md": { + "bytes": 3040, + "sha256": "148075daa67e19f4b4351710498438d17c279a9bce56b2d01cab26ff3be33e99" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/source-manifest.json": { + "bytes": 2431, + "sha256": "716cd49ed01824ee9f6b6fc55ebf2b24fdd5d5a3e677f6e28e34a472616bbe25" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md": { + "bytes": 2917, + "sha256": "230d13b77ba819b5e3edee147523e8cad6bfce95afccc140fb4946d6c8747a2e" + }, + "workflows/maintenance/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md": { + "bytes": 7695, + "sha256": "529c363e9c678f33f7c0be0420d26c64d056321f041726362dba69e53e1e375e" + }, + "workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md": { + "bytes": 9435, + "sha256": "0b2e05bb6a4a3b3f6df0b04abc40ec125be60714b87f609a390246ee2a292d2d" + }, + "workflows/maintenance/skill-evolution-playbook/SKILL.md": { + "bytes": 13082, + "sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6" + }, + "workflows/research/competitor-scan/SKILL.md": { + "bytes": 3266, + "sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6" + }, + "workflows/research/inference-engine-research/SKILL.md": { + "bytes": 5755, + "sha256": "a94102df1790f51d673f2dfe4b047fa6a70b2ead2a12b1a73393ea3765984b6a" + }, + "workflows/research/inference-engine-research/references/cross-repository-mechanisms.md": { + "bytes": 17214, + "sha256": "8eb1b8dd4807cf06df9f6fb1bf88aff9ad6112c408e377631ceada32bc56307a" + }, + "workflows/research/inference-engine-research/references/import.md": { + "bytes": 3463, + "sha256": "c8a57db94768cc6cd4193932def75ba67ec453e56ee0e54f176fb82f1af53091" + }, + "workflows/research/inference-engine-research/references/model-aware-preparation.md": { + "bytes": 9057, + "sha256": "1b117e8f3a35c25dbffc4f7d43bcef1410b2b3f51e98d53933ef3348fb3b070d" + }, + "workflows/research/inference-engine-research/references/overview.md": { + "bytes": 8153, + "sha256": "4e39954ec5cc7ebfe5de1b1041762f75c5c3d381265e3711fd43ee2a7ac3d688" + }, + "workflows/research/inference-engine-research/references/repository-source-scope.md": { + "bytes": 12049, + "sha256": "918e8358b7ef6caa2eb0dea56438c117f0737688d49d06d288ef5bd0cf668b2b" + }, + "workflows/research/inference-engine-research/references/source-manifest.json": { + "bytes": 1613, + "sha256": "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240" + }, + "workflows/research/repository-evolution-analysis/SKILL.md": { + "bytes": 22892, + "sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e" + }, + "workflows/research/repository-evolution-analysis/references/capability-presence-audit.md": { + "bytes": 11461, + "sha256": "c21eb4a6aabe811a49a6540a34c54dbcfdcf7efae3052a79b54034c7838026a5" + }, + "workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md": { + "bytes": 13701, + "sha256": "a70b1d128fb5e0ac12292a290d624f218a0831d7581fe8980b62661473e0f2b7" + } + }, + "refs": { + "checkout:cite-check-downstream-pr": { + "atom": { + "kind": "skill", + "resource": "workflows/governance/cite-check-downstream-pr/SKILL.md" + }, + "card_bytes": 4313, + "card_sha256": "751e5d330d748fec767f93830031742604b2561219e4f2f829a0164455b105ae", + "dependencies": {}, + "entry_sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858", + "entry_source": "workflows/governance/cite-check-downstream-pr/SKILL.md", + "entrypoint": "workflows/governance/cite-check-downstream-pr/SKILL.md", + "guide": "workflows/governance/cite-check-downstream-pr/SKILL.md", + "guide_sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": {}, + "required_count": 1, + "required_resources": { + "workflows/governance/cite-check-downstream-pr/SKILL.md": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858" + }, + "resource_set": "b5aba57aada8d7639d17963d99845dbb1e67706ed7f91303ef72fa4f106710a7", + "revision": "sha256:61b89c41a00b0f44cde7f933774411c3b85ab9871ef7242456f5cfc04a041cfd", + "status": "partial" + }, + "checkout:claim-contract": { + "atom": { + "kind": "skill", + "resource": "workflows/governance/claim-contract/SKILL.md" + }, + "card_bytes": 4141, + "card_sha256": "7dbff3fb6af82a03416ab65c375f3ecd332e6c91dbca39d42706611fa13ff98c", + "dependencies": {}, + "entry_sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670", + "entry_source": "workflows/governance/claim-contract/SKILL.md", + "entrypoint": "workflows/governance/claim-contract/SKILL.md", + "guide": "workflows/governance/claim-contract/SKILL.md", + "guide_sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": {}, + "required_count": 1, + "required_resources": { + "workflows/governance/claim-contract/SKILL.md": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670" + }, + "resource_set": "0ecff74d30b4ec48f040ec680ee186b33832564153c501a75bbf8861a84e9e4d", + "revision": "sha256:8744eb3d57e51d4f42cc22f63086d27e6dc636676630391ad1a52bb72da516bb", + "status": "partial" + }, + "checkout:competitor-scan": { + "atom": { + "kind": "skill", + "resource": "workflows/research/competitor-scan/SKILL.md" + }, + "card_bytes": 3611, + "card_sha256": "e48bcab903640e015c8033d471c3f38337f740f6a5c5c9fe46068de4036cc93d", + "dependencies": {}, + "entry_sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6", + "entry_source": "workflows/research/competitor-scan/SKILL.md", + "entrypoint": "workflows/research/competitor-scan/SKILL.md", + "guide": "workflows/research/competitor-scan/SKILL.md", + "guide_sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": {}, + "required_count": 1, + "required_resources": { + "workflows/research/competitor-scan/SKILL.md": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6" + }, + "resource_set": "8cb6cb9061a192bb24e30dc2b83ecccf9184e32f9ea0fe47a0e6cea4cf945c41", + "revision": "sha256:ef21805d22a24ea0d4e0e4ff7e8fb63849905a1db14d16872aacc92d3d4ad8fa", + "status": "partial" + }, + "checkout:draft-acceptance-issue": { + "atom": { + "kind": "skill", + "resource": "workflows/governance/draft-acceptance-issue/SKILL.md" + }, + "card_bytes": 4631, + "card_sha256": "d0e6e4598621b401628a16d808f9e1c4e19f4f2a10704a0cc523c02bf751fb95", + "dependencies": {}, + "entry_sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497", + "entry_source": "workflows/governance/draft-acceptance-issue/SKILL.md", + "entrypoint": "workflows/governance/draft-acceptance-issue/SKILL.md", + "guide": "workflows/governance/draft-acceptance-issue/SKILL.md", + "guide_sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md", + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + } + }, + "required_count": 1, + "required_resources": { + "workflows/governance/draft-acceptance-issue/SKILL.md": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497" + }, + "resource_set": "1c55b8b313e4ff72eedd01443b7a6be2338ab08c95ab339abcd9771b15f1ff1b", + "revision": "sha256:5c15057d1322f9eefeaba649772679e9736191e9984fc77528aeeaf278637ee3", + "status": "partial" + }, + "checkout:npu-skill-factory": { + "atom": { + "kind": "skill", + "resource": "workflows/maintenance/npu-skill-factory/SKILL.md" + }, + "card_bytes": 6028, + "card_sha256": "b8fff644b6f21ac542eb9e727bec630bad0acf1fb2f7e908a52f4ba43f8cfc0c", + "dependencies": {}, + "entry_sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183", + "entry_source": "workflows/maintenance/npu-skill-factory/SKILL.md", + "entrypoint": "workflows/maintenance/npu-skill-factory/SKILL.md", + "guide": "workflows/maintenance/npu-skill-factory/SKILL.md", + "guide_sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "references/papers-20261015/COMPARISON.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md", + "sha256": "38587678a96581f5c2dc697d982127343565504bffa191352811dffcc165aa23" + }, + "references/papers-20261015/cases/methodology-counterexamples.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md", + "sha256": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4" + }, + "references/papers-20261015/knowledge/evidence-routing.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md", + "sha256": "406d5d74c3fef4c1a23d495492e21a084c3c46495a1a84b385703ed104358874" + }, + "references/papers-20261015/references/readset.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md", + "sha256": "6f953d20d8958c68339c9ceeae348604d0fea3e9c6ccb9b64a63d3b210426a22" + }, + "references/skill-factory-design-20261014.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md", + "sha256": "0b2e05bb6a4a3b3f6df0b04abc40ec125be60714b87f609a390246ee2a292d2d" + } + }, + "required_count": 17, + "required_resources": { + "workflows/maintenance/npu-skill-factory/SKILL.md": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/COMPARISON.md": "38587678a96581f5c2dc697d982127343565504bffa191352811dffcc165aa23", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/INTEGRATION_NOTES.md": "fbc4a96b6f6c477706eed83eaa4fcc29a14f881637629d6c004601ed049f2523", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/QA.md": "3f3785ec39a6938a5d1f2e874e99153fe92c0e666dd3e78a499c8b47d891346a", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/README.md": "221785e91c45588f82b3caab6d52f1ea1d102b16139c20a0802921e2789e6d28", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/UNREAD_LEADS.md": "6c1d87ebe491d27666703149eb05ad582c7e5aff77f0ac5c11a7b89c946f96ee", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/knowledge/evidence-routing.md": "406d5d74c3fef4c1a23d495492e21a084c3c46495a1a84b385703ed104358874", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md": "9c2d1d738e896d05c00f53e6adf14c9df2501ecc3f0020e71b5a1c2192547086", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/protocol-details.md": "41298c6bde3a28f0712fa06a18bbc4ac59aea6d17cc9eb1318744f4121e3bab6", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md": "6f953d20d8958c68339c9ceeae348604d0fea3e9c6ccb9b64a63d3b210426a22", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/repo-to-skill.md": "5ebdac2a2bbbe6614f9d4096bc9895bd685acdf76414e2c3c1fb7b50d57c738d", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md": "148075daa67e19f4b4351710498438d17c279a9bce56b2d01cab26ff3be33e99", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/source-manifest.json": "716cd49ed01824ee9f6b6fc55ebf2b24fdd5d5a3e677f6e28e34a472616bbe25", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md": "230d13b77ba819b5e3edee147523e8cad6bfce95afccc140fb4946d6c8747a2e", + "workflows/maintenance/npu-skill-factory/references/papers-20261015/updates/bounded-updates.md": "529c363e9c678f33f7c0be0420d26c64d056321f041726362dba69e53e1e375e", + "workflows/maintenance/npu-skill-factory/references/skill-factory-design-20261014.md": "0b2e05bb6a4a3b3f6df0b04abc40ec125be60714b87f609a390246ee2a292d2d" + }, + "resource_set": "a169e5134b20eb055de33a5281729d6de8e94d2932ccadf781a38201ad34c5ea", + "revision": "sha256:4a32eb345b5c632ddc93c679f67c1bcd7d4071cc86e68060b5a9843ee70d592c", + "status": "partial" + }, + "checkout:repository-evolution-analysis": { + "atom": { + "kind": "skill", + "resource": "workflows/research/repository-evolution-analysis/SKILL.md" + }, + "card_bytes": 3713, + "card_sha256": "740f137f501b0b404e40dd694f2130a5793da8f413008bebd8049fba2787c660", + "dependencies": { + "workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md": "sha256:a70b1d128fb5e0ac12292a290d624f218a0831d7581fe8980b62661473e0f2b7" + }, + "entry_sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e", + "entry_source": "workflows/research/repository-evolution-analysis/SKILL.md", + "entrypoint": "workflows/research/repository-evolution-analysis/SKILL.md", + "guide": "workflows/research/repository-evolution-analysis/SKILL.md", + "guide_sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e", + "kind": "skill", + "missing_fields": [ + "recommendation", + "validation" + ], + "relative_guide_links": { + "../../maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md#e-c2--better-repository-familiarity-can-produce-unnecessary-caution": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md", + "sha256": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4" + }, + "../../maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/learning-to-commit.md", + "sha256": "9c2d1d738e896d05c00f53e6adf14c9df2501ecc3f0020e71b5a1c2192547086" + }, + "references/capability-presence-audit.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/research/repository-evolution-analysis/references/capability-presence-audit.md", + "sha256": "c21eb4a6aabe811a49a6540a34c54dbcfdcf7efae3052a79b54034c7838026a5" + }, + "references/rtk-consumer-path-transition.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md", + "sha256": "a70b1d128fb5e0ac12292a290d624f218a0831d7581fe8980b62661473e0f2b7" + } + }, + "required_count": 3, + "required_resources": { + "workflows/research/repository-evolution-analysis/SKILL.md": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e", + "workflows/research/repository-evolution-analysis/references/capability-presence-audit.md": "c21eb4a6aabe811a49a6540a34c54dbcfdcf7efae3052a79b54034c7838026a5", + "workflows/research/repository-evolution-analysis/references/rtk-consumer-path-transition.md": "a70b1d128fb5e0ac12292a290d624f218a0831d7581fe8980b62661473e0f2b7" + }, + "resource_set": "818062e63a4e0f65bc6340f18c3c5d996f6c88ff33cc4853cddb75199fa721e4", + "revision": "sha256:f10b5d57f2ae31ee7bcad9907d8374b925a821090f8a73a4d8c7567e7d23a491", + "status": "partial" + }, + "checkout:rsi-evidence": { + "atom": { + "kind": "skill", + "resource": "workflows/governance/rsi-evidence/SKILL.md" + }, + "card_bytes": 6332, + "card_sha256": "f197648462507bcd20e86baae8c937068d4b4bda02d903554ed85abed5a7c3f1", + "dependencies": {}, + "entry_sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a", + "entry_source": "workflows/governance/rsi-evidence/SKILL.md", + "entrypoint": "workflows/governance/rsi-evidence/SKILL.md", + "guide": "workflows/governance/rsi-evidence/SKILL.md", + "guide_sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/measurement/performance-ceiling-analysis/references/acceptance-criteria.md", + "sha256": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638" + }, + "references/loopx-goal-governance/README.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md", + "sha256": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe" + }, + "references/omni-experiments.md": { + "in_directory": true, + "owner": "workflows", + "path": "workflows/governance/rsi-evidence/references/omni-experiments.md", + "sha256": "8fafc1e05ef21ab60158fc626c73ca1b8c615ada59f90fd23199496daa46ac48" + } + }, + "required_count": 9, + "required_resources": { + "workflows/governance/rsi-evidence/SKILL.md": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/LICENSE-MIT.md": "1df1cf519b9e5d8acbbc72820299d7aa95afa1acbfc1f43a15109ad1d59975f3", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/NOTICE.md": "3c3c36a40e1d65f3a6b20ec3a97319cb753e857f1d120f302cd828e107120f6d", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/README.md": "c86eb179cea1b42f346f5c1dc076292ba086be907f20b0beee45c43cf0f8d6fe", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/decision-cases.md": "c2c1d3d75c4fcb515dd36ff84d8dc940c25d54c5757a29a80d1af88eb8b66115", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/mechanisms.md": "4fa09099d362a8088fdb0e6a767f72aae6218b92fe5fd75b6fb78c2bb2a318fb", + "workflows/governance/rsi-evidence/references/loopx-goal-governance/source-ledger.json": "4a0f1f02134af5b7d54a1f13e104b8066372d3d4a1a4a9e717514632fff05893", + "workflows/governance/rsi-evidence/references/omni-experiments.md": "8fafc1e05ef21ab60158fc626c73ca1b8c615ada59f90fd23199496daa46ac48" + }, + "resource_set": "2217ce37c9e8efd08012b9fe6e0111fbe94e35bbed84fa9122be3cb0addfae2b", + "revision": "sha256:959ade47c93ab2b5fbaa43332c597ae672c4e6428c2b53354b37284db87ac9cc", + "status": "partial" + }, + "checkout:skill-evolution-playbook": { + "atom": { + "kind": "skill", + "resource": "workflows/maintenance/skill-evolution-playbook/SKILL.md" + }, + "card_bytes": 7133, + "card_sha256": "7879f6d6b72bb161796834d2acba9f220d90b0c661d1936dc7b97fb053475031", + "dependencies": {}, + "entry_sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6", + "entry_source": "workflows/maintenance/skill-evolution-playbook/SKILL.md", + "entrypoint": "workflows/maintenance/skill-evolution-playbook/SKILL.md", + "guide": "workflows/maintenance/skill-evolution-playbook/SKILL.md", + "guide_sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6", + "kind": "skill", + "missing_fields": [ + "validation" + ], + "relative_guide_links": { + "../../../playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md": { + "in_directory": false, + "owner": "playbooks", + "path": "playbooks/planning/optimization-search-policy/references/papers-20261015/knowledge/adaptation-interfaces.md", + "sha256": "5e761957cb5ecd93926e6ffc13deee7c830c6e8f0ee3c3846e9dd3b50dc74446" + }, + "../npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/cases/methodology-counterexamples.md", + "sha256": "f9fc21753ea41eef77ca020d78d031e945e5dd835b5d09c5ff0e53749ceb2ca4" + }, + "../npu-skill-factory/references/papers-20261015/references/readset.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/readset.md", + "sha256": "6f953d20d8958c68339c9ceeae348604d0fea3e9c6ccb9b64a63d3b210426a22" + }, + "../npu-skill-factory/references/papers-20261015/references/skillopt.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/skillopt.md", + "sha256": "148075daa67e19f4b4351710498438d17c279a9bce56b2d01cab26ff3be33e99" + }, + "../npu-skill-factory/references/papers-20261015/references/trace2skill.md": { + "in_directory": false, + "owner": "workflows", + "path": "workflows/maintenance/npu-skill-factory/references/papers-20261015/references/trace2skill.md", + "sha256": "230d13b77ba819b5e3edee147523e8cad6bfce95afccc140fb4946d6c8747a2e" + } + }, + "required_count": 1, + "required_resources": { + "workflows/maintenance/skill-evolution-playbook/SKILL.md": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6" + }, + "resource_set": "1c7ede459144707193731bdb26f22a27f141ed964b4df4bcbf9c2c22d31bcf36", + "revision": "sha256:61ab81a692582f3f577d2ce04b6211e9587a420de2fc4414b95163fedb28570b", + "status": "partial" + }, + "package:inferrsi.common.skills.cite_check_downstream_pr": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/governance/cite-check-downstream-pr/SKILL.md" + }, + "card_bytes": 4354, + "card_sha256": "857eddcd079df44eee89eb1122de3222c3489aa0f54135d8bf40d5808fad5dee", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "70efe85335c137dc6fd720b2a3d96bc3ce622aa88d06f8d313b49159c289770f", + "entry_source": "workflows/governance/cite-check-downstream-pr/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/governance/cite-check-downstream-pr/SKILL.md", + "guide_sha256": "68ff74b48de1607297aa35e2e8b2eaea12674d938f8c8167b93e55b1044ba858", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "91b2403be64caffb18e5c462f936448a5f7eb0e4e4c96ff715d04a025b930bdb", + "revision": "sha256:6e7cf772c73826fb0f8e57b0c3a20688296769e0d0a3dee8120ac9d35102b970", + "status": "partial" + }, + "package:inferrsi.common.skills.claim_contract": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/governance/claim-contract/SKILL.md" + }, + "card_bytes": 4182, + "card_sha256": "6c4b4f8a7e3c53163197430d171182310693c3a7e9a5741ffbec29fd42f1f861", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "796ec020436a5f84d9973580715c8f4daf34b0edcbc467251ca690045c7c8a62", + "entry_source": "workflows/governance/claim-contract/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/governance/claim-contract/SKILL.md", + "guide_sha256": "49cf787427e7842fc0b8cbc1e58091fc4b77a5a48c0cb8fb7aaecd91f8715670", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "e2961b60f9c7faba55ee2581ef1384a11fd794e4811e8505518022e28466400e", + "revision": "sha256:117e156791fa1a803904094e8ced6b917f0b9ee4eeccc10a843b19d4cc4c876a", + "status": "partial" + }, + "package:inferrsi.common.skills.competitor_scan": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/research/competitor-scan/SKILL.md" + }, + "card_bytes": 3652, + "card_sha256": "eadafcd04ff5bf2d1da20c8eb21b7ed8eaf2e080bb68712e5181e9640966d06c", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "a9f742bf6e110750a91630ab76eac714ac7220d9e7fe95142817d299b95d4de0", + "entry_source": "workflows/research/competitor-scan/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/research/competitor-scan/SKILL.md", + "guide_sha256": "7f2613a1fc8e9fc58c3058c4946b85e8d7d49359143d650f711b88b448307ab6", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "7ff695c0d19e72562bc2dcda1b61ecba9ba867c8ff596dba2e4a97ce9db28314", + "revision": "sha256:92548ca5445149b1d122dc724dccd34beba2be7c51f1a323e0a190fe90527485", + "status": "partial" + }, + "package:inferrsi.common.skills.draft_acceptance_issue": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/governance/draft-acceptance-issue/SKILL.md" + }, + "card_bytes": 4672, + "card_sha256": "46d70f026508eff34a440b2d3e5a0f323aab955830a8c35b1f0ab2e69f84d3ac", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "124ce8ca7c36a0df0414e3b6ef7e660291e355a36a92f424af2d25502608d8e5", + "entry_source": "workflows/governance/draft-acceptance-issue/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/governance/draft-acceptance-issue/SKILL.md", + "guide_sha256": "2c14533c067c51b9763f80a9df0bf5eb5acd398f4265790c57039fed96d4c497", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "d81400223c0546431fccd836de7492d06746e87f2316ea4bbb4267277ecc7920", + "revision": "sha256:1c456ed568651e5af5e7ca922574874b85f0e8fa7798c5facd0beb864c5fde49", + "status": "partial" + }, + "package:inferrsi.common.skills.npu_skill_factory": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/maintenance/npu-skill-factory/SKILL.md" + }, + "card_bytes": 6069, + "card_sha256": "61eaec8bc6b25041cebaf6cbe2234d094db2afba193176b05cc9b93c6e887570", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "efbe58fbf67d9c29eabfff953244b67fb38c49cd3f5653803896dc827ad26c38", + "entry_source": "workflows/maintenance/npu-skill-factory/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/maintenance/npu-skill-factory/SKILL.md", + "guide_sha256": "0de28180da76b6cb9d2c9456733011d00d9801f7662afd32959c4c5d2c05a183", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "0c78e02a58d7bc90ba6b30608a0efe654409280c660e3b82526b8076b9170a9b", + "revision": "sha256:cd538a07e287d3e78471c80da7fbdae9b9420f365bdc449f7a3b431d0d3ef757", + "status": "partial" + }, + "package:inferrsi.common.skills.repository_evolution_analysis": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md" + }, + "card_bytes": 3754, + "card_sha256": "675d09c4a856601cdd2aa0eea782601e0d94c028e69056cad491ae89ec4931a3", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "42cd53a6bfcfc0f4f25d81887116c04424e5a243a974566171055b9282ad0568", + "entry_source": "workflows/research/repository-evolution-analysis/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md", + "guide_sha256": "0f48cc6a77b3ac861af698048be7c250c3ef5c225dc238b9a0e6d71208cbd93e", + "kind": "knowledge", + "missing_fields": [ + "recommendation", + "validation" + ], + "required_count": 716, + "resource_set": "cc3ea137a24adc3b092cbb8378e9babacf3e2df3e5518faac8d6904d422864a2", + "revision": "sha256:00e4e4c5753d75f53922dc1e72fa905dc6c29e44bad811cb9211d824f09dff99", + "status": "partial" + }, + "package:inferrsi.common.skills.rsi_evidence": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/governance/rsi-evidence/SKILL.md" + }, + "card_bytes": 6373, + "card_sha256": "60b71cbba34aeb675bebaae8b455b065b20fa305686a8e1d91d0a07e9f7f2ff0", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "524371d0e09ffb0f0b638658a69fb1a060737a32c20f0b63554213aaa4b71796", + "entry_source": "workflows/governance/rsi-evidence/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/governance/rsi-evidence/SKILL.md", + "guide_sha256": "5edd2bd544da050d2688f37c85ae6e7927eaee24af764e3c96b6cec04982990a", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "8f2a0d523eb0fb9fe4b5a677703c5cdbe308b1c8755077d74876c42295c33f7b", + "revision": "sha256:d2219d7cf339c87caac81db8a19b168eeb178f06174973b58a39facc34b4a39b", + "status": "partial" + }, + "package:inferrsi.common.skills.skill_evolution_playbook": { + "atom": { + "kind": "skill", + "resource": "data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md" + }, + "card_bytes": 7174, + "card_sha256": "1f8629e30a9053fca28d75460b09d0bb739cf9cd3f9c67f9220a0f06500885c6", + "dependencies": { + "data/skill_library": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d" + }, + "entry_sha256": "34e3e833dd066e24fd1c6e17791aec0241e2e17b6c72069796be1112edef9461", + "entry_source": "workflows/maintenance/skill-evolution-playbook/SKILL.md", + "entrypoint": "record.json", + "guide": "data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md", + "guide_sha256": "f988a0569be93fec550da52484d22d970b0a6c31394ea463ad6ee40e0877ede6", + "kind": "knowledge", + "missing_fields": [ + "validation" + ], + "required_count": 716, + "resource_set": "57f29cb54d0eef9df6c823da22e654c93f286dc7047703a72b87678dc9ea150d", + "revision": "sha256:55e5f119d0121623e4e512b43aaf0e55cbc9fabd645f4d8a1ef70d4e5f8b1fdf", + "status": "partial" + } + }, + "release": "v0.3.4", + "shared_dependency": "sha256:502067b90d93cae5a58c6afd65dae5a4cbe183fd29ffb21ea67e8d703e66425d", + "shared_members": 715, + "source_commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf", + "wheel_sha256": "9a1015f2c1e1347f46d1ca899d2cb8e32c8279a75e88669b9de1a8c8bda5b6c9" +} diff --git a/tests/fixtures/atomic_composition.py b/tests/fixtures/atomic_composition.py new file mode 100644 index 000000000..ea4adf806 --- /dev/null +++ b/tests/fixtures/atomic_composition.py @@ -0,0 +1,75 @@ +"""Pinned input for ordinary and managed Reader contract tests.""" + +import hashlib +import json + +from inferrsi.knowledge.atomic_reader import AtomPin +from inferrsi.knowledge.knowledge_operations import Bundle + + +def metadata(identity, kind, entrypoint, source): + return {"id": identity, "kind": kind, "entrypoint": entrypoint, "state": "candidate", + "applicability": {}, "limitations": [], "sources": [source], + "attribution": "Synthetic Reader contract fixture"} + + +def composition(nodes, routes, *, findings=None): + path = "case.json" if findings is not None else "navigation.json" + data = json.dumps({"findings": findings} if findings is not None else {}, + ensure_ascii=False).encode() + source = {"type": "fixture", "sha256": hashlib.sha256(data).hexdigest()} + kind = "case" if findings is not None else "skill" + fields = metadata("selection-fixture", kind, path, source) + fields["composition"] = { + "nodes": nodes, "routes": routes, "when": {}, "license": "Apache-2.0", + "permissions": {"read": True, "retain": True, "redistribute": True}, + } + return Bundle(fields, {path: data}, {}) + + +def node(pin, *requires): + return {"ref": pin.ref, "revision": pin.revision, "requires": list(requires)} + + +def case_fixture(store): + findings = [ + {"id": "target", "reason": "范围 A", "outcome": "one"}, + {"reason": "sibling scope B", "outcome": "two"}, + ] + document = json.dumps({"findings": findings}, ensure_ascii=False).encode() + attachment = bytes([0xff, 0, 0xef, 0x7f]) + nodes, routes, expected = {}, {}, {} + for index, finding in enumerate(findings): + key = f"finding-{index}" + for layer in ("L0", "L1", "L2", "L3"): + name = key + "-" + layer.lower() + if layer == "L3": + path = f"assets/{key}.bin" + body = attachment + bytes([index]) + source, start = body, 0 + else: + path = "case.json" + body = json.dumps(finding, ensure_ascii=False).encode() + source = document + start = source.index(body) + digest = hashlib.sha256(body).hexdigest() + fields = metadata(name, "knowledge", "body", + {"type": "fixture", "sha256": hashlib.sha256(source).hexdigest()}) + fields["atom"] = { + "layer": layer, "when": {}, "license": "Apache-2.0", + "permissions": {"read": True, "retain": True, "redistribute": True}, + "source_span": {"source_index": 0, "path": path, "sha256": digest, + "byte_range": [start, start + len(body)]}, + } + content = {"body": body} + if layer == "L3": + fields["atom"]["resource"] = path + content = {"body": b"Attachment", path: body} + pin = AtomPin(f"store:{name}", store.create(Bundle(fields, content, {}))) + nodes[name] = node(pin) + routes[name] = {"layer": layer, "required": [name], + "finding": f"case.json#/findings/{index}"} + expected[index, layer] = (pin, body) + bundle = composition(nodes, routes, findings=findings) + pin = AtomPin("store:" + bundle.metadata["id"], store.create(bundle)) + return pin, expected diff --git a/tests/knowledge/test_atomic_casebook_entries.py b/tests/knowledge/test_atomic_casebook_entries.py new file mode 100644 index 000000000..fd8deaf5a --- /dev/null +++ b/tests/knowledge/test_atomic_casebook_entries.py @@ -0,0 +1,214 @@ +"""Compare both Casebook guides against the decisions observed from the released wheel.""" + +import json +import shutil +from pathlib import PurePosixPath +from zipfile import ZipFile + +import pytest + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.catalog import _skill_search_source +from inferrsi.knowledge.decision_cards import DecisionSource +from tests.knowledge.test_atomic_casebooks import ( + ATOMS, + BASELINE, + FIXTURES, + RELEASE_COMMIT, + assert_empty, + canonical, + case_sources, + digest, + select, +) +from tests.knowledge.test_atomic_generation import write_json +from tests.knowledge.test_atomic_reader import allow + +GUIDES = {ref: row for ref, row in BASELINE["refs"].items() if "decision" in row} +DIRECTORIES = sorted(ref for ref in GUIDES if ref.startswith("checkout:")) + + +@pytest.mark.parametrize("ref", sorted(GUIDES)) +def test_released_guide_reproduces_each_namespaced_decision(ref): + row = GUIDES[ref] + expected = row["decision"] + with ZipFile(FIXTURES / "casebook-sources-v0.3.4.zip") as archive: + data = archive.read(row["entry_source"]) + assert digest(data) == row["entry_sha256"] + _, metadata = _skill_search_source(data.decode()) + assert metadata["empirical_validation"] == "not_run" + guide = ("" if ref.startswith("checkout:") else "data/skill_library/") + row["entry_source"] + assert expected["atom"] == {"kind": "skill", "resource": guide} + if ref.startswith("package:"): + assert row["legacy_entrypoint"] == "record.json" + assert row["legacy_entrypoint_sha256"] != digest(data) + else: + assert row["legacy_entrypoint"] == guide and row["legacy_entrypoint_sha256"] == digest(data) + source = DecisionSource(ref, row["revision"], "skill", guide, guide, metadata) + budget = expected["card_bytes"] + reply = source.project(max_bytes=budget) + card = reply["card"] + assert reply["card_bytes"] == len(canonical(card)) == budget + assert digest(canonical(card)) == expected["card_sha256"] + assert card["status"] == expected["status"] == "partial" + assert card["missing_fields"] == expected["missing_fields"] == ["validation"] + short = source.project(max_bytes=budget - 1) + assert short["status"] == "over_budget" and "card" not in short + + +@pytest.fixture(scope="module") +def casebook_files(): + with ZipFile(FIXTURES / "casebook-sources-v0.3.4.zip") as archive: + return {name: archive.read(name) for name in archive.namelist()} + + +def directory_sources(root, files): + author, release = case_sources(root, files) + for ref in DIRECTORIES: + name = ref.partition(":")[2] + for directory, filename in (("atoms", f"{name}.original.json"), + ("compositions", f"{name}.json")): + shutil.copyfile(ATOMS.parent / directory / filename, author / directory / filename) + return author, release + + +@pytest.fixture(scope="module") +def installed_directories(tmp_path_factory, casebook_files): + root = tmp_path_factory.mktemp("casebook-entries") + author, release = directory_sources(root, casebook_files) + target = root / "installed" + generation = build_generation(author, target, permits=allow, + source_roots={RELEASE_COMMIT: release}) + return InstalledGeneration(target, expected=generation), target + + +@pytest.mark.parametrize("ref", DIRECTORIES) +def test_directory_replays_all_resources_and_exports_the_original_host_tree( + installed_directories, casebook_files, ref, +): + row = GUIDES[ref] + entry = PurePosixPath(row["legacy_entrypoint"]) + released = {path: raw for path, raw in casebook_files.items() + if PurePosixPath(path).is_relative_to(entry.parent)} + installed, target = installed_directories + _, bundle = installed.read_resolved(ref, revision=installed.catalog[ref]["revision"]) + assert not bundle.dependencies and bundle.content == released + assert len(released) == row["resource_count"] == row["required_count"] + assert bundle.metadata["required_resources"] == sorted(released) + assert digest(canonical(bundle.view()["resources"])) == row["resource_set_sha256"] + assert bundle.metadata["origin"] == ["external"] + assert bundle.metadata["state"] == "candidate" + assert bundle.metadata["empirical_validation"] == "not_run" + assert installed.skills[entry.parent.name] == ref + host = target / "skills" / entry.parent.name + assert {path.relative_to(host).as_posix(): path.read_bytes() + for path in host.rglob("*") if path.is_file()} == { + PurePosixPath(path).relative_to(entry.parent).as_posix(): raw + for path, raw in released.items() + } + + +@pytest.mark.parametrize("ref", DIRECTORIES) +def test_directory_read_selection_replays_each_layer_and_refuses_incomplete_groups( + installed_directories, casebook_files, ref, +): + row = GUIDES[ref] + installed, _ = installed_directories + guide = row["entry_source"] + raw = casebook_files[guide] + result = {} + for layer in ("L0", "L1", "L2", "L3"): + delivery = select(installed, ref, layer, 1_000_000) + assert delivery.receipt["status"] == "delivered" + result[layer] = delivery + size = sum(map(len, delivery.bodies)) + assert delivery.receipt["body_bytes"] == size and size > 0 + assert select(installed, ref, layer, size) == delivery + short = select(installed, ref, layer, size - 1) + assert_empty(short, "over_budget") + assert short.receipt["required_bytes"] == size + for item, body in zip(delivery.receipt["delivered"], delivery.bodies, strict=True): + lo, hi = item["source_byte_range"] + path = item["source_path"].split("/skill_library/", 1)[1] + assert item["source"]["commit"] == RELEASE_COMMIT + assert item["source_range_verification"] == "verified_at_build" + assert casebook_files[path][lo:hi] == body and item["source_sha256"] == digest(body) + forbidden = item["ref"] + denied = select(installed, ref, layer, size, + permits=lambda pin, op: pin.ref != forbidden) + assert_empty(denied, "permission_denied") + stale = select(installed, ref, layer, size, revision=row["revision"]) + assert_empty(stale, "unavailable_revision") + assert_empty(select(installed, ref, layer, size, permits=lambda pin, op: pin.ref != ref), + "permission_denied") + (navigation,) = result["L0"].bodies + assert ref.partition(":")[2].encode() in navigation and b"description:" in navigation + assert b"metadata:" not in navigation and raw.startswith(navigation) + (decision,) = result["L1"].bodies + _, fields = _skill_search_source(decision.decode()) + card = DecisionSource(ref, row["revision"], "skill", guide, guide, fields).project()["card"] + expected = row["decision"] + assert len(canonical(card)) == expected["card_bytes"] + assert digest(canonical(card)) == expected["card_sha256"] + assert card["missing_fields"] == ["validation"] and card["status"] == "partial" + assert result["L2"].bodies[0] == decision and b"".join(result["L2"].bodies) == raw + assert result["L3"].bodies == tuple( + casebook_files[name] for name in sorted(casebook_files) + if PurePosixPath(name).parent.is_relative_to(PurePosixPath(guide).parent) + ) + + +@pytest.mark.parametrize(("change", "error"), [ + ("dropped file and declaration", "complete original directory"), + ("wrong alias", "original relative source"), ("excerpt", "complete L3 original"), + ("missing L3 attachment", "L3 must deliver"), ("omitted prerequisite", "L2 must deliver"), + ("reversed guide sections", "L2 must deliver"), + ("another guide decision", "L1 must deliver"), ("wrong section", "source range or layer"), + ("conditional override", "unconditional delivery"), + ("unbound host export", "requires checked"), ("identity", "original SKILL.md and identity"), +]) +def test_cannot_publish_a_partial_or_misbound_directory(tmp_path, casebook_files, change, error): + author, release = directory_sources(tmp_path, casebook_files) + ref = "checkout:inference-optimization-casebook" + name = ref.partition(":")[2] + path = author / "compositions" / (name + ".json") + spec = json.loads(path.read_bytes()) + declaration = spec["metadata"]["composition"] + bindings = spec["directory_resources"] + attachment = next(key for key in bindings if key.endswith(".json")) + if change == "dropped file and declaration": + del bindings[attachment] + spec["metadata"]["required_resources"].remove(attachment) + elif change == "wrong alias": + bindings[attachment] = bindings[attachment.removesuffix(".json") + ".md"] + elif change == "excerpt": + bindings[attachment] = "navigation" + elif change == "missing L3 attachment": + declaration["routes"]["originals"]["required"].remove(bindings[attachment]) + elif change == "omitted prerequisite": + del declaration["nodes"]["procedure"]["requires"] + elif change == "reversed guide sections": + del declaration["nodes"]["procedure"]["requires"] + declaration["routes"]["procedure"]["required"] = ["procedure", "decision"] + elif change == "another guide decision": + other = json.loads((path.parent / "ascend-optimization-casebook.json").read_bytes()) + declaration["nodes"]["decision"] = other["metadata"]["composition"]["nodes"]["decision"] + elif change == "conditional override": + declaration["routes"]["alternate"] = { + "layer": "L1", "when": {"backend": ["cpu"]}, "supersedes": ["decision"], + "required": ["navigation"], + } + elif change == "wrong section": + path = author / "atoms" / (name + ".original.json") + spec = json.loads(path.read_bytes()) + spec["parts"]["procedure"]["skill_section"] = "decision" + elif change == "unbound host export": + del spec["directory_resources"] + else: + spec["metadata"]["id"] = "another-directory" + write_json(path, spec) + with pytest.raises(ValueError, match=error): + build_generation(author, tmp_path / "installed", permits=allow, + source_roots={RELEASE_COMMIT: release}) + assert not (tmp_path / "installed").exists() diff --git a/tests/knowledge/test_atomic_casebooks.py b/tests/knowledge/test_atomic_casebooks.py new file mode 100644 index 000000000..0ba0b7efd --- /dev/null +++ b/tests/knowledge/test_atomic_casebooks.py @@ -0,0 +1,305 @@ +"""Casebooks comparison inputs from the released v0.3.4 wheel and its native Reader.""" + +import hashlib +import json +import shutil +from pathlib import Path +from zipfile import ZipFile + +import pytest + +from inferrsi.apps.workflows.knowledge import read_selection +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.decision_cards import DecisionSource, UnknownFinding +from tests.knowledge.test_atomic_generation import RELEASE_ROOT, make_author_root, write_json +from tests.knowledge.test_atomic_reader import allow + +FIXTURES = Path(__file__).resolve().parents[1] / "fixtures" / "atomic-reader" +ATOMS = FIXTURES.parents[2] / "src" / "inferrsi" / "knowledge" / "atoms" +RELEASE_COMMIT = "e2f3be102c66c358803ed2186ed67bf627ebcbdf" +BASELINE = json.loads((FIXTURES / "casebook-domain-v0.3.4.json").read_bytes()) +CASES = {ref: row for ref, row in BASELINE["refs"].items() if row["kind"] == "case"} +FINDINGS = [(ref, index) for ref, row in CASES.items() for index in range(len(row["findings"]))] + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def canonical(value): + return json.dumps(value, ensure_ascii=False, separators=(",", ":"), sort_keys=True).encode() + + +@pytest.fixture(scope="module") +def originals(): + with ZipFile(FIXTURES / "casebook-sources-v0.3.4.zip") as archive: + files = {name: archive.read(name) for name in archive.namelist()} + assert {name: {"bytes": len(raw), "sha256": digest(raw)} for name, raw in files.items()} == ( + BASELINE["files"] + ) + return files + + +def decision_source(ref, originals): + row = CASES[ref] + raw = originals[row["case_aliases"]["case.json"]] + record = json.loads(raw) + assert row["case_file_sha256"] == digest(raw) + return DecisionSource(ref, row["revision"], "case", "case.json", record["content"], record) + + +@pytest.mark.parametrize(("ref", "index"), FINDINGS) +def test_one_released_finding_reproduces_its_native_decision_card(originals, ref, index): + row = CASES[ref] + expected = row["findings"][index] + source = decision_source(ref, originals) + raw = originals[row["case_aliases"]["case.json"]] + excerpt = raw[expected["start_byte"]:expected["end_byte"]] + assert digest(excerpt) == expected["span_sha256"] + finding = json.loads(excerpt) + assert source.record["findings"][index] == finding + assert digest(canonical(finding)) == expected["finding_sha256"] + + selector = expected["selector"] + budget = expected["card_bytes"] + exact = source.project(finding=selector, max_bytes=budget) + card = exact["card"] + assert card["atom"]["pointer"] == expected["pointer"] + assert card["declared"]["finding"] == finding + assert exact["status"] == card["status"] == expected["status"] + assert card["missing_fields"] == expected["missing_fields"] + assert len(canonical(card)) == exact["card_bytes"] == budget + assert digest(canonical(card)) == expected["card_sha256"] + + short = source.project(finding=selector, max_bytes=budget - 1) + assert short["status"] == "over_budget" and "card" not in short + + +@pytest.mark.parametrize("ref", sorted(CASES)) +def test_casebooks_require_a_finding_from_the_selected_case(originals, ref): + source = decision_source(ref, originals) + with pytest.raises(ValueError, match="Select one --finding"): + source.project() + with pytest.raises(UnknownFinding): + source.project(finding=f"case.json#/findings/{len(CASES[ref]['findings'])}") + + +@pytest.mark.parametrize("ref", sorted(CASES)) +def test_case_atoms_keep_both_complete_sources_and_the_original_credit(originals, ref): + row = CASES[ref] + record = decision_source(ref, originals).record + for suffix, resource in (("original", "case.json"), ("guide", record["content"])): + identity = record["id"] + "." + suffix + descriptor = json.loads((ATOMS / (identity + ".json")).read_bytes()) + meta = descriptor["metadata"] + assert (descriptor["authority"], meta["id"]) == ("checkout", identity) + for field in ("origin", "state", "applicability", "limitations", "attribution"): + assert meta[field] == record[field] + assert meta["sources"][1:] == record["sources"] + old_path = row["case_aliases"][resource] + raw = originals[old_path] + assert (ATOMS / descriptor["content"][resource]["path"]).read_bytes() == raw + assert meta["entrypoint"] == resource + pin = meta["sources"][0] + assert (pin["commit"], pin["sha256"]) == (RELEASE_COMMIT, digest(raw)) + assert pin["path"] == "src/inferrsi/knowledge/data/skill_library/" + old_path + assert meta["atom"]["layer"] == "L3" + assert meta["atom"]["source_span"] == { + "source_index": 0, "path": pin["path"], + "byte_range": [0, len(raw)], "sha256": digest(raw), + } + + +@pytest.mark.parametrize(("ref", "index"), FINDINGS) +def test_one_finding_and_its_shared_fields_reproduce_the_released_card(ref, index): + row = CASES[ref] + expected = row["findings"][index] + identity = ref.partition(":")[2] + descriptor = json.loads((ATOMS / (identity + ".original.json")).read_bytes()) + raw = (ATOMS / descriptor["content"]["case.json"]["path"]).read_bytes() + shared = {} + for name in ("origin-state", "sources", "applicability", "limits-attribution"): + part = descriptor["parts"][name] + start, end = part["byte_range"] + data = raw[start:end] + fields = json.loads(b"{" + data + b"}") + assert part["layer"] == "L1" and digest(data) == part["sha256"] + assert part["pointers"] == ["/" + field for field in fields] + shared.update(fields) + part = descriptor["parts"][f"finding-{index}"] + assert (part["layer"], part["pointers"]) == ("L1", [f"/findings/{index}"]) + start, end = part["byte_range"] + assert (start, end) == (expected["start_byte"], expected["end_byte"]) + data = raw[start:end] + assert digest(data) == part["sha256"] == expected["span_sha256"] + shared["findings"] = [{} for _ in range(index)] + [json.loads(data)] + markdown = Path(row["entry_source"]).name + source = DecisionSource(ref, row["revision"], "case", "case.json", markdown, shared) + result = source.project(finding=expected["selector"]) + assert result["status"] == expected["status"] + assert digest(canonical(result["card"])) == expected["card_sha256"] + + +def case_sources(root, originals): + author = make_author_root(root) + release = root / "pinned" + shutil.copytree(RELEASE_ROOT, release) + for name, raw in originals.items(): + path = release / "src/inferrsi/knowledge/data/skill_library" / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(raw) + for ref in CASES: + name = ref.partition(":")[2] + for suffix in ("original", "guide"): + filename = f"{name}.{suffix}.json" + shutil.copyfile(ATOMS / filename, author / "atoms" / filename) + shutil.copyfile(ATOMS.parent / "compositions" / (name + ".json"), + author / "compositions" / (name + ".json")) + shutil.copytree(ATOMS / "casebooks", author / "atoms/casebooks") + return author, release + + +@pytest.fixture(scope="module") +def installed_cases(tmp_path_factory, originals): + root = tmp_path_factory.mktemp("cases") + author, release = case_sources(root, originals) + target = root / "installed" + generation = build_generation(author, target, permits=allow, + source_roots={RELEASE_COMMIT: release}) + return InstalledGeneration(target, expected=generation) + + +def select(installed, ref, layer, budget, **request): + revision = request.pop("revision", installed.catalog[ref]["revision"]) + return read_selection(installed, ref, revision=revision, layer=layer, max_bytes=budget, + context={}, permits=request.pop("permits", allow), **request) + + +def assert_empty(delivery, reason): + assert delivery.receipt["status"] == reason + assert delivery.bodies == () and delivery.receipt["delivered"] == [] + assert delivery.receipt["body_bytes"] == 0 + + +@pytest.mark.parametrize("ref", sorted(CASES)) +def test_public_case_resources_and_layers(installed_cases, originals, ref): + row = CASES[ref] + released = {name: originals[path] for name, path in row["case_aliases"].items()} + record = json.loads(released["case.json"]) + guide = record["content"] + revision = installed_cases.catalog[ref]["revision"] + _, bundle = installed_cases.read_resolved(ref, revision=revision) + assert bundle.content == released and not bundle.dependencies + required = [guide, "case.json", *record["required_resources"]] + assert bundle.metadata["required_resources"] == required + assert bundle.metadata["entrypoint"] == guide + for key in ("origin", "state", "applicability", "limitations", "attribution"): + assert bundle.metadata[key] == record[key] + assert bundle.metadata["sources"][1:] == record["sources"] + for layer in ("L0", "L2", "L3"): + result = select(installed_cases, ref, layer, sum(map(len, released.values()))) + assert result.receipt["status"] == "delivered" + for item, body in zip(result.receipt["delivered"], result.bodies, strict=True): + start, end = item["source_byte_range"] + name = item["source_path"].split("/skill_library/", 1)[1] + assert body == originals[name][start:end] + assert item["source_range_verification"] == "verified_at_build" + if layer == "L0": + assert json.loads(b"{" + result.bodies[0] + b"}")["id"] == record["id"] + elif layer == "L2": + assert result.bodies[-1] == released[guide] + else: + assert result.bodies == (released["case.json"], released[guide]) + for selector in (None, "id:missing", f"case.json#/findings/{len(row['findings'])}"): + result = select(installed_cases, ref, "L1", 100_000, finding=selector) + assert_empty(result, "not_applicable") + assert_empty(select(installed_cases, ref, "L1", 100_000, revision=row["revision"], + finding=row["findings"][0]["selector"]), "unavailable_revision") + + +@pytest.mark.parametrize(("ref", "index"), FINDINGS) +def test_public_selection_delivers_one_released_card(installed_cases, originals, ref, index): + row = CASES[ref] + expected = row["findings"][index] + raw = originals[row["case_aliases"]["case.json"]] + selector = expected["selector"] + result = select(installed_cases, ref, "L1", len(raw), finding=selector) + assert result.receipt["status"] == "delivered" + assert result.receipt["selection"]["canonical_finding"] == selector + assert len(result.bodies) == 5 + fields = {} + for item, body in zip(result.receipt["delivered"], result.bodies, strict=True): + lo, hi = item["source_byte_range"] + assert item["source_range_verification"] == "verified_at_build" + assert item["source"]["commit"] == RELEASE_COMMIT and item["layer"] == "L1" + assert raw[lo:hi] == body and digest(body) == item["source_sha256"] + if [lo, hi] == [expected["start_byte"], expected["end_byte"]]: + assert digest(body) == expected["span_sha256"] and "findings" not in fields + fields["findings"] = [{} for _ in range(index)] + [json.loads(body)] + else: + shared = json.loads(b"{" + body + b"}") + assert not fields.keys() & shared.keys() and "findings" not in shared + fields.update(shared) + card = DecisionSource(ref, row["revision"], "case", "case.json", + Path(row["entry_source"]).name, fields).project(finding=selector)["card"] + assert card["status"] == expected["status"] + assert (len(canonical(card)), digest(canonical(card))) == (expected["card_bytes"], + expected["card_sha256"]) + size = result.receipt["body_bytes"] + assert size == sum(map(len, result.bodies)) + assert select(installed_cases, ref, "L1", size, finding=selector) == result + short = select(installed_cases, ref, "L1", size - 1, finding=selector) + assert_empty(short, "over_budget") + assert short.receipt["required_bytes"] == size + for denied in (ref, ref + ".original.limits-attribution", ref + f".original.finding-{index}"): + refusal = select(installed_cases, ref, "L1", size, finding=selector, + permits=lambda pin, op: pin.ref != denied) + assert_empty(refusal, "permission_denied") + + +@pytest.mark.parametrize(("change", "error"), [ + ("missing alias", "cover the original"), ("another guide", "original relative source"), + ("excerpt", "complete L3 original"), ("stale", "Missing pinned"), ("identity", "identity"), + ("swapped selector", "selected original finding"), + ("optional sibling", "selected original finding"), + ("missing limits", "required original decision field"), + ("optional limits", "required original decision field"), + ("missing sources", "required original decision field"), + ("missing finding route", "every original finding"), +]) +def test_build_refuses_broken_case_bindings(tmp_path, originals, change, error): + author, release = case_sources(tmp_path, originals) + first, second = sorted(CASES)[:2] + directory = author / "compositions" + path = directory / (first.partition(":")[2] + ".json") + spec = json.loads(path.read_bytes()) + declaration = spec["metadata"]["composition"] + nodes, routes = declaration["nodes"], declaration["routes"] + other = json.loads((directory / (second.partition(":")[2] + ".json")).read_bytes()) + if change == "missing alias": + del spec["case_resources"][Path(CASES[first]["case_aliases"]["case.json"]).name] + elif change == "another guide": + nodes["guide"] = other["metadata"]["composition"]["nodes"]["guide"] + elif change == "excerpt": + spec["case_resources"]["case.json"] = "identity" + elif change == "stale": + nodes["original"]["revision"] = "sha256:" + "0" * 64 + elif change == "identity": + spec["metadata"]["id"] = second.partition(":")[2] + elif change == "swapped selector": + routes["finding-0"]["finding"] = routes["finding-1"]["finding"] + elif change == "optional sibling": + routes["finding-0"]["optional"] = ["finding-1"] + elif change == "missing finding route": + del routes["finding-0"] + else: + shared = "sources" if change == "missing sources" else "limits-attribution" + nodes["finding-0"]["requires"].remove(shared) + if change == "optional limits": + routes["finding-0"]["optional"] = [shared] + write_json(path, spec) + target = tmp_path / "published" + with pytest.raises(ValueError, match=error): + build_generation(author, target, permits=allow, source_roots={RELEASE_COMMIT: release}) + assert not target.exists() diff --git a/tests/knowledge/test_atomic_composition.py b/tests/knowledge/test_atomic_composition.py new file mode 100644 index 000000000..5fc8c83ba --- /dev/null +++ b/tests/knowledge/test_atomic_composition.py @@ -0,0 +1,100 @@ +import pytest + +from inferrsi.knowledge.atomic_reader import AtomicReader +from tests.fixtures.atomic_composition import composition, node +from tests.knowledge.test_atomic_reader import Snapshots, allow, excerpt + + +def read(source, pin, layer, budget, **context): + return AtomicReader(source, permits=allow).read_selection( + pin.ref, revision=pin.revision, layer=layer, max_bytes=budget, context=context, + ) + + +def test_required_closure_deduplicates_multiple_paths_and_accounts_for_optional_groups(): + source = Snapshots() + rule, steps, evidence = [source.add(excerpt(layer)) for layer in ("L1", "L2", "L3")] + nodes = {"rule": node(rule), "steps": node(steps, "rule"), "evidence": node(evidence, "rule")} + acceptance = {"layer": "L2", "required": ["rule", "steps"], "optional": ["evidence"]} + pin = source.add(composition(nodes, {"acceptance": acceptance})) + result = read(source, pin, "L2", 2383) + assert result.receipt["body_bytes"] == sum(map(len, result.bodies)) == 2383 + records = result.receipt["delivered"] + assert [r["ref"] for r in records] == [rule.ref, steps.ref] + assert records[0]["paths"] == [["acceptance", "rule"], ["acceptance", "steps", "rule"]] + assert result.receipt["omissions"] == [{"path": ["acceptance", "evidence"], + "reason": "over_budget"}] + assert source.reads.count(rule) == 1 + short = read(source, pin, "L2", 2382) + assert (short.bodies, short.receipt["status"], short.receipt["required_bytes"]) == ( + (), "over_budget", 2383, + ) + complete = read(source, pin, "L2", 4398) + assert [r["bytes"] for r in complete.receipt["delivered"]] == [845, 1538, 2015] + assert ["acceptance", "evidence", "rule"] in complete.receipt["delivered"][0]["paths"] + + +def test_query_and_layer_select_the_frozen_release_excerpts(): + source = Snapshots() + nodes, routes = {}, {} + for layer, query in (("L1", "acceptance criteria"), ("L2", "acceptance criteria"), + ("L3", "roofline example")): + nodes[layer] = node(source.add(excerpt(layer))) + routes[layer] = {"layer": layer, "required": [layer], "when": {"query": [query]}} + pin = source.add(composition(nodes, routes)) + examples = [("L1", 845, "acceptance criteria"), ("L2", 1538, "acceptance criteria"), + ("L3", 2015, "roofline example")] + for layer, size, query in examples: + assert read(source, pin, layer, size, query=query).receipt["body_bytes"] == size + assert read(source, pin, layer, size - 1, query=query).receipt["status"] == "over_budget" + assert read(source, pin, "L3", 9000, query="acceptance criteria").receipt["status"] == ( + "not_applicable" + ) + + +def test_each_selected_route_must_supply_its_declared_layer(): + source = Snapshots() + nodes = {"rule": node(source.add(excerpt("L1"))), "asset": node(source.add(excerpt("L3")))} + routes = {name: {"layer": "L1", "required": [name]} for name in nodes} + pin = source.add(composition(nodes, routes)) + with pytest.raises(ValueError, match="supplying L1"): + read(source, pin, "L1", 9000) + + +def test_only_applicable_supersession_changes_current_routes_and_history_stays_pinned(): + source = Snapshots() + old = source.add(excerpt("L1")) + revised = excerpt("L1") + revised.metadata["id"] = "current-rule" + new = source.add(revised) + nodes = {"old": node(old), "new": node(new)} + routes = {"X": {"layer": "L1", "required": ["old"], "when": {"query": ["current"]}}} + original = source.add(composition(nodes, routes)) + routes["Y"] = {"layer": "L1", "required": ["new"], "when": {"engine": {"min": "0.5"}}, + "supersedes": ["X"], "conflicts": ["X"]} + current = source.add(composition(nodes, routes)) + for pin, engine, expected in [(current, "v0.4", old), (current, "v0.5", new), + (original, "v0.5", old)]: + result = read(source, pin, "L1", 3000, engine=engine, query="current") + assert [r["ref"] for r in result.receipt["delivered"]] == [expected.ref] + routes["Y"].pop("supersedes") + conflicting = source.add(composition(nodes, routes)) + source.reads.clear() + conflict = read(source, conflicting, "L1", 3000, engine="v0.5", query="current") + assert conflict.receipt["status"] == "conflict" and not conflict.bodies + assert source.reads == [conflicting] + + +@pytest.mark.parametrize("bad", ["cycle", "dangling", "supersedes cycle"]) +def test_invalid_composition_fails_before_releasing_any_atom(bad): + source = Snapshots() + nodes = {"leaf": node(source.add(excerpt("L1")))} + routes = {"selected": {"layer": "L1", "required": ["leaf"]}} + if bad == "supersedes cycle": + routes["selected"]["supersedes"] = ["selected"] + else: + nodes["leaf"]["requires"] = ["missing" if bad == "dangling" else "leaf"] + pin = source.add(composition(nodes, routes)) + with pytest.raises(ValueError, match="Cycle|names declared"): + read(source, pin, "L1", 1) + assert source.reads == [pin] diff --git a/tests/knowledge/test_atomic_generation.py b/tests/knowledge/test_atomic_generation.py new file mode 100644 index 000000000..07a238aaf --- /dev/null +++ b/tests/knowledge/test_atomic_generation.py @@ -0,0 +1,332 @@ +import hashlib +import json +from concurrent.futures import ThreadPoolExecutor +from functools import partial +from pathlib import Path + +import pytest + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import PUBLIC_TASKS, SEAL, InstalledGeneration, digest +from inferrsi.knowledge.atomic_reader import AtomicReader, AtomPin, AtomUse +from inferrsi.knowledge.knowledge_operations import Bundle, UnavailableRevision, _json +from tests.fixtures.atomic_composition import composition, metadata, node +from tests.knowledge.test_atomic_reader import RELEASE, UPSTREAM, allow, excerpt + +RELEASE_ROOT = Path(__file__).resolve().parents[1] / "fixtures/atomic-reader/release-v0.3.4" +build_release = partial(build_generation, source_roots={RELEASE: RELEASE_ROOT}) + + +def write_json(path, obj): + path.write_text(json.dumps(obj, ensure_ascii=False), encoding="utf-8") + + +def local_atom(name, layer, body): + sha = hashlib.sha256(body).hexdigest() + fields = metadata(name, "knowledge", "body", {"type": "fixture", "sha256": sha}) + fields["atom"] = { + "layer": layer, "when": {}, "license": "Apache-2.0", + "permissions": {"read": True, "retain": True, "redistribute": True}, + "source_span": {"source_index": 0, "byte_range": [0, len(body)], + "path": "sample", "sha256": sha}, + } + return Bundle(fields, {"body": body}, {}) + + +def make_author_root(tmp_path): + root = tmp_path / "source" + atoms, compositions = root / "atoms", root / "compositions" + (atoms / "inputs").mkdir(parents=True) + compositions.mkdir() + nav = local_atom("navigation", "L0", b"See [criteria](references/criteria.md).\n") + binary = local_atom("attachment", "L3", bytes([0xff, 0x00, 0x22])) + nodes = {} + for bundle in [nav, binary, *(excerpt(level) for level in ("L1", "L2", "L3"))]: + identity = bundle.metadata["id"] + name, data = next(iter(bundle.content.items())) + if identity == "navigation": + source = {"text": data.decode()} + else: + relative = "inputs/" + identity + (atoms / relative).write_bytes(data) + source = {"path": relative} + write_json(atoms / (identity + ".json"), + {"metadata": bundle.metadata, "content": {name: source}}) + nodes[identity] = node(AtomPin("package:" + identity, bundle.revision)) + nodes["ceiling-l2"]["requires"] = ["ceiling-l1"] + routes = { + "navigate": {"layer": "L0", "required": ["navigation"]}, + "rules": {"layer": "L1", "required": ["ceiling-l1"]}, + "steps": {"layer": "L2", "required": ["ceiling-l1", "ceiling-l2"], + "optional": ["ceiling-l3"], "when": {"query": ["acceptance criteria"]}}, + "attachment": {"layer": "L3", "required": ["attachment"]}, + } + for skill_name in sorted(PUBLIC_TASKS | {"analysis-example"}): + fields = composition(nodes, routes).metadata + fields["id"] = "entry-" + skill_name + del fields["entrypoint"] + fields["composition"]["skill"] = { + "name": skill_name, "description": "Inspect the fixture.", + "body": "navigation", "resources": {"references/criteria.md": "ceiling-l2", + "assets/example.bin": "attachment"}, + } + write_json(compositions / (skill_name + ".json"), {"metadata": fields}) + return root + + +@pytest.fixture +def author_root(tmp_path): + return make_author_root(tmp_path) + + +def file_bytes(root: Path): + return {p.relative_to(root).as_posix(): p.read_bytes() for p in root.rglob("*") if p.is_file()} + + +def test_same_source_builds_byte_identical_catalog_skills_and_pinned_reader(author_root, tmp_path): + first, second = tmp_path / "install-a", tmp_path / "install-b" + generation = build_release(author_root, first, permits=allow) + assert build_release(author_root, second, permits=allow) == generation + assert file_bytes(first) == file_bytes(second) + assert build_release(author_root, first, permits=allow) == generation + assert not list(author_root.rglob("SKILL.md")) + assert not list(first.rglob("skill-index.json")) + installed = InstalledGeneration(first, expected=generation) + reader = AtomicReader(installed, permits=allow) + assert set(installed.tasks) == PUBLIC_TASKS + assert set(installed.skills) == PUBLIC_TASKS | {"analysis-example"} + for name, ref in installed.skills.items(): + host = first / "skills" / name + header = (host / "SKILL.md").read_text(encoding="utf-8") + assert header == (f'---\nname: "{name}"\ndescription: "Inspect the fixture."\n---\n\n' + "See [criteria](references/criteria.md).\n") + assert (host / "references/criteria.md").read_bytes() == next( + iter(excerpt("L2").content.values())) + assert (host / "assets/example.bin").read_bytes() == bytes([0xff, 0, 0x22]) + entry = installed.catalog[ref] + request = dict(revision=entry["revision"], layer="L2", max_bytes=2383, + context={"query": "acceptance criteria"}) + chosen = reader.read_selection(ref, **request) + assert [len(body) for body in chosen.bodies] == [845, 1538] + assert chosen.receipt["body_bytes"] == 2383 + assert all(item["source_range_verification"] == "verified_at_build" + for item in chosen.receipt["delivered"]) + short = reader.read_selection(ref, **{**request, "max_bytes": 2382}) + assert short.receipt["status"] == "over_budget" and not short.bodies + with pytest.raises(UnavailableRevision): + installed.read_resolved(ref.replace("package:", "checkout:"), + revision=entry["revision"]) + + +def test_source_attestation_needs_the_callers_release_pin(author_root, tmp_path): + destination = tmp_path / "install" + release_id = build_release(author_root, destination, permits=allow) + pinned = InstalledGeneration(destination, expected=release_id) + unpinned = InstalledGeneration(destination) + ref = pinned.tasks["task-debug"] + request = dict(revision=pinned.catalog[ref]["revision"], layer="L2", max_bytes=2383, + context={"query": "acceptance criteria"}) + attested = AtomicReader(pinned, permits=allow).read_selection(ref, **request) + declared = AtomicReader(unpinned, permits=allow).read_selection(ref, **request) + assert attested.bodies == declared.bodies + assert [len(body) for body in attested.bodies] == [845, 1538] + verified = attested.receipt["delivered"] + assert [item["source_range_verification"] for item in verified] == ["verified_at_build"] * 2 + assert declared.receipt == { + **attested.receipt, + "delivered": [{**item, "source_range_verification": "declared"} for item in verified], + } + with pytest.raises(UnavailableRevision): + InstalledGeneration(destination, expected="sha256:" + "0" * 64) + + +def test_one_read_reports_the_external_source_check_for_each_atom(author_root, tmp_path): + external = tmp_path / "original" + external.mkdir() + body = (author_root / "atoms/inputs/attachment").read_bytes() + (external / "sample").write_bytes(body) + roots = {RELEASE: RELEASE_ROOT, digest(body): external} + target = tmp_path / "installation" + generation = build_generation(author_root, target, permits=allow, source_roots=roots) + installed = InstalledGeneration(target, expected=generation) + uses = [] + for name in ("ceiling-l1", "navigation", "attachment"): + ref = "package:" + name + uses.append(AtomUse(AtomPin(ref, installed.catalog[ref]["revision"]), (name,))) + delivery = AtomicReader(installed, permits=allow).read_group( + uses, context={}, max_bytes=10000, + ) + assert [item["source_range_verification"] for item in delivery.receipt["delivered"]] == [ + "verified_at_build", "declared", "verified_at_build", + ] + assert delivery.bodies[-1] == body + (external / "sample").write_bytes(b"wrong external source") + with pytest.raises(ValueError, match="Complete pinned source file differs"): + build_generation(author_root, tmp_path / "corrupt", permits=allow, source_roots=roots) + assert not (tmp_path / "corrupt").exists() + + +def test_host_procedure_assembles_pinned_sections_without_changing_l0(author_root, tmp_path): + descriptor = author_root / "compositions/task-debug.json" + spec = json.loads(descriptor.read_bytes()) + skill = spec["metadata"]["composition"]["skill"] + skill["sections"] = ["ceiling-l1", "ceiling-l2"] + skill["resources"]["references/acceptance-criteria.md"] = "ceiling-l2" + write_json(descriptor, spec) + destination = tmp_path / "install" + build_release(author_root, destination, permits=allow) + installed = InstalledGeneration(destination) + ref = installed.tasks["task-debug"] + navigation = AtomicReader(installed, permits=allow).read_selection( + ref, revision=installed.catalog[ref]["revision"], layer="L0", context={}, max_bytes=100, + ) + assert navigation.bodies == (b"See [criteria](references/criteria.md).\n",) + host = (destination / "skills/task-debug/SKILL.md").read_bytes() + assert host.split(b"\n---\n\n", 1)[1] == navigation.bodies[0] + b"".join( + next(iter(excerpt(layer).content.values())) for layer in ("L1", "L2") + ) + + +@pytest.mark.parametrize("header", [ + None, + "---\nname: task-performance\ndescription: Inspect the fixture.\n---\n", + "---\nname: task-debug\ndescription: Inspect the fixture.\n---\nextra instructions\n", + "---\nname: task-debug\ndescription: Inspect the fixture.\n", +]) +def test_invalid_host_header_rejects_generation(author_root, tmp_path, header): + descriptor = author_root / "compositions/task-debug.json" + spec = json.loads(descriptor.read_bytes()) + spec["metadata"]["composition"]["skill"]["frontmatter"] = "host.yaml" + if header is not None: + spec.setdefault("content", {})["host.yaml"] = {"text": header} + write_json(descriptor, spec) + target = tmp_path / "install" + with pytest.raises(ValueError, match="frontmatter"): + build_release(author_root, target, permits=allow) + assert not target.exists() + + +@pytest.mark.parametrize("change", [ + "missing task", "missing revision", "retain", "license", "policy", "outside", + "alias", "wrong layer", "incomplete skill", "missing relative link", + "undeclared section", "repeated section", "missing section link", "no license", +]) +def test_invalid_candidate_publishes_no_partial_tree(author_root, tmp_path, change): + descriptor = author_root / "compositions/task-debug.json" + spec = json.loads(descriptor.read_bytes()) + dec = spec["metadata"]["composition"] + if change == "missing task": + descriptor.unlink() + elif change == "outside": + spec["content"] = {"source": {"path": "../sibling"}} + elif change == "missing revision": + dec["nodes"]["navigation"]["revision"] = "sha256:" + "0" * 64 + elif change == "retain": + dec["permissions"]["retain"] = False + elif change == "license": + dec["license"] = "NOASSERTION" + elif change == "no license": + dec["license"] = "NO_LICENSE" + elif change == "wrong layer": + dec["routes"]["rules"]["required"] = ["attachment"] + elif change == "incomplete skill": + dec["skill"]["resources"]["assets/missing"] = "not-declared" + elif change == "missing relative link": + del dec["skill"]["resources"]["references/criteria.md"] + elif change == "undeclared section": + dec["skill"]["sections"] = ["absent"] + elif change == "repeated section": + dec["skill"]["sections"] = ["navigation"] + elif change == "missing section link": + dec["skill"]["sections"] = ["ceiling-l1"] + elif change == "alias": + dec["skill"]["resources"]["assets/Example.bin"] = "attachment" + if descriptor.exists(): + write_json(descriptor, spec) + + def policy(pin, op): + return not (change == "policy" and pin.ref == "package:ceiling-l1" and op == "redistribute") + + with pytest.raises((ValueError, PermissionError)): + build_release(author_root, tmp_path / "generation", permits=policy) + assert not (tmp_path / "generation").exists() + + +def test_pinned_history_survives_new_build_and_mixed_install_is_rejected(author_root, tmp_path): + first, second = tmp_path / "release-a", tmp_path / "release-b" + old_id = build_release(author_root, first, permits=allow) + original = InstalledGeneration(first) + spec = author_root / "compositions/task-debug.json" + obj = json.loads(spec.read_bytes()) + obj["metadata"]["limitations"] = ["revision B"] + write_json(spec, obj) + new_id = build_release(author_root, second, permits=allow) + assert new_id != old_id + with pytest.raises(UnavailableRevision): + build_release(author_root, first, permits=allow) + new = InstalledGeneration(second) + ref = original.tasks["task-debug"] + revision = original.catalog[ref]["revision"] + assert original.read_resolved(ref, revision=revision)[1].revision == revision + with pytest.raises(UnavailableRevision): + new.read_resolved(ref, revision=revision) + (first / SEAL).write_bytes((second / SEAL).read_bytes()) + with pytest.raises(ValueError, match="differ"): + InstalledGeneration(first) + assert original.read_resolved(ref, revision=revision)[1].revision == revision + + +def test_concurrent_identical_builders_share_one_complete_destination(author_root, tmp_path): + destination = tmp_path / "generation" + with ThreadPoolExecutor(max_workers=2) as pool: + first, second = [pool.submit(build_release, author_root, destination, permits=allow) + for _ in range(2)] + assert first.result() == second.result() == InstalledGeneration(destination).generation + + +def test_installed_catalog_must_match_the_exporter_even_if_resealed(author_root, tmp_path): + destination = tmp_path / "generation" + build_release(author_root, destination, permits=allow) + path = destination / SEAL + seal = json.loads(path.read_bytes()) + del seal["generation"] + seal["skills"]["task-debug"] = seal["skills"]["task-accuracy"] + seal["generation"] = "sha256:" + digest(_json(seal)) + path.write_bytes(_json(seal)) + with pytest.raises(ValueError, match="composition exports"): + InstalledGeneration(destination) + + +def test_same_length_shift_cannot_publish_a_false_source_range(author_root, tmp_path): + descriptor = author_root / "atoms/ceiling-l1.json" + spec = json.loads(descriptor.read_bytes()) + span = spec["metadata"]["atom"]["source_span"] + start, end = span["byte_range"] + original = (RELEASE_ROOT / span["path"]).read_bytes() + body = (author_root / "atoms/inputs/ceiling-l1").read_bytes() + assert original[start:end] == body and original[start + 1:end + 1] != body + span["byte_range"] = [start + 1, end + 1] + write_json(descriptor, spec) + changed = Bundle(spec["metadata"], {"rule.md": body}, {}) + for path in (author_root / "compositions").glob("*.json"): + composition_spec = json.loads(path.read_bytes()) + nodes = composition_spec["metadata"]["composition"]["nodes"] + nodes["ceiling-l1"]["revision"] = changed.revision + write_json(path, composition_spec) + with pytest.raises(ValueError, match="pinned source range"): + build_release(author_root, tmp_path / "install", permits=allow) + assert not (tmp_path / "install").exists() + + +def test_pinned_source_checks_the_complete_file_and_its_immutable_root(author_root, tmp_path): + alternate = tmp_path / "wrong-release" + path = UPSTREAM + "SKILL.md" + old = (RELEASE_ROOT / path).read_bytes() + (alternate / path).parent.mkdir(parents=True) + (alternate / path).write_bytes(b"X" + old[1:]) + destination = tmp_path / "install" + for roots, reason in (({RELEASE: alternate}, "Complete pinned source file differs"), + ({"0" * 40: RELEASE_ROOT}, "Missing pinned source root")): + with pytest.raises(ValueError, match=reason): + build_generation(author_root, destination, source_roots=roots, permits=allow) + assert not destination.exists() diff --git a/tests/knowledge/test_atomic_playbook_resources.py b/tests/knowledge/test_atomic_playbook_resources.py new file mode 100644 index 000000000..7c7bd214e --- /dev/null +++ b/tests/knowledge/test_atomic_playbook_resources.py @@ -0,0 +1,127 @@ +"""Released Playbook resources that other Workflow guides navigate to.""" +import hashlib +import json +import posixpath +import shutil +from pathlib import Path, PurePosixPath +from urllib.parse import urlsplit + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.atomic_reader import AtomicReader, AtomPin, AtomUse +from tests.knowledge.test_atomic_generation import RELEASE_ROOT, make_author_root +from tests.knowledge.test_atomic_reader import RELEASE, allow + +FIXTURE = Path(__file__).resolve().parents[1] / "fixtures/atomic-reader/playbook-domain-v0.3.4.json" +ATOMS = Path(__file__).resolve().parents[2] / "src/inferrsi/knowledge/atoms" +LIBRARY = "src/inferrsi/knowledge/data/skill_library/" +# Canonical digests of the metadata inherited from each released checkout manifest. +OWNER_METADATA = { + "checkout:optimization-search-policy": + "f69689fea3effe0f8186347430ad2d0fcc6d92406e9ab43158ae9d74fbfa76e4", + "checkout:performance-ceiling-analysis": + "fb72e7a467bbb83077c17670d3f777f52ff01579ae1a32fede5c56e0c18886b2", +} + + +def test_released_playbook_guide_links_preserve_directory_and_read_scope(): + baseline = json.loads(FIXTURE.read_bytes()) + required_external = {} + local_count = denied_count = 0 + for owner, entry in baseline["refs"].items(): + for href, link in entry.get("relative_guide_links", {}).items(): + directory = PurePosixPath(entry["guide"]).parent + path = posixpath.normpath(posixpath.join(str(directory), urlsplit(href).path)) + assert path == (link.get("path") or link["normalized"]) + assert link["in_directory"] == PurePosixPath(path).is_relative_to(directory) + if link["in_directory"]: + assert entry["required_resources"][path] == link["sha256"] + local_count += 1 + elif path in entry["required_resources"]: + assert entry["required_resources"][path] == link["sha256"] + assert entry["dependencies"][path] == "sha256:" + link["sha256"] + required_external.setdefault(owner, []).append(path) + else: + assert path not in entry["dependencies"] + denied_count += 1 + + assert (local_count, denied_count) == (68, 27) + assert {owner: len(paths) for owner, paths in required_external.items()} == { + "checkout:dense-performance-evidence": 1, + "checkout:inference-benchmark-design": 1, + "checkout:optimization-search-policy": 8, + } + + +def test_installed_reader_reopens_original_playbook_navigation_material(tmp_path): + baseline = json.loads(FIXTURE.read_bytes()) + assert baseline["source_commit"] == RELEASE + authors = make_author_root(tmp_path) + release = tmp_path / "release" + shutil.copytree(RELEASE_ROOT, release) + targets = list(baseline["workflow_navigation_targets"].items()) + policy = "checkout:optimization-search-policy" + adaptation = PurePosixPath(baseline["workflow_navigation_targets"][policy]) + notes = adaptation.parent.parent / "references/source-notes.md" + targets.append((policy, notes.as_posix())) + resources = {} + for owner, old_path in targets: + path = PurePosixPath(old_path) + old_entry = PurePosixPath(baseline["refs"][owner]["entrypoint"]) + atom_id = old_entry.parent.name + "." + path.stem + descriptor = atom_id + ".json" + shutil.copyfile(ATOMS / descriptor, authors / "atoms" / descriptor) + owner_root = PurePosixPath("playbooks", old_entry.parent.name) + location = owner_root / path.relative_to(old_entry.parent) + body = (ATOMS / location).read_bytes() + checksum = hashlib.sha256(body).hexdigest() + assert baseline["files"][old_path] == {"bytes": len(body), "sha256": checksum} + assert baseline["refs"][owner]["required_resources"][old_path] == checksum + for copy in (authors / "atoms" / location, release / LIBRARY / path): + copy.parent.mkdir(parents=True, exist_ok=True) + copy.write_bytes(body) + resources["checkout:" + atom_id] = (owner, old_path, body) + + target = tmp_path / "installed" + generation = build_generation(authors, target, source_roots={RELEASE: release}, permits=allow) + installed = InstalledGeneration(target, expected=generation) + reader = AtomicReader(installed, permits=allow) + for ref, (owner, path, body) in resources.items(): + pin = AtomPin(ref, installed.catalog[ref]["revision"]) + use = AtomUse(pin, (ref,)) + request = {"max_bytes": len(body), "context": {}, "operations": ("retain", "redistribute")} + delivery = reader.read_group([use], **request) + assert delivery.bodies == (body,) + record, = delivery.receipt["delivered"] + assert record["ref"] == ref and record["revision"] == pin.revision + assert record["layer"] == "L3" + assert record["source_range_verification"] == "verified_at_build" + assert record["source"]["commit"] == RELEASE and record["source_path"] == LIBRARY + path + assert record["source_byte_range"] == [0, len(body)] + assert record["source"]["sha256"] == record["sha256"] == baseline["files"][path]["sha256"] + _, original = installed.read_resolved(ref, revision=pin.revision) + metadata = original.metadata + fields = ("origin", "applicability", "limitations", "state", + "empirical_validation", "attribution") + inherited = {key: metadata[key] for key in fields} + encoded = json.dumps(inherited, sort_keys=True, ensure_ascii=False, + separators=(",", ":")).encode() + assert hashlib.sha256(encoded).hexdigest() == OWNER_METADATA[owner] + assert metadata["state"] == "candidate" and metadata["empirical_validation"] == "not_run" + + short = reader.read_group([use], **{**request, "max_bytes": len(body) - 1}) + assert short.receipt == {"status": "over_budget", "body_bytes": 0, + "delivered": [], "required_bytes": len(body)} + stale = AtomUse(AtomPin(ref, baseline["refs"][owner]["revision"]), (ref,)) + expired = reader.read_group([stale], **request) + denied = AtomicReader(installed, permits=lambda _, action: action != "retain").read_group( + [use], **request) + assert expired.receipt["status"] == "unavailable_revision" + assert denied.receipt["status"] == "permission_denied" + assert short.bodies == expired.bodies == denied.bodies == () + assert not expired.receipt["delivered"] and not denied.receipt["delivered"] + + assert b"[source notes](../references/source-notes.md)" in resources[ + "checkout:optimization-search-policy.adaptation-interfaces"][2] + notes_body = resources["checkout:optimization-search-policy.source-notes"][2] + assert b"No source PDF is redistributed." in notes_body diff --git a/tests/knowledge/test_atomic_reader.py b/tests/knowledge/test_atomic_reader.py new file mode 100644 index 000000000..ab6f8a123 --- /dev/null +++ b/tests/knowledge/test_atomic_reader.py @@ -0,0 +1,248 @@ +import hashlib +from pathlib import Path + +import pytest + +from inferrsi.knowledge.atomic_reader import AtomicReader, AtomPin, AtomUse, applies +from inferrsi.knowledge.knowledge_operations import Bundle, UnavailableRevision +from inferrsi.knowledge.knowledge_store import KnowledgeStore + +FIXTURES = Path(__file__).resolve().parents[1] / "fixtures" / "atomic-reader" +UPSTREAM = ( + "src/inferrsi/knowledge/data/skill_library/playbooks/measurement/performance-ceiling-analysis/" +) +RELEASE = "e2f3be102c66c358803ed2186ed67bf627ebcbdf" +SOURCE_DIGESTS = { + "L1": "baeab73fb1fbf09da6ae0930b380720c66d9dc8085f8ccd1fb61381bb894799f", + "L2": "e96efc42005af591a87b57dd6f1e9bffa8e351bcd023bd093ac37239a0486638", + "L3": "597cd3205df043cff3ae9d15924c77934e8d8eb300c00c4840f6bb2921f90faf", +} +EXCERPTS = { + "L1": ( + "rule.md", "SKILL.md", 10266, 11111, + "b4e6bdffe5cf990a6be96b6ae8d1b442cf61b47f63bcd8949aae6650ab538089", + ), + "L2": ( + "steps.md", "references/acceptance-criteria.md", 252, 1790, + "b1c9caafde8ac6912a5e4678bd11212a68016fb685a633970c69ad4977d9134a", + ), + "L3": ( + "roofline-example.json", "references/roofline-example.json", 0, 2015, + "597cd3205df043cff3ae9d15924c77934e8d8eb300c00c4840f6bb2921f90faf", + ), +} + + +def excerpt(layer): + filename, path, start, end, digest = EXCERPTS[layer] + return Bundle( + { + "id": "ceiling-" + layer.lower(), "kind": "knowledge", "entrypoint": filename, + "state": "candidate", "applicability": {}, "limitations": [], + "sources": [{ + "type": "git", "url": "https://github.com/InferMatrixLab/InferRSI", + "commit": RELEASE, "path": UPSTREAM + path, "sha256": SOURCE_DIGESTS[layer], + }], + "attribution": "InferMatrixLab/InferRSI", + "atom": { + "layer": layer, "license": "Apache-2.0", "when": {}, + "permissions": {"read": True, "retain": True, "redistribute": True}, + "source_span": { + "source_index": 0, "path": UPSTREAM + path, + "byte_range": [start, end], "sha256": digest, + }, + }, + }, + {filename: (FIXTURES / filename).read_bytes()}, {}, + ) + + +class Snapshots: + def __init__(self): + self.items = {} + self.reads = [] + + def add(self, bundle, authority="package"): + pin = AtomPin(f"{authority}:{bundle.metadata['id']}", bundle.revision) + self.items[pin] = (pin.ref, bundle) + return pin + + def read_resolved(self, reference, *, revision): + pin = AtomPin(reference, revision) + self.reads.append(pin) + if pin not in self.items: + raise UnavailableRevision(reference) + return self.items[pin] + + +def allow(pin, operation): + return True + + +def test_required_paths_share_bytes_and_receipts_reopen_the_exact_version(): + source = Snapshots() + rule, steps = (source.add(excerpt(level)) for level in ("L1", "L2")) + uses = [AtomUse(rule, ("rule",)), AtomUse(rule, ("prerequisite", "rule")), + AtomUse(steps, ("steps",))] + reader = AtomicReader(source, permits=allow) + result = reader.read_group(uses, max_bytes=2383, context={}) + assert result.receipt["status"] == "delivered" + assert result.receipt["body_bytes"] == sum(map(len, result.bodies)) == 2383 + assert source.reads == [rule, steps] + records = result.receipt["delivered"] + assert [record["paths"] for record in records] == [ + [["rule"], ["prerequisite", "rule"]], [["steps"]], + ] + for (pin, level), record, body in zip([(rule, "L1"), (steps, "L2")], records, result.bodies): + filename, path, start, end, digest = EXCERPTS[level] + assert record["ref"] == pin.ref and record["revision"] == pin.revision + assert record["layer"] == level and record["bytes"] == end - start + assert record["source"]["commit"] == RELEASE and record["source_path"] == UPSTREAM + path + assert record["source_byte_range"] == [start, end] + assert record["source_range_verification"] == "declared" + assert record["source_sha256"] == record["sha256"] == hashlib.sha256(body).hexdigest() + assert record["sha256"] == digest + _, pinned = source.read_resolved(record["ref"], revision=record["revision"]) + assert body == pinned.content[filename] == (FIXTURES / filename).read_bytes() + short = reader.read_group(uses, max_bytes=2382, context={}) + assert short.bodies == () + assert short.receipt == { + "status": "over_budget", "body_bytes": 0, "delivered": [], "required_bytes": 2383, + } + + +@pytest.mark.parametrize("level,size", [("L2", 1538), ("L3", 2015)]) +def test_layer_budget_counts_the_last_byte(level, size): + source = Snapshots() + uses = [AtomUse(source.add(excerpt(level)), ("direct",))] + reader = AtomicReader(source, permits=allow) + complete = reader.read_group(uses, max_bytes=size, context={}) + assert complete.receipt["body_bytes"] == len(complete.bodies[0]) == size + short = reader.read_group(uses, max_bytes=size - 1, context={}) + assert short.receipt["status"] == "over_budget" and short.bodies == () + + +def test_authorities_cannot_lend_each_other_bytes_revisions_or_grants(): + source = Snapshots() + original = excerpt("L1") + first = source.add(original, "package") + second = source.add(original, "checkout") + uses = [AtomUse(pin, ("rule",)) for pin in (first, second)] + reader = AtomicReader(source, permits=allow) + result = reader.read_group(uses, max_bytes=1690, context={}) + assert [r["ref"] for r in result.receipt["delivered"]] == [first.ref, second.ref] + assert len(result.bodies) == 2 and result.receipt["body_bytes"] == 1690 + source.reads.clear() + denied = AtomicReader(source, permits=lambda pin, op: pin == first) + result = denied.read_group(uses, max_bytes=1690, context={}) + assert source.reads == [] + assert result.bodies == () and result.receipt == { + "status": "permission_denied", "delivered": [], "body_bytes": 0, + } + del source.items[second] + updated = excerpt("L1") + updated.metadata["limitations"] = ["Fixture revision B"] + source.add(updated, "checkout") + result = reader.read_group(uses, max_bytes=1690, context={}) + assert result.bodies == () and result.receipt == { + "status": "unavailable_revision", "delivered": [], "body_bytes": 0, + } + + +def test_operation_rights_and_conditions_apply_before_any_body_is_delivered(): + source = Snapshots() + steps = excerpt("L2") + steps.metadata["atom"].update( + permissions={"read": True, "retain": False, "redistribute": True}, + license="NOASSERTION", when={"engine": ["v0.4", "v0.5"], "backend": ["gpu"]}, + ) + uses = [AtomUse(source.add(excerpt("L1")), ("rule",)), AtomUse(source.add(steps), ("steps",))] + reader = AtomicReader(source, permits=allow) + matching = {"engine": "v0.5", "backend": "gpu"} + result = reader.read_group(uses, max_bytes=2383, context=matching) + assert result.receipt["status"] == "delivered" + for operation in ("retain", "redistribute"): + result = reader.read_group(uses, max_bytes=2383, context=matching, operations=[operation]) + assert result.bodies == () and result.receipt["status"] == "permission_denied" + for context in ({}, {"engine": "v0.4"}, {**matching, "engine": "v0"}): + result = reader.read_group(uses, max_bytes=2383, context=context) + assert result.bodies == () and result.receipt["status"] == "not_applicable" + + +@pytest.mark.parametrize("change", ["digest", "range", "locator", "unstable", "condition"]) +def test_invalid_source_declaration_cannot_mint_a_receipt(change): + source = Snapshots() + bundle = excerpt("L2") + atom = bundle.metadata["atom"] + if change == "digest": + atom["source_span"]["sha256"] = "0" * 64 + elif change == "range": + atom["source_span"]["byte_range"][1] += 1 + elif change == "locator": + atom["source_span"]["path"] = "../outside.md" + elif change == "unstable": + bundle.metadata["sources"][0]["commit"] = RELEASE[:7] + else: + atom["when"] = {"engine": "v0.5"} + pin = source.add(bundle) + with pytest.raises(ValueError): + AtomicReader(source, permits=allow).read_group( + [AtomUse(pin, ("steps",))], max_bytes=1538, context={"engine": "v0"}, + ) + + +def test_existing_knowledge_store_can_reopen_old_atom_after_metadata_update(tmp_path): + store = KnowledgeStore(tmp_path, skill_root=None) + old = excerpt("L2") + pin = AtomPin("store:" + old.metadata["id"], store.create(old)) + latest = excerpt("L2") + latest.metadata["limitations"] = ["For the matching engine only"] + assert store.update(latest, expected=pin.revision, reason="Clarify bounds", evidence=[]) != ( + pin.revision + ) + reader = AtomicReader(store.reader(), permits=allow) + result = reader.read_group([AtomUse(pin, ("historical",))], max_bytes=1538, context={}) + assert result.bodies == (old.content["steps.md"],) + assert result.receipt["delivered"][0]["revision"] == pin.revision + + +def test_release_bounds_route_only_matching_numeric_versions_and_keep_exact_names(): + source = Snapshots() + steps = excerpt("L2") + steps.metadata["atom"]["when"] = { + "engine": {"min": "v0.5", "before": "1.0"}, "backend": ["gpu"], + } + uses = [AtomUse(source.add(steps), ("release-steps",))] + reader = AtomicReader(source, permits=allow) + for version in ("0.5", "v0.5.0", "v0.10", "0.99.2"): + context = {"engine": version, "backend": "gpu"} + result = reader.read_group(uses, max_bytes=1538, context=context) + assert result.bodies == (steps.content["steps.md"],) + for version in ("0.4.99", "1", "v1.0.0", "nightly", "v0.5rc1"): + context = {"engine": version, "backend": "gpu"} + result = reader.read_group(uses, max_bytes=1538, context=context) + assert result.bodies == () and result.receipt["status"] == "not_applicable" + assert applies({"engine": {"min": "0.0"}}, {"engine": "v0"}) + assert applies({"engine": {"before": "0.5"}}, {"engine": "v0.4"}) + assert not applies({"engine": {"before": "0.5"}}, {}) + assert applies({"engine": ["v0.5rc1", "nightly"]}, {"engine": "nightly"}) + + +@pytest.mark.parametrize("condition", [ + {}, {"min": "nightly"}, {"before": None}, {"min": 0.5}, + {"min": "0.5", "before": "0.5.0"}, {"min": "0.10", "before": "0.5"}, + {"unknown": "0.5"}, [], +]) +def test_invalid_release_range_is_reported_even_after_an_unmatched_condition(condition): + with pytest.raises(ValueError): + applies({"backend": ["gpu"], "engine": condition}, {}) + + +def test_receipt_retains_its_pinned_provenance_when_source_metadata_is_edited(): + source = Snapshots() + rule = excerpt("L1") + rule.metadata["sources"][0]["upstream_refs"] = ["release"] + uses = [AtomUse(source.add(rule), ("rule",))] + result = AtomicReader(source, permits=allow).read_group(uses, max_bytes=845, context={}) + rule.metadata["sources"][0]["upstream_refs"].append("latest") + assert result.receipt["delivered"][0]["source"]["upstream_refs"] == ["release"] diff --git a/tests/knowledge/test_atomic_records.py b/tests/knowledge/test_atomic_records.py new file mode 100644 index 000000000..35ac8dd51 --- /dev/null +++ b/tests/knowledge/test_atomic_records.py @@ -0,0 +1,293 @@ +import hashlib +import json +import shutil +from collections import Counter +from pathlib import Path +from zipfile import ZipFile + +import pytest + +from inferrsi.apps.workflows.knowledge import read_selection +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.atomic_json import matches_span, member_spans +from inferrsi.knowledge.decision_cards import DecisionSource +from inferrsi.knowledge.knowledge_operations import Bundle +from tests.knowledge.test_atomic_generation import RELEASE_ROOT, make_author_root, write_json +from tests.knowledge.test_atomic_reader import RELEASE, allow + +FIXTURES = Path(__file__).resolve().parents[1] / "fixtures/atomic-reader" +BASELINE = json.loads((FIXTURES / "record-domain-v0.3.4.json").read_bytes()) +LIBRARY = FIXTURES.parents[2] / "src/inferrsi/knowledge" +SELF_CONTAINED = sorted( + ref for ref, row in BASELINE["records"].items() if row["old_required_count"] == 1 +) +RECORD_PATH = "src/inferrsi/knowledge/data/skill_library/records" + + +def canonical(value): + return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode() + + +@pytest.fixture(scope="module") +def originals(): + path = FIXTURES / "record-sources-v0.3.4.zip" + assert hashlib.sha256(path.read_bytes()).hexdigest() == BASELINE["release_record_files_sha256"] + with ZipFile(path) as archive: + files = {name: archive.read(name) for name in archive.namelist()} + guide = files.pop("records/README.md") + assert hashlib.sha256(guide).hexdigest() == BASELINE["author_guide_sha256"] + return {f"package:{Path(name).stem}": body for name, body in files.items()} + + +def test_release_inventory_preserves_both_record_dependency_shapes(originals): + rows = BASELINE["records"] + assert originals.keys() == rows.keys() + assert Counter(row["old_required_count"] for row in rows.values()) == {1: 30, 716: 18} + + +@pytest.mark.parametrize("ref", sorted(BASELINE["records"])) +def test_record_l1_contract_matches_the_published_release_card(originals, ref): + row = BASELINE["records"][ref] + raw = originals[ref] + record = json.loads(raw) + assert ref == "package:" + record["id"] + assert hashlib.sha256(raw).hexdigest() == row["original_sha256"] + assert hashlib.sha256(canonical(record)).hexdigest() == row["record_sha256"] + assert row["old_required_count"] == 1 + ( + BASELINE["shared_resource_count"] if record.get("skill_documents") else 0 + ) + + # The independently installed v0.3.4 CLI supplied both goldens. This replay + # uses only the archived Record, without consulting the working library. + source = DecisionSource(ref, row["revision"], "record", "record.json", "record.json", record) + card = source.project()["card"] + assert card["status"] == "complete" and not card["missing_fields"] + assert len(canonical(card)) == row["l1_card_bytes"] + assert hashlib.sha256(canonical(card)).hexdigest() == row["l1_card_sha256"] + required = set(row["l1_required_pointers"]) + assert {"/" + key for key in card["declared"]} <= required <= {"/" + key for key in record} + assert card["declared"] == {key: record[key] for key in card["declared"]} + + +def record_sources(root, originals, refs): + author = make_author_root(root) + release = root / "pinned-source" + shutil.copytree(RELEASE_ROOT, release) + (release / RECORD_PATH).mkdir(parents=True) + (author / "atoms/records").mkdir() + for ref in refs: + name = ref.removeprefix("package:") + for file in (f"atoms/{name}.original.json", f"atoms/records/{name}.json", + f"compositions/{name}.json"): + shutil.copyfile(LIBRARY / file, author / file) + (release / RECORD_PATH / (name + ".json")).write_bytes(originals[ref]) + return author, release + + +@pytest.fixture(scope="module") +def installed_records(tmp_path_factory, originals): + root = tmp_path_factory.mktemp("record-domain") + author, release = record_sources(root, originals, SELF_CONTAINED) + target = root / "install" + generation = build_generation(author, target, permits=allow, source_roots={RELEASE: release}) + return InstalledGeneration(target, expected=generation) + + +def delivered_record_fields(installed, delivery, raw): + """Reconstruct only fields present in the returned, independently pinned source spans.""" + assert delivery.receipt["status"] == "delivered" + assert delivery.receipt["body_bytes"] == sum(map(len, delivery.bodies)) + fields, claims = {}, {} + for item, body in zip(delivery.receipt["delivered"], delivery.bodies, strict=True): + assert item["source_range_verification"] == "verified_at_build" + assert item["source"]["commit"] == RELEASE + lo, hi = item["source_byte_range"] + assert body == raw[lo:hi] + assert hashlib.sha256(body).hexdigest() == item["source_sha256"] + _, atom = installed.read_resolved(item["ref"], revision=item["revision"]) + pointers = atom.metadata["atom"]["source_pointers"] + if pointers == [""]: + assert len(delivery.bodies) == 1 and body == raw + return json.loads(body) + if pointers[0].startswith("/claims/"): + assert len(pointers) == 1 + index = int(pointers[0].removeprefix("/claims/")) + assert index not in claims + claims[index] = json.loads(body) + else: + fragment = json.loads(b"{" + body + b"}") + assert ["/" + key for key in fragment] == pointers + assert not fields.keys() & fragment.keys() + fields.update(fragment) + if claims: + fields["claims"] = [claims[i] for i in range(len(claims))] + return fields + + +@pytest.mark.parametrize("ref", SELF_CONTAINED) +def test_installed_record_layers_replay_the_wheel_decision(installed_records, originals, ref): + raw = originals[ref] + record = json.loads(raw) + row = BASELINE["records"][ref] + revision = installed_records.catalog[ref]["revision"] + _, bundle = installed_records.read_resolved(ref, revision=revision) + assert bundle.content == {"record.json": canonical(record)} + assert bundle.metadata["required_resources"] == ["record.json"] and not bundle.dependencies + assert bundle.metadata["sources"][1:] == record["sources"] + assert bundle.metadata["verification"] == record["verification"] + assert bundle.metadata["state"] == record["status"] + assert bundle.metadata["attribution"] == record.get("attribution", record["sources"]) + + def select(layer, budget, *, context=None, **kwargs): + return read_selection(installed_records, ref, revision=revision, layer=layer, + max_bytes=budget, context=context or {}, permits=allow, **kwargs) + + for layer in ("L0", "L1", "L2", "L3"): + result = select(layer, len(raw)) + fields = delivered_record_fields(installed_records, result, raw) + assert fields == {key: record[key] for key in fields} + if layer == "L0": + assert {"id", "title", "summary", "status", "verification"} <= fields.keys() + if record.get("translations"): + assert "translations" not in fields + translated = select(layer, len(raw), context={"locale": "zh-CN"}) + assert delivered_record_fields(installed_records, translated, raw) == { + **fields, "translations": record["translations"]} + elif layer == "L1": + assert {"/" + key for key in fields} == set(row["l1_required_pointers"]) + # The release pin is the only substituted field in the card comparison. + source = DecisionSource(ref, revision, "record", "record.json", "record.json", fields) + card = source.project()["card"] + assert card == DecisionSource.from_bundle(ref, bundle, bundle.view()).project()["card"] + assert card["status"] == "complete" + replay = canonical({**card, "revision": row["revision"]}) + assert (len(replay), hashlib.sha256(replay).hexdigest()) == ( + row["l1_card_bytes"], row["l1_card_sha256"]) + size = result.receipt["body_bytes"] + assert select(layer, size) == result + short = select(layer, size - 1) + assert short.receipt["status"] == "over_budget" and not short.bodies + assert short.receipt["required_bytes"] == size and not short.receipt["delivered"] + elif layer == "L2": + assert {"applicability", "limitations", "verification", "sources", "status", + "recommendations", "validation_plan"} <= fields.keys() + else: + assert result.bodies == (raw,) + assert select("L1", len(raw), finding="id:unknown").receipt["status"] == "not_applicable" + + +def test_record_identity_and_required_permissions_are_atomic(installed_records): + ref = SELF_CONTAINED[0] + revision = installed_records.catalog[ref]["revision"] + request = dict(revision=revision, layer="L1", context={}, max_bytes=1_000_000, permits=allow) + denied_ref = ref + ".original.verification" + for reference, change, reason in ( + (ref.replace("package:", "checkout:"), {}, "unavailable_revision"), + (ref, {"revision": BASELINE["records"][ref]["revision"]}, "unavailable_revision"), + (ref, {"permits": lambda pin, op: pin.ref != denied_ref}, "permission_denied"), + ): + result = read_selection(installed_records, reference, **{**request, **change}) + assert result.receipt["status"] == reason and result.receipt["body_bytes"] == 0 + assert not result.bodies and not result.receipt["delivered"] + + +def test_source_pointers_select_exact_members_in_the_original_utf8(): + source = r' {"文\/字~" : [ "同", "同" ], "other":{}, "last": {"":true} }'.encode() + members = member_spans(source) + array = "/文~1字~0" + first = source.index('"同"'.encode()) + size = len('"同"'.encode()) + second = source.index('"同"'.encode(), first + size) + assert matches_span(members, [array + "/0"], first, first + size) + assert matches_span(members, [array + "/1"], second, second + size) + assert matches_span(members, [array + "/0", array + "/1"], first, second + size) + assert not matches_span(members, [array + "/1"], first, first + size) + assert not matches_span(members, [array + "/01"], second, second + size) + assert not matches_span(members, [array + "/0"], first, first + size + 1) + + start, end = source.index(b'"'), source.index(b"true}") + len(b"true}") + assert matches_span(members, [array, "/other", "/last"], start, end) + assert not matches_span(members, [array, "/last"], start, end) + assert not matches_span(members, [array, "/last", "/other"], start, end) + assert not matches_span(members, [array, "/other", "/other", "/last"], start, end) + assert not matches_span(members, [array + "/0", "/other"], first, source.index(b"{}") + 2) + assert matches_span(members, ["/last/"], source.index(b'""'), end - 1) + + +def test_duplicate_decoded_member_names_have_no_unique_source_pointer(): + with pytest.raises(ValueError, match="Duplicate JSON member at /nested/a"): + member_spans(br'{"nested":{"a": 1, "\u0061": 2}}') + + +@pytest.mark.parametrize(("change", "reason"), [ + ("unknown node", "declared source node"), + ("partial source", "complete L3 original"), + ("wrong Record", "match its identity"), + ("wrong part digest", "declared source digest"), + ("outside original", "Invalid source range"), + ("wrong existing pointer", "JSON pointers do not match the source range"), +]) +def test_invalid_record_candidate_never_publishes(tmp_path, originals, change, reason): + ref = SELF_CONTAINED[0] + name = ref.removeprefix("package:") + author, release = record_sources(tmp_path, originals, [ref]) + path = author / "compositions" / (name + ".json") + if change in {"wrong part digest", "outside original", "wrong existing pointer"}: + path = author / "atoms" / (name + ".original.json") + spec = json.loads(path.read_bytes()) + if change == "unknown node": + spec["content"]["record.json"]["record_node"] = "missing" + elif change == "partial source": + spec["content"]["record.json"]["record_node"] = "scope" + elif change == "wrong Record": + spec["metadata"]["id"] = "another-record" + elif change == "wrong part digest": + spec["parts"]["scope"]["sha256"] = "0" * 64 + elif change == "wrong existing pointer": + # A stale composition pin must not mask acceptance of the mislabelled part. + (author / "compositions" / (name + ".json")).unlink() + assert spec["parts"]["status"]["pointers"] == ["/status"] + spec["parts"]["status"]["pointers"] = ["/summary"] + else: + spec["parts"]["scope"]["byte_range"][1] = len(originals[ref]) + 1 + write_json(path, spec) + target = tmp_path / "install" + with pytest.raises(ValueError, match=reason): + build_generation(author, target, permits=allow, source_roots={RELEASE: release}) + assert not target.exists() + + +def test_attached_record_cannot_be_published_as_self_contained(tmp_path, originals): + ref = next(ref for ref in originals if BASELINE["records"][ref]["old_required_count"] == 716) + raw = originals[ref] + record = json.loads(raw) + assert record["skill_documents"] + name = record["id"] + sha = hashlib.sha256(raw).hexdigest() + author = make_author_root(tmp_path) + source = RECORD_PATH + "/" + name + ".json" + release = tmp_path / "release" + shutil.copytree(RELEASE_ROOT, release) + (release / source).parent.mkdir(parents=True) + (release / source).write_bytes(raw) + + example = SELF_CONTAINED[0].removeprefix("package:") + original = json.loads((LIBRARY / "atoms" / (example + ".original.json")).read_bytes()) + meta = original["metadata"] + meta["id"] = name + ".original" + meta["sources"][0].update(path=source, sha256=sha) + meta["atom"]["source_span"].update(path=source, sha256=sha, byte_range=[0, len(raw)]) + (author / "atoms/inputs/record.json").write_bytes(raw) + write_json(author / "atoms" / (name + ".json"), { + "metadata": meta, "content": {"record.json": {"path": "inputs/record.json"}}}) + composition = json.loads((LIBRARY / "compositions" / (example + ".json")).read_bytes()) + composition["metadata"]["id"] = name + composition["metadata"]["composition"]["nodes"]["original"] = { + "ref": "package:" + meta["id"], "revision": Bundle(meta, {"record.json": raw}, {}).revision, + } + write_json(author / "compositions" / (name + ".json"), composition) + target = tmp_path / "install" + with pytest.raises(ValueError, match="self-contained"): + build_generation(author, target, permits=allow, source_roots={RELEASE: release}) + assert not target.exists() diff --git a/tests/knowledge/test_atomic_task_routes.py b/tests/knowledge/test_atomic_task_routes.py new file mode 100644 index 000000000..848ff60a1 --- /dev/null +++ b/tests/knowledge/test_atomic_task_routes.py @@ -0,0 +1,165 @@ +import hashlib +import json +import shutil +from pathlib import Path +from zipfile import ZipFile + +import pytest + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import PUBLIC_TASKS, InstalledGeneration +from inferrsi.knowledge.atomic_reader import AtomicReader +from inferrsi.knowledge.knowledge_operations import UnavailableRevision +from inferrsi.knowledge.skill_catalog import primary_task_instructions, skill_resource + +ROOT = Path(__file__).resolve().parents[2] +FIXTURES = ROOT / "tests/fixtures/atomic-reader" +OLD = json.loads((FIXTURES / "task-domain-v0.3.4.json").read_bytes()) +ROUTER = "inference-task-router" + + +@pytest.fixture(scope="module") +def generation(tmp_path_factory): + stage = tmp_path_factory.mktemp("task-domain").resolve() + root, original, source = stage / "installed", stage / "release", stage / "authored" + published = {} + for item in OLD["entries"].values(): + published[item["source"]] = item["original_sha256"] + if card := item.get("route_card"): + published[card["source"]] = card["sha256"] + with ZipFile(FIXTURES / "task-sources-v0.3.4.zip") as archive: + assert set(archive.namelist()) == published.keys() + for path, expected in published.items(): + data = archive.read(path) + assert hashlib.sha256(data).hexdigest() == expected + target = original / "src/inferrsi/knowledge/data/skill_library" / path + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + + library = ROOT / "src/inferrsi/knowledge" + def copy_descriptor(family, name): + directory = library / family + dest = source / family + dest.mkdir(exist_ok=True, parents=True) + descriptor = directory / f"{name}.json" + shutil.copyfile(descriptor, dest / descriptor.name) + spec = json.loads(descriptor.read_bytes()) + for item in spec.get("content", {}).values(): + if path := item.get("path"): + shutil.copyfile(directory / path, dest / path) + return spec["metadata"] + + atoms = set() + for task in OLD["entries"]: + spec = copy_descriptor("compositions", task) + atoms.update(node["ref"].split(":", 1)[1] for node in spec["composition"]["nodes"].values()) + for atom in sorted(atoms): + copy_descriptor("atoms", atom) + generation_id = build_generation(source, root, permits=lambda pin, op: True, + source_roots={OLD["commit"]: original}) + return root / "skills", InstalledGeneration(root, expected=generation_id) + + +@pytest.mark.parametrize("name", sorted(OLD["entries"])) +def test_all_published_task_owners_and_host_instructions(generation, name): + skills, installed = generation + before = OLD["entries"][name] + ref = installed.skills[name] + assert ref == before["target"] + revision = installed.catalog[ref]["revision"] + _, bundle = installed.read_resolved(ref, revision=revision) + assert bundle.metadata["state"] == "candidate" + assert bundle.metadata["empirical_validation"] == "not_run" + source = bundle.metadata["sources"][0] + assert source["commit"] == OLD["commit"] and source["sha256"] == before["original_sha256"] + original = (skills / name / "SKILL.md").read_bytes() + assert len(original) == before["original_bytes"] + assert hashlib.sha256(original).hexdigest() == before["original_sha256"] + header = bundle.content[bundle.metadata["composition"]["skill"]["frontmatter"]] + assert hashlib.sha256(header).hexdigest() == before["header_sha256"] + assert original.startswith(header) + assert hashlib.sha256(original[len(header):]).hexdigest() == before["body_sha256"] + for old_ref, old_revision in before["original_refs"].items(): + with pytest.raises(UnavailableRevision): + installed.read_resolved(old_ref, revision=old_revision) + assert set(installed.tasks) == PUBLIC_TASKS == OLD["entries"].keys() - {ROUTER} + if name == ROUTER: + with pytest.raises(ValueError, match="Not a primary inference task skill"): + primary_task_instructions(skills, name) + return + instructions = primary_task_instructions(skills, name).encode() + assert len(instructions) == before["enter_instruction_bytes"] + assert hashlib.sha256(instructions).hexdigest() == before["enter_instruction_sha256"] + card = before["route_card"] + data = skill_resource(skills, ROUTER, card["public_relative_path"]).read_bytes() + assert len(data) == card["bytes"] and hashlib.sha256(data).hexdigest() == card["sha256"] + assert set(json.loads(data)["candidate_skill_ids"]) == card["seed_owners"].keys() + + +@pytest.mark.parametrize("name", sorted(PUBLIC_TASKS)) +def test_task_layers_preserve_source_ranges_and_refuse_partial_or_foreign_routes(generation, name): + skills, installed = generation + reader = AtomicReader(installed, permits=lambda pin, op: True) + + def read(owner, layer, task, budget): + ref = installed.skills[owner] + return reader.read_selection(ref, revision=installed.catalog[ref]["revision"], + layer=layer, context={"task": task}, max_bytes=budget) + + before = OLD["entries"][name] + card = before["route_card"] + other = next(task for task in sorted(PUBLIC_TASKS) if task != name) + for layer in ("L0", "L1", "L2", "L3"): + full = read(name, layer, name, 100_000) + assert full.receipt["status"] == "delivered" + size = sum(map(len, full.bodies)) + assert full.receipt["body_bytes"] == size + assert read(name, layer, name, size).bodies == full.bodies + short = read(name, layer, name, size - 1) + assert not short.bodies and short.receipt["status"] == "over_budget" + assert short.receipt["body_bytes"] == 0 and short.receipt["required_bytes"] == size + for data, record in zip(full.bodies, full.receipt["delivered"], strict=True): + path = record["source_path"].split("/data/skill_library/", 1)[1] + if path.endswith("/SKILL.md"): + raw = (skills / Path(path).parent.name / "SKILL.md").read_bytes() + else: + assert path == card["source"] + raw = skill_resource(skills, ROUTER, card["public_relative_path"]).read_bytes() + assert record["source"]["commit"] == OLD["commit"] + assert record["source_range_verification"] == "verified_at_build" + assert hashlib.sha256(raw).hexdigest() == record["source"]["sha256"] + start, end = record["source_byte_range"] + assert raw[start:end] == data + if layer == "L0": + assert read(name, layer, "", size).bodies == full.bodies + assert len(full.bodies) == 1 + continue + wrong = read(name, layer, other, size) + assert not wrong.bodies and wrong.receipt["status"] == "not_applicable" + if layer == "L1": + assert card["choose_when"].encode() in full.bodies + if layer == "L2": + roles = ("procedure", "condition", "support", "acceptance") + expected = {f"package:{name}-{role}" for role in roles} | {"package:task-capture-run"} + assert {r["ref"] for r in full.receipt["delivered"]} == expected + if layer == "L3": + via_router = read(ROUTER, layer, name, size) + assert via_router.bodies == full.bodies + assert len(full.bodies) == 1 + assert hashlib.sha256(full.bodies[0]).hexdigest() == card["sha256"] + direct, shared = (reply.receipt["delivered"][0] for reply in (full, via_router)) + assert (direct["ref"], direct["revision"]) == (shared["ref"], shared["revision"]) + + +def test_router_keeps_general_decision_guidance_and_requires_a_target_for_card(generation): + _, installed = generation + router = installed.skills[ROUTER] + reader = AtomicReader(installed, permits=lambda pin, op: True) + read_args = {"revision": installed.catalog[router]["revision"], + "context": {}, "max_bytes": 20_000} + for layer, expected in (("L0", b"# Choose an inference task"), ("L1", b"## Target conditions"), + ("L2", b"## Use and handoff")): + result = reader.read_selection(router, layer=layer, **read_args) + assert any(body.startswith(expected) for body in result.bodies) + result = reader.read_selection(router, layer="L3", **read_args) + assert result.receipt["status"] == "not_applicable" and not result.bodies diff --git a/tests/knowledge/test_atomic_training_budget.py b/tests/knowledge/test_atomic_training_budget.py new file mode 100644 index 000000000..1b3fb8b73 --- /dev/null +++ b/tests/knowledge/test_atomic_training_budget.py @@ -0,0 +1,118 @@ +"""Replay the released training resource-budget guide, its references and adaptation terms.""" + +import json +import shutil + +import pytest + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.catalog import _skill_search_source +from inferrsi.knowledge.decision_cards import DecisionSource +from tests.knowledge.test_atomic_casebooks import ( + ATOMS, + FIXTURES, + RELEASE_COMMIT, + assert_empty, + canonical, + digest, + select, +) +from tests.knowledge.test_atomic_generation import RELEASE_ROOT, make_author_root +from tests.knowledge.test_atomic_reader import allow + +NAME = "training-resource-budget" +REF = "checkout:" + NAME +RELEASE = json.loads((FIXTURES / "playbook-domain-v0.3.4.json").read_bytes())["refs"][REF] +LIBRARY = "src/inferrsi/knowledge/data/skill_library/" + + +@pytest.fixture(scope="module") +def installed_budget(tmp_path_factory): + root = tmp_path_factory.mktemp("training-budget") + author = make_author_root(root) + release = root / "release" + shutil.copytree(RELEASE_ROOT, release) + composition = ATOMS.parent / "compositions" / (NAME + ".json") + shutil.copyfile(composition, author / "compositions" / composition.name) + declaration = json.loads(composition.read_bytes()) + nodes = declaration["metadata"]["composition"]["nodes"] + bindings = declaration["directory_resources"] + assert bindings.keys() == RELEASE["required_resources"].keys() + for logical, node in bindings.items(): + descriptor = ATOMS / (nodes[node]["ref"].removeprefix("checkout:") + ".json") + shutil.copyfile(descriptor, author / "atoms" / descriptor.name) + (resource,) = json.loads(descriptor.read_bytes())["content"].values() + raw = (ATOMS / resource["path"]).read_bytes() + assert digest(raw) == RELEASE["required_resources"][logical] + for dest in (author / "atoms" / resource["path"], release / (LIBRARY + logical)): + dest.parent.mkdir(parents=True, exist_ok=True) + dest.write_bytes(raw) + # Keep the deepest published resource above the legacy Windows path limit on a short drive. + target = root / ("installed-" + "nested-" * 12) / ("tenant-" * 8) / "release" + generation = build_generation(author, target, permits=allow, + source_roots={RELEASE_COMMIT: release}) + return InstalledGeneration(target, expected=generation) + + +def test_training_budget_preserves_released_layers_and_navigation_scope(installed_budget): + reader = installed_budget + _, bundle = reader.read_resolved(REF, revision=reader.catalog[REF]["revision"]) + assert bundle.view()["resources"] == RELEASE["required_resources"] + assert bundle.dependencies == RELEASE["dependencies"] == {} + entry = RELEASE["entrypoint"] + navigation = [link for link in RELEASE["relative_guide_links"].values() + if not link["in_directory"]] + assert len(navigation) == 3 + assert all(link["path"] not in bundle.content for link in navigation) + layers = {} + for level in ("L0", "L1", "L2", "L3"): + delivery = select(reader, REF, level, 1_000_000) + assert delivery.receipt["status"] == "delivered" + size = sum(map(len, delivery.bodies)) + assert select(reader, REF, level, size) == delivery + assert_empty(select(reader, REF, level, size - 1), "over_budget") + stale = select(reader, REF, level, size, revision=RELEASE["revision"]) + assert_empty(stale, "unavailable_revision") + for item, body in zip(delivery.receipt["delivered"], delivery.bodies, strict=True): + start, end = item["source_byte_range"] + path = item["source_path"].removeprefix(LIBRARY) + assert body == bundle.content[path][start:end] + assert item["source_range_verification"] == "verified_at_build" + assert item["source"]["commit"] == RELEASE_COMMIT + denied_ref = item["ref"] + assert_empty(select(reader, REF, level, size, + permits=lambda pin, op: pin.ref != denied_ref), "permission_denied") + layers[level] = delivery.bodies + + assert bundle.content[entry].startswith(layers["L0"][0]) + (decision,) = layers["L1"] + _, fields = _skill_search_source(decision.decode()) + card = DecisionSource(REF, RELEASE["revision"], "skill", entry, entry, fields).project()["card"] + assert card["status"] == "partial" and card["missing_fields"] == ["validation"] + assert digest(canonical(card)) == RELEASE["card_sha256"] + assert len(canonical(card)) == RELEASE["card_bytes"] + assert layers["L2"][0] == decision and b"".join(layers["L2"]) == bundle.content[entry] + assert layers["L3"] == tuple(bundle.content[path] for path in sorted(bundle.content)) + + +def test_training_budget_keeps_share_alike_on_the_adapted_note(installed_budget): + reader = installed_budget + _, bundle = reader.read_resolved(REF, revision=reader.catalog[REF]["revision"]) + nodes = bundle.metadata["composition"]["nodes"] + note = nodes["stas-decision-notes"] + _, atom = reader.read_resolved(note["ref"], revision=note["revision"]) + credit, = atom.metadata["attribution"] + assert atom.metadata["atom"]["license"] == credit["license"] == "CC-BY-SA-4.0" + assert credit["author"] == "Stas Bekman" and credit in atom.metadata["sources"] + content = atom.content["stas-decision-notes.md"] + assert credit["commit"].encode() in content and credit["license_url"].encode() in content + assert b"paraphrased adaptation" in content + for node in ("mindspeed-historical", "mindspeed-source-readset", "sources"): + pin = nodes[node] + _, independent = reader.read_resolved(pin["ref"], revision=pin["revision"]) + assert independent.metadata["atom"]["license"] == "Apache-2.0" + assert bundle.metadata["empirical_validation"] == "not_run" + denied = select(reader, REF, "L3", 1_000_000, operations={"redistribute"}, + permits=lambda pin, op: (pin.ref, op) != (note["ref"], "redistribute")) + assert_empty(denied, "permission_denied") diff --git a/tests/knowledge/test_atomic_workflow_research.py b/tests/knowledge/test_atomic_workflow_research.py new file mode 100644 index 000000000..d6dbc4a10 --- /dev/null +++ b/tests/knowledge/test_atomic_workflow_research.py @@ -0,0 +1,133 @@ +"""Replay the seven shared research resources read from the installed v0.3.4 wheel.""" + +import hashlib +import json +import shutil +from pathlib import Path + +import pytest + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.atomic_reader import AtomicReader, AtomPin, AtomUse +from tests.knowledge.test_atomic_generation import RELEASE_ROOT, make_author_root +from tests.knowledge.test_atomic_reader import RELEASE, allow + +COLLECTION = "inference-engine-research" +PREFIX = f"src/inferrsi/knowledge/data/skill_library/workflows/research/{COLLECTION}/" +ATOMS = Path(__file__).resolve().parents[2] / "src/inferrsi/knowledge/atoms" +PACKAGE_REVISION = "sha256:d2219d7cf339c87caac81db8a19b168eeb178f06174973b58a39facc34b4a39b" +# Independent SHA-256 values from the old rsi_evidence package's material receipts. +RELEASED = { + "SKILL.md": "a94102df1790f51d673f2dfe4b047fa6a70b2ead2a12b1a73393ea3765984b6a", + "references/cross-repository-mechanisms.md": + "8eb1b8dd4807cf06df9f6fb1bf88aff9ad6112c408e377631ceada32bc56307a", + "references/import.md": "c8a57db94768cc6cd4193932def75ba67ec453e56ee0e54f176fb82f1af53091", + "references/model-aware-preparation.md": + "1b117e8f3a35c25dbffc4f7d43bcef1410b2b3f51e98d53933ef3348fb3b070d", + "references/overview.md": "4e39954ec5cc7ebfe5de1b1041762f75c5c3d381265e3711fd43ee2a7ac3d688", + "references/repository-source-scope.md": + "918e8358b7ef6caa2eb0dea56438c117f0737688d49d06d288ef5bd0cf668b2b", + "references/source-manifest.json": + "0ce1678803d1ede6b485fb6b4b1c88aba909056ee6e3b5af691899ceb2056240", +} + + +@pytest.fixture(scope="module") +def research_installation(tmp_path_factory): + root = tmp_path_factory.mktemp("workflow-research") + authors = make_author_root(root) + release = root / "release" + shutil.copytree(RELEASE_ROOT, release) + refs = {} + for original, digest in RELEASED.items(): + guide = original == "SKILL.md" + suffix = "original" if guide else Path(original).stem + identity = f"{COLLECTION}.{suffix}" + descriptor = identity + ".json" + local = Path("workflows", COLLECTION, "guide.md" if guide else original) + raw = (ATOMS / local).read_bytes() + assert hashlib.sha256(raw).hexdigest() == digest + shutil.copyfile(ATOMS / descriptor, authors / "atoms" / descriptor) + for path in (authors / "atoms" / local, release / (PREFIX + original)): + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(raw) + refs["package:" + identity] = (original, raw) + + target = root / "installed" + revision = build_generation(authors, target, source_roots={RELEASE: release}, permits=allow) + installed = InstalledGeneration(target, expected=revision) + uses = [AtomUse(AtomPin(ref, installed.catalog[ref]["revision"]), (ref,)) for ref in refs] + return installed, refs, uses + + +def test_shared_material_preserves_original_names_bytes_and_evidence_scope(research_installation): + installed, refs, uses = research_installation + assert COLLECTION not in installed.skills + assert f"package:{COLLECTION}" not in installed.catalog + assert f"checkout:{COLLECTION}" not in installed.catalog + result = AtomicReader(installed, permits=allow).read_group( + uses, max_bytes=57_304, context={}, operations=("retain", "redistribute"), + ) + assert result.receipt["status"] == "delivered" and result.receipt["body_bytes"] == 57_304 + assert [entry["ref"] for entry in result.receipt["delivered"]] == list(refs) + manifest_name = "references/source-manifest.json" + guide = refs[f"package:{COLLECTION}.original"][1] + limits = ( + "The repository and framework owners retain their pinned provenance and source evidence.", + "The collection is a portable candidate; actual GPU, native distributed and quality " + "validation requires the target environment.", + "No new engine or measured speedup is included.", + ) + assert " ".join(limits).encode() in guide + sources = {} + for use, item, body in zip(uses, result.receipt["delivered"], result.bodies, strict=True): + original, expected = refs[use.pin.ref] + assert item["revision"] == use.pin.revision and body == expected + assert item["layer"] == "L3" and item["source_range_verification"] == "verified_at_build" + assert item["source"]["commit"] == RELEASE and item["source_byte_range"] == [0, len(body)] + assert item["source_path"] == item["source"]["path"] == PREFIX + original + assert item["sha256"] == item["source"]["sha256"] == RELEASED[original] + _, bundle = installed.read_resolved(use.pin.ref, revision=use.pin.revision) + metadata = bundle.metadata + assert metadata["atom"]["license"] == "Apache-2.0" + assert metadata["origin"] == ["external"] + assert tuple(metadata["limitations"]) == limits + assert metadata["state"] == "candidate" and metadata["empirical_validation"] == "not_run" + assert metadata["attribution"] == [{ + "type": "git", "repo": "https://github.com/InferMatrixLab/InferRSI", "commit": RELEASE, + "path": PREFIX + manifest_name, "sha256": RELEASED[manifest_name], + }] + sources[original] = body + manifest = json.loads(sources[manifest_name]) + assert b"license: Apache-2.0" in sources["SKILL.md"] + assert len(manifest["sources"]) == 5 + assert all(not row["locally_verified"] for row in manifest["sources"]) + vllm_omni, = (row for row in manifest["sources"] if row["skill"] == "vllm-omni") + supplement, = vllm_omni["supplements"] + assert not supplement["locally_verified"] + assert "Abort acknowledgment/cleanup supplement only" in supplement["scope"] + + +def test_short_budget_denied_member_or_stale_pin_refuses_whole_group(research_installation): + installed, _, uses = research_installation + reader = AtomicReader(installed, permits=allow) + short = reader.read_group(uses, max_bytes=57_303, context={}) + assert short.bodies == () + assert short.receipt == { + "status": "over_budget", "body_bytes": 0, "delivered": [], "required_bytes": 57_304, + } + for index, use in enumerate(uses): + def permits(pin, action, denied_pin=use.pin): + return pin != denied_pin or action != "retain" + + denied = AtomicReader(installed, permits=permits).read_group( + uses, max_bytes=57_304, context={}, operations=("retain",), + ) + assert denied.bodies == () + assert denied.receipt == {"status": "permission_denied", "body_bytes": 0, "delivered": []} + wrong = AtomUse(AtomPin(use.pin.ref, PACKAGE_REVISION), use.path) + replaced = [*uses[:index], wrong, *uses[index + 1:]] + stale = reader.read_group(replaced, max_bytes=57_304, context={}) + assert stale.bodies == () + assert stale.receipt == {"status": "unavailable_revision", "body_bytes": 0, "delivered": []} diff --git a/tests/knowledge/test_atomic_workflows.py b/tests/knowledge/test_atomic_workflows.py new file mode 100644 index 000000000..02b49f6eb --- /dev/null +++ b/tests/knowledge/test_atomic_workflows.py @@ -0,0 +1,263 @@ +"""Replay the v0.3.4 public Workflow contracts on an independently sealed installation.""" + +import json +import shutil +from pathlib import Path, PurePosixPath + +import pytest + +from inferrsi.knowledge.atomic_build import build_generation +from inferrsi.knowledge.atomic_generation import InstalledGeneration +from inferrsi.knowledge.catalog import _skill_search_source +from inferrsi.knowledge.decision_cards import DecisionSource +from tests.knowledge.test_atomic_casebooks import assert_empty, canonical, digest, select +from tests.knowledge.test_atomic_generation import RELEASE_ROOT, make_author_root, write_json +from tests.knowledge.test_atomic_reader import allow + +FIXTURE = Path(__file__).resolve().parents[1] / "fixtures/atomic-reader/workflow-domain-v0.3.4.json" +RELEASE = json.loads(FIXTURE.read_bytes()) +KNOWLEDGE = FIXTURE.parents[3] / "src/inferrsi/knowledge" +GUIDES = ("cite-check-downstream-pr", "claim-contract", "competitor-scan", "npu-skill-factory") +LINKED_GUIDES = ("draft-acceptance-issue", "repository-evolution-analysis", "rsi-evidence", + "skill-evolution-playbook") +LIBRARY = "src/inferrsi/knowledge/data/skill_library/" + + +def workflow_sources(root, names): + author = make_author_root(root) + pinned = root / "release" + shutil.copytree(RELEASE_ROOT, pinned) + for name in names: + row = RELEASE["refs"]["checkout:" + name] + composition = Path("compositions", name + ".json") + shutil.copyfile(KNOWLEDGE / composition, author / composition) + declaration = json.loads((author / composition).read_bytes()) + bindings = declaration["directory_resources"] + assert bindings.keys() == row["required_resources"].keys() + nodes = declaration["metadata"]["composition"]["nodes"] + for path, key in bindings.items(): + identity = nodes[key]["ref"].removeprefix("checkout:") + atom = Path("atoms", identity + ".json") + shutil.copyfile(KNOWLEDGE / atom, author / atom) + descriptor = json.loads((author / atom).read_bytes()) + (resource,) = descriptor["content"].values() + body = Path("atoms", resource["path"]) + (author / body).parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(KNOWLEDGE / body, author / body) + data = (author / body).read_bytes() + assert RELEASE["files"][path] == {"sha256": digest(data), "bytes": len(data)} + assert row["required_resources"][path] == digest(data) + original = pinned / (LIBRARY + path) + original.parent.mkdir(parents=True, exist_ok=True) + original.write_bytes(data) + return author, pinned + + +@pytest.fixture(scope="module") +def workflow_installation(tmp_path_factory): + root = tmp_path_factory.mktemp("workflows") + author, pinned = workflow_sources(root, (*GUIDES, *LINKED_GUIDES)) + target = root / "installed" + generation = build_generation(author, target, permits=allow, + source_roots={RELEASE["source_commit"]: pinned}) + return InstalledGeneration(target, expected=generation), target + + +@pytest.mark.parametrize("name", (*GUIDES, *LINKED_GUIDES)) +def test_checkout_layered_selection_preserves_workflow_guide(workflow_installation, name): + installed, target = workflow_installation + ref = "checkout:" + name + row = RELEASE["refs"][ref] + guide = row["entry_source"] + revision = installed.catalog[ref]["revision"] + _, bundle = installed.read_resolved(ref, revision=revision) + files = bundle.content + raw = files[guide] + assert {path: digest(data) for path, data in files.items()} == row["required_resources"] + assert bundle.dependencies == row["dependencies"] + if name in GUIDES or name in installed.skills: + assert installed.skills[name] == ref + host = target / "skills" / name + directory = PurePosixPath(guide).parent + exported = {(directory / p.relative_to(host).as_posix()).as_posix(): p.read_bytes() + for p in host.rglob("*") if p.is_file()} + assert exported == files + assert bundle.metadata["required_resources"] == sorted(files) + assert digest(raw) == row["entry_sha256"] == row["guide_sha256"] + assert digest(canonical(bundle.view()["resources"])) == row["resource_set"] + assert bundle.metadata["state"] == "candidate" + results = {} + for layer in ("L0", "L1", "L2", "L3"): + selected = select(installed, ref, layer, sum(map(len, files.values()))) + assert selected.receipt["status"] == "delivered" + size = sum(map(len, selected.bodies)) + assert size == selected.receipt["body_bytes"] + assert select(installed, ref, layer, size) == selected + short = select(installed, ref, layer, size - 1) + assert_empty(short, "over_budget") + assert short.receipt["required_bytes"] == size + stale = select(installed, ref, layer, size, revision=row["revision"]) + assert_empty(stale, "unavailable_revision") + for item, body in zip(selected.receipt["delivered"], selected.bodies, strict=True): + lo, hi = item["source_byte_range"] + assert item["source"]["commit"] == RELEASE["source_commit"] + path = item["source_path"].removeprefix(LIBRARY) + assert item["source_path"] == LIBRARY + path + if layer == "L2": + assert path == guide or path in row["dependencies"] + elif layer != "L3": + assert path == guide + assert item["source_range_verification"] == "verified_at_build" + assert body == files[path][lo:hi] and digest(body) == item["source_sha256"] + for denied in [ref, *(item["ref"] for item in selected.receipt["delivered"])]: + result = select(installed, ref, layer, size, permits=lambda pin, op: pin.ref != denied) + assert_empty(result, "permission_denied") + results[layer] = selected.bodies + (navigation,) = results["L0"] + assert raw.startswith(navigation) and name.encode() in navigation + assert b"description:" in navigation + assert b"metadata:" not in navigation + (decision,) = results["L1"] + _, fields = _skill_search_source(decision.decode()) + assert fields["origin"] == bundle.metadata["origin"] + assert fields["empirical_validation"] == bundle.metadata["empirical_validation"] == "not_run" + projected = DecisionSource(ref, revision, "skill", guide, guide, fields).project()["card"] + assert projected["revision"] == revision + compared = {**projected, "revision": row["revision"]} + assert digest(canonical(compared)) == row["card_sha256"] + assert len(canonical(compared)) == row["card_bytes"] + assert compared["status"] == row["status"] == "partial" + assert compared["missing_fields"] == row["missing_fields"] + assert "validation" in compared["missing_fields"] + assert results["L2"][0] == decision and b"".join(results["L2"][:2]) == raw + assert results["L2"][2:] == tuple(files[path] for path in row["dependencies"]) + for path, revision in row["dependencies"].items(): + assert revision == "sha256:" + digest(files[path]) + assert results["L3"] == tuple(files[path] for path in sorted(files)) + + +def test_factory_exports_linked_notes_and_preserves_source_attribution(workflow_installation): + installed, target = workflow_installation + name = "npu-skill-factory" + ref = "checkout:" + name + row = RELEASE["refs"][ref] + _, bundle = installed.read_resolved(ref, revision=installed.catalog[ref]["revision"]) + host = target / "skills" / name + _, fields = _skill_search_source((host / "SKILL.md").read_text(encoding="utf-8")) + assert bundle.metadata["origin"] == ["external"] + assert bundle.metadata["attribution"] == bundle.metadata["sources"][1:] == fields["sources"] + assert len(fields["sources"]) == 3 + assert len(row["relative_guide_links"]) == 5 and len(row["required_resources"]) == 17 + for link, old in row["relative_guide_links"].items(): + assert old["in_directory"] and digest((host / link).read_bytes()) == old["sha256"] + assert len(fields["provenance_readsets"]) == 14 + for readset in fields["provenance_readsets"]: + original = (PurePosixPath(row["guide"]).parent / readset).as_posix() + assert digest((host / readset).read_bytes()) == row["required_resources"][original] + manifest = host / "references/papers-20261015/references/source-manifest.json" + declared = json.loads(manifest.read_bytes()) + assert len(declared) == 8 + assert all(item["source_copy_in_deliverable"] is False for item in declared) + assert {item["sha256"] for item in declared}.isdisjoint(row["required_resources"].values()) + + +@pytest.mark.parametrize("name", GUIDES) +def test_package_baseline_has_its_own_card_and_shared_dependency(workflow_installation, name): + _, target = workflow_installation + checkout = RELEASE["refs"]["checkout:" + name] + (ref, row), = [ + (key, value) for key, value in RELEASE["refs"].items() + if key.startswith("package:") and value["entry_source"] == checkout["entry_source"] + ] + assert row["entrypoint"] == "record.json" and row["entry_sha256"] != checkout["entry_sha256"] + assert row["guide_sha256"] == checkout["guide_sha256"] + assert row["revision"] != checkout["revision"] + assert row["required_count"] == 1 + RELEASE["shared_members"] == 716 + assert row["dependencies"] == {"data/skill_library": RELEASE["shared_dependency"]} + guide = row["guide"] + assert guide == "data/skill_library/" + checkout["guide"] + body = (target / "skills" / name / "SKILL.md").read_text(encoding="utf-8") + _, fields = _skill_search_source(body) + old = DecisionSource(ref, row["revision"], "skill", guide, guide, fields) + exact = old.project(max_bytes=row["card_bytes"]) + assert digest(canonical(exact["card"])) == row["card_sha256"] + assert row["card_sha256"] != checkout["card_sha256"] + short = old.project(max_bytes=row["card_bytes"] - 1) + assert short["status"] == "over_budget" and "card" not in short + + +def test_loopx_originals_keep_upstream_terms_and_attribution(workflow_installation): + installed, _ = workflow_installation + ref = "checkout:rsi-evidence" + _, bundle = installed.read_resolved(ref, revision=installed.catalog[ref]["revision"]) + ledger_path = next(path for path in bundle.content if path.endswith("/source-ledger.json")) + ledger = json.loads(bundle.content[ledger_path]) + assert ledger["source"]["license"] == "Apache-2.0" + assert ledger["source"]["commit"] == "f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9" + originals = {row["resource"]: row for row in ledger["preserved_originals"]} + assert originals.keys() == {"LICENSE", "LICENSE-MIT.md", "NOTICE.md"} + directory = PurePosixPath(ledger_path).parent + attached = {p: body for p, body in bundle.content.items() + if PurePosixPath(p).parent == directory} + assert len(attached) == 7 + for path, body in attached.items(): + filename = PurePosixPath(path) + atom_ref = ref + "." + filename.stem.lower() + revision = installed.catalog[atom_ref]["revision"] + _, atom = installed.read_resolved(atom_ref, revision=revision) + credit, = atom.metadata["attribution"] + assert credit["url"] == ledger["source"]["url"] + assert credit["commit"] == ledger["source"]["commit"] + assert credit in atom.metadata["sources"] + assert atom.metadata["empirical_validation"] == "not_run" + assert dict(atom.content) == {filename.name: body} + expected_license = "MIT" if filename.name == "LICENSE-MIT.md" else "Apache-2.0" + assert atom.metadata["atom"]["license"] == expected_license + if filename.name in originals: + old = originals[filename.name] + assert credit["path"] == old["source_path"] + assert credit["sha256"] == old["sha256"] == digest(body) + assert len(body) == old["bytes"] + + +@pytest.mark.parametrize(("change", "error"), [ + ("missing required guide", "L2 must deliver"), ("optional guide", "unconditional delivery"), + ("different attachment", "L2 must deliver"), ("undeclared extra", "L2 must deliver"), + ("unbound checkout", "requires checked"), ("unbound navigation", "requires checked"), + ("invented dependency revision", "source-declared dependencies"), + ("remove resource", "complete original directory"), +]) +def test_checkout_requires_the_released_dependency(tmp_path, change, error): + name = "repository-evolution-analysis" + author, pinned = workflow_sources(tmp_path, [name]) + path = author / "compositions" / (name + ".json") + spec = json.loads(path.read_bytes()) + meta = spec["metadata"] + route = meta["composition"]["routes"]["procedure"] + attachment = "rtk-consumer-path-transition" + original = next(p for p, node in spec["directory_resources"].items() if node == attachment) + if change == "missing required guide": + route["required"].remove(attachment) + elif change == "optional guide": + route["required"].remove(attachment) + route["optional"] = [attachment] + elif change == "different attachment": + route["required"] = ["procedure", "capability-presence-audit"] + elif change == "undeclared extra": + route["required"].append("capability-presence-audit") + elif change.startswith("unbound"): + del spec["directory_resources"] + if change == "unbound navigation": + del meta["entrypoint"] + del meta["required_resources"] + elif change == "invented dependency revision": + spec["dependencies"] = {original: "sha256:" + "0" * 64} + else: + del spec["directory_resources"][original] + meta["required_resources"].remove(original) + write_json(path, spec) + target = tmp_path / "installed" + with pytest.raises(ValueError, match=error): + build_generation(author, target, permits=allow, + source_roots={RELEASE["source_commit"]: pinned}) + assert not target.exists()