feat(web): pure-JS level-1 RAT inference #28

Merged
dsh merged 1 commit from feat/pure-js-wink into master 2026-11-23 11:11:36 +00:00
Member

The web toy is now fully client-side: no Flask, no server inference.

  • web/static/wink.js implements complex linear, time rotor, bidirectional RAT scan, SAIL, RMSNorm, patch head, DDIM and CFG in plain JS.
  • web/static/worker.js loads the 10k CFG weights once and denoises off the UI thread.
  • web/export_weights.py exports a checkpoint to static/weights.json (5.2 MB).
  • Run python -m http.server 5001 -d web (or copy index.html + static/ into flango/web-frontend).
  • Numerical validation: max abs ~0.003 for a fixed forward, ~0.009 over a full 50-step DDIM trajectory vs PyTorch (float32).
  • The Flask bridge is removed; 38 Python tests still pass. JS files syntax-checked; model generates promptable digits in Node.
The web toy is now fully client-side: no Flask, no server inference. - `web/static/wink.js` implements complex linear, time rotor, bidirectional RAT scan, SAIL, RMSNorm, patch head, DDIM and CFG in plain JS. - `web/static/worker.js` loads the 10k CFG weights once and denoises off the UI thread. - `web/export_weights.py` exports a checkpoint to `static/weights.json` (5.2 MB). - Run `python -m http.server 5001 -d web` (or copy `index.html` + `static/` into flango/web-frontend). - Numerical validation: max abs ~0.003 for a fixed forward, ~0.009 over a full 50-step DDIM trajectory vs PyTorch (float32). - The Flask bridge is removed; 38 Python tests still pass. JS files syntax-checked; model generates promptable digits in Node.
- static/wink.js: complex linear, time rotor, bidirectional RAT scan, SAIL,
  RMSNorm, patch head and DDIM + CFG in plain JS
- Web Worker loads the 10k CFG weights and generates off the main thread
- weights exporter (checkpoint -> static/weights.json, 5.2 MB)
- removes the Flask bridge; the toy now runs with python -m http.server
- verified against PyTorch: max abs ~0.003 forward, ~0.009 over 50 DDIM steps
- README/docs updated
dsh merged commit ec04d84c8b into master 2026-11-23 11:11:36 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ml-lab/wink!28
No description provided.