LFM3-1.7B on WebGPU straight from your GGUF, faster than the ONNX recipe — could you list it as a browser option?

#19
by KikoCis - opened

Hi Liquid AI team,

Congratulations on LFM3. We've added the lfm3 architecture to Elffuss Engine, our Apache-2.0 WebGPU runtime that reads GGUF files directly, and made LFM3-1.7B its default model.

What it does with LFM3-1.7B:

  • Runs your official GGUFs (LFM3-1.7B-Q8_0.gguf and LFM3-1.7B-QAD-Q4_0.gguf) in the browser, with no conversion step.
  • Covers the full architecture: the gated short convolutions, the sliding-window and global attention layers with rope_freqs, the per-head output gate and the sandwich norms. It also uses your chat template, including <think>.
  • Checked against llama.cpp layer by layer and token by token: greedy outputs match until the first near-tie in the reference's own logprobs.
  • Compared with the recipe on your ONNX model card (onnxruntime-web/webgpu, model_q4f16, prompt in chunks of 256), in the same browser with no flags, alternating the two runtimes:
    • with your QAD-Q4_0 GGUF: about 1.3× faster on a 512-token prompt and about 1.8× faster generating;
    • with the Q8_0 GGUF: about 1.3× and 1.5×.

It is live as the default local model at claw.elffuss.com and code.elffuss.com, and the code is at github.com/utopia-ia/elffuss-engine.

Your model cards list the inference engines each model supports. Would you consider adding Elffuss Engine there as a browser/WebGPU option that runs the GGUF as published? We're happy to share the validation tests (layer by layer against llama-eval-callback, plus greedy decoding) and the benchmark script, or to help if you want to reproduce it on your side.

Thanks for releasing the GGUFs with the chat template and sampling defaults inside: that made the port much easier.

— The Elffuss team (UtopiaIA)

Update: LFM3-1.7B now also runs on the CPU in Elffuss Engine, for browsers with no usable WebGPU (WebAssembly SIMD; threads when the page is cross-origin isolated). Greedy output matches llama.cpp token for token on the QAD-Q4_0 GGUF.

In the same browser session, against llama.cpp compiled to WebAssembly: the prompt is read 2.7x faster and text is written 2.0x faster on one thread; with eight threads, 2.7x and 1.35x.

You can try it at https://elffuss.com/?cpu (the address forces the CPU path, also on devices that have WebGPU).

A question for the team: is there, or will there be, a small draft model that shares LFM3's tokenizer? It would let a device run speculative decoding with the draft on the CPU and LFM3-1.7B on the GPU.

Sign up or log in to comment