Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C chiburdlazgarden
  • 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
  • Genie Sams
  • chiburdlazgarden
  • Issues
  • #1

Closed
Open
Created Feb 15, 2025 by Genie Sams@geniesams01035Maintainer

How is that For Flexibility?


As everyone is aware, the world is still going nuts attempting to establish more, more recent and much better AI tools. Mainly by tossing unreasonable amounts of cash at the issue. Many of those billions go towards constructing cheap or free services that operate at a substantial loss. The tech giants that run them all are wishing to attract as many users as possible, so that they can catch the market, and end up being the dominant or only party that can provide them. It is the traditional Silicon Valley playbook. Once supremacy is reached, expect the enshittification to begin.

A most likely way to make back all that money for developing these LLMs will be by tweaking their outputs to the liking of whoever pays one of 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 motivated, however ad-funded services won't precisely be enjoyable either. In the future, I completely anticipate to be able to have a frank and honest discussion about the Tiananmen occasions with an American AI representative, however 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 terrible events with a happy "Ho ho ho ... Didn't you know? The vacations are coming!"

Or perhaps that is too far-fetched. Right now, dispite all that money, the most popular service for code conclusion still has trouble working with a number of simple words, regardless of them being present in every dictionary. There should be a bug in the "totally free speech", or something.

But there is hope. Among the tricks of an approaching gamer to shake up the market, is to undercut the incumbents by releasing their design totally free, under a permissive license. This is what DeepSeek just made with their DeepSeek-R1. Google did it earlier with the Gemma designs, as did Meta with Llama. We can download these designs 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 designs and run those on our own hardware. And then we can finally have some really helpful LLMs.

That hardware can be an obstacle, though. There are 2 alternatives to pick from if you wish to run an LLM locally. You can get a big, powerful video card from Nvidia, or you can buy an Apple. Either is costly. 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, typical RAM in the case of Apples. Bigger is better here. More RAM means larger designs, which will considerably enhance the quality of the output. Personally, I 'd say one requires a minimum of 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 buying, 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 quantity of money to spare? You purchase pre-owned! This is a practical alternative, however as always, there is no such thing as a complimentary lunch. Memory may be the main issue, but do not underestimate the significance of memory bandwidth and other specifications. Older devices will have lower efficiency on those aspects. But let's not fret too much about that now. I am interested in building something that a minimum of can run the LLMs in a functional way. Sure, the newest Nvidia card may do it faster, but the point is to be able to do it at all. Powerful online models can be nice, however one need to at the really least have the alternative to switch to a local one, if the circumstance requires it.

Below is my effort to construct 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 example, it was not strictly needed to purchase a brand new dummy GPU (see listed below), or I might have found somebody that would 3D print the cooling fan shroud for me, instead of shipping a ready-made one from a distant nation. I'll confess, I got a bit restless at the end when I discovered I needed to buy yet another part to make this work. For me, this was an acceptable tradeoff.

Hardware

This is the full cost 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 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 choice since I currently owned it. This was the starting point. About 2 years ago, I wanted a computer that might function 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 lot of memory, that should work for hosting VMs. I bought it pre-owned and after that switched the 512GB hard disk for a 6TB one to store those virtual machines. 6TB is not needed for running LLMs, and for that reason I did not include it in the breakdown. But if you prepare to collect many designs, 512GB may not suffice.

I have pertained to like this workstation. It feels all very solid, and I have not 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 encountered some troubles when switching elements.

2 x NVIDIA Tesla P40

This is the magic active ingredient. GPUs are expensive. But, as with the HP Z440, typically one can find older devices, that utilized to be top of the line and is still really capable, surgiteams.com pre-owned, for fairly little cash. These Teslas were suggested 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 two. 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 typical workstation, however in servers the cooling is handled in a different way. Beefy GPUs take in a lot of power and can run very hot. That is the reason consumer GPUs always come equipped with huge fans. The cards need to take care of their own cooling. The Teslas, however, have no fans whatsoever. They get simply as hot, however anticipate the server to supply a consistent flow of air to cool them. The enclosure of the card is somewhat formed like a pipeline, and you have 2 choices: blow in air from one side or blow it in from the other side. How is that for flexibility? You absolutely need to blow some air into it, though, or you will harm it as quickly as you put it to work.

The service is basic: just mount a fan on one end of the pipe. And certainly, it appears an entire home market has grown of people that offer 3D-printed shrouds that hold a standard 60mm fan in just the ideal place. The problem is, the cards themselves are already quite bulky, and it is not simple to find a setup that fits 2 cards and two fan mounts in the computer system case. The seller who offered me my 2 Teslas was kind adequate to consist of 2 fans with shrouds, but there was no way I might fit all of those into the case. So what do we do? We purchase more parts.

NZXT C850 Gold

This is where things got frustrating. 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 due to the fact that it did not have the best ports to power the Teslas. Using this helpful website, I deduced that 850 Watt would suffice, and I purchased the NZXT C850. It is a modular PSU, indicating that you only require to plug in the cable televisions that you really require. It featured a neat bag to keep the spare cable televisions. One day, I might give 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 switch the PSU. It does not fit physically, and they likewise altered the main board and CPU connectors. All PSU's I have actually ever seen in my life are rectangle-shaped 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 factor at all. This is simply to tinker you.

The mounting was eventually fixed by utilizing two random holes in the grill that I somehow managed 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 individuals resorted to double-sided tape.

The port required ... another purchase.

Not cool HP.

Gainward GT 1030

There is another concern with utilizing server GPUs in this customer workstation. The Teslas are planned to crunch numbers, not to play computer game with. Consequently, they don't 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 chance to output a video signal. This computer will run headless, but we have no other option. We have to get a 3rd video card, that we don't to intent to use 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 need to 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 buy any x8 card, though, because frequently even when a GPU is promoted as x8, the real connector on it may be just as broad as an x16. Electronically it is an x8, physically it is an x16. That won't deal with this main board, we really require the small adapter.

Nvidia Tesla Cooling Fan Kit

As said, the obstacle is to find a fan shroud that suits the case. After some browsing, I discovered this kit on Ebay a purchased two of them. They came delivered total with a 40mm fan, and all of it fits completely.

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

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

In Homeassistant I included a chart to the control panel that displays the values with time:

As one can see, the fans were noisy, however not particularly effective. 90 degrees is far too hot. I browsed the internet for an affordable upper limitation but could not find anything specific. The documents on the Nvidia site discusses a temperature of 47 degrees Celsius. But, what they mean by that is the temperature level of the ambient air surrounding the GPU, not the measured value on the chip. You understand, the number that really is reported. Thanks, Nvidia. That was handy.

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

My first effort to remedy the circumstance 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 expense of only 15% of the performance. I tried it and ... did not discover any difference at all. I wasn't sure about the drop in efficiency, having just a number of minutes of experience with this setup at that point, however the temperature level qualities were certainly the same.

And after that a light bulb flashed on in my head. You see, right before the GPU fans, there is a fan in the HP Z440 case. In the photo above, it remains in the right 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, akropolistravel.com because the remainder of the computer did not require any cooling. Looking into the BIOS, I discovered a setting for the minimum of the case fans. It varied from 0 to 6 stars and was presently set to 0. Putting it at a higher setting did marvels for the temperature. It likewise made more noise.

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

MODDIY Main Power Adaptor Cable and Akasa Multifan Adaptor

Fortunately, in some cases things just 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 used the Akasa to power the GPU fans from a 4-pin Molex. It has the good 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 decreases noise. Fiddling a bit with this and the case fan setting, I discovered an appropriate tradeoff in between noise and temperature. For now at least. Maybe I will need 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 5 times to compose a story and balancing the outcome:

Performancewise, ollama is set up with:

All models have the default quantization that ollama will pull for ratemywifey.com 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 loving alliteration.

Power usage

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 present setup is to have two designs filled, one for coding, the other for generic text processing, and keep them on the GPU for approximately an hour after last usage.

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

I spent a bit more cash than planned, however I got what I desired: a way of locally running medium-sized models, totally under my own control.

It was a great option to begin with the workstation I already owned, setiathome.berkeley.edu and see how far I might come with that. If I had actually begun 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 numerous more choices to select from. I would also have been extremely tempted to follow the buzz and purchase the most recent and biggest of whatever. New and shiny toys are fun. But if I purchase something new, I want it to last for many years. Confidently predicting where AI will enter 5 years time is impossible today, so having a more affordable maker, that will last a minimum of some while, feels satisfying to me.

I want you good luck by yourself AI journey. I'll report back if I discover something new or interesting.

Assignee
Assign to
Time tracking