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