- 16
- 31 563
The Neural Maze
Spain
Приєднався 20 лис 2023
Become a real Machine Learning Engineer In a World Full of Hype
Finetuning Llama 3.1 to talk like Rick Sanchez | Unsloth Tutorial
In this video, I'll show you how to make Llama 3.1 8B speak like Rick Sanchez.
We'll start by creating a custom dataset from Rick and Morty transcripts in ShareGPT format. Then we'll finetune Llama with the Unsloth library inside a Lambda Labs instance (we need GPUs!). Finally, we'll convert and deploy the model to Ollama for local use.
This is a fun way to learn about LLM finetuning while creating your own Rick-speaking AI assistant. So ...
Wubba lubba dub dub! 🛸
------------------------------
GitHub 👉 github.com/neural-maze/rick-llm
Unsloth 👉 unsloth.ai/
Ollama 👉 ollama.com/
Lambda 👉 lambdalabs.com/
------------------------------
If you like this content, you can also follow me here:
📩 Substack - theneuralmaze.substack.com/
💼 LinkedIn - www.linkedin.com/in/migueloteropedrido
💻 GitHub - github.com/MichaelisTrofficus
🐦 Twitter - x.com/moteropedrido
------------------------------
0:00 Introduction
0:30 Project Overview
3:54 Repo Overview
5:48 Dataset Creation
12:12 Unsloth code
22:49 Lambda Labs
26:18 Launch GPU instance
27:12 Sync filesystems
29:38 SSH into the instance
32:38 Finetune
33:56 GGUF and Modelfile
35:40 Ollama Model
37:19 Chatting with Rick
39:00 Conclusion
------------------------------
juicy fruit by Snoozy Beats / snoozybeats
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
Free Download / Stream: audiolibrary.com.co/snoozybea...
Music promoted by Audio Library • juicy fruit - Snoozy Beats (No Copyri...
------------------------------
We'll start by creating a custom dataset from Rick and Morty transcripts in ShareGPT format. Then we'll finetune Llama with the Unsloth library inside a Lambda Labs instance (we need GPUs!). Finally, we'll convert and deploy the model to Ollama for local use.
This is a fun way to learn about LLM finetuning while creating your own Rick-speaking AI assistant. So ...
Wubba lubba dub dub! 🛸
------------------------------
GitHub 👉 github.com/neural-maze/rick-llm
Unsloth 👉 unsloth.ai/
Ollama 👉 ollama.com/
Lambda 👉 lambdalabs.com/
------------------------------
If you like this content, you can also follow me here:
📩 Substack - theneuralmaze.substack.com/
💼 LinkedIn - www.linkedin.com/in/migueloteropedrido
💻 GitHub - github.com/MichaelisTrofficus
🐦 Twitter - x.com/moteropedrido
------------------------------
0:00 Introduction
0:30 Project Overview
3:54 Repo Overview
5:48 Dataset Creation
12:12 Unsloth code
22:49 Lambda Labs
26:18 Launch GPU instance
27:12 Sync filesystems
29:38 SSH into the instance
32:38 Finetune
33:56 GGUF and Modelfile
35:40 Ollama Model
37:19 Chatting with Rick
39:00 Conclusion
------------------------------
juicy fruit by Snoozy Beats / snoozybeats
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
Free Download / Stream: audiolibrary.com.co/snoozybea...
Music promoted by Audio Library • juicy fruit - Snoozy Beats (No Copyri...
------------------------------
Переглядів: 210
Відео
How to create CUSTOM LLMs using OLLAMA
Переглядів 1,2 тис.Місяць тому
In this short video, I'll show you how to customize your Ollama models using the Modelfile blueprint. We'll learn about the Modelfile syntax and instructions to create a personalized version of Llama 3.2 3B that will act as Joe Rogan. Let's get started! 🚀 Ollama 👉 ollama.com/ Llama 3.2 3B 👉 ai.meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices/ Modelfile documentation 👉github.com/o...
Building a TWIN CELEBRITY APP using QDRANT and STREAMLIT
Переглядів 379Місяць тому
Ever wondered which celebrity you resemble the most? 🤔 In this video I take you behind the scenes of my latest project: the Twin Celebrity App. We'll cover the following technologies: ✨ Streamlit for the user-friendly UI ☁️ Google Cloud Run to host the app and scale it effortlessly 🧘 ZenML for pipeline orchestration 📦 Qdrant to store the image embeddings and retrieve similarities Don't forget t...
LOAD TESTING your Machine Learning Application with LOCUST | Full Tutorial
Переглядів 6852 місяці тому
In this video, I'll show you how to run load tests on your Machine Learning Applications. In simple terms, load testing is a way to see how well a website, app or system performs when lots of people use it at the same time. Using Locust, a powerful and developer-friendly load testing tool, I’ll walk you through setting up and running tests on a FastAPI application for sentiment analysis. Let's ...
How to BECOME an ML ENGINEER in 2024
Переглядів 7482 місяці тому
Becoming a Machine Learning Engineer can be very overwhelming at first. So many concepts, frameworks, libraries, ... But don't worry if you are just beginning your journey! I felt (exactly) the same a few years ago, and that's why in this video I want to share with you a list of resources that will help you a lot along the way. Resources: 💠 𝐅𝐮𝐥𝐥 𝐂𝐨𝐮𝐫𝐬𝐞𝐬 🔸 𝐌𝐚𝐜𝐡𝐢𝐧𝐞 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐢𝐧 𝐏𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧 𝐛𝐲 DeepL...
Building a MULTIAGENT FRAMEWORK from SCRATCH | Agentic Patterns Series
Переглядів 1,7 тис.2 місяці тому
This is the fourth (and last) episode of the "Agentic Patterns from Scratch" series. In this video, you'll learn about the MultiAgent Pattern, a pattern used by many frameworks out there like CrewAI, AutoGen or OpenAI's Swarm. As always, we won't rely on any popular frameworks like LangChain, LlamaIndex or CrewAI: pure Python and Groq's LLMs (llama 3.1 70B 😉) Code 👉 github.com/neural-maze/agen...
ReAct Agent From Scratch | Agentic Patterns Series
Переглядів 1,7 тис.3 місяці тому
This is the third episode of the "Agentic Patterns from Scratch" series. In this video, you'll learn about the Planning Pattern and the ReAct technique for increasing the reasoning capabilities of LLMs. As always, we won't rely on any popular frameworks like LangChain, LlamaIndex or CrewAI: pure Python and Groq's LLMs (llama 3.1 70B 😉) Code 👉 github.com/neural-maze/agentic_patterns Deeplearni...
Tool Calling Agent From Scratch | Agentic Patterns Series
Переглядів 2,1 тис.3 місяці тому
This is the second episode of the "Agentic Patterns from Scratch" series. In this video, I'll introduce you to the basics of the Tool Pattern, understanding how Tools work and implementing one from scratch. Code 👉 github.com/neural-maze/agentic_patterns Deeplearning.ai article 👉 www.deeplearning.ai/the-batch/agentic-design-patterns-part-3-tool-use/ Groq 👉 groq.com/ If you like this content, ...
Reflection Agent From Scratch | Agentic Patterns Series
Переглядів 2,4 тис.4 місяці тому
In this video, I'll introduce you to the basics of the Reflection Pattern, the first of the four Agentic Patterns. This is the first episode in a series where I'll be covering the other patterns as well. Code 👉 github.com/neural-maze/agentic_patterns Deeplearning.ai article 👉 www.deeplearning.ai/the-batch/agentic-design-patterns-part-2-reflection/ Groq 👉 groq.com/ If you like this content, y...
How to GENERATE SONGS with CrewAI | CrewAI Tutorial
Переглядів 1,5 тис.6 місяців тому
In this video I'll show you how I combined crewAI and Suno to generate songs about ANY topic you can imagine. We'll walk through the code, explaining the agents, tasks, and customs tools I had to implement when making the app. And ... by the end of the video, you'll hear a song generated by this application, a song dedicated to Elon Musk and Yann LeCun!! Blog post 👉 neural-maze.github.io/blog/...
A FREE AI ASSISTANT using GROQ AND OLLAMA | CodeGPT VSCode Extension
Переглядів 3,5 тис.7 місяців тому
In this (short) tutorial, I'll introduce you to the CodeGPT extension for VSCode, which integrates an AI Assistant into your development workflow. I've been using this extension extensively for the last few weeks and have found it significantly enhances developer productivity. I'll guide you through connecting CodeGPT to Ollama for local language models and to Groq, the fast inference engine (t...
CREWAI + OLLAMA + LLAMA3 are PROGRAMMING my ARDUINO!! | CrewAI Tutorial
Переглядів 2 тис.7 місяців тому
In this video I'll show you my latest project: connecting crewAI and local LLMs (Ollama) with my Arduino UNO. Throughout the video I will show you how to create a CrewAI Custom Tool that allows us to interact with an Arduino. In addition, we will use Llama 3 8B (using Ollama) to power one of our crewAI agents. Blog post 👉 neural-maze.github.io/blog/posts/202405-crewai-ollama-arduino/ Previous...
How to AUTOMATE LINKEDIN POSTS with CrewAI | CrewAI Tutorial
Переглядів 10 тис.8 місяців тому
In this video I'll show you how to use CrewAI, a framework for orchestrating autonomous AI Agents, to automate your LinkedIn posts. We'll describe the basic components of CrewAI and we'll see an example of a custom tool that uses Selenium to download posts from a LinkedIn account. Finally, our crew of agents will generate a LinkedIn post on the differences between Llama 2 and Llama 3. Blog pos...
Build your Character AI with RunPod, Oobabooga and SillyTavern
Переглядів 2,4 тис.9 місяців тому
In today's video I will show you how to create, from scratch, an AI character using Runpod, Oobabooga and Silly Tavern. To give more quality to our characters, we will use one of the Pygmalion AI models, specifically, Mythalion 13B, due to its quality in roleplay scenarios. To test our system, I will try to convince one of my characters, Jim, the Flat-Earther, that the Earth is not, in fact, fl...
Chat with HackerNews using LangChain, OpenAI Functions and Streamlit
Переглядів 7519 місяців тому
Chat with HackerNews using LangChain, OpenAI Functions and Streamlit
Great video! Thanks so much for sharing. What tools do you use to record your videos and create beautiful visual animated diagrams?
You're welcome! I'm using Screen Studio. For the diagrams, a combination of Excalidraw, Draw.io and Canva
Great content as always! You have shaped my AI journey through your videos bro!
thanks man! Really happy that my content is helping you :)
Great work buddy!!
thanks man!!
Great job, bro!
thanks man! 🙌
Amazing work!!! keep up the good work!
thaaanks!
Amazing! God Job!
thaaanks! 😁
You are making really great contributions to the community, loved it
Thanks! 😊
Amazing..Thank you bro
You're welcome! 😍
I run 12B model Q4_K_M on my 8GB card and you say we need 48GB of ram for 13B is insane. It is just waste of money.
very very nice, great work
Thanks!!
hello bro... how can i add it to a website where people login and ask their queries
You could have a container with Ollama. Under the hood is just Go code and easy to be dockerised. What do you think?
@TheNeuralMaze i am completely new i don't know anything can you make a tutorial video
I built something like this some time ago. Great work. This channel will take off 2025. Postive.
thanks! 😁
¡Gran video, tío!
gracias!!
Excellent series - really useful to understand the Agent technology.
thanks! Glad it helped you :)
Very informative content, I am about to design a LinkedIn scrapper agent that will scrape the given profile, and gather their data in a csv and upon request sends them a connection request with personalized connection note as well..
thanks!! sounds like a very interesting project
0:57 this is no code.
I know 😅 I made a mistake, that's why at 0:59 I say "30 lines in this file". Sorry for that 😁
Hello, did you try the notebooks in fullstackdeeplearning course? They seem not to be working for me.\
Can u create AI agents swarms project That you can use for content generation For example AI article website
that's a great idea! I'll take a look at that :)
it is NOT working for free, no GROQ possible with free codegpt subscription
Top. Thanks 😁
Anytime! 🙂
were you in constant communication with the ai? Could you then ask the ai to change the speed of the blink of just the red led? Im assuming that was the point of building this whole damn thing.
Yes, you could ask the agent to do something like that. The purpose of building "this whole damn thing" was exploring the possibilities of tool calling when connecting LLMs with devices like Arduinos, Raspberry PIs, etc.
@@TheNeuralMaze hey now lol sry i offended ya :D i really liked the video! but i was hoping to see how that connection was made between the 2. not that it was installed on one. must have miss read the title or something. have a great day!
awesome. at which step are we storing the images in GCS?
finally I decided to store the images directly in the Docker image. In general, this is not best practise, but there were just a few images, so I decided to reduce the complexity. GCP is just used for the Cloud Build pipeline and the Cloud Run service. Hope this answers your question! ☺
@TheNeuralMaze thank you for the clarification. Much appreciated. Keen to learn how to store the images in GCS.
Thank you so much. I have a question. started following you on youtube. have this question. I want to use agents for storytelling, and I have prepared templates for the stories to create standard/consistent stories (imagine a writer_agent and an editor_agent, etc). So, each agent is clearly defined, and each should use its own template as guidance to provide the output in the format I want. How do I have, for example, a writer agent use the writer_template to guide it on how I want it to write the story? The template could be part of the agent python code or a local txt file (I still ignore which option would make the agent output more efficient). Please, help.
that's a very cool project! You could start by adding the "writer_template" to the system prompt for the Writer Agent. If that's not enough (or you want to abstract away the template) you could always create a tool. But I'd start with putting the prompt directly in the agent's prompt.
Awesome vid, just like Andy says, like a boss !!
thanks!! 😍
Love the content 🔥
thanks!!
Thank you so much! Your notebook and explanation is amazing! This is very important educational resources for the community! Really helped me to learn the fundamentals of LLM agent!!!
thanks! 🙂
Thanks a lot for your content and explanations! It really helped me understand better how the agentic architecture works. Wishing success in your journey!
Glad it helped you! Thanks for the support 🙂
Thanks for the references, really great content on the channel ❤
Thanks! Glad you enjoyed the video 😍
Hi Miguel, congrats on the channel, keep doing these your videos are f* awesome :) Just a question , I tried building the Dockerfile.suno like you mentioned , but it always gets stuck in the "RUN npm install" command. How can i debug this? Ive looked for a similiar problem on the web but cant find a solution...Im using docker desktop on windows ( dont know if thats relevant or not because I dont really know docker that well). Abrazos desde Portugal ,hermano 💪💪
In my ReAct multiple agent system, the time it takes to obtain the final answer using tools can be quite long, leading to a poor user experience. In your system, how long does the process of calling the choose tool -> execute tool -> get final answer take in each round,, and how many times does the LLM (Large Language Model) need to be called?
It depends on the task, if you go to the third video of the series, you'll see the ReAct agent I implemented from scratch, using three tools. The problem it has to solve is very simple, but maybe it will give you an overall idea of the time it takes.
Thanks for sharing your work Miguel - big fan of your content across your various channels. Interested in why you define the tool signatures in the system prompt as opposed to passing signatures as a list of tools to during the inference request. Have you noticed a difference in output doing it this way?
You mean using the `tools` parameter in the Groq API call? The thing is that Groq has a specific way of dealing with tools, and I wanted to do everything from scratch. To define my own way of dealing with Tools. I don't know if that solves your question :)
@@TheNeuralMaze Sure does - thanks!
@@ben.mcloughlin anytime! ☺
Great explanation, thank you
thanks! 🙏
Nice. I need to do some tweaking to the agents, but this is awesome! Thank you
thanks!!
Banger video! Awesome resources. As a senior ML engineer, i especially endorse the Designing ML Systems Book from Chip Huyen
💯 that book is like the MLE Bible!
Thanka for the video ❤. Really appreciated ❤
you're welcome! 😀
Could you tell us how to pass an interview ?! Or what are the topic that must cover
For the interview, I'll focus on building E2E projects yourself, that can show the community your skills and ability to build ML Systems. That's something you'll be able to achieve after going through the resources I've shared (not all of them, of course!). I'd probably start with the Courses and start building something yourself. If you manage to build 3 / 4 serious projects, you'll be more prepared for interviews (and it'll also improve your CV a lot)
What about math and basic stats and traditional ml.
In this video I was focusing on ML Engineering, but if you are interested in the Mathematical Background of Machine Learning, I recommend you this book: mml-book.github.io/ For traditional ML (if you want to learn the basics of a Machine Learning / Deep Learning), I'll go with the Deeplearning.ai courses about it. They are two specializations and you have them in Coursera. Machine Learning Specialization -> www.coursera.org/specializations/machine-learning-introduction?campaignid=21584843678&adgroupid=&device=c&keyword=&matchtype=&network=x&devicemodel=&adposition=&creativeid=&hide_mobile_promo&gad_source=1&gclid=Cj0KCQjwj4K5BhDYARIsAD1Ly2qNFstFmBt1TNCUfSs4OvP0IdTCsgRJuzh2JWQcEkDo0t2jvWFug-gaAlQIEALw_wcB Deep Learning Specialization -> www.coursera.org/specializations/deep-learning?campaignid=21584843678&adgroupid=&device=c&keyword=&matchtype=&network=x&devicemodel=&adposition=&creativeid=&hide_mobile_promo=&gad_source=1&gclid=Cj0KCQjwj4K5BhDYARIsAD1Ly2qNFstFmBt1TNCUfSs4OvP0IdTCsgRJuzh2JWQcEkDo0t2jvWFug-gaAlQIEALw_wcB Hope it helps!
The information shared here is gold ✨
thanks! happy you find it useful! 🥳
I implemented you code in GCP using Gemini pro, I find Gemini really struggles on following the instruction of the prompt and understanding that it can use the observation returned to answer the question. You have to tell it specifically in great details in each tool's signature with "you can use this tool to do what, to do what, to do what"
Really? I've never used Gemini before to be honest. But good to know. What's your opinion on the Gemini models then? Are therre worse than Llama / OpenAI? I mean, the signature I'm providing should be enough for a good LLM.
@@TheNeuralMaze I am not sure yet. I am just new to GenAI, but based on my tiny experience of implementing ReAct using both Gemini and OpenAI, OpenAI is better than Gemini. Several problem of Gemini (1) you very often run into quota problem (2) Again, I have this search function that does RAG, i have to very detailedly say "this is a search function for a knowledge base that you can use to search for what occasions", otherwise, Gemini won't even consider use it. And sometimes, when I provide the <observation> with clear answers back to it, it returns another <tool_call>, instead of giving me the final answer based on that <observation>
Loved the video, man! So excited about our future collab.
Thanks Paul!! Yes, very excited too, it's going to be legendary 💪
Can i ask you something: why not break it into 2 steps: let llm first select a tool from the list of options(just define them simply and treat as a classification problem) and then in the second step get the values of the parameters. I have seen that when many tools are provided and we expect a complete executable function as output llms sometimes don't work? Also can we connect with you/follow you on linkedin, if it is okay with you? I have been trying to build things from scratch, although not as good as you do. Thanks!
I like the idea you propose, I think it's worth trying, thanks!! I don't know if you've watched the next video of this series (Planning Pattern), but in that video I'm showing the ReAct technique, which works reasonably well to select a tool from a list of available tools :) Answering your second question: yes!! Of course you can connect with me on LinkedIn
The video is really good. You could actually use composio for tool calling and it would have made agent a lot more powerful.
yes, although I tried to make everything from scratch for educational purposes. Having said that, composio would be a great addition to the Tool Agent! :)
enorme Miguel!! 🙌🙌
Gracias!! Me alegro que te haya gustado :)
Very informative... Thanks for the good content...I do not understand people... I can see 9 views and 0 likes!!! ... although the content you provide is very special and truly good content. What you provided here is very nice and I liked the idea of applying topological sorting .. Keep the good work and have a nice day 🌹🌹🌹
thanks!! I really appreciate your words
🚀
🔥🔥🔥
Great content, thank you! Question for you, what tool did you use to draw your diagrams, those are rich and love the fonts you used.
thanks!! It's Excalidraw 🙂
Great Explanation! Welldone.
Glad you liked it!
Simple, clear and to the point. Great video 🔥 Your cat wasn't that surprised by your videos 😂
hahahah not impressed at all with the ReAct technique. Let's see what happens with the multiagent pattern 🤣
Hey, waiting eagerly for the Multiagent Pattern. Please, soon?
yes!! the code is ready and tomorrow I'll start recording :)
Thanks for the good content 🌹🌹🌹
my pleasure!!! ❤