Run AI in the browser - faster, cheaper, and private
Everybody's putting AI in their apps. And, to do it, they're stringing APIs together and sending the results down to the browser. But those APIs are expensive, the round trips are long, and there's a lot of data being exposed. Timestamps: 0:00 Introduction 0:10 Some tools 1:55 Benefits 2:39 Gotchas 3:45 When to use 4:39 Hybrid solution 5:46 Conclusion Is there a better way? Yes there is. Transformers.js https://huggingface.co/docs/transformers.js/index WebLLM https://webllm.mlc.ai/ ONNX Runtime Web https://onnxruntime.ai/docs/tutorials/web/ WebGPU https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API WebNN https://webnn.io/en WebAssembly https://webassembly.org/ Some code examples https://github.com/redis-developer/ai-in-the-browser https://github.com/redis-developer/semantic-search-with-redis