Reviewed on November 24, 2026. The old version used ChatML tokens that do not match TinyLLaMA, an obsolete TRL API, and unsupported speed/VRAM guarantees. TinyLLaMA belongs to the TinyLlama project, not Meta. A 1.1B parameter count alone does not establish quality or resource needs.
1. Scope and cautions
This assumes a CUDA-capable NVIDIA GPU. The first run downloads the model from Hugging Face, while training data stays in local JSONL and is not uploaded. Also control logs, caches, backups, and model artifact storage.
2. Local data
Store one conversation JSON object per line, without secrets or personal data. Use TinyLLaMA tokenizer’s chat template. The scaled LoRA update is \(\Delta W=(\alpha/r)BA\). Code settings are starting points, not performance guarantees.
| |
| |
3. QLoRA code
Keep evaluation data out of training and compare the adapter with the base model on unseen inputs. Loss alone does not prove usefulness or safety. Check factual errors, language-specific quality, and data leakage.
| |
4. Evaluation and operation
Training saves an adapter. Check license and memory before merging or quantizing. Do not expose an unauthenticated API on 0.0.0.0; bind to 127.0.0.1 or use a gateway with authentication, TLS, and network restrictions.
