# Show HN： 使用 Gemma 4 E2B 在浏览器中运行 Prompt-to-Excalidraw 演示（3.1GB）

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：teamchong
- 发布时间：2026-04-20 13:17
- AIHOT 链接：https://aihot.virxact.com/items/cmo6rk67205cjsl4rbcwz3nmq
- 原文链接：https://teamchong.github.io/turboquant-wasm/draw.html

## AI 摘要

开发者发布了一个基于 Gemma 4 和 E2B 的 Prompt-to-Excalidraw 浏览器演示，支持通过自然语言提示直接生成 Excalidraw 手绘图表。该方案将 3.1GB 的 Gemma 4 模型完全部署在浏览器端本地运行，借助 E2B 沙箱环境实现前端 AI 推理，无需后端服务器支持。项目在 Hacker News 获得 101 个赞。

## 正文

TurboQuant Prompt → Diagram

Describe any diagram, Gemma 4 E2B generates it as Excalidraw — entirely in your browser. Desktop Chrome 134+ only.

The LLM outputs compact code (~50 tokens) instead of raw Excalidraw JSON (~5,000 tokens). The TurboQuant algorithm (polar + QJL) compresses the KV cache ~2.4× so longer conversations fit in GPU memory. Needs WebGPU subgroups (Safari/iOS not supported yet) and ~3 GB RAM (mobile browsers cap well below this).

This demo reimplements the TurboQuant algorithm in WGSL compute shaders so it runs on the GPU at 30+ tok/s. The sibling turboquant-wasm npm package implements the same algorithm in WASM+SIMD for CPU-side vector search.
