← all repositories

0hq/WebGPT

A vanilla JavaScript implementation of GPT transformer inference running in web browsers via WebGPU.

3.8k stars JavaScript Inference · ServingLanguage Models
WebGPT
Not currently ranked — collecting fresh signals.
star history

WebGPT runs GPT language models directly in web browsers using WebGPU compute shaders for near-native GPU performance. It implements the full transformer architecture including embeddings, multi-head attention, and feedforward layers entirely in vanilla JS. The project has been tested with models up to 1.5B parameters, reporting benchmark timings (ms/token) for models ranging from 5M to 1.5B parameters on Apple M1 hardware. It includes pre-converted GPT-2 117M and toy Shakespeare models, with scripts provided for importing custom models.

Frequently asked

What is 0hq/WebGPT?
A vanilla JavaScript implementation of GPT transformer inference running in web browsers via WebGPU.
Is WebGPT open source?
Yes — 0hq/WebGPT is an open-source project tracked on heatdrop.
What language is WebGPT written in?
0hq/WebGPT is primarily written in JavaScript.
How popular is WebGPT?
0hq/WebGPT has 3.8k stars on GitHub.
Where can I find WebGPT?
0hq/WebGPT is on GitHub at https://github.com/0hq/WebGPT.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.