Scribe
Scribe

¿Te gusta? Haz que Scribe sea aún mejor dejando una reseña

Obtener Extensión para Chrome

Explorar

  • Videos Populares
  • Videos Recientes
  • Todos los Canales

Herramientas Gratuitas

  • Descargador de Subtítulos de Video
  • Generador de Marcas de Tiempo de Video
  • Resumidor de Videos
  • Contador de Palabras de Video
  • Analizador de Títulos de Video
  • Búsqueda de Transcripciones de Video
  • Analíticas de Video
  • Creador de Capítulos de Video
  • Generador de Cuestionarios de Video
  • Chat con Video

Producto

  • Precios
  • Blog
  • Obtener Extensión para Chrome

Developers

  • Transcript API
  • API Documentation

Legal

  • Términos
  • Privacidad
  • Soporte
  • Mapa del sitio

Derechos de autor © 2026. Hecho con ♥ por Scribe

— Si esto hizo tu vida más fácil (o al menos un poco menos caótica), ¡déjanos una reseña! Prometemos que nos alegrará el día. 😊

Related Videos

EASIEST Way to Fine-Tune a LLM and Use It With Ollama

Video thumbnail
152.41k1,073 Palabras5m readGrade 6
Compartir
Channel
warpdotdev
you want to fine tune your large language model and run it locally on your machine using Ollama. Well, in today's video, we're going to do exactly that. So let's go.
First, for the fun part, just finding the right data set. The reason why finding the right data set is so important is when you train a small, large language model with a data set that is relevant to the task you're trying to do. It can actually outperform large models.
What I'm going to be doing today is creating a small, fast LLM that will generate SQL data based off of table data. I provide it. One of the biggest data sets to do this with is called synthetic text to SQL, which has over 105,000 records split into columns of prompt SQL content, complexity, and more.
Im running a Nvidia 4090 GPU, so I'm going to be fine tuning this on my machine using ubuntu. If you don't have a GPU, feel free to do this using Google Colab, which allows you to run training code in the cloud. The great news is that this project does not require a lot of complex hardware to get it up and running.
We're going to be using Unsloth which allows you to fine tune a lot of open source models really efficiently, with about 80% less memory usage. And we're going to be using Llama 3. 1 which is an LLM used for commercial and research purposes, especially in English, and has really high performance.
Make sure that you have Anaconda installed on your machine as well as the Cuda libraries. I will be using Cuda 12. 1 and Python 3.
10 for this project. You want to install the dependencies required by Unsloth which you can find in the Readme. But for simplicity, here it is.
This creates a new environment for us and installed PyTorch Cuda libraries as well as the latest unsloth. You'll also want to install Jupyter if it isn't there already, and then run your Jupyter notebook. And now you're done with the setup.
So let's go into the Jupyter notebook and get started. First, we want to make sure that all the installed requirements are actually there. If you're using Google Colab, this command will install the packages.
Next we're going to import the fast language model by Unsloth. Here we're specifying that we want to use the Lama three eight bit model. We also want to set up a max sequence length of 2048 tokens.
This means that the model will only consider up to 2048 tokens, where a token can be a word, subword character, or even punctuation. When processing or generating text, and we'll set load in four bit to true, which essentially means we're using less bits, as opposed to using the typical 16 or 32 bits to represent the information in the model. Doing this is going to help you reduce memory usage and also reduce the load on your machine.
After running this, you're going to get a cute Ascii image, and that means that your model is loaded. After this, we're going to load in the PEFT model, which is basically Lora adapters. If you don't know what these terms mean, that's totally fine.
Basically, the LORA adapters mean that we only have to update 1 to 10% of the parameters in this model. Without them, it means that we would have to retrain the whole model, not just a small portion, which takes a lot of time, energy, and even money. Unsworth provides this here with the recommended settings.
I trust them, so feel free to read each comment. Now this is where things can get a little bit tricky depending on what data set you're using. The each data set comes different from each other, but they're each formatted in the same way such that the large language model can understand it.
Llama three uses alpaca prompts which look like this. Now, if you remember our data set, it is not as easy as just plugging it in and letting it go off to the races. I have to format my response first before plugging in the data.
I'm only interested in the SQL of my database. The prompt I will be asking for, as well as the generated code and explanation. So I'm going to update my code to reflect this.
Now we set up the training module to supervise to fine tuning. Trainer by hugging face is what I used. There are a lot of parameters to use all that can be described in their own video.
So for example, have max steps which tells us how many training steps to perform. Seed is a random number generator. We used to be able to reproduce results and warmup steps gradually increases learning rate over time.
So now that we have everything set up, let's run it. And that's it. Your model has been trained.
Now before we move on, we actually need to convert this into the right file type so that we can run this locally using a llama. Luckily, onslaught has a one liner we can use to do this. After this is done, we only need to do one step to be able to run this with Allama.
First, open up your terminal. I'm using the warp terminal here. Go to the path of where the file is saved.
Then create a file called Model file and open it up in the code editor. This is Ollamas Docker like file configuration where we can create new models with specific parameters. In our model file we're going to put a prompt.
So something like you're an SQL generator that takes a user's query and gives them helpful SQL to use. Finally make sure Olan was running. And then we're just going to run this command.
This command will then read all the items in the model file you just created, and start using llama Dhcp under the hood to make sure that the model runs on your machine. And congrats! You can now use your fine tuned LM locally, all with the OpenAI compatible API and more in your applications.
If you're curious to know more about Alama, we do have a two minute video out about everything you need to know about Alama here. Otherwise, thank you for watching and I'll see you next time.
Videos Relacionados
What is a Rest API? (in 2 Minutes)
2:11
What is a Rest API? (in 2 Minutes)
warpdotdev
4,303 views
"I want Llama3 to perform 10x with my private knowledge" - Local Agentic RAG w/ llama3
24:02
"I want Llama3 to perform 10x with my priv...
AI Jason
488,561 views
my simple workflow for digital notes
8:05
my simple workflow for digital notes
Reysu
10,331 views
Build a FREE AI Chatbot with LLAMA 3.2 & FlowiseAI (NO CODE)
11:47
Build a FREE AI Chatbot with LLAMA 3.2 & F...
Leon van Zyl
47,055 views
How to Create Consistent Characters Using Kling AI?
21:15
How to Create Consistent Characters Using ...
CyberJungle
14,463 views
EASIEST Way to Fine-Tune LLAMA-3.2 and Run it in Ollama
17:36
EASIEST Way to Fine-Tune LLAMA-3.2 and Run...
Prompt Engineering
51,143 views
Ollama on Kubernetes: ChatGPT for free!
18:29
Ollama on Kubernetes: ChatGPT for free!
Mathis Van Eetvelde
10,478 views
Build your own RAG based LLM Application (Completely Offline!): AI for your documents
26:01
Build your own RAG based LLM Application (...
Yankee Maharjan
3,396 views
Cheap mini runs a 70B LLM 🤯
11:22
Cheap mini runs a 70B LLM 🤯
Alex Ziskind
235,723 views
98,000 German workers furious after the truth about VW's ownership exposed
7:45
98,000 German workers furious after the tr...
The Electric Viking
60,717 views
RAG vs. Fine Tuning
8:57
RAG vs. Fine Tuning
IBM Technology
73,544 views
Yup, QwQ is CRACKED: Prompt Chaining with Qwen and QwQ reasoning model (Ollama + LLM)
16:23
Yup, QwQ is CRACKED: Prompt Chaining with ...
IndyDevDan
14,911 views
"okay, but I want Llama 3 for my specific use case" - Here's how
24:20
"okay, but I want Llama 3 for my specific ...
David Ondrej
257,677 views
12,419 Days Of Strandbeest Evolution
21:39
12,419 Days Of Strandbeest Evolution
Veritasium
903,324 views
Run ALL Your AI Locally in Minutes (LLMs, RAG, and more)
20:19
Run ALL Your AI Locally in Minutes (LLMs, ...
Cole Medin
271,876 views
Fine-tuning Large Language Models (LLMs) | w/ Example Code
28:18
Fine-tuning Large Language Models (LLMs) |...
Shaw Talebi
366,348 views
Best Fails of the Year | Try Not to Laugh 😆🎉
1:38:06
Best Fails of the Year | Try Not to Laugh ...
FailArmy
1,572,134 views
Run your own AI (but private)
22:13
Run your own AI (but private)
NetworkChuck
1,734,334 views
host ALL your AI locally
24:20
host ALL your AI locally
NetworkChuck
1,434,731 views
Reliable, fully local RAG agents with LLaMA3.2-3b
31:04
Reliable, fully local RAG agents with LLaM...
LangChain
68,703 views