Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A atashcable
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
Collapse sidebar
  • Eusebia Kinser
  • atashcable
  • Issues
  • #1

Closed
Open
Created Feb 10, 2025 by Eusebia Kinser@eusebiakinserMaintainer

How is that For Flexibility?


As everyone is well conscious, the world is still going nuts trying to develop more, more recent and much better AI tools. Mainly by tossing ridiculous quantities of cash at the problem. A lot of those billions go towards constructing inexpensive or totally free services that run at a substantial loss. The tech giants that run them all are wishing to attract as lots of users as possible, so that they can capture the marketplace, and end up being the dominant or just party that can offer them. It is the traditional Silicon Valley playbook. Once supremacy is reached, anticipate the enshittification to start.

A likely way to earn back all that money for establishing these LLMs will be by tweaking their outputs to the taste of whoever pays the many. An example of what that such tweaking looks like is the refusal of DeepSeek's R1 to discuss what occurred at Tiananmen Square in 1989. That a person is certainly politically motivated, however ad-funded services won't precisely be fun either. In the future, I completely anticipate to be able to have a frank and truthful discussion about the Tiananmen occasions with an American AI representative, but the only one I can afford will have assumed the persona of Father Christmas who, while holding a can of Coca-Cola, will intersperse the recounting of the tragic events with a cheerful "Ho ho ho ... Didn't you know? The vacations are coming!"

Or perhaps that is too far-fetched. Today, dispite all that cash, the most popular service for code conclusion still has problem working with a number of simple words, in spite of them existing in every dictionary. There should be a bug in the "free speech", or something.

But there is hope. Among the techniques of an approaching gamer to shock the market, is to undercut the incumbents by launching their design free of charge, under a permissive license. This is what DeepSeek simply 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, people can take these models and scrub the predispositions from them. And we can download those scrubbed designs and run those on our own hardware. And then we can lastly have some really helpful LLMs.

That hardware can be a hurdle, however. There are two alternatives to pick from if you wish to run an LLM locally. You can get a big, effective video card from Nvidia, or you can buy an Apple. Either is pricey. The main spec that indicates 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 implies bigger designs, which will drastically enhance the quality of the output. Personally, I 'd state one needs a minimum of over 24GB to be able to run anything useful. That will fit a 32 billion parameter model 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 do not have that amount of money to spare? You purchase second-hand! This is a feasible alternative, however as always, there is no such thing as a complimentary lunch. Memory may be the main issue, but don't underestimate the significance of memory bandwidth and other specifications. Older devices will have lower efficiency on those aspects. But let's not fret excessive about that now. I am interested in developing something that at least can run the LLMs in a functional method. Sure, the current Nvidia card may do it faster, but the point is to be able to do it at all. Powerful online designs can be good, however one ought to at least have the choice to change to a regional one, if the situation calls for it.

Below is my effort to construct such a capable AI computer without spending excessive. I ended up with a workstation with 48GB of VRAM that cost me around 1700 euros. I might have done it for less. For example, it was not strictly needed to buy a brand name new dummy GPU (see below), or I could have discovered someone 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 impatient at the end when I learnt I had 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 appeared like when it first booted up with all the parts set up:

I'll offer some context on the parts listed below, forum.batman.gainedge.org and after that, I'll run a couple of quick tests to get some numbers on the performance.

HP Z440 Workstation

The Z440 was a simple pick because I currently owned it. This was the starting point. About 2 years back, I desired a computer system that could act as a host for my virtual devices. 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 need to work for hosting VMs. I bought it secondhand and then swapped the 512GB tough drive for a 6TB one to store those virtual makers. 6TB is not required for running LLMs, and for that reason I did not include it in the breakdown. But if you prepare to collect many designs, 512GB might not suffice.

I have pertained to like this workstation. It feels all extremely strong, and I haven't had any issues with it. At least, up until I started this project. It ends up that HP does not like competition, and I encountered some troubles when switching elements.

2 x NVIDIA Tesla P40

This is the magic component. GPUs are costly. But, similar to the HP Z440, often one can discover older devices, that used 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 . 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 purchase 2. Now we have 48GB of VRAM. Double good.

The catch is the part about that they were meant for servers. They will work great in the PCIe slots of a normal workstation, however in servers the cooling is managed differently. Beefy GPUs take in a great deal of power and can run really hot. That is the factor customer GPUs constantly come equipped with huge fans. The cards need to take care of their own cooling. The Teslas, nevertheless, have no fans whatsoever. They get simply as hot, but expect the server to provide a consistent flow of air to cool them. The enclosure of the card is rather shaped like a pipeline, and you have two choices: blow in air from one side or blow it in from the opposite. How is that for versatility? You absolutely should blow some air into it, though, or you will harm it as soon as you put it to work.

