Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • H h-2meta
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 43
    • Issues 43
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nannette Odriscoll
  • h-2meta
  • Issues
  • #22

Closed
Open
Created Feb 11, 2025 by Nannette Odriscoll@nannetteodriscMaintainer

How is that For Flexibility?


As everybody is well conscious, the world is still going nuts trying to establish more, more recent and better AI tools. Mainly by throwing unreasonable amounts of cash at the issue. A lot of those billions go towards constructing low-cost or totally free services that run at a considerable loss. The tech giants that run them all are wanting to draw in as lots of users as possible, videochatforum.ro so that they can catch the market, and classihub.in become the dominant or only celebration that can use them. It is the classic Silicon Valley playbook. Once supremacy is reached, expect 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 preference of whoever pays the a lot of. 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 inspired, but ad-funded services won't exactly be enjoyable either. In the future, I fully expect to be able to have a frank and truthful discussion about the Tiananmen events with an American AI representative, but the just one I can pay for will have assumed the persona of Father Christmas who, while holding a can of Coca-Cola, will sprinkle the stating of the awful events with a cheerful "Ho ho ho ... Didn't you know? The vacations are coming!"

Or possibly that is too far-fetched. Today, dispite all that cash, the most popular service for code completion still has difficulty dealing with a number of easy words, in spite of them being present in every dictionary. There should be a bug in the "complimentary speech", or something.

But there is hope. Among the tricks of an approaching gamer to shake up the marketplace, is to damage the incumbents by launching their model free of charge, under a permissive license. This is what DeepSeek just made with their DeepSeek-R1. Google did it previously with the Gemma models, as did Meta with Llama. We can download these models ourselves and run them on our own hardware. Better yet, individuals can take these models and scrub the biases from them. And we can download those scrubbed models and run those on our own hardware. And after that we can finally have some genuinely useful LLMs.

That hardware can be a difficulty, though. There are two alternatives to select from if you desire to run an LLM in your area. You can get a big, effective video card from Nvidia, or you can purchase an Apple. Either is costly. The main spec that shows how well an LLM will perform is the amount of memory available. VRAM in the case of GPU's, in the case of Apples. Bigger is much better here. More RAM implies larger designs, which will significantly enhance the quality of the output. Personally, I 'd state one needs a minimum of over 24GB to be able to run anything helpful. That will fit a 32 billion criterion design with a little headroom to spare. Building, or buying, a workstation that is geared up to deal with that can quickly cost thousands of euros.

So what to do, if you do not have that quantity of cash to spare? You buy second-hand! This is a viable choice, but as constantly, there is no such thing as a complimentary lunch. Memory may be the main concern, however do not underestimate the importance of memory bandwidth and other specifications. Older devices will have lower performance on those aspects. But let's not worry excessive about that now. I have an interest in constructing something that a minimum of can run the LLMs in a functional method. Sure, the most current Nvidia card might do it faster, but the point is to be able to do it at all. Powerful online designs can be nice, however one should at the minimum have the choice to change to a regional one, if the scenario calls for it.

Below is my effort to build such a capable AI computer without investing too much. I ended up with a workstation with 48GB of VRAM that cost me around 1700 euros. I could have done it for less. For example, it was not strictly needed to purchase a brand brand-new dummy GPU (see below), or I might have discovered somebody that would 3D print the cooling fan shroud for me, rather of delivering a ready-made one from a far country. I'll confess, I got a bit impatient at the end when I discovered I had to purchase yet another part to make this work. For me, this was an acceptable tradeoff.

Hardware

This is the complete expense breakdown:

And this is what it appeared like when it initially booted with all the parts installed:

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 an easy pick due to the fact that I currently owned it. This was the starting 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 great deal of memory, that should work for hosting VMs. I bought it secondhand and then swapped the 512GB hard disk for a 6TB one to store those virtual machines. 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 lots of designs, 512GB might not be enough.

I have pertained to like this workstation. It feels all really solid, and I haven't had any problems with it. At least, up until I started this task. It ends up that HP does not like competitors, and I experienced some troubles when swapping parts.

2 x NVIDIA Tesla P40

