Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions src/inferrsi/knowledge/atoms/audit-llama-runtime-state.original.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"authority": "checkout",
"metadata": {
"id": "audit-llama-runtime-state.original",
"kind": "knowledge",
"entrypoint": "guide.md",
"title": "Audit llama.cpp context memory, partial decode progress, graph reuse and server cancellation when a retry, stale prefix, unexpected rebuild or unreleased slot needs an ownership explanation; requires pinned source or a concrete runtime trace.",
"origin": [
"external"
],
"sources": [
{
"type": "git",
"repo": "https://github.com/InferMatrixLab/InferRSI",
"commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf",
"path": "src/inferrsi/knowledge/data/skill_library/systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md",
"sha256": "fb53c38204f3eb5fcadaa4870cc8b111bf2f3b92696a0a2dd2d9b41d4a905e88"
},
{
"type": "git",
"url": "https://github.com/ggml-org/llama.cpp",
"commit": "707616feb5f379e99ff7442680a55b4a1704c7c9",
"paths": [
"LICENSE",
"include/llama.h",
"src/llama-context.cpp",
"src/llama-context.h",
"src/llama-memory.h",
"src/llama-memory-recurrent.cpp",
"src/llama-graph.cpp",
"src/llama-graph.h",
"ggml/src/ggml-backend.cpp",
"tools/server/server-context.cpp",
"tools/server/server-queue.cpp",
"tools/server/server-queue.h",
"tests/llama-context/cases-kv.cpp",
"tests/llama-context/cases-rs.cpp",
"tests/CMakeLists.txt",
"tests/test-llama-archs.cpp",
"tests/test-backend-ops.cpp",
".github/workflows/build-cann.yml",
"tools/server/tests/unit/test_completion.py"
],
"readset": "references/source-notes.md",
"revision_precision": "full"
}
],
"applicability": {
"scope": "Pinned llama.cpp context-memory, graph-reuse and server task-lifecycle diagnosis; concrete model/backend behavior requires native validation.",
"prerequisites": "Pinned llama.cpp source or a concrete runtime trace, access to the relevant memory/graph/server ownership evidence and an identified caller recovery policy that remains in force.",
"input_contract": "Source/build and model revisions, memory type, actual backend/device and execution mode, context/batch/ubatch parameters, sequence IDs/positions/output flags and return status; graph cases need dispatch evidence, server cases need correlated HTTP/task/slot/cache logs.",
"produced_artifact": "An owner/event ledger of ubatch progress, retained memory, graph-gate decisions, input readiness and slot release/retention, with the first supported broken obligation or smallest missing observation.",
"failure_modes": "Assuming whole-batch rollback after partial decode failure, treating token count as a complete graph-reuse key, or equating posted cancellation with released slots can hide retained state or misdiagnose correct deferred work.",
"refusal_point": "Stop before reset or repair if revision, memory type, actual backend, sequence ownership or partial progress is unknown; escalate unsupported rollback or unresolved in-flight work."
},
"state": "candidate",
"limitations": [
"Source-derived candidate; native runtime and efficacy validation not run.",
"No cross-backend preemption, model-quality or performance claim.",
"KV, recurrent and hybrid state contracts must be checked independently.",
"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",
"url": "https://github.com/ggml-org/llama.cpp",
"commit": "707616feb5f379e99ff7442680a55b4a1704c7c9",
"paths": [
"LICENSE",
"include/llama.h",
"src/llama-context.cpp",
"src/llama-context.h",
"src/llama-memory.h",
"src/llama-memory-recurrent.cpp",
"src/llama-graph.cpp",
"src/llama-graph.h",
"ggml/src/ggml-backend.cpp",
"tools/server/server-context.cpp",
"tools/server/server-queue.cpp",
"tools/server/server-queue.h",
"tests/llama-context/cases-kv.cpp",
"tests/llama-context/cases-rs.cpp",
"tests/CMakeLists.txt",
"tests/test-llama-archs.cpp",
"tests/test-backend-ops.cpp",
".github/workflows/build-cann.yml",
"tools/server/tests/unit/test_completion.py"
],
"readset": "references/source-notes.md"
}
],
"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/systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md",
"byte_range": [
0,
12998
],
"sha256": "fb53c38204f3eb5fcadaa4870cc8b111bf2f3b92696a0a2dd2d9b41d4a905e88"
}
}
},
"content": {
"guide.md": {
"path": "engines/audit-llama-runtime-state.md"
}
},
"parts": {
"navigation": {
"skill_section": "navigation",
"layer": "L0",
"byte_range": [
0,
294
],
"sha256": "3483c423115ec52b518210c86c78b88934d393d052970127d9738938faf92924"
},
"decision": {
"skill_section": "decision",
"layer": "L1",
"byte_range": [
0,
3920
],
"sha256": "2f085be0c7b3ab12a80fe6c69df7ca1cfff8deb983277aa976a5e830d037a6e1"
},
"procedure": {
"skill_section": "procedure",
"layer": "L2",
"byte_range": [
3920,
12998
],
"sha256": "c1c16c9b9a1c1dcc54e994e8ea5dc6d9851dd639e5d546976ae93a39e8123fc4"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"authority": "checkout",
"metadata": {
"origin": [
"external"
],
"applicability": {
"scope": "Pinned llama.cpp context-memory, graph-reuse and server task-lifecycle diagnosis; concrete model/backend behavior requires native validation.",
"prerequisites": "Pinned llama.cpp source or a concrete runtime trace, access to the relevant memory/graph/server ownership evidence and an identified caller recovery policy that remains in force.",
"input_contract": "Source/build and model revisions, memory type, actual backend/device and execution mode, context/batch/ubatch parameters, sequence IDs/positions/output flags and return status; graph cases need dispatch evidence, server cases need correlated HTTP/task/slot/cache logs.",
"produced_artifact": "An owner/event ledger of ubatch progress, retained memory, graph-gate decisions, input readiness and slot release/retention, with the first supported broken obligation or smallest missing observation.",
"failure_modes": "Assuming whole-batch rollback after partial decode failure, treating token count as a complete graph-reuse key, or equating posted cancellation with released slots can hide retained state or misdiagnose correct deferred work.",
"refusal_point": "Stop before reset or repair if revision, memory type, actual backend, sequence ownership or partial progress is unknown; escalate unsupported rollback or unresolved in-flight work."
},
"state": "candidate",
"limitations": [
"Source-derived candidate; native runtime and efficacy validation not run.",
"No cross-backend preemption, model-quality or performance claim.",
"KV, recurrent and hybrid state contracts must be checked independently.",
"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",
"title": "Pinned llama.cpp runtime-state contracts",
"attribution": [
{
"type": "git",
"url": "https://github.com/ggml-org/llama.cpp",
"commit": "707616feb5f379e99ff7442680a55b4a1704c7c9",
"paths": [
"LICENSE",
"include/llama.h",
"src/llama-context.cpp",
"src/llama-context.h",
"src/llama-memory.h",
"src/llama-memory-recurrent.cpp",
"src/llama-graph.cpp",
"src/llama-graph.h",
"ggml/src/ggml-backend.cpp",
"tools/server/server-context.cpp",
"tools/server/server-queue.cpp",
"tools/server/server-queue.h",
"tests/llama-context/cases-kv.cpp",
"tests/llama-context/cases-rs.cpp",
"tests/CMakeLists.txt",
"tests/test-llama-archs.cpp",
"tests/test-backend-ops.cpp",
".github/workflows/build-cann.yml",
"tools/server/tests/unit/test_completion.py"
],
"readset": "references/source-notes.md"
}
],
"sources": [
{
"type": "git",
"repo": "https://github.com/InferMatrixLab/InferRSI",
"commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf",
"path": "src/inferrsi/knowledge/data/skill_library/systems/engines/llama-cpp/audit-llama-runtime-state/references/source-notes.md",
"sha256": "3d12a401e9decb55a2f4f3b2bfa0d360ef5110f63a0469dfe285654e78054190"
},
{
"type": "git",
"url": "https://github.com/ggml-org/llama.cpp",
"commit": "707616feb5f379e99ff7442680a55b4a1704c7c9",
"paths": [
"LICENSE",
"include/llama.h",
"src/llama-context.cpp",
"src/llama-context.h",
"src/llama-memory.h",
"src/llama-memory-recurrent.cpp",
"src/llama-graph.cpp",
"src/llama-graph.h",
"ggml/src/ggml-backend.cpp",
"tools/server/server-context.cpp",
"tools/server/server-queue.cpp",
"tools/server/server-queue.h",
"tests/llama-context/cases-kv.cpp",
"tests/llama-context/cases-rs.cpp",
"tests/CMakeLists.txt",
"tests/test-llama-archs.cpp",
"tests/test-backend-ops.cpp",
".github/workflows/build-cann.yml",
"tools/server/tests/unit/test_completion.py"
],
"readset": "references/source-notes.md",
"revision_precision": "full"
}
],
"id": "audit-llama-runtime-state.source-notes",
"kind": "knowledge",
"entrypoint": "source-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/systems/engines/llama-cpp/audit-llama-runtime-state/references/source-notes.md",
"byte_range": [
0,
15234
],
"sha256": "3d12a401e9decb55a2f4f3b2bfa0d360ef5110f63a0469dfe285654e78054190"
}
}
},
"content": {
"source-notes.md": {
"path": "engines/audit-llama-runtime-state/references/source-notes.md"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"authority": "checkout",
"metadata": {
"origin": [
"external"
],
"applicability": {
"scope": "Diagnose attention-kernel bottlenecks after IO reduction, tile/pipeline regressions and precision or hardware-port assumptions.",
"input_contract": "Actual kernel/device revisions, attention shapes and semantics, operand/accumulator types, correctness/quality criteria, and existing traffic, resource, parallelism and stall observations.",
"produced_artifact": "A bottleneck diagnosis with confidence, one bounded candidate, resource exchange, counter-signal, missing evidence, source ID and next authorization gate.",
"refusal_point": "Return conditional hypotheses when observations are missing; reject or defer changes with wrong outputs/gradients, unsafe lifetimes/order, unsupported primitives, unacceptable accuracy or gains erased by omitted work."
},
"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."
],
"empirical_validation": "not_run",
"title": "Knowledge: attention cost-model boundaries",
"attribution": [],
"sources": [
{
"type": "git",
"repo": "https://github.com/InferMatrixLab/InferRSI",
"commit": "e2f3be102c66c358803ed2186ed67bf627ebcbdf",
"path": "src/inferrsi/knowledge/data/skill_library/systems/platforms/cuda/diagnose-attention-bottlenecks/references/papers-20261015/knowledge/attention-cost-model-boundaries.md",
"sha256": "5ed8f888443e38ccb72545b6025447aab7b92936f78c151fed680e582126239b"
},
{
"type": "unknown",
"note": "Legacy provenance remains in procedure/readsets"
}
],
"id": "diagnose-attention-bottlenecks.attention-cost-model-boundaries",
"kind": "knowledge",
"entrypoint": "attention-cost-model-boundaries.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/systems/platforms/cuda/diagnose-attention-bottlenecks/references/papers-20261015/knowledge/attention-cost-model-boundaries.md",
"byte_range": [
0,
5223
],
"sha256": "5ed8f888443e38ccb72545b6025447aab7b92936f78c151fed680e582126239b"
}
}
},
"content": {
"attention-cost-model-boundaries.md": {
"path": "platforms/diagnose-attention-bottlenecks/references/papers-20261015/knowledge/attention-cost-model-boundaries.md"
}
}
}
Loading
Loading