The service is simple: just install a fan on one end of the pipe. And engel-und-waisen.de certainly, it seems a whole home market has grown of individuals that offer 3D-printed shrouds that hold a standard 60mm fan in simply the best location. The problem is, the cards themselves are already quite large, and it is not simple to find a configuration that fits two cards and 2 fan mounts in the computer system case. The seller who offered me my 2 Teslas was kind enough to consist of 2 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 might have been enough. But I wasn't sure, and I needed to buy a brand-new PSU anyway due to the fact that it did not have the ideal connectors to power the Teslas. Using this convenient website, I deduced that 850 Watt would be adequate, and I purchased the NZXT C850. It is a modular PSU, implying that you just require to plug in the cables that you actually need. It came with a neat bag to save the extra cables. One day, I might 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 challenging to swap the PSU. It does not fit physically, and they also 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 rectangle-shaped box, however with a cutout, making certain that none of the normal PSUs will fit. For no technical factor at all. This is simply to tinker you.

The mounting was eventually fixed 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 steady now, and I feel lucky that this worked. I have seen Youtube videos where individuals resorted to double-sided tape.

The adapter required ... another purchase.

Not cool HP.

Gainward GT 1030

There is another concern with utilizing server GPUs in this consumer workstation. The Teslas are meant to crunch numbers, not to play video games with. Consequently, they don't have any ports to connect a monitor addsub.wiki to. The BIOS of the HP Z440 does not like this. It refuses to boot if there is no way to output a video signal. This computer system will run headless, however we have no other choice. We need to get a 3rd video card, that we do not to intent to utilize ever, just to keep the BIOS happy.

This can be the most scrappy card that you can find, of course, but there is a requirement: we must make it fit on the main board. The Teslas are bulky 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 website for some background on what those names indicate. One can not purchase any x8 card, though, because often even when a GPU is advertised as x8, the actual port on it might be simply as large as an x16. Electronically it is an x8, physically it is an x16. That will not deal with this main board, we really need the small connector.

Nvidia Tesla Cooling Fan Kit

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

Be alerted that they make a dreadful great deal of noise. You do not wish to keep a computer with these fans under your desk.

To watch on the temperature level, I worked up this quick script and put it in a cron task. It periodically reads out the temperature level on the GPUs and sends out that to my Homeassistant server:

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

As one can see, the fans were noisy, but not particularly efficient. 90 degrees is far too hot. I searched the web for a sensible ceiling but might not discover anything specific. The documentation on the Nvidia site points out a temperature of 47 degrees Celsius. But, what they suggest by that is the temperature of the ambient air surrounding the GPU, not the measured worth on the chip. You know, the number that actually is reported. Thanks, Nvidia. That was helpful.

After some more browsing and checking out the opinions of my fellow internet people, my guess is that things will be fine, supplied that we keep it in the lower 70s. But do not estimate me on that.

My first effort to correct the circumstance was by setting an optimum to the power usage of the GPUs. According to this Reddit thread, one can lower the power intake of the cards by 45% at the expense of only 15% of the efficiency. I tried it and ... did not notice any difference at all. I wasn't sure about the drop in efficiency, having only a number of minutes of experience with this setup at that point, but the temperature level qualities were certainly unchanged.

And then a light bulb flashed on in my head. You see, prior to 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 draws 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, because the remainder of the computer system did not need any cooling. Looking into the BIOS, I found 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 greater setting did wonders for the temperature. It likewise made more sound.

I'll hesitantly confess that the third video card was valuable 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 used the Akasa to power the GPU fans from a 4-pin Molex. It has the nice feature that it can power 2 fans with 12V and 2 with 5V. The latter certainly minimizes the speed and hence the cooling power of the fan. But it also lowers sound. Fiddling a bit with this and the case fan setting, I discovered an appropriate tradeoff in 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 gathered these numbers by running ollama with the-- verbose flag and asking it five times to write a story and averaging the result:

Performancewise, ollama is set up with:

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

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

Power consumption

Over the days I kept an eye 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 model on the card improves latency, but consumes more power. My current setup is to have 2 designs loaded, one for coding, the other for generic text processing, and keep them on the GPU for up to an hour after last usage.

After all that, am I pleased that I began this project? Yes, I think I am.

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

It was a great choice to start with the workstation I already owned, and see how far I could feature that. If I had actually started with a new device from scratch, it certainly would have cost me more. It would have taken me much longer too, as there would have been much more alternatives to choose from. I would likewise have been extremely lured to follow the hype and purchase the newest and biggest of everything. New and shiny toys are enjoyable. But if I purchase something new, I want it to last for years. Confidently anticipating where AI will go in 5 years time is difficult right now, so having a more affordable device, that will last at least some while, feels satisfying to me.

I want you best of luck on your own AI journey. I'll report back if I find something new or intriguing.

Assignee
Assign to
Time tracking