1 How is that For Flexibility?
Antwan Brink edited this page 2025-02-11 12:45:14 +01:00


As everyone is well conscious, the world is still going nuts attempting to establish more, more recent and much better AI tools. Mainly by tossing ridiculous quantities of cash at the issue. A number of those billions go towards developing low-cost or free services that operate at a significant loss. The tech giants that run them all are hoping to attract as lots of users as possible, so that they can record the marketplace, and end up being the dominant or just party that can provide them. It is the classic Silicon Valley playbook. Once supremacy is reached, anticipate the enshittification to begin.

A most likely way to make back all that cash for establishing these LLMs will be by tweaking their outputs to the taste of whoever pays one of the most. An example of what that such tweaking looks like is the refusal of DeepSeek's R1 to discuss what took place at Tiananmen Square in 1989. That one is certainly politically motivated, but ad-funded services will not precisely be enjoyable either. In the future, I fully expect to be able to have a frank and honest conversation about the Tiananmen events with an American AI agent, however the just one I can afford will have presumed the persona of Father Christmas who, while holding a can of Coca-Cola, will intersperse the recounting of the terrible occasions with a happy "Ho ho ho ... Didn't you know? The vacations are coming!"

Or maybe that is too improbable. Today, dispite all that cash, the most popular service for code conclusion still has difficulty working with a couple of easy words, regardless of them being present in every dictionary. There need to be a bug in the "totally free speech", or something.

But there is hope. Among the tricks of an upcoming gamer to shake up the market, is to damage the incumbents by launching their model totally free, under a liberal license. This is what DeepSeek just did with their DeepSeek-R1. Google did it earlier with the Gemma models, as did Meta with Llama. We can download these models ourselves and run them on our own hardware. Even better, people can take these designs and scrub the predispositions from them. And we can download those scrubbed models and run those on our own hardware. And after that we can lastly have some really beneficial LLMs.

That hardware can be a hurdle, however. There are 2 alternatives to select from if you desire to run an LLM locally. You can get a big, effective video card from Nvidia, or you can purchase an Apple. Either is pricey. The main specification that suggests how well an LLM will perform is the quantity of memory available. VRAM in the case of GPU's, normal RAM in the case of Apples. Bigger is better here. More RAM implies bigger designs, which will dramatically improve the quality of the output. Personally, I 'd say one requires at least over 24GB to be able to run anything beneficial. That will fit a 32 billion specification design with a little headroom to spare. Building, or purchasing, a workstation that is geared up to handle that can easily cost thousands of euros.

So what to do, if you don't have that amount of cash to spare? You buy pre-owned! This is a practical alternative, however as always, there is no such thing as a complimentary lunch. Memory might be the main concern, however do not underestimate the significance of memory bandwidth and other specs. Older equipment will have lower efficiency on those elements. But let's not fret too much about that now. I have an interest in developing something that at least can run the LLMs in a usable method. Sure, the latest Nvidia card might do it faster, however the point is to be able to do it at all. Powerful online designs can be good, but one need to at least have the alternative to change to a regional one, if the scenario calls for it.

Below is my attempt to develop such a capable AI computer system without spending excessive. I wound up with a workstation with 48GB of VRAM that cost me around 1700 euros. I could have done it for less. For circumstances, it was not strictly necessary to buy a brand name new dummy GPU (see listed below), or I could have discovered somebody that would 3D print the cooling fan shroud for me, rather of shipping a ready-made one from a far nation. I'll confess, I got a bit restless at the end when I found out I had to buy yet another part to make this work. For me, asteroidsathome.net this was an acceptable tradeoff.

Hardware

This is the full expense breakdown:

And this is what it looked liked when it initially booted up with all the parts set up:

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

HP Z440 Workstation

The Z440 was a simple pick because I already owned it. This was the beginning point. About 2 years back, I wanted a computer system that could act as a host for my virtual makers. The Z440 has a Xeon processor with 12 cores, and this one sports 128GB of RAM. Many threads and a great deal of memory, that ought to work for hosting VMs. I bought it secondhand and after that switched the 512GB hard disk for a 6TB one to save those virtual devices. 6TB is not needed for running LLMs, and for that reason I did not include it in the breakdown. But if you plan to gather many models, 512GB may not suffice.

I have actually pertained to like this workstation. It feels all really strong, and I have not had any issues with it. At least, until I began this task. It ends up that HP does not like competition, and I encountered some troubles when switching parts.

2 x NVIDIA Tesla P40

This is the magic active ingredient. GPUs are costly. But, as with the HP Z440, frequently one can find older equipment, that utilized to be leading of the line and is still very capable, second-hand, for fairly little cash. These Teslas were suggested to run in server farms, for things like 3D making and other graphic processing. They come equipped with 24GB of VRAM. Nice. They fit in a PCI-Express 3.0 x16 slot. The Z440 has two of those, so we purchase 2. Now we have 48GB of VRAM. Double great.

The catch is the part about that they were meant for servers. They will work fine in the PCIe slots of a typical workstation, but in servers the cooling is managed in a different way. Beefy GPUs consume a lot of power and can run extremely hot. That is the reason customer GPUs constantly come equipped with big fans. The cards need to look after their own cooling. The Teslas, however, have no fans whatsoever. They get just as hot, but anticipate the server to provide a constant circulation of air to cool them. The enclosure of the card is somewhat 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 definitely must blow some air into it, though, or you will harm it as quickly as you put it to work.

