Enjoying this issue?
Get tomorrow's AI & engineering digest in your inbox — hand-picked, summarized, and always spam-free.
TLDR
The HP ZGX Fury with an Nvidia GB300 can handle the full model development lifecycle locally: fine-tuning 27B and 120B models, serving multiple LoRA adapters, training a router, quantization, RL, and even pre-training a GPT-2 level model from scratch in under 9 hours. This means organizations can keep their data private and avoid cloud costs and model deprecation issues.
Key points
Fine-tuning a 27B model with LoRA in bfloat16 fits in the 96GB HBM memory, avoiding quantization errors.
Five LoRA adapters can be served simultaneously from one base model using vLLM, each trained on different department data.
A tiny Gemma 270M model was fine-tuned to route requests to the appropriate adapter.
The machine can run GRPO reinforcement learning for the support model, with a separate tiny model as a reward function to prevent gaming.
Pre-training a 900M parameter GPT-2 level model from scratch took 5 hours 40 minutes for pre-training and 8.5 hours total, achieving a score close to the original GPT-2 1.5B model.
Tools mentioned
Techniques
- LoRA
- QLoRA
- multi-LoRA serving
- pruning (Minron)
- distillation
- NVFP4 quantization
- GRPO
- UL2 denoising
- pre-training from scratch
Stop scrolling. Start reading smarter.
Receive the day's most important AI & engineering updates in one concise email. No spam.
Transcript (captions)
Okay, in my recent inference video on the ZGX Fury, I threw a whole bunch of different models at this machine just to see what it could run. This time though, I want to see what you can actually
build with it. So, in this video, I'm going to fine-tune a 27B model, then a 120B model, serve five custom versions of a model at the same time, train a tiny model to route between them, and
then look at things like pruning, distilling, and quantizing a model for deployment. I'm also going to do some things about running reinforcement learning. And then just for fun, I
wanted to see how long it would take to train a GPT2 level model completely from scratch on this machine running fully locally in my office. So, first up, this is a video sponsored by HP and Nvidia.
This is the HP ZGX Fury with an Nvidia GB300 inside. It's running ZRT, HP's command line tool that comes pre-installed and handles the setup, serving, and logging. and they've let me
the machine to put it through its paces over a number of weeks. The thing I would say is even if you don't see yourself buying one of these, stick around. Most of what I'm going to show
you here are the fundamentals of how you sort of think about doing these tasks for yourself. We'll look at things like memory math for sizing a fine tune, how multilaura serving works, and I'm also
going to touch on things like how to stop RL from gaming your rewards, etc. The cool thing is that the Fury lets me show all of these things in one place. Now, let me stress why do I think
training locally actually matters. I think there are three reasons here. Number one being privacy. When you fine-tune your data goes into the weights and if that's things like
contracts or customer records, you just don't want to send those to a cloud service. The second thing is cost. A small model trained on your task can often match a much bigger general model
on that task. And of course, if you're running it yourself, it means that you're running it on your own hardware where you don't have to pay a per token bill. The third thing that I think is
becoming more and more important all the time is control. doing things this way, your model doesn't have to change because a provider updated or deprecated something, which unfortunately is
becoming more and more often, and it's a pain point that I'm hearing from people all the time, is that they're having to make huge updates because a model provider has decided to deprecate a
model that's only 6 months old. Now, up until now, the catch has always been that for every one of these things, you needed a cloud GPU cluster. So, for me, the big question in this video was
pretty simple. how much of that loop of developing all of this stuff can be done on one machine fully locally. Now, to keep this grounded, I'm going to try and use one example all the way through.
We're going to look at building a customer support for a fictional online store. Almost every business has support, and that data is something that they want to keep private. Not to
mention that there's real money at stake if the model gets it wrong here. All right. So, the main model that I'm going to start out with here is the Quen 3.827B.
It's a really solid base model, and it's what a lot of the community fine-tunes are actually built on. So, let's start with the memory math here because training is a very different beast than
inference. If you do a full fine-tune with an atom optimizer in mixed precision, you need roughly 16 bytes per parameter. You've got the weights, the gradients, a full precision copy of the
weights, and two optimizer states to take care of. For a 27B model, that works out to be 430 GB before you even count activations. So, for most business tasks, that's going to be overkill. And
this math works the same on any hardware. So, it's worth doing before you go out and rent or buy anything there. The cool thing is this is where Laura comes in. Now, I've done some
videos on Laura on the channel before when it first came out, but the key concept here is that with Laura, you freeze the base model and you train two small matrices on top of the layers that
you care about. The trainable part usually works out to be less than 1% of the model. So, the gradients optimizer states become tiny. Your memory is basically just the frozen model. And
this is where the fury helps. On a smaller machine, fine-tuning a 27B model usually pushes you into Q Laura, where you would quantize the base down to 4bit, so around 14 to 15 GB. On this
machine though, the full Bflat 16 model is about 54 GB. That fits comfortably in the HPM memory that we've got here with plenty of room left over for longer sequences and bigger batches. So, I can
just run a plane Laura in Bflat 16. The cool thing about that too is that it trains faster because you're not dequantizing every step and you're not training on top of quantization errors.
Now, for the example that I'm showing here, I did all of this with unsloth and TRL. And you can see the memory sitting well inside the HBM for the whole run here. I also tried going much bigger
with Nvidia's Neotron Super model, the 120B model using Qura there. For that model in 4bit, the base is roughly 60 to 70 GB. So you can fine-tune a 120B model on a single box, which is pretty cool
when you think about what that used to need in the past. All right, so what did I actually train on? Two things that I think are the most useful for business. The first is agent traces. A lot of
companies are running agents today on Frontier APIs. Every time one of those agents does a job well, like looking up an order, checking a refund policy, calling the right tool, and writing a
reply, that's a trace. If you collect the successful ones, filter them out with your emails and fine-tune on them, the local model learns your tools, your schemas, your workflows. Then for
runtime runs, you can stop paying for the Frontier model. You keep everything on the box. I generated my traces with some of the big open models from the inference video running fully locally on
the Fury. If you are going to do this with a commercial API for your traces, check the terms on training on its outputs, etc. The second kind of data that I use for training is your internal
data. So this is things like your help center articles, past tickets, policy documents, guides, things like that. And one of the best ways to do this is you turn those into instruction and response
pairs. And this is the bit that I think people miss a lot. Normally you have to pick between private and customize, right? Cloud fine-tuning means uploading all your data and staying private
usually means a very generic model, etc. Here you get both. But here's an important thing. Laura is good at teaching behavior, not facts. So things like tone, formatting, which tool to
call, how your company writes a refund email, that kind of stuff. It's a bad way to try and cram in the whole knowledge of your product catalog. It's also not a good way to try and update
prices and information like that. All of those things, that's what RAG is for. So in practice, you want both a lura that knows how to behave and a rag that delivers the current facts and
information. And that leaves us to one of my favorite parts about this, which is multilura. So adapters are small. A rank 16 adapter on a 27B model is in the low hundreds of megabytes. So instead of
one model for everything, you keep one base model loaded and you train an adapter per department or job. So, here I've got a support adapter that writes replies in the store's voice and makes
the right tool calls. And I've got a rag adapter that only answers from the retrieved help center docs and cites them. And the cool thing is I've still got room for others. I can have one that
turns notes into slides on the company template. I can have another that writes SQL queries against the company's schema. And finally, if I wanted to, I can have a legal one for reviewing
contracts. And the cool thing with all of these with VLM, all of those get served at the same time off just one copy of the base model and requests for different adapters get batched together.
So five fine tunes would be about 270 GB of separate models. But in this case, one 54 GB base plus five adapters is barely that much bigger than the base. And operationally, this is really nice.
Each team owns its adapter and owns its data. Legal's data only goes in to the legal adapter. The support one only goes into the support one. And the cool thing here is that if your support team wants
to retrain theirs, they can do it overnight on the same box without touching anyone else's data. So that's a 27B fine tune with five adapters all being served at once, which is basically
the equivalent of having five different versions of this model. Okay, so if you've got five adapters, something has to decide which one handles each request. Now, we could try and hardcode
that if we wanted to, but this is where the latest sort of decision models come in. And if you watch the inference video I made for this, I talked about how there was a tiny model that was sitting
in the lineup of models that I loaded all at once. And that was this. It's a Gemma 270M fine-tuned to make one decision and make it really quickly. It doesn't write long
answers back. It just looks at the incoming ticket and says billing, technical, refund, escalate to a human and it decides which of the five adapters that the agent query is going
to be sent to. So, this is super specialized and it's not general to every kind of decision that people want to make out there. It's for our specific use case here. So, we can have it as a
router that's running fully locally here. And you could imagine if I wanted to, I could actually have one of the routes going to either another ZGX fur box with a really super big model on it
or to a third party API if I wanted to do that as well. Now, if people want to see a whole video of me showing how I'd basically train this from scratch, let me know. I'll make a video about that.
The cool thing about this model is just how small it is and how fast it trains. We're talking about a 270m model here. On the Fury, I was able to do this in several different training runs, trying
out different data, trying out different ideas, trying out different hyperparameter tunes, and then being able to load up all of those versions and compare them and test them with my
own eval. And I think this is one of the things a lot of business and companies would actually benefit from a lot right now. The ability to do some kind of routing, whether that's for customer
support, whether that's for document classification, whether it's for triggering workflows, or even things like deciding whether a request can stay local or needs to be sent for a bigger
model. Remember, I've talked about these models in the past being really good for detecting PII information there. So, let me know if you want to see a video of me doing a full walkthrough of building one
of these in a separate video. All right, next up, once we've actually got this, we've got a few decisions we can make. Do we want to deploy all of this just straight away like this, or do we want
to actually do a quantization ourselves? Now, in the inference video, I was showing you that pretty much most of the models I was running, I was running in NVFP4.
So, what I want to go through now is just how you can get your own model into that format. And the way that I did this here is I'm using Nvidia's model optimizer for the whole thing. Now, the
temptation is to basically say, well, why shouldn't we just use the NVFP4 that Nvidia's already created? When you create a quantization, it's quantized on trying to keep its accuracy against a
certain data set. Now, Nvidia does a really good job of picking really good generalized data sets, but if I want to keep that accuracy against my company's data and the traces that I've got
myself, then I would like to do my own NVFP4 quantization. And that's where Nvidia's model optimizer comes in. So, we've got a whole bunch of options in here. The first step that we can do if
we want to is we can do pruning. So you can actually go through parts of the network that contribute lease to being able to predict this out and actually just cut out different chunks of the
network to get a smaller model. Nvidia's actually got a recipe for doing this called Minron. Now I should stress that pruning on its own can cost some quality. So it's not the thing that
you're going to want to do all the time. The second thing though that you could also do is we could also do some form of distillation. Right? So we could get the Bflat fine-tune model to act as a
teacher and then take that prune model to be a student learning to match it. The cool thing here is in this example is that both the teacher and the student fit on the Fury at the same time. So you
don't need a separate server for the teacher. The third one and the one that I'm doing here is just quantizing what we've got into NVFB4. So we give it a set of calibration
examples and what I just used there was some of the data that we trained on some of the support tickets some of the agent traces etc and then model optimizer works out how to compress the weights
into 4bit floating point. Now, Blackwell has the hardware support for NVFP4, which is a big part of why it runs so fast on this machine. And then doing it all on our custom data set means that
the accuracy here is going to be very, very small. And in this case, then I serve it with VLLM in the same kind of setup as we did the inference video. Now, don't forget VLM has that ability
to do the multilura here. And here's an example side by side, right? the same customer question going to the base model to the fine-tune model and to the fine-tune model with rag. The base model
will give us a polite generic answer that doesn't know the store's policies. The fine-tune model sounds like the store's team support and calls the right tool for this. But then with the rag on
top, it pulls the current return policy sites any links where it actually got it from. And a really cool thing here is that all this quantization and serving has been run on the same machine. No
copying checkpoints from a training cluster to an inference server back again. And the whole thing's been done fully locally. All right, the next thing I want to talk about is something that's
kind of new as an ability for companies to be able to do and it's really been limited mostly to Frontier Labs and this is the whole idea of doing custom RL here. So supervised fine-tuning teaches
the model what a good answer looks like. Reinforcement learning teaches it how to basically find those answers and how to have the right reasoning tokens of getting to that right answer at the end.
The idea here is pretty simple. The model generates a bunch of attempts. A reward function scores them and the trainer pushes the model towards higher scores. In this case, I've used GRPO in
the TRL library for this. RL is a really interesting workload in that because it's half inference and half training, you need fast generations for those attempts and you need to compute the
updates on the Fury here. The rollout server and the trainer can run together on the same box for the support model here. The reward is the stuff you can actually check. So, did it call the
right tool? Is the output in the right format? Did it apply the policy correctly, etc. But here's the thing with RL models are very good at finding the path of least resistance to the
reward. So if your reward is just ticket resolved, a support model can work out the fastest way to resolve a ticket is to give everyone a refund. The reward goes up, but the business loses money.
So you want to make sure that you add in some kind of harm penalty there. The reward becomes the task score minus lambda times a harm score. For the harm score, I trained a second version of a
decision model to flag replies that would hurt the business. Refunds out of policy, promises the store can't keep, that kind of thing. The cool thing is that model is so tiny that it can score
every roll out without slowing anything down, which is much cheaper than calling a big LLM as a judge every single time. But if I wanted to, I could still do that. And I would certainly recommend
that you still do sort of spot checks against a bigger judge every now and then and even check yourself what's going on. RL is very good at learning to be able to fool lots of kinds of judges.
Using RL like this to make agent traces better. Learn to be able to see how to make your harness better is one of the biggest areas that we're seeing people be able to improve their agent results
recently. Okay. So, everything so far I've done in the video is about adapting existing models. And really, that's probably what you should be doing for most of this, but one of the things I've
had a lot of fun of playing with and just to basically push this machine to about as far as it can go is training a model from nothing. So, I've done a bunch of different experiments like this
over the past few weeks. The one I'm going to show you here, I took a fork of Andre Kapathy's nano chat and trained a GPT2 level model from scratch on the Fury. It's a 20 layer model about 900
million parameters. It's trained on 5.2 billion tokens. The pre-training for that took 5 hours and 40 minutes running at around 290,000 tokens per second the whole way through. the full pipelines
basically a tokenizer a tuning sweep the pre-training evals and even the fine tuning at the end to make it a chat model took about 8 and 1/2 hours in total and the cool thing here I started
it on a Saturday night I came in the next morning the whole thing was fully done with the batch size that I picked from the tuning sweep it end up using around about 135 GB of memory at its
peak which is a big part of why this runs so quickly the result scores about 0.25 on the core benchmark. So for reference, the original GPT2 1.5 billion parameter model. So actually a much
bigger model was scoring about 0.26. And back when that GPT2 model was created, it took around 168 hours on 32 TPUs. This is a smaller model on one machine overnight. And I think that
really just reinforces the power of a model like this. Now, I didn't just run this one run alone. I've actually done a bunch of different tests on things. One of the ones that I showing you here is
that I also wanted to test an idea that came out of a research paper which was adding UL2 style denoising to pre-training. So, this is where about half the documents get turned into
fill-in- the gap exercises. So, same model, same data, same number of steps, but trying out some different ideas on pre-training. And that allowed me to get a sense of how well this would actually
work. Now, with the version that I did for everything exactly the same, the UL2 model came out slightly behind on this run, which gave me a bunch of ideas for future runs that I wanted to try
different research things on. And that's kind of the point here. Being able to run a controlled experiment like that on your own machine overnight and get a clear answer the next morning is exactly
what you want if you're trying to understand how pre-training actually works, how things like continued pre-training can be done, and also how you can improve your models in general.
Now, most businesses don't need to pre-train their own model. That's not what I'm saying here. But for teams that do want to learn how this stuff works from the ground up, this is a really
nice thing to be able to do here. All right, so let's step back and look at what this one machine just did. It fine-tuned a 27B model and a 120B model. It was able to make multiple adapters to
be able to serve the equivalent of five of those 27B models using Laura adapters that are tuned for the different departments in the organization all side by side at the same time. I train a tiny
decision model to learn to be able to route between them. I was able to then try out pruning and distilling those and then finally quantizing the model down to NVFP4
fully local on private data. The machine was then able to run RL where it could run both of the models on the machine at the same time. And then finally, I showed you training a GPT2 level model
from scratch overnight. And what I've covered here is pretty much the whole life of a model from pre-training to production on one box that's sitting next to my desk. While the inference
video show what this machine can run, this video has really shown what you can build. And I think for a lot of organizations, that's just taking things to a whole new step. With inference,
everyone has access to the same base models. What nobody else has though is your data, your processes, and the way that your company actually does things. When you train on that privately, the
model becomes something that's genuinely yours. And it's where we're seeing a lot of organizations just get a massive advantage. So, I'm still going to do one more video about the ZGX Fury that I've
got coming up in the next couple of weeks. If you missed the inference video, I'll put the link to that in the description. also links to where you can find out more about the ZGX Fury.
Anyway, let me know in the comments what you'd want to train on a machine like this. I'm really interested to hear from people what people are most interested in training about. And as always, if you
found the video useful, please click like and subscribe. And I will talk to you in the next video. Bye for now.