Unsloth accelerates and simplifies large-language-model fine-tuning by combining performance optimization, parameter-efficient training, and GPU memory management. It supports adapting a quantized LLaMA-3 8B model with LoRA on limited hardware. section 2.1.2
A practical Unsloth workflow includes:
- Install Unsloth with supporting packages such as xformers, TRL, PEFT, Accelerate, and bitsandbytes. section 2.1.2
- Load a 4-bit LLaMA-3 8B model and tokenizer, then attach lightweight LoRA adapters. section 2.1.2
- Format domain data into instruction, input, and response fields before supervised fine-tuning. section 2.1.2
- Train with SFTTrainer, gradient accumulation, sequence packing, and an 8-bit AdamW optimizer. section 2.1.2
Credit-risk adaptation
A fine-tuned model evaluates an applicant earning $1,137.38, carrying $766.31 in monthly debt, holding a 600 credit score, and having one late payment, classifying the applicant as high risk. section 2.1.2
Listing 2.2 Installing Unsloth and other supporting packages
!pip install "unsloth[colab-new]@git+https://github.com/unslothai ➥/unsloth.git" #A !pip install --no-deps xformers trl peft accelerate bitsandbytes
Use the installation listing to reproduce the Unsloth environment and its supporting fine-tuning packages. section 2.1.2

