Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • U unicoc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 126
    • Issues 126
    • 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
  • Adell Collier
  • unicoc
  • Issues
  • #113

Closed
Open
Created Feb 21, 2025 by Adell Collier@adell628893828Maintainer

How is that For Flexibility?


As everybody is aware, the world is still going nuts trying to develop more, newer and better AI tools. Mainly by throwing unreasonable quantities of cash at the issue. A number of those billions go towards building inexpensive or totally free services that operate at a significant loss. The tech giants that run them all are intending to attract as numerous users as possible, so that they can catch the market, and end up being the dominant or just celebration that can provide them. It is the timeless Silicon Valley playbook. Once supremacy is reached, anticipate the enshittification to start.

A likely method to earn back all that money for establishing 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 refusal of DeepSeek's R1 to discuss what occurred at Tiananmen Square in 1989. That one is certainly politically motivated, but ad-funded services won't precisely be enjoyable either. In the future, I completely expect to be able to have a frank and sincere discussion about the Tiananmen events with an American AI agent, 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 stating of the terrible events with a cheerful "Ho ho ho ... Didn't you understand? The vacations are coming!"

Or maybe that is too improbable. Right now, dispite all that cash, the most popular service for code conclusion still has difficulty working with a number of easy words, regardless of them being present in every dictionary. There should be a bug in the "complimentary speech", or something.

But there is hope. One of the techniques of an upcoming player to shock the market, is to undercut the incumbents by launching their model for free, under a liberal 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. Even better, people can take these models and scrub the predispositions from them. And we can download those scrubbed models and run those on our own hardware. And then we can finally have some truly beneficial LLMs.

That hardware can be a difficulty, however. There are two choices to pick from if you wish to run an LLM in your area. You can get a huge, effective video card from Nvidia, or you can buy an Apple. Either is expensive. The main specification that suggests how well an LLM will perform is the amount of memory available. VRAM when it comes to GPU's, normal RAM in the case of Apples. Bigger is much better here. More RAM means bigger designs, which will significantly improve the quality of the output. Personally, I 'd state one needs at least 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 purchasing, a workstation that is equipped to manage that can easily cost thousands of euros.

So what to do, if you don't have that amount of money to spare? You buy second-hand! This is a practical alternative, but as always, there is no such thing as a totally free lunch. Memory might be the main issue, however don't ignore the value of memory bandwidth and other specs. Older equipment will have lower performance on those elements. But let's not worry 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 most recent Nvidia card might do it much faster, but the point is to be able to do it at all. Powerful online models can be great, but one should at the really least have the choice to change to a regional one, if the situation requires it.

Below is my effort to build such a capable AI computer without investing 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 name new dummy GPU (see listed below), demo.qkseo.in or I could have discovered somebody that would 3D print the cooling fan shroud for me, instead of delivering a ready-made one from a faraway country. I'll admit, I got a bit restless at the end when I discovered out I had to buy yet another part to make this work. For me, this was an appropriate tradeoff.

Hardware

This is the full expense breakdown:

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

I'll offer some context on the parts listed below, and after that, I'll run a couple of fast tests to get some numbers on the efficiency.

HP Z440 Workstation

The Z440 was an easy choice since I currently owned it. This was the beginning point. About two years earlier, I wanted a computer system that might serve 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 must work for hosting VMs. I bought it secondhand and after that swapped the 512GB disk drive for a 6TB one to keep those virtual makers. 6TB is not needed for running LLMs, and therefore I did not include it in the breakdown. But if you plan to collect numerous designs, 512GB might not be enough.

I have actually pertained to like this workstation. It feels all really solid, and I have not had any problems with it. At least, until I started this project. It ends up that HP does not like competition, forum.batman.gainedge.org and I experienced some problems when switching components.

2 x NVIDIA Tesla P40

This is the magic component. GPUs are pricey. But, as with the HP Z440, typically one can discover older devices, that utilized to be top 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 buy 2. Now we have 48GB of VRAM. Double great.

The catch is the part about that they were implied for servers. They will work fine in the PCIe slots of a normal workstation, but in servers the cooling is handled differently. Beefy GPUs consume a lot of power and can run very hot. That is the reason consumer GPUs always come equipped with big fans. The cards need to take care of their own cooling. The Teslas, nevertheless, have no fans whatsoever. They get just as hot, however expect the server to provide a steady circulation of air to cool them. The enclosure of the card is somewhat 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 definitely must blow some air into it, though, or you will damage it as quickly as you put it to work.

