ReadonlymodelStaticstepsTotal compiled steps executed (tests assert the compiled path ran rather than silently falling back).
StaticunexpectedTotal UNEXPECTED retraces observed (a shapeless closure tracing more than once). Must stay 0: a retrace means per-step JS graph builds sneaked back in, which both wrecks the perf win and signals shape drift. Surfaced loudly; tests assert on it.
Free compiled closures (model unload).
One decode step: consumes the pending token array (uint32 [1], unevaluated is fine), advances every cache by one position, returns the logits node plus the cache-update nodes that must ride the same async_eval. Throws on unsupported state, leaving the caches as they were (any growth already done is benign).
StaticforStaticreleaseRelease an existing model-owned runner without materializing constants or creating a new native closure. Call only after all borrowers have stopped; a no-op for a graph that owns none.
The Gemma graph's compiled decode step (its
compiledDecodeStep).