1 How is that For Flexibility?
Carmelo Tietkens edited this page 2025-02-10 21:21:16 +01:00


As everyone is well conscious, the world is still going nuts trying to establish more, more recent and much better AI tools. Mainly by tossing absurd amounts of money at the issue. A number of those billions go towards building low-cost or totally free services that run at a significant loss. The tech giants that run them all are wanting to attract as many users as possible, so that they can catch the market, and end up being the dominant or just party that can use them. It is the timeless Silicon Valley playbook. Once supremacy is reached, anticipate the enshittification to begin.

A likely way to earn back all that money for establishing these LLMs will be by tweaking their outputs to the liking of whoever pays the most. An example of what that such tweaking looks like is the rejection of DeepSeek's R1 to discuss what happened at Tiananmen Square in 1989. That a person is certainly politically encouraged, however ad-funded services won't exactly be fun either. In the future, I fully anticipate to be able to have a frank and truthful conversation about the Tiananmen occasions with an American AI representative, but the just one I can pay for will have assumed the personality of Father Christmas who, while holding a can of Coca-Cola, will sprinkle the recounting of the awful occasions with a happy "Ho ho ho ... Didn't you understand? The holidays are coming!"

Or maybe that is too improbable. Right now, dispite all that cash, the most popular service for code conclusion still has problem dealing with a couple of easy words, despite them being present in every dictionary. There must be a bug in the "totally free speech", or something.

But there is hope. Among the techniques of an upcoming gamer to shock the marketplace, is to undercut the incumbents by launching their design totally free, under a liberal license. This is what DeepSeek just made with their DeepSeek-R1. Google did it previously with the Gemma designs, as did Meta with Llama. We can download these models ourselves and run them on our own hardware. Even better, individuals can take these models and scrub the biases from them. And we can download those scrubbed designs and run those on our own hardware. And after that we can finally have some really helpful LLMs.

That hardware can be a difficulty, though. There are two options to pick from if you desire to run an LLM in your area. You can get a big, powerful video card from Nvidia, or you can buy an Apple. Either is pricey. The main specification that shows how well an LLM will carry out is the quantity of memory available. VRAM in the case of GPU's, normal RAM in the case of Apples. Bigger is much better here. More RAM means larger designs, which will drastically improve the quality of the output. Personally, I 'd state one requires at least over 24GB to be able to run anything helpful. That will fit a 32 billion parameter design with a little headroom to spare. Building, or purchasing, a workstation that is equipped to manage that can quickly cost thousands of euros.

So what to do, if you don't have that quantity of money to spare? You purchase second-hand! This is a viable option, however as always, there is no such thing as a totally free lunch. Memory may be the main issue, but do not ignore the importance of memory bandwidth and other specifications. Older equipment will have lower performance on those aspects. But let's not worry too much about that now. I am interested in developing something that a minimum of can run the LLMs in a functional way. Sure, the most recent Nvidia card might do it much faster, however the point is to be able to do it at all. Powerful online models can be good, however one should at least have the alternative to switch to a regional one, if the scenario requires it.

Below is my attempt to build such a capable AI computer without spending excessive. I ended up with a with 48GB of VRAM that cost me around 1700 euros. I might have done it for less. For circumstances, it was not strictly essential to purchase a brand name new dummy GPU (see listed below), or I could have found somebody that would 3D print the cooling fan shroud for me, rather of delivering a ready-made one from a distant nation. I'll confess, I got a bit impatient at the end when I learnt I needed to purchase yet another part to make this work. For me, this was an appropriate tradeoff.

Hardware

This is the full expense breakdown:

And this is what it appeared like when it first booted up with all the parts set up:

I'll provide some context on the parts listed below, and after that, I'll run a few quick tests to get some numbers on the efficiency.

HP Z440 Workstation

The Z440 was a simple choice since I currently owned it. This was the beginning point. About two years back, I wanted a computer that could function as a host for my virtual machines. The Z440 has a Xeon processor with 12 cores, and this one sports 128GB of RAM. Many threads and a lot of memory, that should work for hosting VMs. I bought it previously owned and after that switched the 512GB disk drive for a 6TB one to store those virtual devices. 6TB is not required for running LLMs, and therefore I did not include it in the breakdown. But if you prepare to gather many models, 512GB may not suffice.

