So I'm taking a moment now to explain that the training costs of optimizing a model for this course
can be very slim indeed.
It can be a matter of a couple of cents, and you don't need to go berserk and be doing what I'm doing
and using A100 boxes and, and big training runs.
And just to to clarify that.
So first of all, as I explained last time, you can run on a box like a T4, which is very cheap.
You can have a batch size that the largest that will fit on that box.
It's probably 1 or 2, um, and then run training that way.
But if you do that, actually with the training data set that we've been working with, it will take
a long time, which is still going to add up to a bit because we've just got lots of data.
And I wanted to explain that actually, it's not necessary to be training against this monstrous data
set.
I do that because I want to show you some, some good, some, some really quite strong results, but
you'll get great results with a much smaller data set too.
Now, one thing I would suggest though one you can just take the data set of 400,000 data points and
just select from it the first 20,000 and run with that sub data set, and that would be totally fine.
Um, it's probably better if you're going to do that.
If instead you focus in on one particular type of product that's being priced, because that way the
model will have opportunity to learn all about that product.
Um, for example, you could choose appliances, which was one of the data sets that we pulled down
from the Huggingface hub at the very beginning.
Um, and instead of bringing down all of these data sets, you could simply bring down appliances only.
And I've set up a, um, a Jupyter notebook.
Uh, not not on Colab, just just a local notebook.
It's in week six, where the other, uh, days were for week six.
We actually built this data set the full one on day two.
So this is a copy of day two, but it just made much simpler and more narrow to only look at appliances.
And because it's such a small data set, it will run super fast.
We connect it to the environment.
This is will be a throwback to the to the past.
It's complaining because I've already logged in to Huggingface and I tried to log in a second time,
but ignore that.
Um, and now we're just going to take, uh, the data set names, and I've commented everything out
except for appliances, which you may remember, was one of the really small data sets.
Um, uh, Hugging Face is really upset with me for, uh, running it multiple times, but there we go.
Off it runs.
The total time it takes to load in this data set is, uh, about a 0.2 of a minute, if I remember right.
Uh, 0.3 of a minute even, uh, and when we do that, we've got 28,000 items.
Um, so it's a lot smaller than the 400,000 data set we've been working with.
But it's a perfectly respectable number for Flora, and it has the benefit of being focused on appliances.
So it's a narrower data set.
Um, and, uh, yeah, I, um, you can follow the rest of these charts.
I've taken out the charts that don't matter.
Like the comparison of different data types.
This is the price.
The average is.
It's a smaller average.
Um, but still you get all the way up to 999.
And that is the, the, the curve.
Um, and then to curate this, there's nothing really to it.
We're going to take the entire data set.
This is that same chart now for our smaller data set showing that there isn't a material correlation
there.
Um, and we can just quickly confirm that the same thing applies to the tokens as we checked before.
Um, and then finally when we divide that into a training and test data set, we'll take the 25,000
items for training and then 2000 for test.
Um, and everything else will work just great here.
Uh, you'll see the training prompt.
The test prompt.
We can plot the distribution of prices in the test set.
There we go.
We've got a perfectly decent spread.
And then finally we can create the prompts from this, just as we did before, and then upload this
to Huggingface, potentially give it a different name like I've called it light data here.
Um, and also make the two pickle files, uh, and yeah, then you can use that in your training instead.
It will build a model based on smaller populations of data that will be focused on predicting the prices
of just home appliances, rather than all the different types.
This will work great.
I think it'll be a good exercise for you to have to make those small changes in various places in the
code to focus in on this smaller data set.
Uh, and I have run this myself, and I can confirm that whatever result we're going to discover, uh,
from the main run we're doing with the 400,000, the same will apply in this case in terms of how it
stacks up compared to other models.
Not as much as will be the case with the the bigger data set, but uh, without giving the game away
that the the important things will happen even if you're focused on appliances.
And obviously when you're dealing with the data set at 25,000, uh, you can, uh, get through it very
quickly indeed.
Um, but should you do that and should you then get the bug like I have and want to then go and do a
bigger run?
Then of course, you can add in more types and you can spend a few dollars and then be doing it for
the full data set.
Anyway, I thought I'd go through that.
This.
This may be a good revision for people on how we curated the data and should you wish, a smaller data
set.
It tells you how to do it.
All right.
In the next video, we go to weights and biases, and we look at how the big run with the 400,000 is
coming along.
And we poke around weights and biases to see what more can be done there.
See you there.