Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R recruit-vet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 55
    • Issues 55
    • 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
  • Alda Pastor
  • recruit-vet
  • Issues
  • #14

Closed
Open
Created Feb 10, 2025 by Alda Pastor@aldapastor2596Maintainer

How is that For Flexibility?


As everyone is well aware, the world is still going nuts attempting to establish more, newer and better AI tools. Mainly by tossing absurd quantities of cash at the issue. Many of those billions go towards constructing cheap or free services that run at a considerable 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 just celebration that can use them. It is the traditional Silicon Valley playbook. Once dominance is reached, anticipate the enshittification to start.

A most likely method to earn back all that cash 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 looks like is the rejection of DeepSeek's R1 to discuss what occurred at Tiananmen Square in 1989. That a person is certainly politically inspired, but ad-funded services will not exactly be fun either. In the future, I totally anticipate to be able to have a frank and honest discussion about the Tiananmen occasions with an American AI agent, but the just one I can afford will have presumed the personality of Father Christmas who, while holding a can of Coca-Cola, will sprinkle the recounting of the tragic events with a cheerful "Ho ho ho ... Didn't you know? The holidays 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 couple of simple words, in spite of them being present in every dictionary. There should be a bug in the "free speech", or something.

But there is hope. Among the tricks of an upcoming player to shake up the market, is to damage the incumbents by launching their model totally free, under a liberal license. This is what DeepSeek just did with their DeepSeek-R1. Google did it earlier 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 designs and scrub the biases from them. And we can download those scrubbed designs and run those on our own hardware. And after that we can lastly have some genuinely useful LLMs.

That hardware can be an obstacle, however. There are 2 alternatives to pick from if you wish to run an LLM in your area. You can get a huge, powerful video card from Nvidia, or you can buy an Apple. Either is expensive. The main spec that shows how well an LLM will carry out is the amount of memory available. VRAM when it comes to GPU's, typical RAM in the case of Apples. Bigger is better here. More RAM implies larger models, which will drastically 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 specification model with a little headroom to spare. Building, or buying, a workstation that is geared up 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 purchase second-hand! This is a practical choice, however as always, there is no such thing as a free lunch. Memory might be the main issue, however do not underestimate the importance of memory bandwidth and other specifications. Older equipment will have lower efficiency on those elements. 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 method. Sure, the current Nvidia card may do it faster, however the point is to be able to do it at all. Powerful online models can be good, however one ought to at the very least have the alternative to switch to a local one, if the circumstance requires it.

Below is my attempt to build such a capable AI computer system without spending 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 instance, it was not strictly needed to purchase a brand name brand-new dummy GPU (see listed below), or I might have discovered somebody that would 3D print the cooling fan shroud for me, rather of shipping a ready-made one from a faraway nation. I'll confess, I got a bit restless at the end when I discovered out I had to purchase 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 set up:

I'll provide some context on the parts 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 an easy choice because I currently owned it. This was the starting point. About 2 years back, I wanted a computer system that might function as a host for my virtual makers. The Z440 has a Xeon processor with 12 cores, and pipewiki.org this one sports 128GB of RAM. Many threads and a great deal of memory, that ought to work for hosting VMs. I purchased it secondhand and then swapped the 512GB tough drive for a 6TB one to save 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 lots of designs, 512GB may not suffice.

I have pertained to like this workstation. It feels all extremely strong, and I haven't had any problems with it. At least, until I started this job. It ends up that HP does not like competition, and I came across some difficulties when switching parts.

2 x NVIDIA Tesla P40

This is the magic component. GPUs are expensive. But, as with the HP Z440, typically one can find older devices, that used to be top of the line and is still really capable, second-hand, for fairly little money. These Teslas were meant 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 two of those, so we purchase two. 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 normal workstation, however in servers the cooling is managed in a different way. Beefy GPUs take in a lot of power and can run extremely hot. That is the reason consumer GPUs constantly 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 supply a consistent circulation of air to cool them. The enclosure of the card is rather shaped like a pipeline, and you have 2 options: blow in air from one side or blow it in from the opposite. How is that for flexibility? You definitely need to blow some air into it, however, or you will harm it as soon as you put it to work.

