Loom vs transformers.js

Same model, same prompt, same decoding, same tab. transformers.js is loaded here for comparison only — it is not a dependency of the engine.

What is being compared

 Loomtransformers.js
modelQwen2.5-0.5B-InstructQwen2.5-0.5B-Instruct
formatGGUF Q4_K_MONNX q4f16
size on disk469 MB483 MB
runtimehand-written Rust → wasm, SIMD128ONNX Runtime Web, SIMD128
threads11 (forced, for fairness)

Not identical quantisations — no two runtimes share one. q4f16 is the closest ONNX build by size and bits per weight, which is the fairest match available rather than a perfect one.

Run

Run one, reload the page, then run the other. Two models at once is ~950 MB of wasm heap; on a machine that then swaps, the second number measures paging rather than the engine. Results survive the reload.

Results

 loadprefilldecodetok/s

Where the gap comes from

Filled in once both have run.