Video wird geladen...
Video konnte nicht geladen werden
You heard about LLM inference on WebGPU, but what about... finetuning LLM on WebGPU? 🤯 I put together a super earlier PoC that proves it's possible, backed by llama.cpp / wllama 😁 Working on LoRA next...
19,426 Aufrufe • vor 8 Tagen •via X (Twitter)
15 Kommentare

Link to demo:

Optimizer states usually eat up memory faster than gradients here. Sticking with SGD for now, or writing an 8-bit Adam WGSL kernel?

👀 💦

Waiting for this 😎🔥

Built something similar though for educational purposes: for training and learning RL in your browser Here’s mine:

That's wild. How are you handling the backward pass memory pressure on WebGPU? Would love to see the LoRA version.

Fine-tuning direto no browser via WebGPU ⚙️ tira o peso de subir servidor em nuvem pra tarefa pontual. Se rodar liso, muda completamente a conta de infraestrutura pra app local.

the finetune wall is buffer limits before vram - webgpu caps one storage buffer at 128mib by default, and a backward pass holds activations rather than streaming layer by layer the way inference does. does wllama shard tensors across bindings yet, or is that the lora blocker?

I am more interested in post-training than fine-tuning

LoRA fits that path well: only the adapter gradients stay resident, which is exactly what the WebGPU buffer limits allow.

Try PoLORA

This is peak work! I've been meaning to research for a while what has been stopping us from training in a browser, so besides the poc, thanks for saving me some time as well.

full finetune on WebGPU keeps weights + grads + opt state resident. ship LoRA first if you want more than a toy GGUF. the PoC is the hard part.

WebGPU fine-tuning could make browser-native adaptation practical for privacy-sensitive workflows.

Bro 🤯

