ข้ามไปยังเนื้อหาหลัก

Fine-Tuning Your Own Llama 2 Model

In this session, we take a step-by-step approach to fine-tune a Llama 2 model on a custom dataset.
Maxime Labonne
Maxime Labonne

สร้างบัญชีฟรีของคุณ

ฝึกฝนและตรวจสอบความก้าวหน้าของคุณ

ดำเนินการต่อด้วย Googleเมื่อดำเนินการต่อ ถือว่าคุณยอมรับ ข้อกำหนดการใช้งานและ นโยบายความเป็นส่วนตัว และยอมรับว่าข้อมูลของคุณจะถูกจัดเก็บในสหรัฐอเมริกา

The advent of large language models has taken the AI world by storm. Outside of proprietary foundation models like GPT-4, open-source models are playing a pivotal role in driving the AI revolution forward, democratizing access for anyone looking to leverage these models in production. One of the biggest challenges in generating high-quality output from open-source models rests in fine-tuning, where we improve their outputs based on a series of instructions.

In this session, we take a step-by-step approach to fine-tune a Llama 2 model on a custom dataset. First, we build our own dataset using techniques to remove duplicates and analyze the number of tokens. Then, we fine-tune the Llama 2 model using state-of-the art techniques from the Axolotl library. Finally, we see how to run our fine-tuned model and evaluate its performance.

Key Takeaways:

  • How to build an instruction dataset
  • How to fine-tune a Llama 2 model
  • How to use and evaluate the trained model

Note: To participate in this code-along, you will need to have a valid Google Colab account. Get started here.

Additional Resources

Solution Notebook (dataset)

Solution Model

[SKILL TRACK] AI Fundamentals

[BLOG] Introduction to Meta AI’s LLaMA

[BLOG] Fine-Tuning LLaMA 2: A Step-by-Step Guide to Customizing the Large Language Model

[BLOG] Llama.cpp Tutorial: A Complete Guide to Efficient LLM Inference and Implementation

หัวข้อ

ที่เกี่ยวข้อง

บทแนะนำ

Fine-Tuning Llama 3 and Using It Locally: A Step-by-Step Guide

Fine-Tune Llama 3.2

บทแนะนำ

Fine-tuning Llama 3.2 and Using It Locally: A Step-by-Step Guide