Reply 40 of 45, by BitWrangler
- Rank
- l33t++
So here I am getting excited about what all these frontend inference engines can do when all the fancy stuff happens courtesy of llama.cpp
"Well duh, that's a given Bee Dubbya." But I am meaning the flexibility of hardware target, it's all in the llama.cpp flags and switches.
Firstly the tensor pairing, that's where your GPUs are working in kind of like a RAID 0 stripe and the work is split between, but dependent on the other for completeness. They need high bandwidth to swap data, so this is not the config for PCIe 1x. This is more ideal for your fast slots, enables large models in the pooled VRAM.
Then there's the layered mode, where it just dispenses an amount of layers to work on that the GPU can hold, kind of your JBOD version. This doesn't need fast inter GPU communications, for all I know it will work on a PCI to PCI 1x riser or USB3 EGPU setup even. Provided your run time per job is sufficiently long that the time it takes to get 8GB there and back isn't too ridiculous.
Asymmetry can be handled by specifying the loading proportion per GPU, so you can have a slow 2GB doing it's share along with a fast 12GB. Mixed precision is handled well also, most commonly seen with single GPU plus CPU in a "regular desktop workstation". But it also means you can have very mixed targets in same system Vulkan, RDNA, CUDA and OpenCL (Presuming you get the drivers to play nice, that can always be a thing with mixed generations)
Then you don't even have to have all the GPU in the same machine, you can run one instance across multiple machines with an RPC configuration. Woohoo.
Now what I have to dig into is whether tensor mode is a whole instance thing or whether you can designate one pair in tensor and layer mode to extra GPU, or tensor them if you get 2 slowpokes who aren't massively affected by communicating at PCIe 1x.
Heh, guess it's back to "distributed computing" times, like SETI/Folding/Scrypt mining where you have to figure out where to distribute your computing around the house so as not to strain your circuits or get any room/floor too hot. 🤣 Actually, I have to dig out what the Ethereum and Litecoin guys knew about power tuning if I get much running. Basically a combo of undervolt and downclock, optimising GPU/RAM clock ratios until you're at 90% of the speed for 50% of power. Some workloads though, you can actually optimise for power and get higher speed too, think Ether was more like that because of memory intensity.
Well anyway, that's part of why I'm on a push going into winter, wanna get the high load training going in the cold weather so it's only like paying 50% for my heat. (I mean that as a cost offset, will still be more elec than not doing it) Then in spring start tuning, and chron jobbing machine activation times so it's queuing jobs until cheap elec/cool eves. Would be cool if by then I can get voice assistant frontend up and running on just a few dozen watts off solar through day.
edit: the horses mouth https://github.com/ggml-org/llama.cpp/blob/ma … cs/multi-gpu.md
EDITII: Now that's interesting, apparently the R9 390s had "overkill" memory performance when used for mining Ethereum, such that memclocks were often lowered for power save. However core clocks were known to spike power use rapidly over 1050. So definitely have to keep core clocks down. I wonder how low they can go before AI perf impact. However, is overkill for Ether memory speed enough? It is known on the more crippled memory bus of the RX series, "memsift" ("memshift"?) memory timing strap mods were required to get good mem performance. Maybe I will look at how those work and give the R9s something similar, insane VRAM speeds for practically anything else sound like barely enough in AI context. These seem like guides I will need later... https://www.overclock.net/threads/undervoltin … reader.1632351/ https://www.overclock.net/threads/guide-how-t … lt-gcn.1592963/
Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.