I have pertained to like this workstation. It feels all extremely strong, and menwiki.men I haven't had any problems with it. A minimum of, up until I started this task. It turns out that HP does not like competitors, and I experienced some troubles when swapping elements.

2 x NVIDIA Tesla P40

This is the magic active ingredient. GPUs are pricey. But, just like the HP Z440, frequently one can find older devices, that utilized to be leading of the line and is still extremely capable, second-hand, for fairly little cash. These Teslas were implied to run in server farms, for things like 3D rendering and other graphic processing. They come equipped with 24GB of VRAM. Nice. They suit a PCI-Express 3.0 x16 slot. The Z440 has 2 of those, so we buy 2. Now we have 48GB of VRAM. Double good.

The catch is the part about that they were implied for servers. They will work fine in the PCIe slots of a normal workstation, but in servers the cooling is managed differently. Beefy GPUs consume a lot of power and can run very hot. That is the reason customer GPUs always come equipped with big fans. The cards require to take care of their own cooling. The Teslas, however, have no fans whatsoever. They get just as hot, but anticipate the server to supply a stable circulation of air to cool them. The enclosure of the card is rather formed like a pipe, and you have 2 alternatives: blow in air from one side or blow it in from the opposite. How is that for flexibility? You absolutely need to blow some air into it, however, or you will damage it as quickly as you put it to work.

The option is basic: simply install a fan on one end of the pipe. And certainly, it seems an entire home market has grown of individuals that sell 3D-printed shrouds that hold a standard 60mm fan in just the right location. The issue is, the cards themselves are currently quite bulky, and it is challenging to find a setup that fits two cards and two fan installs in the computer case. The seller who offered me my two Teslas was kind enough to include two fans with shrouds, but there was no chance I could fit all of those into the case. So what do we do? We purchase more parts.

NZXT C850 Gold

This is where things got irritating. The HP Z440 had a 700 Watt PSU, which may have been enough. But I wasn't sure, and I needed to buy a new PSU anyway because it did not have the right adapters to power the Teslas. Using this useful site, I deduced that 850 Watt would suffice, and I bought the NZXT C850. It is a modular PSU, meaning that you just require to plug in the cable televisions that you actually require. It included a cool bag to keep the spare cables. One day, I may provide it a great cleaning and use it as a toiletry bag.

Unfortunately, HP does not like things that are not HP, so they made it difficult to switch the PSU. It does not fit physically, and they likewise altered the main board and CPU connectors. All PSU's I have ever seen in my life are rectangle-shaped boxes. The HP PSU likewise is a rectangle-shaped box, but with a cutout, making certain that none of the typical PSUs will fit. For no technical reason at all. This is simply to tinker you.

The installing was ultimately solved by utilizing 2 random holes in the grill that I somehow handled to line up with the screw holes on the NZXT. It sort of hangs stable now, and I feel fortunate that this worked. I have actually seen Youtube videos where people turned to double-sided tape.

The connector needed ... another purchase.

Not cool HP.

Gainward GT 1030

There is another problem with utilizing server GPUs in this customer workstation. The Teslas are intended to crunch numbers, not to play video games with. Consequently, they don't have any ports to link a monitor to. The BIOS of the HP Z440 does not like this. It refuses to boot if there is no chance to output a video signal. This computer will run headless, however we have no other choice. We need to get a third video card, that we don't to intent to use ever, simply to keep the BIOS delighted.

This can be the most scrappy card that you can discover, obviously, however there is a requirement: we should make it fit on the main board. The Teslas are bulky and fill the 2 PCIe 3.0 x16 slots. The only slots left that can physically hold a card are one PCIe x4 slot and one PCIe x8 slot. See this website for some background on what those names suggest. One can not buy any x8 card, however, because frequently even when a GPU is advertised as x8, the real adapter on it may be just as large as an x16. Electronically it is an x8, physically it is an x16. That will not work on this main board, we really need the little connector.

Nvidia Tesla Cooling Fan Kit

