TensorDump forward hook + TensorCompare CLI: localise numeric divergence between two runs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- machine-learning, tooling
Direzione di ricerca
Start by reading the existing ForwardHooks, ExecutionObserver, and TraceSink APIs to understand how a tensor dump could integrate with current execution. The scope spans a versioned cross-platform format, filtering, comparison metrics and CLI, documentation, and in-tree parity-test use. Done means Android and JVM dumps compare in one command and identify the first tensor over tolerance, with the format documented and a Python reader.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
The most expensive part of bringing a large model to a phone is not the port, it is finding where numerics diverge between two executions of the same model: FP32 reference vs a quantized or FP16 backend, desktop vs device, eager vs compiled. The downstream Whisper-on-LiteRT case study needed ad-hoc per-block probes to localise an FP16 LayerNorm overflow to block 31 of 32 and an INT8 projection error to the block-0 K projection — all built by hand, twice, in Python and in Kotlin.
SKaiNET has the hooks (ForwardHooks, ExecutionObserver, TraceSink) but no standard artifact that two runs can exchange, and no standard comparison.
Scope
-
TensorDump: a forward hook that writes named intermediate tensors (by module path and op index) to one compact binary file — header with name, shape, dtype/encoding, then payload — appendable, streaming, no heap copy of the whole run. Works on JVM, Android and Kotlin/Native. -
TensorCompare: a library function + CLI (skainet-plan-style) taking two dumps and reporting per tensor: cosine, RMSE, max abs diff, index of first divergence above a tolerance, and a summary that names the first tensor that crosses the tolerance (the localisation answer). - Filters: dump only tensors matching a module-path glob, every N-th op, or a shape predicate, so a 32-layer encoder does not produce gigabytes.
- Documented recipe in the how-to section: "compare a device run against a desktop reference" with the two commands.
- Used in-tree at least once: the
.vmfbparity acceptance (#1148) or the JNI parity tests read/write this format instead of bespoke arrays.
Acceptance
- A dump from an Android
androidTestrun and a dump from a JVM test of the same model compare in one command and point at the first divergent tensor. - Format documented and versioned; readable from Python with a short reference reader in
ground-truthtooling.
Related
- #1148 — eager vs compiled parity acceptance
- #1261 — ULP-level JIT drift, the kind of thing this tool should make a one-liner to see
- Lingua principale
- Kotlin
- Stelle
- 52
- Fork
- 15
- Merge medio
- 1g 15h
- PR unite (30g)
- 36
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SKaiNET-developers/SKaiNET
-
coding good first issue size:xs skill:kotlin-core sub-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
SKaiNET-developers/SKaiNET#1323 ·
I maintainer di solito rispondono entro 1 giorno
-
coding good first issue platform size:xs skill:js sub-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SKaiNET-developers/SKaiNET#1232 ·
I maintainer di solito rispondono entro 1 giorno
-
skeep tracking
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
SKaiNET-developers/SKaiNET#1331 ·
I maintainer di solito rispondono entro 1 giorno
-
assessment size:s skill:review sub-issue
Difficoltà 4/5 1-2 giorni Idoneità per principianti 18/100
SKaiNET-developers/SKaiNET#1330 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue size:s skill:docs sub-issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
SKaiNET-developers/SKaiNET#1329 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SKaiNET-developers/SKaiNET
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
supabase-community/supabase-kt#1413 ·
I maintainer di solito rispondono entro 5 giorni
-
Type: Possible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
spacecowboy/Feeder#1258 ·
I maintainer di solito rispondono entro 1 giorno
-
[Submission] 抖音火山版Apertasubmit-adaption submit-adaption-pre
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BetterAndroid/android-notification-icon-project#744 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
utopia-rise/godot-jvm#1004 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
pedroSG94/RootEncoder#2213 ·
I maintainer di solito rispondono entro 2 giorni