The service is simple: simply install a fan on one end of the pipeline. And certainly, it appears an entire home market has actually grown of people that sell 3D-printed shrouds that hold a basic 60mm fan in simply the best place. The problem is, the cards themselves are already rather large, and it is challenging to find a configuration 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 include two fans with shrouds, but there was no other way I could 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 sufficed. But I wasn't sure, opentx.cz and disgaeawiki.info I needed to purchase a brand-new PSU anyway since it did not have the right ports to power the Teslas. Using this handy site, I deduced that 850 Watt would suffice, and I bought the NZXT C850. It is a modular PSU, meaning that you only require to plug in the cable televisions that you really require. It came with a neat bag to store the spare cables. One day, I may give it an excellent cleansing and utilize it as a toiletry bag.

Unfortunately, HP does not like things that are not HP, so they made it hard 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 likewise is a rectangular box, but with a cutout, making certain that none of the regular PSUs will fit. For no technical reason at all. This is simply to mess with you.

The installing was eventually solved by utilizing 2 random holes in the grill that I somehow managed to line up with the screw holes on the NZXT. It sort of hangs steady now, and I feel fortunate that this worked. I have actually seen Youtube videos where people turned to double-sided tape.

The adapter needed ... another purchase.

Not cool HP.

Gainward GT 1030

There is another concern with utilizing server GPUs in this consumer workstation. The Teslas are planned to crunch numbers, not to play video games with. Consequently, they do not have any ports to link a display to. The BIOS of the HP Z440 does not like this. It refuses to boot if there is no chance to output a video signal. This computer will run headless, however we have no other choice. We have to get a third video card, that we do not to intent to utilize 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 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 website for some background on what those names suggest. One can not purchase any x8 card, though, because often even when a GPU is marketed as x8, the real connector on it might be just as wide 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 adapter.

Nvidia Tesla Cooling Fan Kit

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

Be cautioned that they make a terrible great deal of noise. You do not desire to keep a computer system with these fans under your desk.

To keep an eye on the temperature, I worked up this fast 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 added a chart to the control panel that displays the values in time:

As one can see, the fans were loud, however not especially effective. 90 degrees is far too hot. I browsed the internet for an affordable ceiling but could not find anything particular. The documentation on the Nvidia website points out a temperature level of 47 degrees Celsius. But, what they suggest 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 in fact is reported. Thanks, Nvidia. That was valuable.

After some more browsing and checking out the opinions of my fellow web residents, my guess is that things will be great, offered that we keep it in the lower 70s. But don't quote me on that.

My first effort to remedy the situation was by setting an optimum to the power intake of the GPUs. According to this Reddit thread, one can lower the power consumption of the cards by 45% at the cost of just 15% of the performance. I tried it and ... did not see any difference at all. I wasn't sure about the drop in performance, having only a couple of minutes of experience with this configuration at that point, however the temperature 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 draws air into the case, and I figured this would 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 did not require any cooling. Looking into the BIOS, I discovered 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 level. It also made more sound.

I'll hesitantly confess that the third video card was practical when adjusting the BIOS setting.

MODDIY Main Power Adaptor Cable and Akasa Multifan Adaptor

Fortunately, sometimes things just work. These 2 items were plug and play. The MODDIY adaptor cable television connected 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 feature that it can power two fans with 12V and two with 5V. The latter certainly minimizes the speed and thus the cooling power of the fan. But it likewise minimizes sound. Fiddling a bit with this and the case fan setting, I found an appropriate tradeoff in between noise and temperature. For now a minimum of. Maybe I will require to revisit this in the summer season.

Some numbers

Inference speed. I collected these numbers by running ollama with the-- verbose flag and asking it five times to compose a story and balancing the outcome:

Performancewise, ollama is configured with:

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

Another crucial finding: Terry is by far the most popular name for a tortoise, followed by Turbo and Toby. Harry is a favorite for trademarketclassifieds.com 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, however takes in more power. My existing setup is to have 2 models packed, one for coding, the other for generic text processing, and keep them on the GPU for forum.altaycoins.com up to an hour after last usage.

After all that, am I delighted that I started this project? Yes, I believe I am.

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

It was an excellent option to start with the workstation I currently owned, 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 a lot longer too, as there would have been much more choices to select from. I would also have been extremely lured to follow the hype and purchase the current and biggest of whatever. New and glossy toys are fun. But if I purchase something brand-new, I desire it to last for many years. Confidently anticipating where AI will enter 5 years time is difficult today, kenpoguy.com so having a less expensive device, that will last at least some while, feels acceptable to me.

I wish you all the best on your own AI journey. I'll report back if I discover something brand-new or interesting.

Assignee
Assign to
Time tracking