AI Briefing
KO

Show HN: Prompt-to-Excalidraw demo in the browser with Gemma 4 E2B (3.1GB)

·2026.04.19 20:17

Key point

In the browser, Gemma 4 E2B converts prompts into Excalidraw diagrams.

Details

This is a demo implementing a Prompt → Diagram flow in the browser, where Gemma 4 E2B takes the user's description and generates Excalidraw diagram code.

The key idea is that instead of having the model output raw Excalidraw JSON, it's designed to output compact code of about 50 tokens, greatly reducing the burden of long outputs.

  • Runtime environment: Desktop Chrome 134+
  • Additional requirements: WebGPU subgroups, about 3GB RAM
  • Constraints: Mobile browsers have memory limitations, and Safari/iOS is not yet supported

For performance and memory efficiency, the TurboQuant algorithm was reimplemented in WGSL compute shaders, which enables it to run at 30+ tok/s on the GPU.

TurboQuant uses a polar + QJL approach to compress the KV cache by about 2.4x, allowing longer conversations to stay within GPU memory.

The demo includes example diagrams such as:

  • OAuth 2.0 PKCE sequence diagram
  • Full-stack app
  • OAuth flow
  • CI/CD pipeline
  • TCP state machine
  • Engineering org
  • E-commerce schema
  • Payment classes
  • Checkout swimlane

It also mentions the turboquant-wasm npm package, which implements the same algorithm in WASM+SIMD, and introduces it as usable for CPU-side vector search as well.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.