As everybody is well aware, the world is still going nuts attempting to establish more, newer and better AI tools. Mainly by tossing absurd amounts of money at the problem. Many of those billions go towards constructing low-cost or complimentary services that run at a considerable loss. The tech giants that run them all are hoping to draw in as numerous users as possible, so that they can catch the market, and become the dominant or only celebration that can use them. It is the timeless Silicon Valley playbook. Once dominance is reached, expect the enshittification to begin.
A likely way to earn back all that money for developing these LLMs will be by tweaking their outputs to the taste of whoever pays the most. An example of what that such tweaking appears like is the rejection of DeepSeek's R1 to discuss what took place at Tiananmen Square in 1989. That a person is certainly politically motivated, but ad-funded services won't exactly be enjoyable either. In the future, I completely expect to be able to have a frank and sincere conversation about the Tiananmen occasions with an American AI agent, but the only one I can afford will have assumed the personality of Father Christmas who, while holding a can of Coca-Cola, will intersperse the stating of the awful occasions with a happy "Ho ho ho ... Didn't you understand? The vacations are coming!"
Or possibly 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 simple words, despite them existing in every dictionary. There should be a bug in the "free speech", or something.
But there is hope. One of the techniques of an approaching gamer to shock the market, is to undercut the incumbents by launching their model totally free, under a permissive license. This is what DeepSeek simply did 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. Better yet, people can take these designs and scrub the predispositions from them. And we can download those scrubbed designs and run those on our own hardware. And after that we can lastly have some really helpful LLMs.
That hardware can be a hurdle, though. There are two choices to pick from if you wish to run an LLM locally. You can get a big, demo.qkseo.in effective video card from Nvidia, or you can purchase an Apple. Either is expensive. The main specification that shows how well an LLM will perform is the amount of memory available. VRAM when it comes to GPU's, regular RAM in the case of Apples. Bigger is much better here. More RAM means larger models, which will considerably enhance the quality of the output. Personally, I 'd state one needs a minimum of over 24GB to be able to run anything beneficial. That will fit a 32 billion parameter design with a little headroom to spare. Building, or buying, a workstation that is equipped to handle that can easily cost countless euros.
So what to do, if you don't have that amount of money to spare? You purchase pre-owned! This is a viable option, however as always, there is no such thing as a totally free lunch. Memory might be the main issue, however don't underestimate the importance of memory bandwidth and other specifications. Older devices will have lower efficiency on those elements. But let's not worry too much about that now. I have an interest in building something that at least can run the LLMs in a functional method. Sure, the most recent Nvidia card may do it much faster, however the point is to be able to do it at all. Powerful online designs can be good, however one should at the extremely least have the option to change to a regional one, if the situation requires it.
Below is my effort to build such a capable AI computer without spending excessive. I wound up with a workstation with 48GB of VRAM that cost me around 1700 euros. I might have done it for less. For circumstances, it was not strictly necessary to purchase a brand new dummy GPU (see listed below), or I might have discovered somebody that would 3D print the cooling fan shroud for me, instead of shipping a ready-made one from a distant country. I'll confess, I got a bit impatient at the end when I discovered out I needed to buy yet another part to make this work. For me, this was an appropriate tradeoff.
Hardware
This is the complete expense breakdown:
And this is what it looked liked when it first booted up with all the parts installed:
I'll give some context on the parts listed below, and after that, I'll run a couple of quick tests to get some numbers on the efficiency.
HP Z440 Workstation
The Z440 was a simple pick due to the fact that I currently owned it. This was the beginning point. About 2 years back, I desired a computer system that could serve 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 must work for hosting VMs. I purchased it secondhand and then swapped the 512GB hard disk drive for a 6TB one to save those virtual devices. 6TB is not required for running LLMs, and therefore I did not include it in the breakdown. But if you plan to collect lots of models, 512GB might not suffice.
I have actually pertained to like this workstation. It feels all extremely solid, and I haven't had any problems with it. At least, until I began this job. It turns out that HP does not like competition, and I encountered some problems when switching components.
2 x NVIDIA Tesla P40
This is the magic active ingredient. GPUs are expensive. But, as with the HP Z440, frequently one can find older equipment, that utilized to be top of the line and is still very capable, pre-owned, for fairly little money. These Teslas were indicated to run in server farms, for things like 3D making and other graphic processing. They come geared up 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 suggested for servers. They will work great in the PCIe slots of a regular workstation, but in servers the cooling is managed differently. Beefy GPUs consume a great deal of power and can run extremely hot. That is the factor consumer GPUs always come equipped with big fans. The cards require to look after their own cooling. The Teslas, however, have no fans whatsoever. They get simply as hot, however expect the server to supply a stable circulation of air to cool them. The enclosure of the card is somewhat shaped like a pipe, and you have 2 choices: blow in air from one side or blow it in from the other side. How is that for versatility? You definitely should blow some air into it, though, or you will harm it as quickly as you put it to work.
The solution is simple: just install a fan on one end of the pipe. And certainly, it seems an entire cottage industry has actually grown of people that sell 3D-printed shrouds that hold a standard 60mm fan in just the best place. The issue is, the cards themselves are currently quite large, and it is challenging to discover a setup that fits two cards and 2 fan mounts in the computer system case. The seller who offered me my 2 Teslas was kind sufficient to include 2 fans with shrouds, but there was no way 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 annoying. The HP Z440 had a 700 Watt PSU, which may have sufficed. 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 handy website, I deduced that 850 Watt would suffice, and I purchased the NZXT C850. It is a modular PSU, meaning that you only need to plug in the that you in fact require. It included a neat bag to keep the spare cables. One day, I may provide it a good cleaning and utilize 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 rectangular boxes. The HP PSU also is a rectangular box, but with a cutout, making certain that none of the normal PSUs will fit. For no technical reason at all. This is just to mess with you.
The installing was ultimately resolved by utilizing two 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 actually seen Youtube videos where individuals turned to double-sided tape.
The adapter needed ... another purchase.
Not cool HP.
Gainward GT 1030
There is another issue with utilizing server GPUs in this customer workstation. The Teslas are intended 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 refuses to boot if there is no method to output a video signal. This computer system will run headless, however we have no other choice. We need to get a third video card, that we don't to intent to utilize ever, just to keep the BIOS delighted.
This can be the most scrappy card that you can discover, of course, but 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 site for some background on what those names imply. One can not purchase any x8 card, however, because typically even when a GPU is promoted as x8, the actual connector on it may be just as large as an x16. Electronically it is an x8, physically it is an x16. That won't deal with this main board, we truly require the small connector.
Nvidia Tesla Cooling Fan Kit
As said, the obstacle is to find a fan shroud that suits the case. After some browsing, I found this package on Ebay a bought 2 of them. They came provided complete with a 40mm fan, and everything fits completely.
Be cautioned that they make a dreadful lot of sound. You do not wish to keep a computer system with these fans under your desk.
To watch on the temperature, I worked up this quick script and put it in a cron job. It regularly reads out the temperature level on the GPUs and sends that to my Homeassistant server:
In Homeassistant I added a graph to the control panel that displays the values in time:
As one can see, the fans were noisy, but not especially effective. 90 degrees is far too hot. I browsed the web for an affordable upper limitation but might not discover anything particular. The documentation on the Nvidia website points out a temperature level of 47 degrees Celsius. But, what they imply by that is the temperature level of the ambient air surrounding the GPU, not the measured worth on the chip. You understand, the number that in fact is reported. Thanks, Nvidia. That was handy.
After some more browsing and reading the viewpoints of my fellow web residents, my guess is that things will be great, supplied that we keep it in the lower 70s. But don't estimate me on that.
My first effort to fix the scenario was by setting a maximum to the power intake of the GPUs. According to this Reddit thread, one can lower the power intake of the cards by 45% at the cost of just 15% of the efficiency. I attempted it and ... did not notice any difference at all. I wasn't sure about the drop in efficiency, having just a couple of minutes of experience with this setup at that point, however the temperature level attributes were certainly the same.
And after that 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 best corner, inside the black box. This is a fan that draws 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, because the remainder of the computer system did not require any cooling. Looking into the BIOS, I discovered a setting for the minimum idle speed of the case fans. It ranged from 0 to 6 stars and was currently set to 0. Putting it at a higher setting did marvels for the temperature. It also made more noise.
I'll hesitantly admit that the third video card was valuable when changing the BIOS setting.
MODDIY Main Power Adaptor Cable and Akasa Multifan Adaptor
Fortunately, often things simply work. These 2 items were plug and play. The MODDIY adaptor cable linked the PSU to the main board and CPU power sockets.
I used the Akasa to power the GPU fans from a 4-pin Molex. It has the nice function that it can power 2 fans with 12V and two with 5V. The latter certainly minimizes 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 found an acceptable tradeoff between noise and temperature level. In the meantime at least. Maybe I will need to revisit this in the summertime.
Some numbers
Inference speed. I collected these numbers by running ollama with the-- verbose flag and asking it 5 times to write a story and averaging the result:
Performancewise, ollama is configured with:
All models have the default quantization that ollama will pull for you if you don't define anything.
Another crucial finding: Terry is by far the most popular name for a tortoise, wiki.rrtn.org followed by Turbo and Toby. Harry is a favorite for hares. All LLMs are caring alliteration.
Power intake
Over the days I kept an eye on the power consumption 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 model on the card enhances latency, however takes in more power. My current setup is to have 2 designs 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 delighted that I started this project? Yes, I think I am.
I spent a bit more money than prepared, but I got what I wanted: a method of locally running medium-sized models, completely under my own control.
It was an excellent choice to begin with the workstation I currently owned, and see how far I could feature that. If I had actually started with a brand-new machine from scratch, it certainly would have cost me more. It would have taken me a lot longer too, as there would have been a lot more choices to pick from. I would likewise have actually been extremely tempted to follow the buzz and buy the current and greatest of whatever. New and glossy toys are enjoyable. But if I buy something new, I desire it to last for several years. Confidently predicting 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 by yourself AI journey. I'll report back if I discover something brand-new or interesting.
1
How is that For Flexibility?
vonkrajewski11 edited this page 2025-02-13 21:23:10 +00:00