News for hackers. Stuff that matters.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @03:14PM (#35583663)
> For example, the latest MacBook Pro can have more than 60G+ unified GPU RAM that can be used to store the model weights and a reasonably powerful GPU to run many workloads.

...for $3.5K minimum, according to the Apple website :/

Is there any chance WebGPU could utilize the matrix instructions shipping on newer/future IGPs? I think MLIR can do this through Vulkan, which is how SHARK is so fast in Stable Diffusion on the AMD 7900 series, but I know nothing about webgpu's restrictions or Apache TVM.

Re:Web LLM – WebGPU Powered Inference of Large Language Models by summarity on Saturday April 15, 2023 @03:16PM (#35583676)
That would need support in dawn: https://dawn.googlesource.com/dawn

Dawn and WebIDL is also an easy way to add GPU support to any application (that can link C code (or use via a lib)). And Google maintains the compiler layer for the GPU frameworks (Metal, DX, Vulkan ...). This is going to be a great leap forward for GPGPU for many apps.

Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @03:30PM (#35583821)
Hmmm is there an issue tracker for Dawn matrix acceleration in... Vulkan or D3D12, I guess? Diving into these software stacks is making my head hurt.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by satvikpendem on Saturday April 15, 2023 @04:05PM (#35584053)
Getting 64 GB of VRAM for $3.5k is a lot cheaper than buying the equivalent Nvidia discrete GPUs.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @04:27PM (#35584226)
Maybe Intel will start offering cheap, high capacity ARC dGPUs as a power play? That would certainly be disruptive.

But yeah, AMD/Nvidia are never going offer huge memory pools affordably on dGPUs.

Re:Web LLM – WebGPU Powered Inference of Large Language Models by summarity on Saturday April 15, 2023 @04:06PM (#35584065)
It's also interesting that this opens up the full saturation of Apple Silicon (minus the ANE): GGML can run on the CPU, using NEON and AMX, while another instance could run via Metal on the GPU using MLC/dawn. Though the two couldn't share (the same) memory at the moment.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @04:21PM (#35584179)
The GPU's ML task energy is so much lower that you'd probably get better performance running everything on the GPU.

I think some repos have tried splitting things up between the NPU and GPU as well, but they didn't get good performance out of that combination? Not sure why, as the NPU is very low power.

Re:Web LLM – WebGPU Powered Inference of Large Language Models by j45 on Saturday April 15, 2023 @09:55PM (#35586547)
This was a really insightful explanation, thanks.

I have been wanting to get a beefier Mac Studio/mini m2 the more

I’m seeing Apple Silicon specific tweaked packages.

Re:Web LLM – WebGPU Powered Inference of Large Language Models by verdverm on Saturday April 15, 2023 @04:11PM (#35584106)
You can get it for a lot less from https://frame.work

But 64G of VRAM is not the same as GPU mem, apples and oranges

Re:Web LLM – WebGPU Powered Inference of Large Language Models by satvikpendem on Saturday April 15, 2023 @04:14PM (#35584136)
Where does Framework offer 64 GB of VRAM? By VRAM I am referring to GPU RAM, yes.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @04:19PM (#35584162)
Technically any newish laptop with 64GB of RAM has 64GB of "VRAM," but right now the Apple M series and AMD 7000 series are the only IGPs with any significant ML power.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by sroussey on Saturday April 15, 2023 @05:13PM (#35584577)
I’m not sure what you mean. Typically, an iGPU slices off part of RAM for the GPU at boot time, which means it’s fixed and not shared. When did this change?
Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @06:21PM (#35585190)
Its fixed at boot but (on newer IGPs) can grow beyond the initial capacity.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by lights0123 on Saturday April 15, 2023 @08:21PM (#35585999)
For Intel, it seems that per their chart under "What is the maximum amount of graphics memory or video memory my computer can use?" and discussion under "Will adding more physical memory increase my graphics memory amount?" at https://www.intel.com/content/www/us/en/support/articles/000..., iGPUs included with 5th gen/Broadwell processors were their first to do so in 2014.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by fulafel on Sunday April 16, 2023 @05:14AM (#35588445)
Full unified memory came 10 ish years ago (also powering the PS4) but I think hw ability to adjust iGPU memory without booting predated that.
Re:Web LLM – WebGPU Powered Inference of Large Language Models by KeplerBoy on Saturday April 15, 2023 @05:23PM (#35584670)
Doesn't it all boil down to bandwidth?

AMDs IGP are way less attractive because they use rather slow DDR4/5 memory while the M2 has blazing fast memory integrated in the package.

We're talking about 50 GB/s vs 400 GB/s. Nvidia's A100 has 1000 GB/s.

Memory bandwidth is usually the bottleneck in GPU performance as many kernels are memory-bound (look up the roofline performance model).

Re:Web LLM – WebGPU Powered Inference of Large Language Models by brucethemoose2 on Saturday April 15, 2023 @06:29PM (#35585255)
The AMD 6000 series has 128-bit LPDDR5 as an option, the 7000 series had LPDDR5X. This is similar to the M1/M2.

The Pro/Max have double/quadruple that bus width. But they are much bigger/more expensive chips.

Re:Web LLM – WebGPU Powered Inference of Large Language Models by azeirah on Sunday April 16, 2023 @02:33PM (#35592895)
I was wondering about the integrated gpu in my desktop ryzen 7900x.

I can find very little about it (or other 7000 series integrated gpus). Is this usable at all for running LLaMa in some way?