Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: tinygrad
|
| 4 |
+
tags:
|
| 5 |
+
- gpt2
|
| 6 |
+
- webgpu
|
| 7 |
+
- tinygrad
|
| 8 |
+
- logit-lens
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# tinygpt-webgpu
|
| 12 |
+
|
| 13 |
+
GPT-2 124M compiled to WGSL compute kernels by [tinygrad]'s WebGPU exporter, for
|
| 14 |
+
running inference in the browser at <https://jik.wtf/tinygpt>.
|
| 15 |
+
|
| 16 |
+
This repository holds only the weight payloads. The compiled kernels and the
|
| 17 |
+
manifests that describe these blobs live in the site repository beside the
|
| 18 |
+
loader, because the offsets in a manifest are meaningful only against the exact
|
| 19 |
+
blob they were computed for.
|
| 20 |
+
|
| 21 |
+
| file | bytes | contents |
|
| 22 |
+
| --- | --- | --- |
|
| 23 |
+
| `state.bin` | 495,399,936 | transformer weights, fp32, laid out for the exported graph |
|
| 24 |
+
| `lens_state.bin` | 30,670,848 | fitted J-lens Jacobians, 13 layers |
|
| 25 |
+
|
| 26 |
+
The decode graph is compiled for a fixed 256-slot KV cache and emits both logits
|
| 27 |
+
and all 13 residual stream taps, so both lenses read from one forward pass.
|
| 28 |
+
|
| 29 |
+
Greedy decoding reproduces the native tinygrad oracle token for token:
|
| 30 |
+
`"The capital of France is"` continues `" the capital of the French"`.
|
| 31 |
+
|
| 32 |
+
[tinygrad]: https://github.com/tinygrad/tinygrad
|