The solution is easy: just install a fan on one end of the pipeline. And certainly, it appears an entire home industry has grown of individuals that sell 3D-printed shrouds that hold a standard 60mm fan in simply the right place. The problem is, the cards themselves are currently rather large, and it is challenging to discover a configuration that fits two cards and two fan installs in the computer case. The seller who sold me my 2 Teslas was kind enough to consist of two fans with shrouds, however there was no method 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 due to the fact that it did not have the right adapters to power the Teslas. Using this helpful site, I deduced that 850 Watt would be sufficient, and I purchased the NZXT C850. It is a modular PSU, indicating that you just require to plug in the cable televisions that you in fact need. It came with a cool bag to save the spare cable televisions. 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 tough to swap the PSU. It does not fit physically, and they also changed the main board and CPU connectors. All PSU's I have ever seen in my life are rectangle-shaped boxes. The HP PSU likewise is a rectangular box, but with a cutout, making certain that none of the typical PSUs will fit. For no technical reason at all. This is just to tinker you.

The mounting was eventually solved by utilizing two random holes in the grill that I somehow handled to align with the screw holes on the NZXT. It sort of hangs steady now, and I feel lucky that this worked. I have actually seen Youtube videos where individuals turned to double-sided tape.

The port required ... another purchase.

Not cool HP.

Gainward GT 1030

There is another concern with using server GPUs in this customer workstation. The Teslas are planned to crunch numbers, not to play computer game with. Consequently, they do not have any ports to connect a screen to. The BIOS of the HP Z440 does not like this. It declines to boot if there is no other way to output a video signal. This computer will run headless, but we have no other option. We have to get a third video card, that we don't to intent to use ever, just to keep the BIOS delighted.

This can be the most scrappy card that you can find, naturally, however there is a requirement: king-wifi.win 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, however, because typically even when a GPU is advertised as x8, the real port on it may be simply as wide as an x16. Electronically it is an x8, physically it is an x16. That will not deal with this main board, we truly need the small adapter.

Nvidia Tesla Cooling Fan Kit

As said, the challenge is to discover a fan shroud that fits in 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 it all fits perfectly.

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

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

In Homeassistant I added a chart to the control panel that displays the worths in time:

As one can see, the fans were loud, but not particularly efficient. 90 degrees is far too hot. I browsed the internet for a reasonable upper limit but might not discover anything specific. The paperwork on the Nvidia site 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 know, the number that really is reported. Thanks, Nvidia. That was helpful.

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

My first attempt to correct the situation was by setting an optimum 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 efficiency. I tried it and ... did not notice any difference at all. I wasn't sure about the drop in performance, having only a couple of minutes of experience with this setup at that point, however the temperature level characteristics were certainly the same.

And after that a light bulb flashed on in my head. You see, simply before the GPU fans, there is a fan in the HP Z440 case. In the image above, it remains in the best corner, inside the black box. This is a fan that sucks 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 found a setting for the minimum idle speed 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 reluctantly confess that the third was practical when adjusting the BIOS setting.

MODDIY Main Power Adaptor Cable and Akasa Multifan Adaptor

Fortunately, sometimes things just work. These two products were plug and play. The MODDIY adaptor cable television connected 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 great 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 reduces noise. Fiddling a bit with this and the case fan setting, I discovered an appropriate tradeoff in between noise and temperature level. For now at least. Maybe I will require to review this in the summer season.

Some numbers

Inference speed. I collected 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 configured with:

All models have the default quantization that ollama will pull for you if you don't define anything.

Another important 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 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, king-wifi.win there is another tradeoff to be made. Keeping the design on the card enhances latency, but consumes more power. My existing setup is to have actually two designs packed, one for coding, the other for generic text processing, and keep them on the GPU for as much as an hour after last use.

After all that, am I pleased that I started this task? Yes, I think I am.

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

It was a great option to begin with the workstation I already owned, and see how far I might come with that. If I had started with a 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 choose from. I would likewise have been extremely tempted to follow the hype and purchase the most current and asteroidsathome.net greatest of whatever. New and shiny toys are fun. But if I purchase something new, I desire it to last for several years. Confidently forecasting where AI will enter 5 years time is impossible right now, so having a more affordable machine, that will last a minimum of some while, feels satisfactory to me.

I wish you best of luck on your own AI journey. I'll report back if I discover something new or interesting.

Assignee
Assign to
Time tracking