Create a First AI Program with TypeScript and Serverless WebAssembly
summary
Builds a serverless WebAssembly app using Spin and TypeScript (Rust/Python optional), compiles with spin build and serves with spin up, then calls a Llama 2 chat model for answers. Demo is a Magic 8‑ball API + static frontend, adds a KV cache to cut responses from ~40 seconds (local CPU model) to ~0.2s, and shows spin Cloud deploy plus GPU multiplexing to avoid per-request GPU cold starts. Local full models are huge (~8 GB), so cloud proxy (spin Cloud GPU) is the practical path.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:03What is WebAssembly and why it matters
- 9:50Spin features
- 15:10Workshop setup
- 27:49Spin scaffolding
- 39:00JSON API with random responses
- 43:10AI with Llama 2
- 54:19Deploy to Fermyon Cloud
- 1:03:34Caching with KV store
- 1:14:58Frontend with static files
- 1:26:40Embeddings and vector search
- 1:50:20Q&A
related talks
25mBuilding Serverless AI Apps with Spin and WebAssembly
01h 34mTutorial: Getting Started with Serverless WebAssembly and Spin
01h 34mTutorial: Getting Started with Serverless WebAssembly and Spin
31m"Serverless AI Inferencing Using Python and WebAssembly"
59mNext generation microservices and serverless apps with WebAssembly & Spin
31mBuild a Serverless WebAssembly App in Python using Spin
08mKeynote: How WebAssembly can Power the New Wave of Serverless AI
44mA Greener, Cost-Effective Cloud with Serverless WebAssembly
