
This guide is a companion to the Unsloth QLoRA walkthrough video, which presents fine-tuning an 8B-class open-weight model on a single 6GB card and carrying the result into Ollama. The video is the starting point and this article adds the documented paths, the source links, and the limits worth knowing before training. Commands below follow the official docs and are untested here since no GPU training run was performed on this box.
Fine-tuning here does not mean retraining the model from scratch. The video frames it as a frozen base plus a small trainable overlay, and the Unsloth fine-tuning guide plus the LoRA hyperparameters guide document the same split. The base weights stay frozen in 4-bit while a low-rank adapter learns on top, covering roughly 1 percent of the parameters.
4-bitr and lora_alphaThe video contrasts this with prompt engineering, which rents behavior per request, and retrieval, which fetches documents per request. Fine-tuning fits the third case, which is style, format, and judgment repeated daily. The Unsloth repository is the code home for that workflow, with notebooks per model family.
The video's central claim comes straight from the Unsloth requirements table, which lists absolute minimum VRAM by model size for QLoRA at 4-bit versus LoRA at 16-bit. Treat every figure as a floor, never a guarantee for a specific card or context length.
QLoRA floor against 8GB for LoRAQLoRA floor against 19GB for LoRAQLoRA floor against 22GB for LoRAQLoRA floor and 11B models need 7.5GBQLoRA floor against 33GB for LoRAQLoRA, which is outside single small-GPU territory
A used 8GB card therefore covers the 8B starter case with headroom, a 12GB card steps toward 14B, and short context plus batch size 1 or 2 is the documented way to stay under the ceiling. The same requirements page warns that some models need more than the minimum and that lowering batch size to 1 through 3 is the first fix for out-of-memory errors. When the local card is too small, the documented fallback is a free hosted notebook with a larger GPU, run unchanged.
The video's dataset rule is blunt, with 50 great pairs beating 5000 scraped ones, and the honest framing matters more than the count. Write examples in your own voice, in the exact output shape you want repeated, and keep private or unlicensed data out. A small purpose-built JSONL set with instruction plus input plus output per line is the pattern the flow assumes.
Modelfile system prompt for tone and retrieval for document knowledgeIf two examples pasted into a system prompt already fix the behavior, that outcome is a signal not to fine-tune at all. Reserve training for formats and judgments repeated many times per week.
The video covers one flow with two homes, local or hosted, and the Unsloth fine-tuning guide documents both the install and the free-notebook route. Locally the documented path centers on pip install unsloth inside one Python environment on the box that already hosts inference, with newer stacks pointing at updated torch plus triton plus the zoo package when cells complain. The hosted path opens the matching notebook for the chosen model, runs cells top to bottom, and re-runs erroring cells, which the guide treats as normal ritual rather than breakage. Either way the GPU check comes first with nvidia-smi and a short cuda available probe, and both paths are untested here.
nvidia-smi before opening any notebook or local environmentmax_seq_length such as 2048r equal to 16 with lora_alpha equal to 162e-4, batch size 1 or 2, and 1 to 3 epochs
The recipe above is the docs-sourced starter from the hyperparameters guide, not a measured result. Raising r adds capacity at the cost of memory and overfit risk on small sets, while lowering the learning rate toward 1e-4 or 5e-5 is the steadier option the guide names. Keep sequence length short on 6GB because longer context eats the same headroom the adapter needs.
Training ends with a small adapter, while daily use wants one portable file, so the export step merges and quantizes. The saving-to-GGUF page documents the one-line path through model.save_pretrained_gguf with quantization_method set to q4_k_m, alongside q8_0 and f16 variants plus push_to_hub_gguf for Hub uploads. The same page documents the longer manual route through save_pretrained_merged with merged_16bit plus the llama.cpp conversion and quantize tools, which reaches the same destination with more steps. Quant choice is a size-versus-fidelity trade, with q4_k_m framed as the sweet spot and q8_0 keeping more quality at a larger size, and that framing reflects published characterizations rather than anything measured here.
model.save_pretrained_gguf and q4_k_m for the compact defaultf16 when archival fidelity matters more than file sizepush_to_hub_gguf or keep weights local for privacyModelfile whose first line is FROM ./model.ggufollama create followed by ollama run per the Modelfile reference
The Ollama Modelfile reference specifies FROM ./ollama-model.gguf as an absolute or Modelfile-relative path, with PARAMETER and SYSTEM lines for tuning and persona. That puts the custom model on localhost behind the same local API other agents already use. The related local-run guide below is the natural prerequisite when the Ollama side is not set up yet.
Small fine-tunes fail in predictable ways, so judge the held-out exam rather than training prompts or hopes. Loss that falls then climbs points at overfit, which calls for fewer epochs or a smaller rank, while loss that never moves points at under-capacity or data and template mismatch. Keep eval prompts near the trained sequence length, since long-context recall is where quantization pressure shows first. Remember the ceiling too, because no flag changes the arithmetic that puts 32B at 26GB or 70B at 41GB. All of these checks are untested here and follow the documented failure modes plus the video's limits section.
Pair this build with Run AI Locally with Ollama plus Qwen3 on one GPU when the serving side needs setup first, since that companion covers installing Ollama and running a base model before teaching it custom habits here.