HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nathanrs
gpt2-webgl
TypeScript2025–2025
nathanrs / gpt2-webgl

gpt2-webgl

A browser-based, WebGL2 implementation of GPT-2 with transform block and attention matrix visualization

2Distinct people
4Mentions
0Explicit recommenders
349GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A browser-based, WebGL2 implementation of GPT-2 with transform block and attention matrix visualization

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by day4 dated mentions

Observed mentions: 2025-05-02 15:21:49 UTC to 2025-05-27 19:45:16 UTC.

0122025-05-02 00:00:00 UTC to 2025-05-03 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsMay 22025-05-03 00:00:00 UTC to 2025-05-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-04 00:00:00 UTC to 2025-05-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-05 00:00:00 UTC to 2025-05-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-06 00:00:00 UTC to 2025-05-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-07 00:00:00 UTC to 2025-05-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-08 00:00:00 UTC to 2025-05-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-09 00:00:00 UTC to 2025-05-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-10 00:00:00 UTC to 2025-05-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-11 00:00:00 UTC to 2025-05-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-12 00:00:00 UTC to 2025-05-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-13 00:00:00 UTC to 2025-05-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-14 00:00:00 UTC to 2025-05-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 142025-05-15 00:00:00 UTC to 2025-05-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-16 00:00:00 UTC to 2025-05-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-17 00:00:00 UTC to 2025-05-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-18 00:00:00 UTC to 2025-05-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-19 00:00:00 UTC to 2025-05-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-20 00:00:00 UTC to 2025-05-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-21 00:00:00 UTC to 2025-05-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-22 00:00:00 UTC to 2025-05-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-23 00:00:00 UTC to 2025-05-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-24 00:00:00 UTC to 2025-05-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-25 00:00:00 UTC to 2025-05-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-26 00:00:00 UTC to 2025-05-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-27 00:00:00 UTC to 2025-05-28 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsMay 27

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
May 22025-05-02 00:00:00 UTC2025-05-03 00:00:00 UTC211
May 32025-05-03 00:00:00 UTC2025-05-04 00:00:00 UTC000
May 42025-05-04 00:00:00 UTC2025-05-05 00:00:00 UTC000
May 52025-05-05 00:00:00 UTC2025-05-06 00:00:00 UTC000
May 62025-05-06 00:00:00 UTC2025-05-07 00:00:00 UTC000
May 72025-05-07 00:00:00 UTC2025-05-08 00:00:00 UTC000
May 82025-05-08 00:00:00 UTC2025-05-09 00:00:00 UTC000
May 92025-05-09 00:00:00 UTC2025-05-10 00:00:00 UTC000
May 102025-05-10 00:00:00 UTC2025-05-11 00:00:00 UTC000
May 112025-05-11 00:00:00 UTC2025-05-12 00:00:00 UTC000
May 122025-05-12 00:00:00 UTC2025-05-13 00:00:00 UTC000
May 132025-05-13 00:00:00 UTC2025-05-14 00:00:00 UTC000
May 142025-05-14 00:00:00 UTC2025-05-15 00:00:00 UTC000
May 152025-05-15 00:00:00 UTC2025-05-16 00:00:00 UTC000
May 162025-05-16 00:00:00 UTC2025-05-17 00:00:00 UTC000
May 172025-05-17 00:00:00 UTC2025-05-18 00:00:00 UTC000
May 182025-05-18 00:00:00 UTC2025-05-19 00:00:00 UTC000
May 192025-05-19 00:00:00 UTC2025-05-20 00:00:00 UTC000
May 202025-05-20 00:00:00 UTC2025-05-21 00:00:00 UTC000
May 212025-05-21 00:00:00 UTC2025-05-22 00:00:00 UTC000
May 222025-05-22 00:00:00 UTC2025-05-23 00:00:00 UTC000
May 232025-05-23 00:00:00 UTC2025-05-24 00:00:00 UTC000
May 242025-05-24 00:00:00 UTC2025-05-25 00:00:00 UTC000
May 252025-05-25 00:00:00 UTC2025-05-26 00:00:00 UTC000
May 262025-05-26 00:00:00 UTC2025-05-27 00:00:00 UTC000
May 272025-05-27 00:00:00 UTC2025-05-28 00:00:00 UTC202

What Hacker News says

4 sources
CUDA is better for sure, but the pure functional nature of the traditional shader is conceptually much simpler and I kind of relish the simplicity. There is no crazy tiling or anything. Just per-pixel parallelism [1]. It won't be as fast as those real, highly-tuned kernels, but it's still nice to see something simple that does something non-trivial. It reminded me of the early "GPGPU" days (early 2000s?) [1] https://github.com/nathan-barry/gpt2-webgl/blob/main/src/gpt...
In Running GPT-2 in WebGL: Rediscovering the Lost Art of GPU Shader Programming
Yeah, right now the weights aren't even pushed to the repo so there's no way for the github page to load them in. I've looked a tiny bit into it and might end up making a fix for it, having it load the weights by fetching them from somewhere else on load, but probably not today. There is a link to the zipped up folder with the weights here: https://github.com/nathan-barry/gpt2-webgl/releases/download... If anyone wants to make a PR which fetches the file from there, unzips it, then loads in the weights from there that would be greatly appreciated.
In Show HN: GPT-2 implemented using graphics shaders

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.