A Beginner’s Guide to LLM Fine-Tuning

<p>The growing interest in Large Language Models (LLMs) has led to a surge in&nbsp;<strong>tools and wrappers designed to streamline their training process</strong>.</p> <p>Popular options include&nbsp;<a href="https://github.com/lm-sys/FastChat" rel="noopener ugc nofollow" target="_blank">FastChat&nbsp;</a>from LMSYS (used to train&nbsp;<a href="https://huggingface.co/lmsys/vicuna-13b-v1.5" rel="noopener ugc nofollow" target="_blank">Vicuna</a>) and Hugging Face&rsquo;s&nbsp;<a href="https://github.com/huggingface/transformers" rel="noopener ugc nofollow" target="_blank">transformers</a>/<a href="https://github.com/huggingface/trl" rel="noopener ugc nofollow" target="_blank">trl</a>&nbsp;libraries (used in&nbsp;<a href="https://towardsdatascience.com/fine-tune-your-own-llama-2-model-in-a-colab-notebook-df9823a04a32" rel="noopener" target="_blank">my previous article</a>). In addition, each big LLM project, like&nbsp;<a href="https://github.com/nlpxucan/WizardLM/tree/main" rel="noopener ugc nofollow" target="_blank">WizardLM</a>, tends to have its own training script, inspired by the original&nbsp;<a href="https://github.com/tatsu-lab/stanford_alpaca" rel="noopener ugc nofollow" target="_blank">Alpaca</a>&nbsp;implementation.</p> <p>In this article, we will use&nbsp;<a href="https://github.com/OpenAccess-AI-Collective/axolotl" rel="noopener ugc nofollow" target="_blank"><strong>Axolotl</strong></a>, a tool created by the OpenAccess AI Collective. We will use it to fine-tune a&nbsp;<a href="https://github.com/OpenAccess-AI-Collective/axolotl/blob/main/examples/llama-2/qlora.yml" rel="noopener ugc nofollow" target="_blank"><strong>Code Llama 7b</strong></a>&nbsp;model on an evol-instruct dataset comprised of 1,000 samples of Python code.</p> <h1>Why Axolotl?</h1> <p>The main appeal of Axolotl is that it provides a one-stop solution, which includes numerous features, model architectures, and an active community. Here&rsquo;s a quick list of my favorite things about it:</p> <p><a href="https://towardsdatascience.com/a-beginners-guide-to-llm-fine-tuning-4bae7d4da672"><strong>Learn More</strong></a></p>
Tags: LLM Tuning