The option is basic: just install a fan on one end of the pipeline. And certainly, it appears a whole home market has grown of individuals that sell 3D-printed shrouds that hold a basic 60mm fan in simply the right place. The problem is, the cards themselves are already rather large, and it is difficult to find a configuration that fits two cards and 2 fan mounts in the computer case. The seller who sold me my 2 Teslas was kind enough to consist of two fans with shrouds, but there was no way I could fit all of those into the case. So what do we do? We buy more parts.

NZXT C850 Gold

This is where things got bothersome. The HP Z440 had a 700 Watt PSU, which may have sufficed. But I wasn't sure, and I needed to buy a brand-new PSU anyhow because it did not have the right ports to power the Teslas. Using this convenient website, I deduced that 850 Watt would be sufficient, and I purchased the NZXT C850. It is a modular PSU, suggesting that you just require to plug in the cables that you really need. It came with a neat bag to store the spare cables. One day, I might offer it an excellent cleansing and utilize it as a toiletry bag.

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

The mounting was ultimately fixed by using 2 random holes in the grill that I in some way handled to align with the screw holes on the NZXT. It sort of hangs stable now, and I feel lucky that this worked. I have seen Youtube videos where individuals turned to double-sided tape.

The port needed ... another purchase.

Not cool HP.

Gainward GT 1030

There is another issue with using server GPUs in this customer workstation. The Teslas are meant to crunch numbers, not to play computer game with. Consequently, they do not have any ports to connect a display to. The BIOS of the HP Z440 does not like this. It declines to boot if there is no method to output a video signal. This computer system will run headless, but we have no other choice. We need to get a 3rd 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, but there is a requirement: we should make it fit on the main board. The Teslas are large and fill the two 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 site for some background on what those names suggest. One can not buy any x8 card, though, because frequently even when a GPU is promoted as x8, the real port on it might be just as broad as an x16. Electronically it is an x8, physically it is an x16. That won't work on this main board, we actually need the little connector.

Nvidia Tesla Cooling Fan Kit

As said, the difficulty is to discover a fan shroud that fits in the case. After some browsing, I found this kit on Ebay a bought 2 of them. They came provided total with a 40mm fan, and all of it fits completely.

Be warned that they make a terrible lot of noise. You do not wish to keep a computer with these fans under your desk.

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

In Homeassistant I included a graph to the dashboard that displays the values with time:

As one can see, the fans were loud, but not particularly effective. 90 degrees is far too hot. I browsed the internet for a sensible ceiling however might not find anything particular. The documentation on the Nvidia website discusses a temperature level of 47 degrees Celsius. But, what they mean by that is the temperature of the ambient air surrounding the GPU, not the determined worth on the chip. You know, the number that in fact is reported. Thanks, Nvidia. That was helpful.

After some more searching and reading the opinions of my fellow web residents, my guess is that things will be fine, offered that we keep it in the lower 70s. But don't me on that.

My very first effort to remedy the scenario was by setting a maximum to the power usage of the GPUs. According to this Reddit thread, one can reduce the power intake of the cards by 45% at the cost of only 15% of the performance. I tried it and ... did not observe any distinction at all. I wasn't sure about the drop in efficiency, having only a couple of minutes of experience with this setup at that point, however the temperature 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 operate in tandem with the GPU fans that blow air into the Teslas. But this case fan was not spinning at all, due to the fact that the remainder of the computer did not require any cooling. Checking out the BIOS, I discovered a setting for the minimum idle speed of the case fans. It ranged from 0 to 6 stars and was presently set to 0. Putting it at a higher setting did wonders for the temperature. It likewise made more sound.

I'll reluctantly admit that the third video card was handy when adjusting the BIOS setting.

MODDIY Main Power Adaptor Cable and Akasa Multifan Adaptor

Fortunately, sometimes things simply work. These two items were plug and play. The MODDIY adaptor cable linked 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 nice feature that it can power two fans with 12V and 2 with 5V. The latter certainly reduces the speed and hence the cooling power of the fan. But it also minimizes sound. Fiddling a bit with this and the case fan setting, I found an appropriate tradeoff between sound and temperature. For now at least. Maybe I will require to revisit this in the summer season.

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 balancing the result:

Performancewise, ollama is set up with:

All designs have the default quantization that ollama will pull for you if you do not specify anything.

Another crucial 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 intake

Over the days I watched on the power usage 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 improves latency, but takes in more power. My existing setup is to have 2 models filled, one for coding, the other for generic text processing, and keep them on the GPU for up to an hour after last use.

After all that, am I happy that I started this project? Yes, I think I am.

I spent a bit more cash than planned, however I got what I wanted: a way of in your area running medium-sized models, entirely under my own control.

It was a great choice to begin with the workstation I currently owned, and see how far I could include that. If I had actually begun with a brand-new maker from scratch, it certainly would have cost me more. It would have taken me a lot longer too, as there would have been much more options to select from. I would also have been really lured to follow the hype and buy the current and greatest of whatever. New and shiny toys are fun. But if I purchase something brand-new, I want it to last for years. Confidently forecasting where AI will go in 5 years time is difficult right now, so having a less expensive machine, that will last a minimum of some while, feels acceptable to me.

I wish you great luck on your own AI journey. I'll report back if I find something brand-new or fascinating.