TRANSCRIPCIÓNEnglish

How To Fine-Tune A Large Language Model (Step-By-Step)

28m 22s5,509 palabras772 segmentsEnglish

TRANSCRIPCIÓN COMPLETA

0:00

AI is great at a lot of things. Sounding

0:02

human is not one of them.

0:04

>> Hasta la vista, baby. So, when it comes

0:07

to the promise of making our lives

0:09

easier, specifically when it comes to

0:11

writing things like blog posts and

0:13

articles and scripts or social media

0:15

posts or whatever, we still need to

0:17

spend a ton of time reviewing and

0:19

editing the work before publishing. But,

0:21

that can end right now. In this video,

0:23

I'm going to walk you through a

0:24

step-by-step process on how to make LLMs

0:27

sound more like you, Ron. Sorry, were

0:28

you talking to me? Unless, of course,

0:30

you aren't human. Are you human, Ron?

0:33

Anyway, this video is a complete guide

0:35

to fine-tuning your large language

0:37

models. I'll show you some use cases

0:38

specifically related to copywriting and

0:41

my own needs, but the applications

0:44

really are [music] limitless. So,

0:45

without further ado, join me on this

0:47

journey.

0:52

Before we get too deep, let me explain

0:54

what fine-tuning is. So, fine-tuning is

0:57

basically teaching an AI to act a

0:59

certain way, as opposed to know certain

1:02

things. So, imagine you hire a writer

1:04

for your YouTube channel to help you

1:07

write scripts. If you give them a Google

1:08

Drive full of research material, well,

1:11

they'll know all of the facts that need

1:13

to go into the project, but they still

1:15

don't know how to write or talk like

1:17

you. So, fine-tuning is the process of

1:19

giving that writer repeated examples of

1:22

exactly how you talk. And you give them

1:24

so much of that that eventually they

1:27

naturally start sounding like you.

1:29

That's not creepy at all. You may have

1:30

also heard of RAG or retrieval augmented

1:34

generation. It's another way to give

1:36

additional context and details to a

1:38

model. However, the difference between

1:40

RAG and fine-tuning is that RAG is more

1:42

like giving your writer a giant

1:44

reference manual with details and facts

1:46

that they can pull from, but it's not

1:48

going to change the way they actually

1:51

respond stylistically. They'll just now

1:54

have the ability to know and retrieve

1:56

that additional information. So, when

1:58

you fine-tune a model, you basically

2:00

start with one of the big general models

2:03

that are out there that's trained on a

2:04

ton of information. And then you give

2:06

that model specific examples of the sort

2:09

of outputs that you want from it. That

2:11

process is then repeated over and over

2:14

and over again until it learns your

2:17

tone, your structure, your formatting,

2:19

your jokes, your habits, and your

2:21

preferences. So, the simplest comparison

2:23

is basically RAG is like giving AI

2:25

access to your notebook, so it has all

2:27

the information that it needs.

2:29

Fine-tuning is more like giving it

2:31

acting lessons, so that it actually

2:33

becomes more like you and starts to

2:35

respond just like you. So, if you need a

2:37

model to know and understand a certain

2:39

details, you could feed those details to

2:42

the model through RAG. That's basically

2:44

what you're doing when you upload PDFs

2:46

or text files or things like that inside

2:48

of ChatGPT. If you want the model to

2:50

talk like you, RAG's not going to quite

2:52

cut it. You need to actually fine-tune

2:54

the model to achieve this.

3:01

Here's a model inside of a platform

3:03

called Nebius that I've already

3:05

fine-tuned. You can see this one's

3:06

called MW YouTube, and it's built on top

3:10

of Llama 3.3 7B Instruct. With this

3:13

particular model, I trained it on all of

3:16

my YouTube transcripts, like probably a

3:18

hundred hours worth of training data

3:21

transcripts from my videos. The idea

3:24

being that I can tell it to go write a

3:26

script on any topic I want in the style

3:28

of me, and it will write a script that

3:30

sounds the way I would talk on a video.

3:33

If I go into the playground here, this

3:34

is my fine-tuned model, and I can give

3:37

it a system prompt, and I can chat with

3:38

it just like I would ChatGPT. And I am

3:41

going to get to a step-by-step breakdown

3:43

in just a minute. I just want to finish

3:44

showing off this example that I already

3:46

did, and then we'll do one from scratch.

3:48

In my system prompt, I'm going to go

3:50

ahead and say, "You are Matt Wolf. Use

3:51

correct punctuation and markdown." And I

3:54

can give it a prompt like, "Create a

3:55

detailed outline with six to eight H2

3:58

sections for a 10-minute YouTube video

4:00

on Nvidia's dominance in AI." "Label

4:02

with ## headers and three to five

4:05

bullets per section." I just wanted to

4:06

give it some extra details cuz like with

4:08

any large language model, the more

4:10

context you can get it, the better the

4:12

output you're going to get. Now, if I

4:13

submit this, theoretically, it's going

4:15

to write a script for me that sounds

