@jax-js/jax 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # jax-js: JAX in pure JavaScript
2
2
 
3
- [Website](https://www.ekzhang.com/jax-js/)
3
+ [Website](https://www.ekzhang.com/jax-js/) | [API Reference](https://www.ekzhang.com/jax-js/docs/)
4
4
 
5
5
  This is a machine learning framework for the browser. It aims to bring JAX-style, high-performance
6
6
  CPU and GPU kernels to JavaScript, so you can run numerical applications on the web.
@@ -55,20 +55,24 @@ const y = np.dot(x.ref, x); // JIT-compiled into a matrix multiplication kernel
55
55
  Under construction.
56
56
 
57
57
  ```bash
58
- npm install
59
- npm run build:watch
60
- npm test
58
+ pnpm install
59
+ pnpm run build:watch
60
+
61
+ # Run tests
62
+ pnpm exec playwright install
63
+ pnpm test
61
64
  ```
62
65
 
63
66
  ## Next on Eric's mind
64
67
 
65
- - softmax, log_softmax, logsumpexp, one_hot
66
- - Start working on first neural network
68
+ - Finish CLIP inference demo and associated features (depthwise convolution, vmap of gather, etc.)
69
+ - Fix jit-of-grad returning very incorrect result
70
+ - Improve perf of MNIST neural network
71
+ - Optimize conv2d further (maybe blocks -> local dims?)
72
+ - Add fused epilogue to JIT
73
+ - Reduce kernel overhead of constants / inline expressions
67
74
  - Investigate why jax-js Matmul is 2x slower on Safari TP than unroll kernel
68
75
  - How many threads to create per workgroup, depends on hardware
69
- - Need to break up kernel dispatches if workgroup count exceeds 65536
70
- - Think about two-stage `cumsum()`
71
- - Frontend transformations need to match backend type for pureArray() and zeros() calls
72
76
 
73
77
  ## Milestones
74
78
 
@@ -88,15 +92,17 @@ npm test
88
92
  - [x] `jit()` support via Jaxprs and kernel fusion
89
93
  - [x] We figure out the `dispose()` / refcount / linear types stuff
90
94
  - [ ] `dispose()` for saved "const" tracers in Jaxprs
91
- - [ ] Garbage collection for JIT programs, maybe needs to be moved off-device
95
+ - [ ] Garbage collection for JIT programs
92
96
  - [ ] Memory scheduling, buffer allocation (can be tricky)
93
97
  - [ ] Demos: Navier-Stokes, neural networks, statistics
94
- - [ ] Features for neural networks
95
- - [ ] Convolution
96
- - [ ] Random and initializers
97
- - [ ] Optimizers (optax package?)
98
- - [ ] Wasm backend (needs malloc)
98
+ - [x] Features for neural networks
99
+ - [x] Convolution
100
+ - [x] Random and initializers
101
+ - [x] Optimizers (optax package?)
102
+ - [x] Wasm backend (needs malloc)
103
+ - [x] Better memory allocation that frees buffers
99
104
  - [ ] SIMD support for Wasm backend
105
+ - [ ] Async / multithreading Wasm support
100
106
  - [ ] Device switching with `.to()` between webgpu/cpu/wasm
101
107
  - [ ] numpy/jax API compatibility table
102
108
  - [ ] Import tfjs models