Get the latest tech news
Running GPT-2 in WebGL: Rediscovering the Lost Art of GPU Shader Programming
Nathan Barry's Personal Website
Preface: A few weeks back, I implemented GPT-2 using WebGL and shaders ( Github Repo) which made the front page of Hacker News ( discussion). One had to pack data into texture formats, use off-screen framebuffers to capture the results, and often perform multiple render passes to accomplish multi-stage algorithms. Raw buffers: Allocate arrays of floats or integers, read/write them directly, and move them back and forth between host and device with explicit copy calls.
Or read this on Hacker News