Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
251 lines
23 KiB
Markdown
251 lines
23 KiB
Markdown
# Laptop profile: Qwen3.8-Flash-Next IQ3_S on a 16 GB laptop GPU
|
|
|
|
**Status:** experimental profile, measured on one laptop. Nothing here is a production default or a quality claim.
|
|
|
|
The target is the one machine below, not the RTX 5090 server: what has to live where, which of the Original's
|
|
low-memory modes apply, what the Rust port lacked to run there, and paired numbers on the same prompts.
|
|
|
|
## Machine
|
|
|
|
| | |
|
|
| --- | --- |
|
|
| CPU | Intel i9-11900H, 8 cores / 16 threads, AVX-512 (VNNI, VBMI) |
|
|
| RAM | 48 GB (47 GiB usable); WSL2 gets half by default: `MemTotal` 24,447,308 kB |
|
|
| GPU | NVIDIA GeForce RTX 3080 Laptop GPU, 16,384 MiB, sm_86, driver 617.42 (WDDM, WSL2 passthrough); 14.89 GiB free to CUDA in WSL with nothing running |
|
|
| Disk | NVMe, 1.2 TB free on C:; the WSL ext4 VHDX lives on it |
|
|
| Software | Windows 11 Pro 26200, WSL2 Ubuntu 24.04, CUDA 13.2.86 (nvcc), cuBLAS 13.4 (Original) / 12.9.1.4 (port), Rust 1.99, gcc 13.3 |
|
|
|
|
Pinned host memory under this WSL2: `cudaHostAlloc` of 16 x 512 MiB and `cudaHostRegister` of 1-16 GiB all succeeded
|
|
(probe, 2026-10-16). The Original's setup.py comment "the driver pins only about 1 GB" under WSL is not true for this
|
|
driver; the limit is the VM's RAM.
|
|
|
|
## Model components and where they can live
|
|
|
|
Sizes are from the files (`native_experts.txt`, the MTP pack, the KAR provenance) and the Original's formulas.
|
|
|
|
| component | size | must be | can be |
|
|
| --- | --- | --- | --- |
|
|
| routed experts (48 layers x 512, IQ2_S..IQ4_NL) | 50,292,326,400 B (46.84 GiB), blob 1.51-2.66 MB, mean 2.05 MB | read per token for the 10 routed experts of every layer | VRAM cache (hot), RAM (warm), SSD (cold, via the OS file cache or direct reads) |
|
|
| dense pack (attention, GDN, shared experts, routers, norms) | `dense.bin` 1,538,035,200 B | VRAM | - |
|
|
| native head (Q5_K `output.weight` 248,320 x 2,560) | 521,472,000 B (Original log) | VRAM | - |
|
|
| token embedding | ~0.4 GB (Q5_K) | read per token | mapped host memory |
|
|
| PLE n-gram table (`per_layer_token_embd`, 320,001,536 rows) | 28,800,138,240 B (90 B/row, GGUF shard 2) or ~16 GB of level-2 KAR parts (50 B/row) | 16 rows per token | SSD (direct reads) + a bounded row cache |
|
|
| MTP draft layer (`data/mtp-rt`) | dense 116,099,072 B + experts 707,788,800 B (802 MiB of VRAM loaded) + draft head 212.9 MiB (106,299-token CJK subset) | VRAM | - |
|
|
| QSA KV, INT8 | 1,056 B per cell per layer, 12 QSA layers + draft layer = ~13.7 KB per token: 8K 0.11 GB, 32K 0.45 GB, 128K 1.8 GB, 256K 3.6 GB | the attention window in VRAM | the rest in pinned RAM (`--kv-resident`) |
|
|
| prompt (prefill) buffers | Original: borrowed from expert-cache slots (`--prefill auto`); port arena 2.0 / 2.8 / 4.3 GiB at chunk 2048 / 4096 / 8192 | VRAM while a prompt is read | - |
|
|
|
|
The routed experts are the whole problem: 46.84 GiB against 14.9 GiB of usable VRAM and 23 GiB of WSL RAM.
|
|
|
|
### VRAM budget (16 GiB card, 14.9 GiB free to CUDA)
|
|
|
|
Measured (logs of the runs below):
|
|
|
|
| | Original (`--expert-cache auto`, `--max-context 8192`) | port (Original serve stack, 8K ceiling) |
|
|
| --- | --- | --- |
|
|
| free before the expert cache | 9.67-9.73 GiB (after dense, native Q5_K head 521 MB, MTP 802 MiB, KV, state) | not printed; KV alone 0.391 GiB + 0.258 GiB prompt stage (262,144-cell geometry, 32K window) |
|
|
| reserve | `--vram-reserve-mib` 700 + 218 MiB draft head | `_VRAM_RESERVE_MIB` 700 + `_DECODE_RESERVE_MIB` 1024 (per-request verifier assembly) |
|
|
| expert slots | 4,597-4,632 slots, 8.76-8.83 GiB, sized per blob by the profile | 3,133 slots, 6.00 GiB |
|
|
| prompt path | borrows the last 1,965 slots (3.72 GiB) during a prompt | borrows the last 1,157 slots |
|
|
| left free | 459-461 MiB "with everything loaded" | (nvidia-smi peak 14,195 MiB used of 16,384) |
|
|
| decode hit rate (per request) | 48-77 % | 40-53 % of window entries on the GPU |
|
|
|
|
Every GiB of VRAM is ~520 more cached experts (2.05 MB each) out of 24,576.
|
|
|
|
### RAM budget (48 GB physical, 23.3 GiB in WSL by default)
|
|
|
|
| | Original low-RAM resident mode | port before this work | port, laptop profile |
|
|
| --- | --- | --- | --- |
|
|
| experts | `--resident-experts`: the complement of the GPU cache (~36 GiB) does not fit, so the soft path keeps what fits (MemAvailable - 4 GiB headroom), hottest by the profile, page-locked; the rest through the OS file cache from the GGUF in place | 50 GB copied into RAM (`load_resident_expert_source`, needs MemAvailable >= 58 GB) and page-locked whole | read-only shared mapping of shard 0 (`load_mapped_expert_source`): nothing copied, the OS file cache keeps what is used |
|
|
| KAR archive | `--ple-kar`: mapped from the file | 55,295,529,472 B sealed memfd (shmem) for the life of the process | read-only file (`open_read_only_file`): file cache only |
|
|
| PLE (GGUF) | `--ple-io direct`: never in RAM, 1M-row (90 MB) cache | not used (KAR PLE only) | not used (KAR PLE only) |
|
|
| KV host copy | none at 8K (streaming is off below 64K, and setup turns it off under WSL) | 12 x 276,825,088 B = 3.32 GB pinned (always 262,144 cells) | same: 3.094 GiB pinned |
|
|
|
|
**Under WSL2 the unmodified Original's resident modes do not engage.** `available_memory_bytes()`
|
|
(expert_source.cpp:219) requires the cgroup-v2 path of `/proc/self/cgroup` ("0::/init.scope") to exist unde
|
|
`/sys/fs/cgroup`; WSL2 mounts cgroup v2 at `/sys/fs/cgroup/unified` (hybrid layout), so it returns false and
|
|
`--resident-experts` / `--resident-budget-gib` fall back to plain mmap with "cannot determine available RAM". With
|
|
that check relaxed (2 lines, built as a separate labeled arm, not committed to `engine/strata`) the resident mode
|
|
works: "RAM budget 16.83 GiB: 8892 of the 38.07 GiB of experts the GPU cache does not hold", page-locked.
|
|
|
|
### NVMe
|
|
|
|
* PLE direct reads: 16 rows per token, one 4 KiB read each, ~64 KB/token: negligible at any decode rate.
|
|
* Experts: a miss that is neither in VRAM nor in RAM is a 1.5-2.7 MB read. That is the term that decides decode
|
|
speed once the RAM cannot hold the complement.
|
|
* The shards are verified once per start by the port (SHA-256 of 83.6 GB) and the KAR archive likewise (55.3 GB).
|
|
|
|
## Files on the laptop and why
|
|
|
|
| file | size | needed by | why |
|
|
| --- | --- | --- | --- |
|
|
| `qwen-iq3-s-l2-v4.kar` + provenance | 55.3 GB | port (KAR PLE), Original `--ple-kar` arm | the compressed PLE source; level 2 is lossy (an experimental arm, not the control) |
|
|
| `data/iq3_s` (dense.bin, index, native_experts.txt, tokenizer) | 1.5 GB | Original | its native pack |
|
|
| `data/mtp-rt` | 0.8 GB | both | the MTP draft layer |
|
|
| `data/expert-profile.bin` | 196,632 B, sha256 `8f59b4aa...6388975baf` | both (VRAM tier ranking, resident budget) | upstream `data/expert-profile.bin` at the pinned Strata commit `d9ab8435`; the imported subtree omits it |
|
|
| GGUF shard 1 | 54,817,524,224 B | both, strictly | the routed experts (no non-lossy compressed source exists: the KAR archive's level-2 experts have relative L2 ~0.33 and no quality gate), the dense GGUF projections and the native head |
|
|
| GGUF shard 2 | 28,800,138,432 B | both, strictly | Original: `--native` opens every shard of the split (`gguf_split_paths`, generate.cpp:1544) and `--ple-io direct` reads the table from it; port: `Qwen4ExpArtifact::bind` and `KarPleBinding::new` verify both shard digests and the PLE descriptor even when the rows come from KAR |
|
|
|
|
All model files live on the WSL ext4 disk (`~/laptop/model`, `~/laptop/data`): `/mnt/c` is a 9p mount, far slowe
|
|
for mapped and direct reads. Nothing of it is in Git.
|
|
|
|
## The Original's low-memory modes (engine/strata, unmodified)
|
|
|
|
From `generate.cpp`, `expert_source.cpp`, `setup.py` and `docs/DETAILS.md`:
|
|
|
|
| mode | flags | experts in RAM | fits this laptop |
|
|
| --- | --- | --- | --- |
|
|
| resident arena (default) | none | all 50.3 GB, pinned | no |
|
|
| low-RAM mapped | `--mmap-experts` (GGUF in place when the pack has no experts.bin) | OS file cache only | yes |
|
|
| low-RAM resident | `--resident-experts` = `--mmap-experts --resident-cpu-experts`, page-locked, 4 GiB headroom, soft | the complement of the GPU cache if it fits, else (#467) what fits, hottest by profile | yes (the "what fits" path) |
|
|
| RAM budget | `--resident-budget-gib N` | N GiB, hottest by profile, rest mapped; lookahead page prefetch of the next layer's predicted experts | yes |
|
|
| PLE | `--ple-io direct` (default) / `--ple-kar` (KAR-enabled build, experimental) | 90 MB row cache / file cache | yes |
|
|
| KV | `--kv int8`, `--kv-resident 32768` from 64K (setup turns streaming off under WSL) | none at 8K | yes |
|
|
|
|
setup.py's argument set for IQ3_S: `--pack --native SHARD1 --ple-gguf SHARD2 --expert-profile data/expert-profile.bin
|
|
--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp DIR --max-context N [--kv int8] [--resident-experts |
|
|
--mmap-experts]`. setup.py's table lists IQ3_S at 62 GB of RAM (48 GB: IQ2_XS or Q2_0); for a PC whose RAM cannot hold the
|
|
experts it picks the low-RAM resident variant, which is what is measured here.
|
|
|
|
## What the port lacked for this laptop
|
|
|
|
The Original serve stack of the port (`docs/original-serve.md`) opened only with server-sized sources:
|
|
|
|
| mechanism | Original | port before | port now (this branch) |
|
|
| --- | --- | --- | --- |
|
|
| expert source without a 50 GB copy | `--mmap-experts`, GGUF in place | none: `load_resident_expert_source` copies 50 GB and needs MemAvailable >= 58 GB | `load_mapped_expert_source`: read-only shared mapping of shard 0; `MappedExpertBank` pageable mode (copies staged by the driver, no 50 GB `cuMemHostRegister`) |
|
|
| RAM budget / resident complement | `--resident-budget-gib`, `--resident-experts` | none | `LELEKA_ORIGINAL_SERVE_RESIDENT_BUDGET_GIB`: hottest non-VRAM experts page-locked in place (read-only registration of the file pages), same clamp |
|
|
| KAR PLE without holding the archive in RAM | `PleTable::open_kar` maps the file | 55.3 GB sealed memfd (shmem) | `InheritedKarArchive::open_read_only_file`: regular read-only file, verified at load |
|
|
| PLE direct from the GGUF | `--ple-io direct` | not ported (the Original serve stack needs KAR PLE) | not ported |
|
|
| VRAM expert tier sized for 16 GB | `--expert-cache auto` + profile | merged from `claude/expert-residency`, never run on a real model | used here, first real-model run |
|
|
| MTP | `--spec 4 --mtp` | present (`--mtp-rt-dir` / pack) | unchanged |
|
|
| KV sized by `--max-context` | yes | always 262,144 cells: 3.32 GB pinned host copy + 0.42 GB VRAM window at any ceiling | `LELEKA_LAPTOP_CELLS` (bench only, experimental) |
|
|
| sm_86 companion of `qsa_prompt_resolver.ptx` | n/a | stale after the kv-streaming reseal (2 arch_ptx tests failed; the 3080 would load the sm_120 image) | regenerated |
|
|
| lookahead page prefetch of predicted experts | `STRATA_LOOKAHEAD` | none | none |
|
|
| PCIe share of misses | `--pcie-frac 0.55` over the pinned complement | `_PCIE_FRAC` default 0 | 0 (pageable bank) |
|
|
|
|
## Results, 2026-10-16 (one laptop, WSL2, n = 6 requests per arm)
|
|
|
|
Workload: `benchmarks/laptop/prompts.txt` (3 user turns, thinking off, 88 / 83 / 78 tokens, tokenized once with
|
|
`chat_tokens` and fed as the same IDs to both engines), 128 new tokens, greedy, each prompt served twice in one
|
|
process (pass 0, pass 1), conversation cache off, `--max-context 8192` / ceiling 8192, INT8 KV, spec 4 + MTP
|
|
(`data/mtp-rt`), `--spec-min-p 0.5`, expert profile sha256 `8f59b4aa...` , 7 CPU expert workers. Cache state: no
|
|
root, so page caches could not be dropped; each arm starts with whatever the previous one left (recorded per arm
|
|
in `~/laptop/results/*.cache`). Engine: Original `engine/strata` at this branch, built for sm_86 with CUDA 13.2.86
|
|
(`STRATA_NEXT_EXPERIMENTAL_KAR_PLE=ON`); port: branch `claude/laptop-profile`, `--features sm86`, release. Model:
|
|
the two IQ3_S shards (sha256 `4c1eb2ce...`, `316b46f3...`, verified on copy) and the level-2 KAR archive
|
|
(`536d612c...`). TTFT is measured from sending the request to the first emitted token; decode tok/s is produced
|
|
tokens over the decode phase; prefill tok/s is prompt tokens over the prompt phase. VRAM is nvidia-smi's peak fo
|
|
the whole GPU; RAM is the process's peak RSS (file-backed pages are reclaimable).
|
|
|
|
| arm | PLE | experts | decode tok/s mean (median, range) | prefill tok/s mean | TTFT mean (range) | load to ready | peak VRAM | peak RSS (anon / file / shmem) |
|
|
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
| Original, `--resident-experts` (falls back to mmap under WSL2, see above) | GGUF direct | 4,632 VRAM slots + mmap | 5.64 (5.61, 4.45-7.12) | 8.7 | 10.0 s (8.0-12.0) | 34 s | 15,093 MiB | 22.4 GB (2.3 / 19.8 / 1.1) |
|
|
| Original, same, KAR PLE (`--ple-kar ... --ple-kar-gpu-cache-mib 64`) | KAR L2 | same | 8.15 (7.45, 6.75-10.17) | 12.4 | 7.2 s (4.6-9.1) | 150 s | 15,111 MiB | 22.9 GB (2.0 / 22.3 / 1.1) |
|
|
| Original + WSL cgroup fix (diagnostic arm), resident 16.83 GiB page-locked, KAR PLE | KAR L2 | 4,597 VRAM + 16.8 GiB RAM + mmap | 10.61 (10.93, 7.00-14.44) | 18.6 | 5.0 s (3.6-8.4) | 161 s | 15,111 MiB | 22.2 GB (1.9 / 15.1 / 18.1); MemAvailable fell to 2.2 GB |
|
|
| **port**, mapped experts + VRAM tier (profile, auto) | KAR L2 | 3,133 VRAM slots + mmap | **2.70** (2.63, 2.15-3.68) | **3.1** | **28.4 s** (20.6-36.6) | 212 s | 14,195 MiB | 20.5 GB (2.1 / 17.8 / 3.9) |
|
|
| port, adaptive swaps off, decode reserve 512 MiB | KAR L2 | 3,397 VRAM slots + mmap | 2.62 (2.67, 1.81-3.13) | 3.5 | 25.2 s (21.0-30.7) | 193 s | 14,709 MiB | 20.3 GB |
|
|
| port, + resident budget 16 GiB (clamped to 11.42 GiB page-locked) | KAR L2 | 3,133 VRAM + 11.4 GiB RAM + mmap | 2.39 (2.27, 1.48-3.44) | 3.1 | 30.2 s (21.2-46.9) | 214 s | 14,195 MiB | 14.0 GB |
|
|
|
|
The paired comparison is row 2 (unmodified Original, the mode it actually runs in under WSL2) against row 4 (port):
|
|
same prompts, same PLE source, same profile, same VRAM-tier policy, greedy. **The port is 3.0x slower in decode
|
|
(2.70 vs 8.15 tok/s), 4.0x slower in prefill (3.1 vs 12.4 tok/s) and 3.9x later to the first token (28.4 vs 7.2
|
|
s), with 1.5 GB less RAM, 0.9 GB less VRAM and 1,500 fewer VRAM expert slots.** Greedy outputs of the two agree on
|
|
the first 47 / 43 / 57 tokens of the three prompts and then diverge (GPU and CPU experts round differently and the
|
|
two place different experts on the GPU; the Original itself diverges from its GGUF-PLE run after 44 / 42 / 128
|
|
tokens). This is not a quality gate. Rows 1 and 2 differ in the PLE source and in page-cache state at the start;
|
|
they are not a PLE A/B.
|
|
|
|
Where the port's time goes (traced run, `LELEKA_BRINGUP_TRACE=1`, 3 prompts x 48 tokens): every decode millisecond
|
|
is inside `run_window` (62 windows, 62.8 s, 1,014 ms mean per verify window; begin_adaptation 13 ms, draft 10 ms,
|
|
everything else < 1 ms). The Original spends ~0.35-0.45 s per round on the same prompts. In the window, the
|
|
routed-expert CPU tier (`CpuExpertPool::run_entries`) prepares every job on the calling thread
|
|
(`prepare_scoped` copies the expert's three matrices out of the bank, i.e. page faults on the mapped shard, serially)
|
|
before the workers compute; the Original's pool reads the blobs where they are, fetches a layer's missing experts
|
|
on 8 threads and prefetches the next layer's predicted experts. Neither the resident budget nor turning adaptive
|
|
swaps off changed the port's rate beyond the run-to-run spread, which points at that path rather than at residency.
|
|
The prompt path likewise copies each borrowed expert with a host-blocking pageable `cuMemcpyHtoDAsync` on one
|
|
thread, where the Original stages through pinned buffers with helper threads.
|
|
|
|
## Recommendations and open items
|
|
|
|
1. Port next (largest measured gap): parallel, zero-copy CPU expert preparation over the mapped bank (literal
|
|
`expert_pool_dispatch_multi` + `FileExpertSource` fetch threads and routing lookahead), then pinned staging fo
|
|
the prompt copy ring. Re-measure with the same harness.
|
|
2. VRAM: the port leaves ~1,500 fewer expert slots than the Original; the 1 GiB per-request verifier reserve, the
|
|
262,144-cell KV geometry (3.1 GiB pinned host + 0.65 GiB VRAM at an 8K ceiling) and the verifier being assembled
|
|
per request are the candidates (`LELEKA_LAPTOP_CELLS` exists in the bench for an experiment; not run here).
|
|
3. WSL memory: with the default 50 % (23.3 GiB) the Original's resident mode (fixed) left 2.2 GB available. A
|
|
`%UserProfile%\.wslconfig` with `[wsl2] memory=40GB swap=8GB` would let the complement grow toward ~30 GiB of
|
|
the 38 GiB the GPU does not hold. Needs `wsl --shutdown`; not applied.
|
|
4. The Original's `available_memory_bytes()` hybrid-cgroup bug (WSL2) is worth an upstream-style fix in the fork;
|
|
this branch does not modify `engine/strata`.
|
|
5. Native Windows would give the Original the full 47 GiB and its Windows paths (PrefetchVirtualMemory,
|
|
working-set trimming); it needs a Windows CUDA toolkit install (not present), so it was not tried.
|
|
6. Statistics: n = 6 per arm (2 passes x 3 prompts), single process per arm, uncontrolled page-cache state; the
|
|
charter's paired-A/B requirements (>= 30 repeats, CIs) are not met. Treat the ratios as indicative.
|
|
|
|
## Update 2026-10-24 (branch `claude/laptop-opt`, head 1823923 + harness): state, ceilings, what is and is not measured
|
|
|
|
**Work stopped early by the coordinator** (the 5090 runtime has priority): the integrated head was benchmarked only in the OEM power
|
|
profile, nothing was tuned, `rtx3080-16g.json` is unchanged. The results below are what exists; the open list says what a rerun must do.
|
|
|
|
### Machine state is the dominant variable
|
|
|
|
| state | GPU | H2D pinned | VRAM | bf16 GEMM | how recognised |
|
|
| --- | --- | --- | --- | --- | --- |
|
|
| OEM profile (found 2026-10-17, 10-23) | P5, **30 W** limit, memory 810 MHz, SM 210-1,800 MHz | 3.1 GB/s | 40 GB/s | 6-8 TFLOP/s | `nvidia-smi -q -d PERFORMANCE,POWER`: SW Power Cap + SW Thermal Slowdown active even at idle, limit 30 W (default 115, max 140) |
|
|
| Turbo (set by the operator 2026-10-24) | P0, 100-135 W, memory 7,151 MHz, SM 1,840 MHz | **11.8 GB/s** (pageable 7.4-7.8) | **445 GB/s** | **44 TFLOP/s** | no throttle reasons |
|
|
|
|
Every earlier laptop number in this document (and in `prefill-throughput.md`, `memory-safety.md`, the Original rows above) was taken in an
|
|
undefined one of the two states and is not comparable to another; the 5.6-12.6 tok/s rows of 2026-10-16/17 cannot be paired with anything
|
|
measured later without a same-state rerun. Full ceiling tables for both states: `docs/roofline.md` 1.5 / 1.6; Turbo ideals: decode 29-38 tok/s
|
|
(43-46 at 3 tokens per window), prefill link-bound 480 tok/s at chunk 2048 and 1,900 tok/s at 8192 (pinned), 305 / 1,220 pageable.
|
|
|
|
**Stability incident.** The laptop took two BSODs (0x19C `WIN32K_POWER_WATCHDOG_TIMEOUT`, 2026-10-16 and 2026-10-23) after about 1.5 h of
|
|
sessions in the 30 W profile; during run A1 the whole machine stalled twice (33 and 27 min gaps in `mem.tsv`). Do not run long GPU jobs in the OEM
|
|
profile. `scripts/laptop/lap_run.sh` now wraps every laptop GPU job: preflight (refuses unless the limit is >= 100 W, no SW power cap / thermal
|
|
slowdown at idle, not P5), a 1 Hz watchdog (`monitor.sh`: kills the job on the OEM signature = P5 + memory < 2 GHz + throttle reasons 0x4/0x20, a limit
|
|
< 100 W, > 90 C, or a 10 s gap between samples), `timeout` 900 s, a 120 s cool-down between runs, and `~/LAPTOP_GPU.lock`. A plain P5 with the
|
|
idle reason (0x1) during model load is a clock ramp (it tripped the first version of the rule in `T1_short` at 51 C, 17 W; the job was killed and
|
|
no result was taken); the rule was narrowed accordingly.
|
|
|
|
### Measured: integrated head 1823923, OEM 30 W profile (run `A0_short`, n = 6, not a performance claim)
|
|
|
|
Production-like configuration (harness `original_serve_laptop_bench`, `scripts/laptop/lap_run.sh`): KAR level 2 read-only file, mapped experts,
|
|
VRAM tier `auto` + profile (seed on, adaptive on, pcie_frac 0 for the pageable bank), MTP depth 4 with the draft vocabulary bound
|
|
(`LELEKA_ORIGINAL_SERVE_RT_DIR=~/laptop/data/mtp-rt`), spec-min-p 0.5, INT8 KV (32,768 resident), chunk 2048, 7 CPU workers, conversation cache off,
|
|
`benchmarks/laptop/prompts.txt` (88 / 83 / 78 tokens, 128 new, greedy). Page cache emptied first (`posix_fadvise(DONTNEED)` on the shards and the
|
|
archive, no root needed), GPU clocks during the run: SM mean 1,268 MHz, memory 797 MHz, 29 W.
|
|
|
|
| pass | prefill tok/s (p1 / p2 / p3) | TTFT s | decode tok/s per request | decode weighted |
|
|
| --- | --- | --- | --- | --- |
|
|
| 0 (cold) | 5.5 / 3.6 / 4.9 | 16.9 / 24.6 / 16.3 | 2.72 / 2.45 / 3.22 | 2.76 |
|
|
| 1 (cache warming) | 3.8 / 3.3 / 7.1 | 24.0 / 26.6 / 11.6 | 1.76 / 3.96 / 5.15 | 2.95 |
|
|
|
|
Load to ready 271 s (the two shards are SHA-256-verified one after the other in 181.7 s, the 55 GB archive and the MTP pack in 89 s: the load is
|
|
bound by single-threaded hashing and by the cold page cache). Peak VRAM 14,201 MiB, peak RSS 33.2 GB (anon 2.5, file 31.4, shmem 3.9), process
|
|
VmSwap 1.8 GB, VM swap used 2.5 GB, MemAvailable minimum 30.6 GB. Tier statistics: 55 % of the expert entries from VRAM, 45 % from the CPU pool, 0 %
|
|
over PCIe. Observations (not conclusions): the rate rises with each request while the page cache fills, i.e. a start from a cold cache pays disk reads
|
|
for every miss; the VM already swaps anonymous pages (1.8-2.5 GB) with 40 GB of WSL RAM. Contexts of 8k / 32k / 64k / 180k were not run
|
|
(`prompt-{8192,16384,32768,65536,180000}.ids` are generated by `cargo run -p leleka-tokenizer --example long_prompts`).
|
|
|
|
### Recommended laptop configuration (from the evidence above and the earlier agents' runs; none of it re-tuned here)
|
|
|
|
* Power: Turbo mode (P0, >= 100 W) is a precondition for any laptop claim; in the OEM profile expect 2.5-5 tok/s decode and 4-7 tok/s prefill.
|
|
* `.wslconfig`: `memory=40GB swap=8GB` (as applied). Keep >= 6 GB free + reclaimable; `LELEKA_ORIGINAL_SERVE_RESIDENT_BUDGET_GIB` only after a measurement
|
|
that it beats the page cache (it was neutral or negative at 11.4 GiB in the 2026-10-16 runs).
|
|
* Engine: the `rtx3080-16g` profile as shipped (tier auto + profile, seed on, `--mtp-rt-dir` = the MTP pack, spec-min-p 0.5, INT8 KV, chunk 2048,
|
|
7 workers, prefix cache off until the pool acceptance tests; `LELEKA_ORIGINAL_SERVE_PCIE_FRAC` unset = 0 over the pageable bank).
|
|
* `LELEKA_ORIGINAL_SERVE_DECODE_RESERVE_MIB=512` buys 264 slots (3,133 -> 3,397) at a risk of the per-request verifier not fitting; untested on this head.
|
|
|
|
### Open (in the order I would run them, each <= 15 min with `lap_run.sh`, Turbo only)
|
|
|
|
1. Baseline in Turbo: the same 6 requests, then 8k / 32k / 64k contexts, 3 interleaved repetitions (decode weighted, prefill, TTFT, peaks).
|
|
2. Page-cache residency after load: the loader hashes shard 0, shard 1, the archive in that order, so the archive evicts the experts; read the
|
|
profile-ranked experts back (or hash the archive first / in parallel threads: 271 s -> about 100 s) and compare the first-request TTFT and decode.
|
|
3. One change at a time: slots (`DECODE_RESERVE_MIB` 512), `PCIE_FRAC` 0.1-0.25 with the file pages registered (`cuMemHostRegister` of the
|
|
read-only mapping measured 12 GB/s versus 7.5 pageable), `CPU_WORKERS` 4 / 6 / 7 (the DRAM sum saturates at 4-8 readers), chunk 4096 / 8192,
|
|
seed swaps 1,024, prefix cache budget under the memory governor.
|
|
4. Stability: 30 mixed requests and the 1-hour soak in 15-minute segments with `LELEKA_LAPTOP_SEQUENCE` / `LELEKA_LAPTOP_SOAK_S`
|
|
(`mem.tsv` at 1 Hz holds RSS, VRAM, swap, clocks, power, temperature).
|