
Machine Learning in the Browser: Fast Iteration with ONNX & WebAssembly#
Romain Clement
PyData Paris 2025 October 1st 2025
🙋 Who is able to deploy ML models from day one?#
🤕 Hard truth about ML models#
Many surveys and field experience show :
- Most models never reach production
- Technical difficulties for integration
- Lack of user feedback
- Difficulty to showcase business value
- Privacy concerns
💡 Can we do better?#
💰 Deploy simple demos at no cost ⚙️ Use standard model interchange formats 🌍 Inference at the edge
💡 Can we do better?#
💰 Deploy simple demos at no cost → Static websites ⚙️ Use standard model interchange formats → ONNX 🌍 Inference at the edge → WebAssembly
⚙️ What is ONNX?#
- Generic ML model representation
- Common file format
- Training / inference loose coopling
- Language-agnostic
- Backend-agnostic
- Interoperability

🤝 ONNX Models#
Export models from favourite framework:
- Scikit-Learn: sklearn-onnx
- Tensorflow: tensorflow-onnx
- PyTorch: torch.onnx
- ... or build a custom graph with the onnx!
⚠️ Some models or layer types might not be supported by generic operators yet!
🤝 ONNX Models#
Using Netron to visualize an ONNX model


🤝 ONNX Runtime#
- C/C++
- Python
- ...
- Web!
🌍 What is WebAssembly?#
- Portable compilation target
- Client and server applications
- Major browsers support (desktop, mobile)
- Fast, safe and open
- Privacy
⚠️ Some restrictions may apply, especially regarding available memory (4GB)

🌍 WebAssembly#
Famous usage in Data Science ecosystem:
- Pyodide (Python in browser)
- JupyterLite (JupyterLab in browser)
- PyScript (Python in HTML)
- ONNX Runtime Web!
- 🤗 Transformers.js!
Getting started with ONNX Runtime Web#
Housing value estimation demo
✅ Train a regressor with Scikit-Learn ✅ Export it to ONNX ✅ Integrate it into a static website
Source: rclement/pydata-paris-2025-ml
Getting started with 🤗 Transformers.js#
Text summarizer demo
✅ Pre-trained lightweight ONNX LLM (Google Gemma 3 270m ~1GB) ✅ Integrate it into a static website
Source: rclement/pydata-paris-2025-ml
🚢 Introducing modelship#
Local-first utility Python app
Automate the generation of application from models
OSS Apache-2 licensed
Get started: - uvx modelship static --output dist --metadata metadata.yml model.onnx - https://github.com/datalpia/modelship
🚢 modelship demo#
Let's try to gap the "extra mile"
✅ Build static web app from ONNX model and metadata ✅ Deploy on GitHub Pages using CI/CD
Source: rclement/pydata-paris-2025-modelship-demo
🚢 modelship demo#
Try the deployment yourself!
https://rclement.github.io/pydata-paris-2025-modelship-demo/

🚢 modelship demo#
🚢 Takeaway#
Just start shipping!
Romain CLEMENT#
Indepedent consultant at Datalpia

Meetup Python Grenoble co-organizer
🌐 datalpia.com 🌐 romain-clement.net 🔗 linkedin.com/in/romainclement
🙋 Questions ?#
Thank you! Let's chat!
📚 References#
- The Institute for Ethical AI & Machine Learning - The State of Production ML in 2024
- KD Nuggets - Survey: Machine Learning Projects Still Routinely Fail to Deploy
- KD Nuggets - Models Are Rarely Deployed: An Industry-wide Failure in Machine Learning Leadership
- Wasm 3.0 Completed Announcement
- ONNX Runtime Web documentation
- 🤗 Transformers.js documentation