Step-by-step guide to fine-tuning Falcon 180B, the largest open-source LLM with 180B parameters, on a multi-GPU machine using DeepSpeed ZeRO stage 3, LoRA via Hugging Face PEFT, and Flash Attention 2. Covers environment setup, dataset preparation with the Dolly dataset, instruction formatting, sample packing, and launching distributed training with torchrun. The combination of techniques reduces memory usage dramatically, enabling ~2-hour fine-tuning runs on 8x A100 80GB GPUs compared to the 7 million GPU hours required for pretraining.

6m read timeFrom philschmid.de
Post cover image
Table of contents
1. Setup Development Environment2. Load and prepare the dataset3. Fine-Tune Falcon 180B using DeepSpeed, Hugging Face Transformers, LoRA with Flash AttentionConclusion
2 Impressions