MCPcopy Index your code
hub / github.com/Ryan-yang125/ChatLLM-Web

github.com/Ryan-yang125/ChatLLM-Web @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
632 symbols 1,469 edges 23 files 135 documented · 21% updated 23mo agov1.0.0 · 2023-05-18★ 6304 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

icon

ChatLLM Web

English / 简体中文

🗣️ Chat with LLM like Vicuna totally in your browser with WebGPU, safely, privately, and with no server. Powered By web-llm.

Try it now

cover

Features

  • 🤖 Everything runs inside the browser with no server support and is accelerated with WebGPU.

  • ⚙️ Model runs in a web worker, ensuring that it doesn't block the user interface and providing a seamless experience.

  • 🚀 Easy to deploy for free with one-click on Vercel in under 1 minute, then you get your own ChatLLM Web.

  • 💾 Model caching is supported, so you only need to download the model once.

  • 💬 Multi-conversation chat, with all data stored locally in the browser for privacy.

  • 📝 Markdown and streaming response support: math, code highlighting, etc.

  • 🎨 responsive and well-designed UI, including dark mode.

  • 💻 PWA supported, download it and run totally offline.

Instructions

  • 🌐 To use this app, you need a browser that supports WebGPU, such as Chrome 113 or Chrome Canary. Chrome versions ≤ 112 are not supported.

  • 💻 You will need a GPU with about 6.4GB of memory. If your GPU has less memory, the app will still run, but the response time will be slower.

  • 📥 The first time you use the app, you will need to download the model. For the Vicuna-7b model that we are currently using, the download size is about 4GB. After the initial download, the model will be loaded from the browser cache for faster usage.

  • ℹ️ For more details, please visit mlc.ai/web-llm

Roadmap

  • [✅] LLM: using web worker to create an LLM instance and generate answers.

  • [✅] Conversations: Multi-conversation support is available.

  • [] Desktop: Build a desktop version with Tauri, which will use system cache (not just browser cache) and run locally and offline.

  • [] UI: Dark and Light Theme.

Deploy to Vercel

  1. Click Deploy with Vercel, follow the instructions, and finish in just 1 minute.
  2. Enjoy it 😊

Development

git clone https://github.com/Ryan-yang125/ChatLLM-Web.git
cd ChatLLM-Web
npm i
npm run dev

Screenshots

Home

More

LICENSE

MIT

Extension points exported contracts — how you extend this code

Props (Interface)
(no doc)
components/markdown.tsx
languageMap (Interface)
(no doc)
utils/codeblock.ts
ChatStore (Interface)
(no doc)
store/chat.ts

Core symbols most depended-on inside this repo

throwBindingError
called by 31
public/lib/WebLLM/sentencepiece.js
dispose
called by 28
public/lib/WebLLM/tvmjs.bundle.js
ptrFromOffset
called by 23
public/lib/WebLLM/tvmjs.bundle.js
toString
called by 23
public/lib/WebLLM/tvmjs.bundle.js
log
called by 22
public/lib/WebLLM/tvmjs.bundle.js
checkCall
called by 20
public/lib/WebLLM/tvmjs.bundle.js
loadPointer
called by 18
public/lib/WebLLM/tvmjs.bundle.js
allocRawBytes
called by 17
public/lib/WebLLM/tvmjs.bundle.js

Shape

Function 347
Method 234
Class 48
Interface 3

Languages

TypeScript100%

Modules by API surface

public/lib/WebLLM/tvmjs.bundle.js249 symbols
public/lib/WebLLM/sentencepiece.js208 symbols
public/lib/WebLLM/tvmjs_runtime.wasi.js74 symbols
web-worker/web-llm.worker.ts40 symbols
store/chat.ts15 symbols
components/Icons.tsx9 symbols
components/markdown.tsx8 symbols
components/ChatBox.tsx7 symbols
hooks/web-llm.ts5 symbols
pages/index.tsx3 symbols
components/SideBar.tsx3 symbols
components/InitModal.tsx3 symbols

For agents

$ claude mcp add ChatLLM-Web \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact