Commit Graph
9 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 48417b6b41 STRA-338 params p04: gptoss family (gptoss, igpu, gptoss-igpu, gptoss-npu, gpu-npu-worker, npu-service) down to 5 parameters; domain names for the experimental-ref structs 2026-11-08 01:05:51 +01:00
Pavlo Ratushnyi dc28184651 STRA-338 size-fn2: wide lines of cpu-sys, cpu-kernels, cpu-worker, gguf, gptoss*, gpu-npu-worker, igpu*, native-parity-bench, npu-*, serving-policy (prod 33 -> 5, test 29 -> 0: comments re-wrapped, message strings broken at a space with a backslash continuation, same bytes; native-parity-bench main split into run_with_context); the five WGSL lines of igpu gemm stay 2026-11-06 20:04:57 +01:00
Pavlo Ratushnyi 3691a466ce STRA-338 size-fn: gpu-npu-worker run trimmed, cpu-worker reader alias, clippy clean 2026-11-06 18:03:30 +01:00
Pavlo Ratushnyi 9d2c38d716 STRA-338 size-fn: no new dyn-trait uses (aliases and generics), type aliases for clippy 2026-11-06 17:58:52 +01:00
Pavlo Ratushnyi 87052cf9f4 STRA-338 size-fn: split_run and reference attention split further 2026-11-06 17:53:16 +01:00
Pavlo Ratushnyi 2f3e3aed9b STRA-338 size-fn: gpu-npu-worker: run and install_accelerator second pass 2026-11-06 17:39:28 +01:00
Pavlo Ratushnyi 569e7026ed STRA-338 size-fn: gpu-npu-worker: run, argument parsing and main split 2026-11-06 17:24:36 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4725df5bdf feat: --cache-slots, one worker keeps the KV caches of several agents and picks the right one (STRA-220)
GptOssEngine holds up to N conversation caches (--cache-slots N on the four workers, default 1 =
unchanged). crates/cpu-worker/src/slots.rs chooses per prompt: continue in place a slot that is
wholly a prefix of the prompt (the same agent's next turn); otherwise take the slot sharing the
longest prefix as a donor and either continue it (losing its tail) or copy the shared part into
a new/empty/least recently used slot (State::copy_prefix_from), whichever discards fewer cached
tokens, so a new agent gets the shared system prompt without destroying another agent's cache.
Results are bit-identical to a fresh prefill (synthetic test: copied prefix continues bit for
bit, donor untouched).

Measured: CPU only, 3 agents, 36 requests: 1.37x/1.46x prompt time, outputs identical.
Through the control plane, 4 agents on one iGPU worker, 3 clean alternating pairs: 986/993/995 s
with 1 slot against 569/575/575 s with 4 slots (1.73x), answers identical in all six runs. The
first run of pair 1 was disturbed by the UTC date in the system prompt changing mid-run and was
repeated. Compare-ConcurrentEpisodes.ps1 takes -Agents, -SharedInstructionTokens and the
'slots' arm and records output hashes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 03:45:20 +02:00
Pavlo RatushnyiandClaude Opus 5.5 3ebcb3ffd6 experiment: one prompt prefilled by the iGPU and the NPU together; measured, no gain (STRA-220)
leleka-gpu-npu-worker (crates/gpu-npu-worker) splits a long prompt: the NPU path takes the
first share of the tokens and the GPU path the rest, on two threads. They meet only in the
KV cache, through the new leleka_gptoss::LayerCache, which both prefill paths now use instead
of &mut State (same behaviour). The GPU part's cache waits for each layer the NPU part
stores, so the GPU runs layer l while the NPU runs l+1. The last-token distribution matches
the GPU alone (KL <= 1e-4).

Measured: 2048 tokens 0.89-1.13x against the GPU alone, depending on share; agent episode
(4 turns of ~2,060 new tokens, 6 alternating pairs) 0.81-1.16x per pair, a net loss. Both
paths stream all weights whatever their token share and share the 15 W budget, and the NPU
part's CPU attention over the growing context is the slow side. Not adopted; stays
experimental. Also: NpuPrefill::with_cpu_threads, and -ArmA/-ArmB/-LogDir in
Compare-PrefillWorkers.ps1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:42:12 +02:00