www.xbdev.net
xbdev - software development
Friday October 25, 2024
Home | Contact | Support | LearnWebGPU Graphics and Compute ...
     
 

LearnWebGPU

Graphics and Compute ...

 

WebGPU > WebGPU Meets LLM: Using Chat-GPT Type Agents 'Free' In Your Browser With WebGPU


To give you an idea of just how complex and big large language models (LLMs) such as ChatGPT are:
• It would take 355 years to train GPT-3 on a single NVIDIA Tesla V100 GPU
• GPT-4's is based on eight models with 220 billion parameters each - for a total of about 1.76 trillion parameters

Typically, these large complex language models can't run on a CPU (not unless you're willing to wait a very very long time for the result). You need access to a GPU, a powerful number crunching GPU.

I know what you're thinking, you could download all of the drivers, and tools, instal them and configure your system to run a LLM! But what if I told you, that you could run a LLM like ChatGPT in a web-browser (locally on your machine) without installing anything - just open the webpage, it downloads the necessary files, and it runs on your machine (not using cloud computing - but your own GPU).

WebGPU API has made this possible!! Amazing yes?


ChatGPT Directly in the Browser with WebGPU?! (No Install, No Server)


There are a few variations of LLMs being developed using WebGPU, WebAssembly & Web Workers - if you're interested in giving one a try, visit this website to give the chat demo a try: Web LLM.

Be warned, if you've got a slow internet connection, it takes a while to download and initialize - you'll also need an 'okay' graphics card - otherwise, it'll run slower than a wet-sock (or crash).


webgpu startup chat client llm chatgpt
Example screenshot of the startup process for the LLM using WebGPU - note it takes a while to download.



To give you an idea, on my i9 computer with an AMD Radeon 5500 - it takes about 10-20 seconds per 'word' when writing a reply to a simple questions like 'hello'.


Resources and Links


WebLLM: https://mlc.ai/web-llm/
Hello WebGPU Stable Diffusion
















WebGPU Development Cookbook - coding recipes for all your webgpu needs! WebGPU by Example: Fractals, Image Effects, Ray-Tracing, Procedural Geometry, 2D/3D, Particles, Simulations WebGPU Games WGSL 2d 3d interactive web-based fun learning WebGPU Compute WebGPU API - Owners WebGPU & WGSL Essentials: A Hands-On Approach to Interactive Graphics, Games, 2D Interfaces, 3D Meshes, Animation, Security and Production Kenwright graphics and animations using the webgpu api 12 week course kenwright learn webgpu api kenwright programming compute and graphics applications with html5 and webgpu api kenwright real-time 3d graphics with webgpu kenwright webgpu for dummies kenwright webgpu api develompent a quick start guide kenwright webgpu by example 2022 kenwright webgpu gems kenwright webgpu interactive compute and graphics visualization cookbook kenwright wgsl webgpu shading language cookbook kenwright WebGPU Shader Language Development: Vertex, Fragment, Compute Shaders for Programmers Kenwright wgsl webgpugems shading language cookbook kenwright WGSL Fundamentals book kenwright WebGPU Data Visualization Cookbook kenwright Special Effects Programming with WebGPU kenwright WebGPU Programming Guide: Interactive Graphics and Compute Programming with WebGPU & WGSL kenwright



 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.