XMasterrrr
a year ago
Hey guys, this is something I have been intending to share here for a while. This setup took me some time to plan and put together, and then some more time to explore the software part of things and the possibilities that came with it.
Part of the main reason I built this was data privacy, I do not want to hand over my private data to any company to further train their closed weight models; and given the recent drop in output quality on different platforms (ChatGPT, Claude, etc), I don't regret spending the money on this setup.
I was also able to do a lot of cool things using this server by leveraging tensor parallelism and batch inference, generating synthetic data, and experimenting with finetuning models using my private data. I am currently building a model from scratch, mainly as a learning project, but I am also finding some cool things while doing so and if I can get around ironing out the kinks, I might release it and write a tutorial from my notes.
So I finally had the time this weekend to get my blog up and running, and I am planning on following up this blog post with a series of posts on my learnings and findings. I am also open to topics and ideas to experiment with on this server and write about, so feel free to shoot your shot if you have ideas you want to experiment with and don't have the hardware, I am more than willing to do that on your behalf and sharing the findings
Please let me know if you have any questions, my PMs are open, and you can also reach me on any of the socials I have posted on my website.
mattnewton
a year ago
The main thing stopping me from going beyond 2x 4090’s in my home lab is power. Anything around ~2k watts on a single circuit breaker is likely to flip it, and that’s before you get to the costs involved of drawing that much power for multiple days of a training run. How did you navigate that in a (presumably) residential setting?
J_Shelby_J
a year ago
I’m running two 3090s on a 700w psu. You definitely can get more than that out of 2000w bus.
I wrote a blog on reducing the power limits of nvidia gpus. Definitely try it out. https://shelbyjenkins.github.io/blog/power-limit-nvidia-linu...
XMasterrrr
a year ago
Hey man, I think I came across your blog at some point before while trying to figure out my own power plan for this beast (check my comment to OP for more context), so kudos to you for that.
I would say that power limiting is a potential work around, and it should work perfectly fine for inference, but when it comes to trainning you will want to squeeze every ounce of power. So, depends on your goal.
What CPU/Mobo/Storage are you running with those two 3090s for a 700w to work? I am gonna say, if at any point you're pushing more than 500w out of that PSU, you might be risking the 80% safety rule. I would have at least used a 850w just to be safe with two 3090s + rest of hardware.
smcnally
a year ago
Thank you for this post. I’d read it in ~June and it helped quite a bit with manual ‘nvidia-smi’ runs. I just recently created the systemd service description and am still delving related power and performance possibilities.
tcdent
a year ago
I can't believe a group of engineers are so afraid of residential power.
It is not expensive, nor is it highly technical. It's not like we're factoring in latency and crosstalk...
Read a quick howto, cruise into Home Depot and grab some legos off the shelf. Far easier to figure out than executing "hello world" without domain expertise.
gizmo686
a year ago
A good engineer knows the difference between safe and dangerous. Setting up an AI computer is safe. Maybe you trip a circut. Maybe you interfere with something else running on your hobby computer. But nothing bad can really happen.
Residential electrical is dangerous. Maybe you electrocute yourself. Maybe you cause a fire 5 years down the line. Maybe you cause a fire for the next owner because you didn't know to protect the wire with a metal plate so they drill into it.
Having said that, 2 4090s will run you aroud $5,000, not counting any of the surrounding system. At that cost point, hireing an electritian would not be that big of an expense relativly speaking.
Also, if you are at the point where you need to add a circut for power, you might need to seriously consider cooling, which could potentially be another side quest.
XMasterrrr
a year ago
I agree with you on all of that. I went down the rabbit hole to understand what's up, but I also hired someone and told them exactly what I wanted: breakers amps and volts, outlets type, surge protector over the entire breaker box up to 120k, etc (I am going to be writing about power and electricity in part 3 of this blogpost series). Electricity was on top of the things I was not going to cheap out on because the risk vs reward made no sense to me.
Re: cooling; I have an AC vent directed on the setup, plus planned out in-out in the most optimal way possible to maximize cooling. I have installed like 20 more fans since taking these pictures :D
vunderba
a year ago
Just a slight clarification, an RTX 4090 card currently runs about $1700 USD at least in the states, so it's more like $3500 pre-tax.
XMasterrrr
a year ago
A year ago it was a struggle to get one for anything below $2100 pre-tex. Glad it came down a bit.
tjoff
a year ago
Add to that is that it is likely illegal to do yourself. Which of course has implications for insurance etc.
m-s-y
a year ago
In the US, it’s fully legal to perform electric/plumbing/whatever work on your own home.
If you screw it up and need to file a claim, insurance can’t deny the claim based solely on the fact that you performed the work yourself, even if you’re not a certified electrician/plumber/whatever.
What you don't want to do is have an unlicensed friend work on your home, and vice versa. There are no legal protections, and the insurance companies absolutely will go after you/your friend for damages.
Edit: sorry this applies to owned property, not if you’re renting
earleybird
a year ago
In my jurisdiction I can certainly do the work but am under the same requirements to pull a permit and pass a provincial inspection. It very quickly becomes the most effective to have an electrician involved, maybe not for all the work but some of it. They're more that willing to review the work you do and talk about it. Think of it as pair coding - great opportunity to learn and they'll tell you when you've done a good job. (at least the ones I've found)
gizmo686
a year ago
Around here, the bar is lower for work on your own property, but you still need to be qualified by the county to be allowed to do so. Qualification consists of a 2 hour open book exam, where the book is a copy of the national electrical codes.
https://www.montgomerycountymd.gov/DPS/Process/combuild/home...
Granted, if you actually do unlicensed work in your house, no one will know. But it is still illegal.
jefftk
a year ago
Depends on the state and municipality. Mine doesn't allow homeowners to pull electrical permits.
scubbo
a year ago
Extraordinary claims require extraordinary evidence.
zamadatix
a year ago
As with most regulations in the "US" I have a feeling the answer is really something like "Depending on the city and state you live in the answer lies somewhere between 'go nuts' and 'that could lead to criminal charges and you being liable for everything that happens to the house and your neighbors kitchen sink'".
defrost
a year ago
It's like that in Australia, liability and insurance hinge on licenced work by trade qualified professionals.
What is common here, in the handy crowd at least, is to do your own electrical, plumbing, gas work and leave it open and accessable for a licenced professional to check and sign off on.
You're still paying for an hour or two of their time and a surcharge for "taking on the responsibility" but it's often not an issue if the work is clean, to current code, and sanity tests correct (correct wiring, correct angles on plumbing, pressure testing on gas pipes).
tourmalinetaco
a year ago
It‘s hardly an extraordinary claim. Just because you can’t install a ceiling fan doesn’t mean it‘s an “extraordinary” feat that is “likely illegal”.
scubbo
a year ago
> insurance can’t deny the claim based solely on the fact that you performed the work yourself
_This_ is the claim that is extraordinary. I'm not saying that the government would bust down my door for doing work on my own home, but rather that the insurance company would then view that work as uninsured.
The entire business model of insurance agencies is to find new, creative, and unexpected ways to deny claims. That is how they make their money. To claim that they would accept liability for a property that's had uninspected work done by an unlicensed, untrained, unregistered individual is just that - extraordinary.
bigiain
a year ago
> Also, if you are at the point where you need to add a circut for power, you might need to seriously consider cooling, which could potentially be another side quest.
There should be an easy/reliable way to channel "waste heat" from something like this to your hot water system.
Actually, 4 or 5 kW continuous is a lot more than most domestic hot water services need. So in my usual manner of overcomplicating simple ideas, now I want to use the waste heat to run a boiler driving a steam engine, perhaps to directly mechanically run your air conditioning or heat pump compressor.
raxxorraxor
a year ago
Instant water heaters use up to and sometimes even more than 27kW. Of course boilers use less, but still...
These aren't power requirements that are insurmountable. They would get pricey though and I wish my rig for computing would use something around .1kW under load...
Using the heat from PCs would be nice. I guess most just use them as electrical heaters right now.
XMasterrrr
a year ago
Let me know if you figure it out, I would be really interested hahaha
BizarroLand
a year ago
I'm doing this myself now. I have a homelab server setup and a hybrid water heater.
Stuffed the homelab next to the air intake of the water heater, now when I need hot water my water heater sucks the heat out of the air and puts it into the water.
It's obviously not 100% efficient, but at least it recaptures some of the waste heat and decreases my electrical bill somewhat.
lolinder
a year ago
> I can't believe a group of engineers are so afraid of residential power. ... Read a quick howto, cruise into Home Depot and grab some legos off the shelf. Far easier to figure out than executing "hello world" without domain expertise.
The instinct to not touch something that you don't yet deeply understand is very much an engineer's instinct. Any engineer worthy of the title has often spent weeks carefully designing a system to take care of the hundreds of edge cases that weren't apparent at a quick glance. Once you've done that once (much less dozens of times) you have a healthy respect for the complexity that usually lurks below the surface, and you're loathe to confidently insert yourself confidently into an unfamiliar domain that has a whole engineering discipline dedicated to it. You understand that those engineers are employed full time for a reason.
The attitude you describe is one that's useful in a lot of cases and may even be correct for this particular application (though I'm personally leery of it), but if confidently injecting yourself into territory you don't know well is what being an "engineer" means to you, that's a sad commentary on the state of software engineering today.
3eb7988a1663
a year ago
People can and do die from misuses of electricity. Not a move-fast-and-break things kind of domain.
varispeed
a year ago
You only "break" once...
lbotos
a year ago
I've been learning Japanese and a favorite of mine is: 一体
Which is used as "what the heck" but it's direct kanji translation is one body.
varispeed
a year ago
Fun fact as a kid I stuck my fingers in the loose mains wires as we were playing at unfinished building. The wires were live and I still remember it felt like it's going to break my arm. Fortunately I only got a slight burn. This got me interested in electronics which I started studying later in my life.
fhdsgbbcaA
a year ago
You’re forgetting many people have landlords who aren’t exactly keen on tenants doing diy electrical work.
tourmalinetaco
a year ago
I’m hardly surprised, this is primarily a programming discussion website, and the highest voltage read on an average day here is in mV. It’s natural to be leery of things you have no experience in.
fragmede
a year ago
your car is 12 volts, and USB is 5 volts; 12 or up to 20 these days for laptop charging. My computer's CPU is probably 1.8 volts but I can't remember the last time I had my multimeter on that, but that's still more than millivolts.
raxxorraxor
a year ago
Probably meant milliampere, specifically 1 milliampere. But yes, usually lightweight engineers are familiar with TTL and limit themselves to 5V. 12V+ is another arcane realm you don't want to touch.
Some old serial ports had 12V and a high max current. The DIY things you attached here were prone to kill your mainboard.
Voltage/current is either 0 or 1. Anything higher kills software developers instantly.
matt-p
a year ago
In telecoms 48V dc is very common and not always even connectorised! It's "safe-ish" but DC makes me more nervous than 240v, big thick 400A cables into a rack are quite intimidating to see but the main issue is DC is sticky and doesn't have the safety protections of RCDs etc. Indeed you are lucky to get a working isolator.
littlestymaar
a year ago
That's technically correct, but irrelevant: you cannot kill yourself with 12 or 20V any more than with 10mV. 120V or 230V is another story.
That being said, it's still very easy not to kill yourself with 120/230V: just shut down the power before touching anything.
wpietri
a year ago
Ah yes, the "move fast and burn your house down" school of "engineering".
phil21
a year ago
Adding a bog-standard breaker and a short conduit run is about as simple as it gets for electric work. It’s rather low risk if you simply read the code and follow it.
If you know nothing about basic electric work or principles, sure - spend the $500 to have an electrician add a 30 or 50A 220V outlet near your electric service panel. Totally reasonable to do as it is indeed dangerous to touch things you don’t understand.
It’s far less complex and less dangerous than adding an EV charge point to your garage which seems to be quite common for this crowd. This is the same (less, since you typically have a lot more flexibility on where to locate the outlet and likely don’t need to pull through walls) complexity as adding a drop for an electric stove.
Where the “home electric hackers” typically tend to get in trouble is doing stuff like adding their own generator connection points and not properly doing interlocks and all that fun stuff.
If you can replace your own light switches and wall receptacles you are just one step away from adding an additional branch circuit. Lots of good learning material out there on the subject these days as well!
wpietri
a year ago
I'm not saying people shouldn't add breakers. I'm saying your talking like people are scaredy-cats and comparing it to working with toys or hello world is exactly the kind of of macho nonsense that leads people to do shoddy engineering.
As a hobby, I restore pinball machines. A modern one is extremely careful about how it uses power, limiting wall current to a small, normally-sealed section of the machine. And even so, it automatically disables the lower-voltage internals the moment you open the coin door. A 1960s machine, by contrast, may not have a ground at all. It may have an unpolarized plug, and it will run wall current all over the place, including the coin door, one of the flippers, and a mess of relays.
In the pinball community, you'll find two basic attitudes toward this. One is people treating electrical safety about as seriously as the people who design the modern machines. The others is people who think anybody who worries about a little wall current are all pussies who don't have the balls to work on anything and should just man up and not worry about a little 120V jolt.
The truth is that most people here are not engineers of any sort. We're software developers. We're used to working in situations where safety and rigor basically don't matter, where you have to just cowboy ahead and try shit. And that's fine, because control-z is right there. I've met people who bring that attitude to household electrical work, and they're fucking dangerous. I know one guy, quite a smart one, who did a lot of his own electrical work based on manliness and arrogance, and once the inspector caught up with him, he immediately pulled the guy's meter and wouldn't let him connect up to the grid again until a real electrician had straightened it all out.
It's true that this stuff is not that hard to learn if you study it. But an architect friend likes to say that the building code is written in blood, meaning that much of it is there because confident dumbasses managed to kill enough people that they had to add a new rule. If people are prepared to learn the rules and appreciate why they're there, I'm all for it. But if they do it coming from a place of proving that they're not "so afraid of residential power", that's a terrible way to approach it.
matt-p
a year ago
To be fair I'd be quite a bit more relaxed working on 120v. Very supprised these machines don't run on dc internally?
wpietri
a year ago
In the older ones, it's almost all AC. One giant transformer, a couple of different voltages. Possibly with "high tap", a way to compensate for wall current with lower than expected voltages. The past is another country.
user
a year ago
pupdogg
a year ago
You can run a setup of 8x 4090 GPUs using 4x 1200W 240V power supplies (preferably HP HSTNS-PD30 Platinum Series), with a collective use of just around 20-amps, meaning it can easily run on a single 240V 20-amp breaker. This should be easily doable in a home where you typically have a 100 to 200A main power panel. Running 4x 1200W power supplies 24 hours a day will consume 115.2 kWh per day. At an electricity rate of $0.12 per kWh, this will cost approximately $13.82 per day or around $414.72 per month.
FYI, I can handle electrical system design and sheet metal enclosure design/fabrication for these rigs, but my software knowledge is limited when it comes to ML. If anyone's interested, I'd love to collaborate on a joint venture to produce these rigs commercially.
google234123
a year ago
In Cali isn't now like 0.5 per kWh :P
pupdogg
a year ago
Wow!
XMasterrrr
a year ago
Yeah, you get it. I am using 3x 1600w 240V Platinum PSUs from Superflower (They're the manufacturer of EVGAs PSUs. Top notch stuff, did my homework) I however decided against server PSUs like the one you suggested because the extra setup overhead + noise.
As I mentioned in my reply to OP, very doable as long as you do your research. The only thing I did not do was not doing the installation itself because I was not comfortable with it, but I pretty much had everything named to the contractor, and even how I would have gone about the installation process was exactly how he did it.
Hit me up on Twitter or Email, we can chat ideas about this venture
swader999
a year ago
You'll have helicopters over your house.
pupdogg
a year ago
Believe it or not, a buddy of mine was dealing with crazy high power bills for three months and couldn’t figure out why. He tried everything to cut back, but nothing worked. Finally, he called an electrician, who found a hidden short in a 30-amp circuit that was constantly drawing power without tripping the breaker. After fixing the issue, his bills went back to normal—no helicopters were involved during the process!
fennecbutt
a year ago
And all that heat was going...where?
w-ll
a year ago
Good thing i can see them coming, and happy to offer anyone a cup of coffee/tea to understand im just the biggest nerd in the hoa.
defrost
a year ago
Already have to deal with Robinson R22's during mustering season, a few more won't hurt.
nullindividual
a year ago
Do you run this 24/7?
What is your cost of electricity per kilowatt hour and what is the cost of this setup per month?
nrp
a year ago
How are you finding 2b/3b quantized llama 405B? Is it behaving better than 8b or 16b llama 70B?
pupdogg
a year ago
Amazing setup. I have the capability to design, fabricate, and powder coat sheet metal. I would love to collaborate on designing and fabricating a cool enclosure for this setup. Let me know if you're interested.
koyote
a year ago
This is undoubtedly cool and I am a bit jealous!
Maybe a bit of a stupid question, but what do you actually do with the models you run/build, a part from tinkering? I'd assume most tinkering can also be done on smaller systems? Is it in order to build a model that is actually 'useful'/competitive?
faangguyindia
a year ago
I tried self hosting LLM for commandline instant completion and guidance utility: https://github.com/zerocorebeta/Option-K
But problem is even 7b models are too slow on my pc.
Hosted models are lightening fast. I considered possibility of buying hardware but decided against it.
bravura
a year ago
How loud is it? Was special electrical needed?
lossolo
a year ago
Cool, it looks similar to my crypto mining rigs (8xGPU per node) from around 7 years ago, but I used PCI-E risers and a dual power supply.
TaylorAlexander
a year ago
[flagged]