Commit 09adb11
ux(wasm): clear prefill expectation message + verify ccall works (#35)
The "hang" users see is actually the prefill phase (processing all
prompt tokens through 28 layers in WASM). This takes 5-10s for a
0.8B model and cannot be interrupted — it runs synchronously before
the first ASYNCIFY yield point in the generation callback.
Changes:
- Message now says "Processing prompt (may take a few seconds)..."
to set expectations correctly
- Stats bar shows "processing prompt..."
- Confirmed ccall({async:true}) is the correct ASYNCIFY pattern
and generation streaming works AFTER prefill completes
The prefill blocking is a fundamental WASM limitation without a
step-by-step API. Future: expose a single-token-forward API to
enable prefill yielding.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 60e44c6 commit 09adb11
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
0 commit comments