Skip to content

rondagdag/local-llms

Repository files navigation

From Cloud to Laptop — Local AI Demo Collection

"AI Without Borders" — AI that runs anywhere: your browser, your laptop, your edge device. No cloud. No limits. Just pure intelligence, locally.

By Ron Dagdag — Research Engineering Manager at Thomson Reuters, Microsoft MVP (AI · Windows Dev · IoT · Mixed Reality).

Demo Collection

Demo Category Tech
Browser AI vs Local Server LLM Inference Transformers.js · WebGPU · Ollama
Prompt API Playground Chrome Built-in AI Gemini Nano
Summarization API Chrome Built-in AI Gemini Nano
Sentiment Analysis NLP Transformers.js · DistilBERT
Translation & Language Detection Chrome Built-in AI Chrome Translator API
Video Background Removal Computer Vision Transformers.js · MODNet · WebGPU
Video Object Detection Computer Vision Transformers.js · YOLOv9 · WebGPU

Quick Start

Prerequisites

  • Node.js 20.19+ or 22.12+Download here (includes npm)
  • Verify your install: node -v and npm -v

Setup (3 steps)

Step 1 — Open the project folder

cd local-llms

Step 2 — Install all dependencies

npm run setup

This installs npm packages for all 6 sub-projects at once. It may take a minute on first run.

Step 3 — Build and serve

npm run build
npm start

Open http://localhost:8000 — the launcher page links to all 7 demos.

That's it! Three commands and you're running.

NPM Scripts

Script Description
npm run setup Install npm deps in all sub-projects
npm run build Build all Vite-based sub-projects
npm run build:prompt-api Build prompt-api-playground only
npm run build:summarization Build summarization-api-playground only
npm run build:translation Build translation-language-detection-api-playground only
npm run build:video-bg Build video-background-removal only
npm run build:video-detect Build video-object-detection only
npm start Serve from port 8000

Project Structure

local-llms/
├── index.html                                    # 🏠 Demo launcher
├── package.json                                  # Root build scripts
├── browser-vs-ollama/                            # LLM comparison demo
│   ├── index.html
│   ├── slides.html
│   ├── app.js, transformers-client.js, ollama-client.js
│   ├── From-Cloud-to-Laptop.pdf
│   └── docs/
├── prompt-api-playground/                        # Chrome Prompt API
├── summarization-api-playground/                 # Chrome Summarizer API
├── transformerjs-sentiment-analysis/             # Browser NLP
├── translation-language-detection-api-playground/ # Chrome Translation API
├── video-background-removal/                     # Real-time bg removal
└── video-object-detection/                       # Real-time object detection

Requirements

  • Node.js 20.19+ or 22.12+ for building Vite projects
  • Chrome 127+ for Chrome Built-in AI demos (Prompt, Summarization, Translation)
  • Chrome/Edge 113+ with WebGPU for transformers.js and video demos
  • Ollama running locally for the browser-vs-ollama demo

Browser Notes

Demos must be served over HTTP — open directly from file:// will not work due to module/CORS restrictions.

Chrome Built-in AI demos require Chrome 127+ with the relevant flags or origin trial tokens enabled. See each sub-project's README for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors