Skip to content

spikes/webgpu: compare candle and vectoron on the CPU - #59

Closed
keypair34 wants to merge 2 commits into
fix/webgpu-spike-shellcheckfrom
spike/webgpu-engine-bench
Closed

keypair34 wants to merge 2 commits into
fix/webgpu-spike-shellcheckfrom
spike/webgpu-engine-bench

Conversation

@keypair34

Copy link
Copy Markdown
Collaborator

Adds a CPU harness for vectoron next to cpu-baseline, so candle and vectoron can be compared on the same runner in the same job. The spike only ever measured candle.

vectoron-cpu runs the same prompt, prefill chunk, greedy decode loop, result schema and release profile as cpu-baseline, in the browser and natively. engine-bench.yml builds both, runs them back to back on macos-26 (Chrome, WebKit) and ubuntu-latest (Chrome), and report.mjs puts the rows in one table. It has its own workflow, and webgpu-spike.yml ignores these files, so engine work doesn't rerun the GPU matrix. Hosted runners only.

Numbers from the same harness code (run 45591228222, bench.json, wasm simd128, no yields):

candle prefill / decode vectoron 0.2 prefill / decode
macos-26 Chrome 38.0 s / 4.3 tok/s 11.2 s / 2.2
macos-26 WebKit 29.0 s / 5.1 11.1 s / 2.7
ubuntu Chrome 36.5 s / 4.4 9.0 s / 2.3

vectoron reads the prompt about 3 to 4 times faster and generates at about half the speed. Peak RSS in Chrome is 1.0 to 1.3 GB, against 2.0 to 2.2 GB for candle.

The first generated token differs between the engines. That is a near-tie, not a bug: the top two logits are 70151 (18.68) and 4498 (18.61) in candle, and 4498 (18.73) and 70151 (18.68) in vectoron, with the same top five. The report's "first 20 tokens vs native CPU" column is therefore not a useful cross-engine check.

Notes for review:

  • The push trigger now also matches spike/webgpu-*, so branches stacked on this one can run it. The workflow did not run on this branch's push, so the numbers above come from the earlier run on the same code.
  • Cargo.lock is committed so CI builds with --locked.

Stacked on #52 through the shellcheck fix.

setoelkahfi and others added 2 commits November 25, 2026 11:47
vectoron-cpu is cpu-baseline with vectoron 0.2 in place of candle: same
prompt, prefill chunk, greedy decode loop, result schema and release
profile.

engine-bench.yml runs both engines back to back in one job per runner and
browser, plus native on macos-26 and ubuntu, so each pair of numbers
comes from the same machine. It has its own workflow so that engine work
doesn't rerun the GPU matrix, and webgpu-spike.yml now ignores these
files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si>
Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
The push trigger named only spike/webgpu, so a branch stacked on it
could not run its own benchmark before merging.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si>
Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
@setoelkahfi

Copy link
Copy Markdown
Collaborator

Opened under the wrong GitHub account by mistake. Reopening the same branch under the right one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants