// guide
How to fine-tune an LLM with LlamaFactory
To fine-tune an LLM with LlamaFactory, pick a base model, a dataset and a method such as LoRA, QLoRA or full fine-tuning in its LlamaBoard web UI; on NVIDIA Brev, the LlamaFactory (LlamaBoard) Launchable runs LlamaFactory with Qwen/Qwen3-8B as the default base model on one NVIDIA L40S 48GB GPU.
Updated
On this page
What does the LlamaFactory Launchable run?
It runs LlamaFactory v0.9.5 with its LlamaBoard web UI from the official hiyouga/llamafactory:0.9.5 container image, pinned by digest. A Launchable is a reproducible, shareable environment configuration on NVIDIA Brev: GPU, disk, container setup and ports in one link (NVIDIA Brev Launchables (external site)).
| Setting | Default |
|---|---|
| GPU | 1x NVIDIA L40S 48GB |
| Instance type | AWS g6e.xlarge |
| Disk | 256 GiB |
| Price | about $2.23/hr (Brev console, 2026-11-15) |
| Base model | Qwen/Qwen3-8B |
| LlamaBoard port | 7860 |
| Licences | LlamaFactory Apache-2.0; Qwen/Qwen3-8B Apache-2.0 |
The README of the LlamaFactory (LlamaBoard) Launchable also lists Qwen/Qwen3-4B-Instruct-2507 and meta-llama/Llama-3.1-8B-Instruct as base model options, and you can set any Hugging Face model path in LlamaBoard. Each model keeps its own licence. For other training stacks, see fine-tuning.
LoRA vs QLoRA vs full fine-tuning: which should I pick?
Pick LoRA or QLoRA when you want to train small adapters on a frozen base model; pick full fine-tuning when you need to update every weight. LlamaFactory supports full-tuning, freeze-tuning, LoRA and QLoRA, among other methods (LlamaFactory README (external site)).
| Method | What it trains | Source |
|---|---|---|
| LoRA | Freezes the pre-trained weights and trains small low-rank matrices injected into each Transformer layer | LoRA paper (external site) |
| QLoRA | Backpropagates through a frozen, quantized base model into LoRA adapters, to use less GPU memory than LoRA on full-precision weights | QLoRA paper (external site) |
| Full fine-tuning | Updates all model weights; it needs far more GPU memory than LoRA or QLoRA | Launchable README (external site) |
A LoRA or QLoRA run produces an adapter that you can merge into the base model at export. For LoRA on image models instead of LLMs, read train a FLUX LoRA on a cloud GPU.
How do I run a first fine-tune in LlamaBoard?
Open LlamaBoard, set the model path, pick a method and a bundled dataset, and start training. These steps follow the Launchable README:
Open the LlamaBoard link, or forward the port with
brev port-forward INSTANCE_NAME --port 7860:7860.Wait for the base model download; its log is
/root/workspace/llamafactory/logs/model-fetch.log.Set the model path and select a fine-tuning method, for example LoRA.
Choose a dataset; bundled examples such as
identitywork without uploads.Start training.
Chat with the result in LlamaBoard, then export the trained model.
Datasets, checkpoints, downloaded models, the Hugging Face cache and the LlamaBoard settings live under /root/workspace/llamafactory/.
How do I serve the result?
Export the model, then serve it through an OpenAI-compatible API. The LlamaFactory README gives the commands (LlamaFactory README (external site)):
Merge a LoRA adapter into the base model with LlamaBoard's export step, or with
llamafactory-cli export examples/merge_lora/qwen3_lora_sft.yaml.Serve it with the vLLM backend:
API_PORT=8000 llamafactory-cli api examples/inference/qwen3.yaml infer_backend=vllm vllm_enforce_eager=true.Or load the exported model into your own vLLM server, as in serve an OpenAI-compatible API with vLLM.
The Launchable exposes LlamaBoard on port 7860; check which other ports you open before you serve an API from the instance.
How do I deploy it on NVIDIA Brev?
Deploy it from its Launchable page and open LlamaBoard on port 7860. The full flow is in how to deploy a Launchable on NVIDIA Brev.
Open the LlamaFactory (LlamaBoard) page and click its launch button.
Deploy and wait for the instance to show Running.
Open LlamaBoard on port
7860, or forward the port with thebrevCLI.Wait for the base model download before you start training.
What happens when I stop or delete the instance?
Stop keeps your files; Delete removes them. Read how to stop, start and delete an NVIDIA Brev instance for the console and CLI steps.
- Stop the instance when you are not training. Datasets, checkpoints and exports are written under
/root/workspace/llamafactory/inside the container; Delete removes them. Copy exports off the instance before you stop or delete it. - Storage is still billed while the instance is stopped.
- Delete removes the instance and every file on it, including datasets, checkpoints and exported models.
How does this relate to NightKeeper?
This Launchable is a finished environment you deploy yourself. NightKeeper is a separate 9owls product for your own code: it packages your repository as an NVIDIA Brev Launchable, proves it on a fresh GPU and keeps it running.
Sources: where do these facts come from?
LlamaFactory (LlamaBoard) Launchable README (external site), read 2026-11-22
LlamaFactory README (external site), read 2026-11-22
LoRA: Low-Rank Adaptation of Large Language Models (external site), read 2026-11-22
QLoRA: Efficient Finetuning of Quantized LLMs (external site), read 2026-11-22
NVIDIA Brev Launchables (external site), read 2026-11-22