nowfound

AI · May 2, 2025

GPT-2 implemented using graphics shaders

Back in the old days, people used to do general-purpose GPU programming by using shaders like GLSL. This is what inspired NVIDIA (and other companies) to eventually create CUDA (and friends). This is an implementation of GPT-2 using WebGL and shaders. Enjoy!

GPT-2 implemented using graphics shaders launched on May 2, 2025 with 228 votes, #135 of 7,905 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 1 year on.

Visit github.com ↗Alternativestop 2% of May 2025

In plain words

This project implements GPT-2, a language model, using WebGL and graphics shaders rather than traditional GPU computing frameworks. It demonstrates an unconventional approach to neural network computation by leveraging shader programming, a technique that predates modern CUDA-based GPU acceleration. The implementation is available on GitHub and runs in web browsers, making it a proof-of-concept for general-purpose GPU programming through graphics APIs.

written from the facts on this page · September 2026

From the sources

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

pip install torch numpy transformers Run the downloader: python download_weights.py This will fetch: wte.bin (token embeddings) wpe.bin (positional embeddings) c_attn_q_w_0.bin … c_attn_q_w_11.bin c_attn_k_w_0.bin … etc. lm_head_w.bin , lm_head_b.bin And a generated manifest.json mapping names → URLs Front-end Setup with Vite We use Vite to bundle TS, serve ESM modules & handle js-tiktoken : npm install Start the local dev server: npm run dev Open your browser at http://localhost:5173 Any changes under src/ will trigger HMR andfrom github.com

Does a similar job

all alternatives →
  • HipScript – Run CUDA in the browser with WebAssembly and WebGPU2025 · hipscript.lights0123.com · ▲309

    CUDA is NVIDIA's language for GPU programming, allowing you to mix write CPU and GPU code in C++ in one file. By chaining a few projects that compile CUDA to OpenCL, then Vulkan, then WebGPU, you can experiment with this GPGPU language on any hardware.

  • ChartGPU – WebGPU-powered charting library (1M points at 60fps)Jan 2026 · github.com · ▲670

    Creator here. I built ChartGPU because I kept hitting the same wall: charting libraries that claim to be "fast" but choke past 100K data points. The core insight: Canvas2D is fundamentally CPU-bound. Even WebGL chart libraries still do most computation on the CPU. So I moved everything to the GPU via WebGPU: - LTTB downsampling runs as a compute shader - Hit-testing for tooltips/hover is GPU-accelerated - Rendering uses instanced draws (one draw call per series) The result: 1M points at 60fps with smooth zoom/pan. Live demo:…

  • Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)2023 · github.com · ▲55

    Demo of agent based model on GPU with CUDA and OpenGL (Windows/Linux) Agent instances on GPU memory Uses SSBO for instanced objects (with GLSL 450 shaders) CUDA OpenGL interops Renders with GLFW3 window manager Dynamic camera views in OpenGL (pan,zoom with mouse) Libraries installed using vcpkg (https://github.com/KienTTran/ABMGPU)

  • Free e-book about WebGPU Programming2024 · shi-yan.github.io · ▲471

    I am excited to announce the launch of my e-book on Graphics/WebGPU programming! This project has consumed much of my spare time, during which I developed various tools to facilitate the publishing process, including a code playground and a static site generator that can reference sample codes. However, I'm feeling burnt out and ready to call it finished, even though it may not feel completely done. Avoiding another abandoned side project has been my primary motivation in reaching this point.

  • GA
    GPU-Accelerated Digit Recognition with WebGL2016 · erkaman.github.io · ▲135

More ai this month

the category →
  • Video model that turns script into viral social media videos

    AI · 17d ago · spira.ai

  • The browser where Claude Code and Codex work beside you

    AI · 17d ago · rill.love

  • Kolibri is Aleph Alpha

    AI · 18d ago · tej.as

  • Paintings by AI models: programs run through a simulation of oil paint.

    AI · 20d ago · stillwet.art

  • Onepin▲384

    AI voiceover with every name, price and date said right

    AI · 30d ago · onepin.ai

  • A real-time world model you can explore and change

    AI · 28d ago · world.pixverse.video

Source: Show HN post ↗

Launched alongside, May 2025

the whole month →
  • Tapflow 2.0▲1,125

    We built Tapflow for devs, designers, PMs, and tech folks who’ve been sitting on internal docs, templates, and systems — but never productized them. Upload a PDF, notes, or workshop deck, and Tapflow drafts a structured product (with chapters, teaser and pricing plans). It’s good for AI kits, onboarding guides, design systems, and frameworks. You can sell through Stripe, LemonSqueezy, or PayPal. Real-time collaboration is in early beta. No site builder, no LMS — clean design and just focused tools to ship. Fully bootstrapped and just launched on PH today →…

    Work · 2025 · tapflow.ai

  • C9

    Life & fun · 2025 · felixrieseberg.github.io

  • Appwrite 2.0 brings a new engine, a rebuilt Console, five database types, an S3 API, an OAuth 2.1 server, and organization-level Domains and Firewall.

    Dev tools · 2025 · appwrite.io

  • Perfect meeting memory in Notion

    AI · 2025 · notion.com

  • Den▲948

    Multiplayer AI agent builder

    AI · 2025 · getden.io

  • Powerful productivity on the go

    AI · 2025 · raycast.com