BrowserAI: Run Local LLMs Directly in Your Browser with WebGPU
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
BrowserAI is an innovative open-source project that enables running large language models (LLMs) directly within your web browser. Leveraging WebGPU for accelerated performance, it offers a private, cost-free, and offline-capable solution for integrating AI into web applications. Developers can easily build powerful, privacy-conscious AI experiences without server-side infrastructure.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
BrowserAI is an open-source project that revolutionizes how developers integrate large language models (LLMs) into web applications. It allows you to run powerful LLMs, such as Llama, DeepSeek-Distill, and Kokoro, entirely within the user's browser. This approach ensures 100% privacy, eliminates server costs, and provides offline capabilities, making it ideal for a wide range of AI-powered web solutions. The project leverages WebGPU for near-native performance, offering a fast and efficient way to deploy AI directly on the client side.
Installation
Getting started with BrowserAI is straightforward. You can install it using npm or yarn:
npm install @browserai/browserai
OR
yarn add @browserai/browserai
Examples
Basic Usage
import { BrowserAI } from '@browserai/browserai';
const browserAI = new BrowserAI();
// Load model with progress tracking
await browserAI.loadModel('llama-3.2-1b-instruct', {
quantization: 'q4f16_1',
onProgress: (progress) => console.log('Loading:', progress.progress + '%')
});
// Generate text
const response = await browserAI.generateText('Hello, how are you?');
console.log(response.choices[0].message.content);
Chat with System Prompt
const ai = new BrowserAI();
await ai.loadModel('gemma-2b-it');
const response = await ai.generateText([
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'What is WebGPU?' }
]);
console.log(response.choices[0].message.content);
Structured Output Generation
const response = await browserAI.generateText('List 3 colors', {
json_schema: {
type: "object",
properties: {
colors: {
type: "array",
items: {
type: "object",
properties: {
name: { type: "string" },
hex: { type: "string" }
}
}
}
}
},
response_format: { type: "json_object" }
});
console.log(response.choices[0].message.content);
Why Use BrowserAI?
- 100% Private: All AI processing occurs locally in the user's browser, ensuring data privacy and security.
- Zero Server Costs: Eliminate the need for expensive server infrastructure for AI inference, reducing operational costs significantly.
- Offline Capable: Once models are downloaded, applications can function without an internet connection, enhancing accessibility and reliability.
- WebGPU Accelerated: Benefit from near-native performance thanks to WebGPU acceleration, providing a fast and responsive user experience.
- Developer Friendly: A simple SDK and API make it easy to integrate various LLMs, speech recognition, and text-to-speech capabilities into web projects.
- Production Ready: Utilizes pre-optimized popular models, ready for deployment in real-world applications.
Links
Related repositories
Similar repositories that may be relevant next.

ext-apps: Standard for UIs Embedded in AI Chatbots with MCP Protocol
August 6, 2026
MCP Apps provides a standardized way to deliver interactive UIs from MCP servers, rendering inline in compliant chat clients like Claude and ChatGPT. This repository contains the official specification and SDK for building these interactive UIs. It enables developers to create rich user experiences, such as charts, forms, and dashboards, directly within AI chatbot conversations.

Axolotl: Streamlining LLM Fine-tuning with a Powerful Open-Source Framework
July 7, 2026
Axolotl is a comprehensive, free, and open-source framework designed to simplify the post-training and fine-tuning processes for large language models (LLMs). It offers extensive model support, diverse training methods, and robust performance optimizations, making it an invaluable tool for researchers and developers. With easy configuration and cloud-ready deployment, Axolotl empowers users to efficiently customize and enhance LLMs.

Zero: The AI Coding Agent for Your Local Terminal
July 6, 2026
Zero is an innovative AI coding agent designed for your local terminal, offering powerful capabilities to inspect repositories, edit files, run commands, and utilize browser/terminal helpers. It provides durable local sessions while giving users full control over the AI model and permission levels. This tool empowers developers with a customizable and secure AI assistant directly within their development environment.

Griptape: Modular Python Framework for AI Agents and Workflows
July 5, 2026
Griptape is a modular Python framework designed to simplify the development of generative AI applications. It provides a flexible set of abstractions for working with Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), and various other AI components. With its structured approach, Griptape enables developers to build sophisticated AI agents and workflows efficiently.
Source repository
Open the original repository on GitHub.
14 counted GitHub visits