4:18

similar to how I would write. And that's

4:20

exactly what it did here. But, I can

4:22

also compare it to what it would have

4:24

looked like if I didn't use a fine-tuned

4:26

model. So, if I go to compare here, and

4:28

then I switch this second model on the

4:30

right to, let's go Llama 3.3 7B

4:34

Instruct. That is the same model that I

4:36

previously fine-tuned here. Let's go

4:38

ahead and clear our chat on the left,

4:40

and I'll give it a prompt, "Write an

4:42

outro and closing to a video that wraps

4:44

up why Nvidia is so dominant in AI." So,

4:46

let's go ahead and give it that and let

4:48

it write an outro for us, and we can see

4:50

side-by-side comparisons of how it would

4:52

write that outro. Now, the un-fine-tuned

4:55

model did a little bit better with

4:57

formatting, but that actually makes

4:58

sense because I gave it just a ton of

5:01

transcripts from YouTube videos. And if

5:03

you've ever looked at the transcripts

5:05

from YouTube videos, there's usually not

5:06

much formatting or punctuation, so it

5:09

kind of overfit for that. But, if we

5:12

look at the normal Llama response, "As

5:14

we conclude our explanation of Nvidia's

5:16

dominance in the AI landscape, it's

5:18

clear that their success can be

5:19

attributed to a combination of strategic

5:21

innovation, forward thinking,

5:23

investments, and relentless pursuit of

5:25

technological advancement." And then the

5:26

version that's trained to sound kind of

5:28

like me. So, there you have it. "That's

5:29

why Nvidia is so dominant in AI right

5:31

now. They've been preparing this moment

5:33

for over a decade. They're the leader in

5:34

the hardware that's required to train AI

5:37

models. They're the leader in the

5:38

hardware that's required to run AI

5:40

inference, and they're even building

5:41

their own AI models." Now, I'm not going

5:43

to read the whole thing, but it's even

5:45

trained on some of my old calls to

5:47

action that I used to put in my videos.

5:49

If you've watched a lot of my videos,

5:51

you know that this reads like me.

5:53

Hopefully, you found this video helpful.

5:54

Hopefully, you feel more looped in on

5:56

the whole Nvidia ecosystem and why

5:58

everybody's making such a big deal about

5:59

Nvidia We can even see here it went on

6:02

to say, "If you like stuff like this and

6:04

you want to stay looped in in the AI

6:05

world and the latest AI tools, get the

6:07

TLDR of everything that's going on in

6:09

the world of AI, check out

6:10

futuretools.io. Thank you so much for

6:12

tuning in. I really, really appreciate

6:14

you, and thanks again to Wirestock for

6:15

sponsoring this video. I'll see you guys

6:17

in the next video. Bye-bye." Now, it's

6:18

funny because Wirestock hasn't sponsored

6:20

the channel in like a couple years now,

6:21

but that's in the training data. So, it

6:24

wrote an output that sounds like what I

6:26

would have written. Now, granted, the

6:27

formatting sucks, but that's my fault on

6:30

the way I trained in the data. I didn't

6:32

clean up the data. I just gave it sort

6:33

of unformatted transcripts, so it gives

6:36

me back unformatted transcripts. Garbage

6:39

in, garbage out. So, real quickly,

6:41

here's how I trained that one, and then

6:42

we'll start a new training from scratch.

6:44

I found this random website called

6:46

downloadyoutubetranscripts.com.

6:49

It looks pretty quickly made and slapped

6:51

together, but for seven bucks, I was

6:53

able to download all of the transcripts

6:55

from my YouTube channel in one click. It

6:57

exported all of those transcripts as

6:59

just one giant text file. You can also

DESBLOQUEAR MÁS

Regístrate gratis para acceder a funciones premium

VISOR INTERACTIVO

Mira el video con subtítulos sincronizados, superposición ajustable y control total de la reproducción.

REGÍSTRATE GRATIS PARA DESBLOQUEAR

RESUMEN DE IA

Obtén un resumen instantáneo generado por IA del contenido del video, los puntos clave y las conclusiones.

REGÍSTRATE GRATIS PARA DESBLOQUEAR

TRADUCIR

Traduce la transcripción a más de 100 idiomas con un solo clic. Descarga en cualquier formato.

REGÍSTRATE GRATIS PARA DESBLOQUEAR

MAPA MENTAL

Visualiza la transcripción como un mapa mental interactivo. Comprende la estructura de un vistazo.

REGÍSTRATE GRATIS PARA DESBLOQUEAR

CHATEA CON LA TRANSCRIPCIÓN

Haz preguntas sobre el contenido del video. Obtén respuestas impulsadas por IA directamente desde la transcripción.

REGÍSTRATE GRATIS PARA DESBLOQUEAR

SACA MÁS PARTIDO A TUS TRANSCRIPCIONES

Regístrate gratis y desbloquea el visor interactivo, los resúmenes de IA, las traducciones, los mapas mentales y mucho más. No se requiere tarjeta de crédito.