Qwen3.8 27B: local fine-tuning with Unsloth

Learn to fine-tune Qwen3.8 27B with JSONL data and QLoRA on Ubuntu. The demo uses a 48 GB GPU and includes GGUF export and a before-and-after test.

Player not loading? Watch on YouTube

Fahd Mirza walks through fine-tuning Qwen3.8 27B on a custom dataset with Unsloth. His setup runs Ubuntu with a single GPU carrying 48 GB of VRAM. During training, he reports memory use close to 19 GB; that observation applies to this demonstration rather than every configuration.

The tutorial starts with a JSONL file containing instruction, input and output fields. Its question-and-answer examples describe Mirza using public information. He keeps the dataset small for the demo and recommends 500 to 1,000 or more examples for production work.

The training script loads the model in 4-bit precision and attaches rank-16 LoRA adapters. Mirza explains how QLoRA trains adapters while keeping the base weights frozen. He also covers the chat format, gradient checkpointing and trainer settings. Batch size two with four gradient accumulation steps gives eight examples per update, and the run uses three epochs with an AdamW 8-bit optimizer.

The workflow includes GGUF export with Q4KM quantization for use with tools such as Ollama. A final comparison asks the base model and the adapter-equipped model the same question about Mirza. He reports that the adapted model answers with details from his dataset. This is a small local LLM training example without API calls, not a broad evaluation of accuracy or generalization.