docs: virtual-tensors explanation + Android classifier tutorial (CI-verified samples) - #1164
Merged
Merged
Conversation
…erified Two pages, one honest story: - explanation/virtual-tensors.adoc — the ML Drift-style split as implemented: the strides algebra, TensorView = Shape + Format + Layout + Storage, resolver-owned physical forms (WeightFormResolver, AllocationResolver, the user-wins override), scope-based lifetime without a graph, and the known limits stated rather than implied. Three hand-drawn SVGs show the mechanisms: one logical cell landing at two physical positions, three views sharing one storage with materialize() as the only copy point, and the resolution flow with the override lane. - tutorials/android-classifier-getting-started.adoc — define, train and evaluate a [4,16,3] Iris MLP with the Kotlin DSL, plus precise sections on where off-heap weights (mapped GGUF loading, not trainable params) and NEON kernels (quantized matmul, not FP32; #920) apply on Android. The tutorial's code is IrisClassifier.kt in skainet-docs-samples: compiled and executed in CI with a held-out accuracy >= 0.80 assertion — the first end-to-end CrossEntropyLoss training of a DSL model in the test suite, converting a previously untested composition into coverage. Closes #1160. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1160. Independent of #1162 (both branch from
develop; merge in any order).Two Antora pages with hand-drawn SVGs, one honest story:
explanation/virtual-tensors.adoc(developers) — the ML Drift-style tensor virtualization as implemented on the eager/IO side: the strides algebra (one logical cell, two physical positions),TensorView = Shape + Format + Layout + Storage, resolver-owned physical forms (WeightFormResolver→AllocationResolver→explain(), with the user-wins override lane), scope-based lifetime without a graph, and a "known limits, stated rather than implied" list (compile lane carries no Layout yet;Storage.OffHeaphas no tensor-factory consumer; the ForwardScope slab is heap; trainable params are heap-resident). Heavy xrefs tomemory-model,packed-weight-layout,eager-executioninstead of duplication.tutorials/android-classifier-getting-started.adoc(consumers) — define, train and evaluate a[4,16,3]Iris MLP with the Kotlin DSL on Android (minSdk 24, published coordinates), then two deliberately precise sections: where off-heap applies today (mapped GGUF loading — dense F32; not trainable parameters; #973 for packed) and where NEON applies today (quantized matmul via the auto-discovered JNI provider; FP32 is scalar until #920), with xrefs to the kernel-support matrix and the Pixel 8a perf page.The tutorial cannot rot: its snippets are tagged regions of the new
IrisClassifier.ktinskainet-docs-samples, compiled and executed in CI with a held-out accuracy ≥ 0.80 assertion. This is also the suite's first end-to-endCrossEntropyLosstraining of a DSL model — a previously untested composition, now covered. (skainet-docs-samplesgainsskainet-data-api/skainet-data-simpleandkotlinx-coroutines-testtest deps.)Full pr-gate green.
🤖 Generated with Claude Code