This is the magic active ingredient. GPUs are pricey. But, as with the HP Z440, typically one can discover older equipment, that utilized to be top of the line and is still extremely capable, pre-owned, for fairly little cash. These Teslas were implied 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 2 of those, so we buy two. Now we have 48GB of VRAM. Double good.

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 handled in a different way. Beefy GPUs take in a great deal of power and can run extremely hot. That is the factor consumer GPUs always come equipped with huge fans. The cards require to look after their own cooling. The Teslas, nevertheless, have no fans whatsoever. They get simply as hot, but expect the server to supply a stable flow of air to cool them. The enclosure of the card is rather shaped like a pipeline, and you have two alternatives: blow in air from one side or blow it in from the other side. How is that for flexibility? You absolutely must blow some air into it, though, or you will harm it as quickly as you put it to work.

The solution is basic: just install a fan on one end of the pipeline. And certainly, it appears an entire home industry has grown of people that sell 3D-printed shrouds that hold a standard 60mm fan in just the best place. The problem is, the cards themselves are currently rather bulky, and it is difficult to discover a setup that fits 2 cards and 2 fan installs in the computer case. The seller who sold me my two Teslas was kind adequate to consist of 2 fans with shrouds, but there was no other way I might fit all of those into the case. So what do we do? We buy 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, hb9lc.org and I needed to buy a new PSU anyhow due to the fact that it did not have the best ports to power the Teslas. Using this convenient website, I deduced that 850 Watt would be adequate, and I bought the NZXT C850. It is a modular PSU, indicating that you only require to plug in the cable televisions that you actually require. It featured a neat bag to store the spare cables. One day, I might provide it an excellent cleaning and utilize 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 likewise altered the main board and CPU ports. All PSU's I have ever seen in my life are rectangle-shaped boxes. The HP PSU also is a rectangular box, however 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 resolved by utilizing 2 random holes in the grill that I in some way 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 people resorted to double-sided tape.

The port required ... another purchase.

Not cool HP.

Gainward GT 1030

There is another issue with utilizing 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 link 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 option. We need to get a third video card, that we do not to intent to use ever, simply to keep the BIOS happy.

This can be the most scrappy card that you can find, obviously, but there is a requirement: we should 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 mean. One can not buy any x8 card, though, because often even when a GPU is advertised as x8, the actual adapter on it might be simply as wide 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 small port.

Nvidia Tesla Cooling Fan Kit

As said, the challenge 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 delivered complete with a 40mm fan, and wiki.asexuality.org it all fits perfectly.

Be alerted that they make a horrible great deal of sound. You do not wish to keep a computer system 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 worths with time:

As one can see, the fans were noisy, however not especially efficient. 90 degrees is far too hot. I searched the internet for an affordable ceiling but might not discover anything specific. The documentation on the Nvidia website discusses a temperature of 47 degrees Celsius. But, what they imply 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 handy.

After some additional searching and checking out the opinions of my fellow internet people, my guess is that things will be fine, offered that we keep it in the lower 70s. But don't estimate me on that.

My first attempt to fix the circumstance was by setting a maximum to the power intake of the GPUs. According to this Reddit thread, one can decrease the power intake of the cards by 45% at the cost of just 15% of the efficiency. I tried it and ... did not notice any difference at all. I wasn't sure about the drop in performance, having just a couple of minutes of experience with this configuration at that point, however the temperature level attributes were certainly the same.

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 image above, it remains in the ideal corner, inside the black box. This is a fan that sucks air into the case, mariskamast.net 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 system 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 greater setting did wonders for the temperature. It likewise made more sound.

I'll unwillingly confess that the 3rd video card was helpful 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 television 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 function that it can power 2 fans with 12V and 2 with 5V. The latter certainly decreases the speed and thus the cooling power of the fan. But it also lowers sound. Fiddling a bit with this and the case fan setting, I found an appropriate tradeoff in between noise and temperature. For now 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 5 times to write a story and balancing the outcome:

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 essential 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 usage

Over the days I watched 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, but consumes more power. My current setup is to have actually two models 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 pleased that I began this task? Yes, I think I am.

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

It was a great choice to begin with the workstation I already owned, and see how far I might come with that. If I had begun with a brand-new machine from scratch, it certainly would have cost me more. It would have taken me much longer too, as there would have been a lot more alternatives to pick from. I would likewise have been extremely lured to follow the buzz and buy the most current and greatest of whatever. New and shiny toys are fun. But if I buy something new, I desire it to last for many years. Confidently predicting where AI will enter 5 years time is impossible right now, hb9lc.org so having a cheaper machine, that will last at least some while, feels satisfactory to me.

I want you excellent luck on your own AI journey. I'll report back if I discover something new or interesting.

Assignee
Assign to
Time tracking