登录 注册
AI 模型与开发框架教育与学习 chatgptdeep-learninglanguage-modelllmtvmwebgpu
19,368
Stars
1,411
Forks
137
Watchers
153
Open Issues
Apache-2.0
许可证
TypeScript
语言
2023-04-13
创建时间
2026-11-10
最近更新

项目能做什么

直接在浏览器内运行的高性能 LLM 推理引擎。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<div align="center" id="top">

# WebLLM

[![NPM Package](https://img.shields.io/badge/NPM_Package-Published-cc3534)](https://www.npmjs.com/package/@mlc-ai/web-llm)
[!["WebLLM Chat Deployed"](https://img.shields.io/badge/WebLLM_Chat-Deployed-%2332a852)](https://chat.webllm.ai/)
[![Join Discord](https://img.shields.io/badge/Join-Discord-7289DA?logo=discord&logoColor=white)](https://discord.gg/9Xpy2HGBuD)
[![Related Repository: WebLLM Chat](https://img.shields.io/badge/Related_Repo-WebLLM_Chat-fafbfc?logo=github)](https://github.com/mlc-ai/web-llm-chat/)
[![Related Repository: MLC LLM](https://img.shields.io/badge/Related_Repo-MLC_LLM-fafbfc?logo=github)](https://github.com/mlc-ai/mlc-llm/)

**High-Performance In-Browser LLM Inference Engine.**

[Documentation](https://webllm.mlc.ai/docs/) | [Blogpost](https://blog.mlc.ai/2024/06/13/webllm-a-high-performance-in-browser-llm-inference-engine) | [Paper](https://arxiv.org/abs/2412.15803) | [Examples](examples)

</div>

## Overview

WebLLM is a high-performance in-browser LLM inference engine that brings language model inference directly onto web browsers with hardware acceleration.
Everything runs inside the browser with no server support and is accelerated with WebGPU.

WebLLM is **fully compatible with [OpenAI API](https://platform.openai.com/docs/api-reference/chat).**
That is, you can use the same OpenAI API on **any open source models** locally, with functionalities
including streaming, JSON-mode, function-calling (WIP), etc.

We can bring a lot of fun opportunities to build AI assistants for everyone and enable privacy while enjoying GPU acceleration.

You can use WebLLM as a base [npm package](https://www.npmjs.com/package/@mlc-ai/web-llm) and build your own web application on top of it by following the examples below. This project is a companion project of [MLC LLM](https://github.com/mlc-ai/mlc-llm), which enables universal deployment of LLM across hardware environments.

<div align="center">

**[Check out WebLLM Chat to try it out!](https://chat.webllm.ai/)**

</div>

## Key Features

- **In-Browser Inference**: WebLLM is a high-performance, in-browser language model inference engine that leverages WebGPU for hardware acceleration, enabling powerful LLM operations directly within web browsers without server-side processing.

- [**Full OpenAI API Compatibility**](#full-openai-compatibility): Seamlessly integrate your app with WebLLM using OpenAI API with functionalities such as streaming, JSON-mode, logit-level control, seeding, and more.

- **Structured JSON Generation**: WebLLM supports state-of-the-art JSON mode structured generation, implemented in the WebAssembly portion of the model library for optimal performance. Check [WebLLM JSON Playground](https://huggingface.co/spaces/mlc-ai/WebLLM-JSON-Playground) on HuggingFace to try generating JSON output with custom JSON schema.

- [**Extensive Model Support**](#built-in-models): WebLLM natively supports a range of models including Llama 3, Ph
阅读完整原文

商业机会分析 AI 生成

隐私优先的端侧AI浏览器增强扩展

产品构想基于Web-LLM开发一款无需配置API Key、所有文本处理(网页摘要、邮件润色、划词解释)全部在用户浏览器显卡本地完成的扩展程序。
核心功能纯本地WebGPU推理、内置轻量级量化小模型、预置生产力Prompt工作流、网页上下文一键解析。
目标用户对数据隐私高度敏感的研究员、律师、企业白领及技术人员。
难度/周期中等 · 1-2个月 · 成本:极低(主要是域名、前端托管与基础展示站,无后端推理服务器开销)
收费模式买断制或高级功能订阅(免费版提供基础模型,付费版提供定制化专业工作流与精细调优模型包)。
竞争风险初次加载模型文件体积大(几百MB至数GB),容易造成用户流失;低配集显设备运行性能可能不佳。
依据 已验证事实

零成本Web端交互式文档与答疑Widget SDK

产品构想为开源文档站点和小型SaaS提供一个开箱即用的前端问答组件,用户访问网页时利用访客本地算力进行向量检索与回答,网站主无需支付任何LLM API费用。
核心功能一键嵌入JS脚本、文档内容自动切片与端侧Embedding检索、Web-LLM驱动问答、无后端依赖部署。
目标用户独立开发者、开源维护者、个人博客作者、技术文档站长。
难度/周期中等 · 2-3个月 · 成本:低(基础CDN分发与文档站点成本)
收费模式免费开源基础版,商业文档站收取定制UI/去版权标识/高级知识库打包配置的商业授权费。
竞争风险访客设备性能参差不齐,在无WebGPU或老旧设备上需要降级处理;文档量大时浏览器端检索性能瓶颈。
依据 数据支持的判断

Web-LLM 专属端侧模型量化编译与全球加速分发平台

产品构想提供自动化管线,帮企业将专有模型转换为Web-LLM/TVM/WebGPU兼容的高性能权重格式,并提供全球CDN加速分发与版本管理服务。
核心功能HuggingFace模型一键转Web-LLM格式、自动化量化压测、断点续传CDN托管SDK、设备兼容性监控仪表盘。
目标用户希望将端侧AI引入自研产品的Web开发团队和中小型企业。
难度/周期高 · 3-5个月 · 成本:中等(需要编译转码服务器、全球流量CDN分发成本)
收费模式按模型托管数量订阅 + 模型下发流量按量计费。
竞争风险目标B端客户规模当前偏小;公有CDN和开源方案可能削弱分发工具的壁垒。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
NousResearch/hermes-agent 中文介绍暂未生成
The agent that grows with you
262,390 Python
f/prompts.chat 中文介绍暂未生成
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect
176,834 MDX
langflow-ai/langflow 中文介绍暂未生成
Langflow is a powerful tool for building and deploying AI-po
156,509 Python
langchain-ai/langchain 中文介绍暂未生成
The agent engineering platform.
149,319 Python
microsoft/generative-ai-for-beginners 中文介绍暂未生成
21 Lessons, Get Started Building with Generative AI
123,306 Jupyter Notebook
rasbt/LLMs-from-scratch 中文介绍暂未生成
Implement a ChatGPT-like LLM in PyTorch from scratch, step b
108,187 Jupyter Notebook
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2023-04-13,近 30 天仍在推送,发布过 8 个 Release
社区活跃Star 19,368 / Fork 1,411 / Issue 153(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/mlc-ai/web-llm.git
cd web-llm
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。