As said, the challenge is to find a fan shroud that fits in the case. After some browsing, I discovered this package on Ebay a bought 2 of them. They came delivered total with a 40mm fan, and it all fits completely.

Be cautioned that they make a horrible lot of sound. You don't wish to keep a computer with these fans under your desk.

To keep an eye on the temperature level, I worked up this fast script and put it in a cron job. It occasionally reads out the temperature level on the GPUs and sends out that to my Homeassistant server:

In Homeassistant I added a chart to the dashboard that shows the worths gradually:

As one can see, the fans were loud, however not especially reliable. 90 degrees is far too hot. I browsed the web for a sensible upper limitation however might not find anything particular. The documents on the Nvidia site discusses a temperature of 47 degrees Celsius. But, what they indicate by that is the temperature level of the ambient air surrounding the GPU, not the measured value on the chip. You know, the number that actually is reported. Thanks, Nvidia. That was practical.

After some additional searching and reading the viewpoints of my fellow web citizens, my guess is that things will be great, offered that we keep it in the lower 70s. But don't estimate me on that.

My first effort to remedy the situation was by setting an optimum to the power consumption of the GPUs. According to this Reddit thread, one can decrease the power intake of the cards by 45% at the cost of only 15% of the efficiency. I attempted it and ... did not discover any difference at all. I wasn't sure about the drop in performance, having only a number of minutes of experience with this setup at that point, however the temperature level attributes were certainly the same.

And then a light bulb flashed on in my head. You see, just before the GPU fans, there is a fan in the HP Z440 case. In the photo above, it remains in the ideal corner, inside the black box. This is a fan that sucks air into the case, and I figured this would work in tandem with the GPU fans that blow air into the Teslas. But this case fan was not spinning at all, since the remainder of the computer system did not need any cooling. Looking into the BIOS, I discovered a setting for the minimum idle speed of the case fans. It varied from 0 to 6 stars and was presently set to 0. Putting it at a higher setting did wonders for the temperature level. It also made more noise.

I'll unwillingly confess that the third video card was valuable when adjusting the BIOS setting.

MODDIY Main Power Adaptor Cable and Akasa Multifan Adaptor

Fortunately, in some cases things simply work. These two items were plug and sitiosecuador.com play. The MODDIY adaptor cable connected the PSU to the main board and CPU power sockets.

I utilized the Akasa to power the GPU fans from a 4-pin Molex. It has the great function that it can power 2 fans with 12V and two with 5V. The latter certainly decreases the speed and therefore the cooling power of the fan. But it also lowers sound. Fiddling a bit with this and the case fan setting, I discovered an acceptable tradeoff between noise and temperature. For now at least. Maybe I will need to review this in the summer.

Some numbers

Inference speed. I gathered these numbers by running ollama with the-- verbose flag and asking it five times to compose a story and averaging the outcome:

Performancewise, ollama is set up with:

All designs have the default quantization that ollama will pull for you if you don't define anything.

Another essential finding: Terry is by far the most popular name for a tortoise, followed by Turbo and Toby. Harry is a preferred for hares. All LLMs are caring alliteration.

Power consumption

Over the days I watched on the power intake of the workstation:

Note that these numbers were taken with the 140W power cap active.

As one can see, there is another tradeoff to be made. Keeping the design on the card enhances latency, but takes in more power. My present setup is to have two designs loaded, one for coding, the other for generic text processing, and keep them on the GPU for approximately an hour after last use.

After all that, am I happy that I started this task? Yes, I believe I am.

I spent a bit more cash than planned, but I got what I desired: a method of in your area running medium-sized designs, totally under my own control.

It was an excellent choice to start with the workstation I currently owned, and see how far I might include that. If I had actually begun with a brand-new device from scratch, it certainly would have cost me more. It would have taken me a lot longer too, as there would have been numerous more options to choose from. I would likewise have been really lured to follow the buzz and buy the most recent and biggest of everything. New and shiny toys are fun. But if I purchase something brand-new, I want it to last for several years. Confidently forecasting where AI will go in 5 years time is difficult right now, so having a less expensive device, that will last at least some while, feels acceptable to me.

I want you all the best on your own AI journey. I'll report back if I discover something brand-new or interesting.