Commit 3e6448d
runtime: cap max_new_tokens 3072 -> 768 for usable phone-UX latency
Lab observation 2026-05-27: with thinking-mode generating 500-1500
think-tokens plus structured-output tokens, max_new_tokens=3072
allowed turns to run for 7-10 minutes on RK3588 NPU. Phone-app
shows 'Thinking...' the whole time with no progress visible until
the turn completes (generate() blocks until the full output text
is ready).
Cap to 768 — about 2-3 minutes per turn at RK3588's ~5-7 tps. Long
but bounded enough that the phone UI doesn't appear hung. The
synthetic-verdict fallback in run_troubleshoot handles truncated
output gracefully.
Proper fix later: stream tokens as they arrive via SSE (current
generate blocks). Then max_new_tokens can be raised again without
hurting perceived latency.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent dec8471 commit 3e6448d
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
0 commit comments