Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
- Tensor addition example (inference_example.ml) and interactive notebook
- Sentiment analysis example with DistilBERT (tokenizer, vocab, inference)
- build_notebooks.sh for building and serving interactive docs
- Enable directory-targets in dune-project for universe build rule
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Type-safe OCaml bindings to onnxruntime-web for browser-based ML inference
via js_of_ocaml or wasm_of_ocaml. Supports WebAssembly (CPU) and WebGPU
(GPU) execution providers.
Modules:
- Dtype: GADT tensor element types (float32, int32, uint8, etc.)
- Tensor: create from Bigarray (zero-copy), read back, GPU download, dispose
- Session: load ONNX models, run inference, manage lifecycle
- Env: configure WASM threads/SIMD/paths and WebGPU power preference
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>