Repository navigation
Conversation
cobanov
left a comment
There was a problem hiding this comment.
Thanks for the tests and the console matrix.
- Off should plan exactly as main does today, but
min_batch = near_full_vram ? 128 : 256and the 0.25 GiB introspect reserve inmodel_plan.cppapply in Off too. Please gate both on the disk setting and add a test that Off matches main. - Please don't turn introspection off while its settings row says On: show it there, or leave the setting alone.
- Since Auto moves tight models to
-ub 32 -ctxcp 0, I'd like two measurements: prompt speed on a long prompt at-ub 32vs64, and time to first token over about 10 turns of one chat on the 18B in Auto vs Off.
Please rebase once #101 is in. #104 also touches model_plan.cpp, so expect a small conflict there.
6c3f11f to
43a7d63
Compare
|
@cobanov Updated Fixes Applied
Live PS5 Benchmark 1:
|
| Setting | Trials (tok/s) |
Median (tok/s) |
Mean (tok/s) |
Median TTFT | Lowest pool free |
|---|---|---|---|---|---|
-ub 32 |
242.62, 239.04, 239.15 |
239.15 |
240.27 |
32,896.3 ms |
0.22 GiB |
-ub 64 |
267.40, 264.90, 263.74 |
264.90 |
265.35 |
29,832.9 ms |
0.18 GiB |
Result: -ub 32 costs 9.7% prompt speed for 0.04 GiB headroom, confirming we should only drop -ub 64 -> 32 when it actually unlocks a longer context.
Live PS5 Benchmark 2: 10-Turn Single-Chat TTFT on 18B MoE (3 Chats / 30 Turns per Mode)
Your hypothesis about dropping the single checkpoint on a recurrent/hybrid model (Qwen3.5) reproduced 100% on the PS5:
Mode (on 18B MoE, q8_0) |
Turn 1 TTFT Med | Turns 2–10 (27 turns) cached_tokens Avg |
Turns 2–10 TTFT Med (Min–Max) | Lowest pool free |
|---|---|---|---|---|
Off (-b 256 -ub 64 -ctxcp 1) |
7,060.9 ms |
2,216.1 |
303.1 ms (272.3–427.7) |
0.12 GiB |
Auto (before fix: -ub 32 -ctxcp 0) |
8,602.2 ms |
0 (wiped every turn) |
8,810.5 ms (7,745.7–9,808.1) |
0.20 GiB |
Auto (fixed: -b 128 -ub 64 -ctxcp 1 --cache-disk) |
8,737.9 ms |
2,216.1 (matched Off) |
297.9 ms (268.7–420.2) |
0.10 GiB |
- With
-ctxcp 1preserved, switched-chat SSD restore (Chat 3 -> Chat 1) inAutoalso worked cleanly (cached_tokens = 2,360 / 2,421,0.31 s@516 MB/sloading87.8 MiB + 62.8 MiB chk,HTTP 200), andAlways onexpanded18Bto32k q4_0(HTTP 200,143.9 ms,0.21 GiBfree).
Rebased on updated #101 (9df6910), and I'll handle the small rebase once #101/#104 settle.
43a7d63 to
af921c3
Compare
|
@cobanov Rebased
|
af921c3 to
d84b501
Compare
…ftpsrv writer and settings UI # Conflicts: # scripts/build-app.sh
d84b501 to
9100a56
Compare
Stacked on #101 (
7d1375a) — only the top commitaf921c3belongs to this PR; rebase onto main once #101 merges.Tight-VRAM context expansion and explicit
kv_typepreservation for--cache-disk, split out of #89.Changes (
ps5/app/model_plan.cpp,ps5/app/model_plan_test.cpp,ps5/app/dashboard.cpp)Off == mainparity &LLAMA_INTROSPECTuntouched:LLAMA_INTROSPECTtoggling/budgeting (main.cppand the0.25 GiBreserve are completely untouched — the console's Developer setting stays in control).disk_cache_modevalues to"off".min_batch = 128and tight-ub 32compaction strictly ondmode != "off". Whendisk_cache == "off"(or invalid),plan_modelproduces the exact samePlan(fits,ctx,ubatch,kv_type,reserve_gib,total_gib,why,args) asorigin/main.-ctxcp 1(never emits-ctxcp 0or-ctxcp 4):-ctxcp 1to-ctxcp 0breaks intra-chat prefix reuse on hybrid recurrent models (Qwen3.5), forcing full prompt re-prefill on every follow-up turn.model_plan.cppnow always keeps-ctxcp 1and-cram 0.-ub 32compaction (~0.05 GiBcompute scratch):dmode != "off"and VRAM is tight (!fitsorctx < ctx_cap), tries-ub 32(tight_reclaim = 0.05 GiB) and accepts it only when it rescues!p.fitsor unlocks a strictly longer context (tight_plan.ctx > p.ctx) — never downgrading a working-ub 64plan at the same context length.AutovsAlways on:Autoenables-b 128 --cache-diskwhen near full (< 0.75 GiBheadroom or compacting) and honors an explicitkv_typeacross>= 8kbefore stepping down toq4_0;Always onenables--cache-diskand expands toq4_0(expanded)when it unlocks a longer context.ps5/app/model_plan_test.cpp): Covers exactOff == mainequal_plansparity (c,d,moe18,iq2_27b, invalid"bogus"),-ctxcp 1invariant (never-ctxcp 0or-ctxcp 4),2 * state_gibaccounting,18B MoE(11.74unlock8k->16k,11.80keeping-ub 64),27B IQ2_M(11.66unlock16k->32k,11.30q4_0 (expanded)),0 MiB--cache-diskomission, and strictctx_cap.Verification
model_plan_test: ok (synthetic only),log_sink_test: all passed,bash -n,tests/test_build_app.py(7/7 OK).Off+LLAMA_INTROSPECT=1check (18B MoE,kv_type=q8_0):-c 16384 -ctk q8_0 -b 256 -ub 64 -ctxcp 1 -cram 0(no--cache-disk),llama.logconfirmedintrospection: enabled (POST /v1/introspect) (activation budget 256 MiB), and nestedcharacter_sheetjson_schemareturnedHTTP 200+/health 200.Benchmark 1: Long Prompt Speed at
-ub 32vs-ub 64(18B MoE,-c 16384 -ctk q8_0 -b 128 -ctxcp 0)3 identical cold documents per ubatch (
8,249,7,599,7,859tokens; allcached_tokens == 0,enable_thinking: false):8,249tok)7,599tok)7,859tok)pool free-ub 32242.62 tok/s(34,031.3 ms)239.04 tok/s(31,823.0 ms)239.15 tok/s(32,896.3 ms)239.15 tok/s240.27 tok/s32,896.3 ms0.22 GiB-ub 64267.40 tok/s(30,880.2 ms)264.90 tok/s(28,720.9 ms)263.74 tok/s(29,832.9 ms)264.90 tok/s265.35 tok/s29,832.9 ms0.18 GiB-ub 32trades-9.7%prompt throughput (-25.75 tok/s) for+0.04 GiBcompute headroom, so keeping-ub 64unless-ub 32unlocks a longer context (or rescues fit) is the right trade-off.Benchmark 2: 10-Turn Single-Chat TTFT on
18B MoE(3Separate 10-Turn Chats /30Turns per Mode)Identical
~1,895–2,055-token Turn 1 + 9 follow-up turns (~2,364–2,526tokens at Turn 10;kv_type=q8_0,enable_thinking: false,max_tokens=64,temperature=0.0):27turns)cached_tokensAvgpool freeOff(-b 256 -ub 64 -ctxcp 1)7,060.9 ms2,216.1272.3 ms303.1 ms324.8 ms427.7 ms0.12 GiBAuto(before fix:-ub 32 -ctxcp 0)8,602.2 ms0(full re-prefill every turn)7,745.7 ms8,810.5 ms8,825.7 ms9,808.1 ms0.20 GiBAuto(fixed:-b 128 -ub 64 -ctxcp 1 --cache-disk)8,737.9 ms(incl. ~1.6s SSD save of prev chat)2,216.1(identical prefix reuse)268.7 ms297.9 ms325.7 ms420.2 ms0.10 GiBMulti-Model Live PS5 Planner & Chat Matrix (
192.168.10.6,kv_type=q8_0,ctx_cap=65536)OffPlanAutoPlanOnPlanAuto/On)pool free(Auto/On)Qwen3.5-2B Q8_0(2.01 GB)64k q8_0(3.1 GiB,-b 256 -ub 64)Off(no disk)64k q8_0 + disk(3.1 GiB,-b 256)1,087.8 ms(Off) /1,133.9 ms(templatecached=0)8.51/8.51 GiBQwen3.5-9B Q6_K(8.56 GB)64k q8_0(9.9 GiB,-b 256 -ub 64)Off(no disk)64k q8_0 + disk(9.9 GiB,-b 256)242.3 ms/247.6 ms(~1,656/1,619cached)2.06/2.01 GiBQwen3.6-12B IQ-Q5_K_M(8.42 GB)64k q8_0(9.5 GiB,-b 256 -ub 64)Off(no disk)64k q8_0 + disk(9.5 GiB,-b 256)203.3 ms/202.8 ms(~1,648/1,681cached)2.51/2.46 GiBqwen3.5-14b-a3b Q4_K_M(8.70 GB)64k q8_0(9.6 GiB,-b 256 -ub 64)Off(no disk)64k q8_0 + disk(9.6 GiB,-b 256)171.4 ms/169.7 ms(~1,593/1,676cached)2.11/2.05 GiBqwen3.5-18b-a3b Q4_K_M(11.38 GB)16k q8_0(11.6 GiB,-b 256 -ub 64)16k q8_0 + disk(-b 128 -ub 64)32k q4_0 (expanded) + disk(-b 128 -ub 64)297.9 ms(2,216.1cached inAuto)0.10/0.21 GiBQwen3.8-27B IQ2_M(10.24 GB)32k q8_0(11.6 GiB,-b 256 -ub 64)32k q8_0 + disk(-b 128 -ub 64)64k q4_0 (expanded) + disk(-b 128 -ub 64)502.6 ms/513.7 ms(1,676/1,681cached)0.12/0.12 GiB2B,9B,12B,14B-A3B) keep-b 256 -ub 64 -ctxcp 1and disable--cache-diskinAuto, matchingOffidentically.18B-A3B,27B) drop-b 256 -> 128+ enable--cache-diskinAuto, and expand context inOn(18B:16k -> 32k,27B:32k -> 64k) while keeping-ctxcp 1and full multi-turn KV reuse.Refs #89.
Console Screenshot
Live PS5 TV Settings → Model showing Disk cache spillover (
Offdefault) and the tight-VRAM subtitle.Generated with Google's Antigravity