You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: load browser assets directly from Hugging Face
Ensure program IDs keep working even if the PAW site is unavailable by fetching browser metadata and assets from the Hugging Face CDN. Refresh the browser docs and examples around the email-triage-browser slug, and bump the package to 0.3.1.
Copy file name to clipboardExpand all lines: README.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# @programasweights/web
2
2
3
-
Run [PAW (Programs as Weights)](https://programasweights.com) neural programs directly in the browser. No server required.
3
+
Run [PAW (Programs as Weights)](https://programasweights.com) neural programs directly in the browser. No custom server required for inference.
4
4
5
-
PAW compiles natural language specifications into tiny neural programs. This SDK runs them client-side via WebAssembly, using a shared GPT-2 base model (105 MB, cached after first load) and per-program LoRA adapters (~5 MB each).
5
+
PAW compiles natural language specifications into tiny neural programs. This SDK runs them client-side via WebAssembly, using a shared GPT-2 base model (134 MB, cached after first load) and per-program assets (~12 MB total: ~5 MB LoRA adapter + ~7 MB prefix cache).
1.**First call**: downloads the GPT-2 Q6_K base model (~105 MB) and caches it in IndexedDB
56
-
2.**Per program**: downloads only the LoRA adapter (~5 MB) from HuggingFace CDN
55
+
1.**First call**: downloads the GPT-2 Q8_0 base model (~134 MB) and caches it in IndexedDB
56
+
2.**Per program**: downloads the program assets (~12 MB total: ~5 MB LoRA adapter + ~7 MB prefix cache) from Hugging Face CDN
57
57
3.**Inference**: runs entirely in the browser via WebAssembly (llama.cpp compiled to WASM)
58
58
4.**Subsequent visits**: base model loads from cache instantly
59
59
60
-
Multiple programs share one cached base model. Loading a second program is just a 5 MB download.
60
+
Multiple programs share one cached base model. Loading a second program is just a ~12 MB download.
61
+
62
+
If you load a program by content-addressable ID, the browser runtime only depends on Hugging Face-hosted assets. Slugs still need the PAW API for the initial ID lookup.
61
63
62
64
## API Reference
63
65
@@ -66,15 +68,15 @@ Multiple programs share one cached base model. Loading a second program is just
66
68
Loads a PAW program and returns a callable function.
67
69
68
70
**Parameters:**
69
-
-`slugOrId` — Program slug (e.g., `"programasweights/email-triage"`) or program ID hash
71
+
-`slugOrId` — Program slug (for example `"email-triage-browser"`) or program ID hash
0 commit comments