Efficient Fine-Tuning for Llama 2 on Custom Dataset with QLoRA on a Single GPU in Google Colab
ฝัง
- เผยแพร่เมื่อ 26 ก.ค. 2024
- In this video, I will show you how to fine-tune a Llama 2 model on a custom dataset. First, we will build a custom dataset using techniques to remove duplicates and the number of tokens. Then, we will fine-tune the Llama 2 model on the custom dataset. Later, we will evaluate the fine-tune Llama 2 model and we will push the fine-tune Llama 2 model on the hugging face hub.
👉 Complete Code:
github.com/MuhammadMoinFaisal...
If you enjoyed this video, be sure to subscribe and press the 👍 button
_______________________________________________________________
🧑🏻💻 My AI and Computer Vision Courses⭐:
📙 YOLOv9: Learn Object Detection, Tracking with WebApps (13$):
www.udemy.com/course/yolov9-l...
📕 Learn LangChain: Build #22 LLM Apps using OpenAI & Llama 2 (14$):
www.udemy.com/course/learn-la...
📚 Computer Vision Web Development: YOLOv8 and TensorFlow.js (13$):
www.udemy.com/course/computer...
📕 Learn OpenCV: Build # 30 Apps with OpenCV, YOLOv8 & YOLO-NAS (13$):
www.udemy.com/course/learn-op...
📗 YOLO-NAS, OpenAI, SAM with WebApps using Flask and Streamlit (13$): www.udemy.com/course/yolo-nas...
📘 YOLO-NAS The Ultimate Course for Object Detection & Tracking (13$): www.udemy.com/course/yolo-nas...
📙 YOLOv8: Object Detection, Tracking & Web Apps in Python 2023 (13$) : www.udemy.com/course/yolov8-t...
📚 YOLOv7 YOLOv8 YOLO-NAS: Object Detection, Tracking & Web Apps in Python 2023 (13$): www.udemy.com/course/yolov7-o...
_______________________________________________________________
Don't forget to connect with me:
👉 LinkedIn: / muhammad-moin-7776751a0
🤖 GitHub: github.com/MuhammadMoinFaisal
_______________________________________________________________
⚒️Freelance Work:
www.upwork.com/freelancers/~0...
_______________________________________________________________
For Consultation Call 📞:
www.upwork.com/freelancers/~0...
Happy Coding!
⌛Time Stamps⏳
Introduction: 00:00
Create Dataset : 02:13
Fine-Tune Llama 2 Model on Custom Data: 28:34
Evaluate the Fine-Tune Llama 2 Model : 50:15
Push the Fine-Tune Llama 2 model on the hugging face hub: 54:23
Tags:
#Llama2 #Llama #finetune #llms - วิทยาศาสตร์และเทคโนโลยี
🧑🏻💻 My AI and Computer Vision Courses⭐:
📙 YOLOv9: Learn Object Detection, Tracking with WebApps (13$):
www.udemy.com/course/yolov9-learn-object-detection-tracking-with-webapps/?couponCode=JUNE13DOLLARS
📕 Learn LangChain: Build #22 LLM Apps using OpenAI & Llama 2 (14$):
www.udemy.com/course/learn-langchain-build-12-llm-apps-using-openai-llama-2/?couponCode=JUNE13DOLLARS
📚 Computer Vision Web Development: YOLOv8 and TensorFlow.js (13$):
www.udemy.com/course/computer-vision-web-development/?couponCode=JUNE13DOLLARS
📕 Learn OpenCV: Build # 30 Apps with OpenCV, YOLOv8 & YOLO-NAS (13$):
www.udemy.com/course/learn-opencv-build-30-apps-with-opencv-yolov8-yolo-nas/?couponCode=JUNE13DOLLARS
📗 YOLO-NAS, OpenAI, SAM with WebApps using Flask and Streamlit (13$): www.udemy.com/course/yolo-nas-object-detection-tracking-web-app-in-python-2023/?couponCode=JUNE13DOLLARS
📘 YOLO-NAS The Ultimate Course for Object Detection & Tracking (13$): www.udemy.com/course/yolo-nas-the-ultimate-course-for-object-detection-tracking/?couponCode=JUNE13DOLLARS
📙 YOLOv8: Object Detection, Tracking & Web Apps in Python 2023 (13$) : www.udemy.com/course/yolov8-the-ultimate-course-for-object-detection-tracking/?couponCode=JUNE13DOLLARS
📚 YOLOv7 YOLOv8 YOLO-NAS: Object Detection, Tracking & Web Apps in Python 2023 (13$): www.udemy.com/course/yolov7-object-detection-tracking-with-web-app-development/?couponCode=JUNE13DOLLARS
perfect tutorial bro, you covered everything one needs to finetune. thanks
Bhai....you are ultimate man.....so precise and perfectly explained...loved it....
Bro you are great keep doing it
great content. up to you of course but it would be more than appreciated if you could release a video soon or late on different models like mistral and even more interesting would be how to train models based on different kind of dataset and usecases like for example train models for personality or characters. looking forward for more content like this ! good job
Tutorial on Fine Tuning Mistral model will be coming next week surely
Thanks
Great Tutorial as usual.
I liked the details and specificity during the explanation.
Can you make another code version to use local vector store like chromadb instead of any online one like faiss.
Sure will make one tutorial on it as well
Bro in the dataset i need to add few row to finetune how can i achieve that please help
Really helpful video. I have one doubt, if the context size was 4096 token then why did we choose 2048 for filtering.
4096 is the total context size, headroom is needed for the preamble/prompt template. Such has the “###Instruction …..” that is added after the dataset is k filtered.
In a real example, the {system_prompt} may vary to examples like “Act as a naval expert and …..”
base datasets are left generic so they can be used to train different models, which can have very different prompt templates
and you have to add the token length of the output/response
How to make chatbot with the saved LLAMA-2 model
Hey, can you list out some sources for LLMops
can i run this code withotu colab is visual studio code?
Hi bro,
I have certain doubts can you help me out ?
Can you make a video on how to use such fine tuned models by making an API reference as if we download the model streamlit apps do not have that much space at backend. If I am not wrong we might need to make a quantized version of this model and then use it with our use case by making an API reference as it's size exceeds(13gb >10gb) and we might need to pay for deployment.
Sure, will make a video tutorial on it
Thanks
UserWarning: The generation config instance is invalid -- `.validate()` throws warnings and/or exceptions.
****Fix these issues to save the configuration. This warning will be raised to an exception in v4.34.****
Thrown during validation:
`do_sample` is set to `False`. However, `temperature` is set to `0.9` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`.
warnings.warn(
Explaination is good, but losing the gist, no control over data since it is taken from the HF. Asking generic question which can be answered by any text generation engine. I want someone to create a video completely from scratch first by creating the custom dataset step by step (which is partially cover in this video), and feed the LLM and ask questions against the dataset and show the reference of the generated text from the dataset.