Skip to content

wllbo/browser-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browser-llm

Run Large Language Models locally - better than edge, it's already in your browser 💪

🎮 Try it out 👾

Key Features

  • 💰 No Fees: No keys, no costs, no quotas
  • 🏎️ Fast Inference: Runs on WASM with WebGPU acceleration
  • 🔒 Privacy First: Pure client-side processing
  • 🏕️ Offline Ready: Download model once, use anywhere
  • 🔄 Streaming: Token-by-token output with minimal latency
  • 📱 Device Agnostic: Just needs a modern browser with sufficient memory for the model

How It Works

The application is built with vanilla JavaScript and uses emerging web standards:

  • WebAssembly (WASM): Core runtime for model inference
  • WebGPU: Hardware acceleration for supported devices
  • Web Workers: Offloads model inference to prevent UI blocking
  • transformers.js: Runs transformer models directly in the browser
  • onnxruntime-web: Optimized inference engine
  • Model Loading: LRU caching system (max 3 models) with quantization fallback (4-bit → 8-bit)
Browser LLM Demo

Browser Support

Feature Chrome Firefox Safari Edge
WASM
WebGPU 🚧 🚧

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published