TECHNOLOGY

Granite LoRA versus QLoRA: matched demos, parser rules and memory units

In this article
THE QUICK TAKE

Use matched demonstration runs and actual notebook metrics; full-versus-demo comparisons change training size, evaluation coverage and the interpretation of memory values.

A small classification experiment can make the LoRA–QLoRA memory trade-off concrete without establishing a universal ranking of the methods. The Granite tutorial examined here reports both approaches on a laptop GPU, but its full and demonstration runs use different training and evaluation sizes. Those distinctions determine which comparisons are actually controlled.

Identify the model path being compared

The project README adapts a Granite base model for AG News classification by generating a category label. LoRA freezes the base weights and trains adapters; the QLoRA path additionally loads a quantized base while retaining adapter training. A compact stored base does not imply that every arithmetic operation uses the same low-bit format.

The case uses an RTX 4060 Laptop GPU with 8GB of VRAM. That identifies a particular machine class and workflow, rather than demonstrating that any model of the same nominal size fits every similarly labeled GPU. Sequence length, checkpointing, adapter targets and live objects remain part of the resource requirement.

Compare demonstration runs with demonstration runs

The reviewed notebook defines a full training path and a smaller demonstration path. Its demonstration data uses 20,000 training examples and 500 generation-evaluation examples. The full path uses 110,000 training examples and an evaluation prefix of 2,000 examples.

Consequently, comparing full LoRA with demonstration QLoRA changes both training data and evaluation coverage. The matched demonstration runs are more informative about the method difference in that setup. Even there, equal aggregate accuracy does not prove identical predictions, statistical equivalence or equal behavior on another task.

Read the split and parser implementations

The README describes a stratified training split, while the reviewed notebook calls a shuffled train/test split without the stratification argument. The generation-evaluation subsets are prefix slices. We preserve the implemented selection rather than assuming that every prose description is an exact execution trace.

The evaluator also distinguishes strict accuracy from macro-F1 on parseable predictions. An unrecognized label counts as wrong for strict accuracy, while the known-only F1 calculation excludes it. Parse coverage is therefore necessary context. A changing parser or unknown-output rate can change the meaning of a score even when the model weights stay fixed.

Keep memory units and observation boundaries explicit

The notebook’s memory helper divides byte counts by powers of 1024, producing GiB even though variable names and several tables use GB. It records allocated, reserved and maximum values separately. Those are different measurements and should not be collapsed into a single unqualified VRAM number.

The README also contains approximate summary values and a more detailed memory table. We treat them as author-reported observations rather than independent measurements. A reproduction should identify peak-reset boundaries and account for objects retained across notebook stages; clearing a cache does not release a model that is still referenced.

Separate a useful tutorial from a general quality claim

The full QLoRA run is reported as incomplete, while the smaller matched runs provide the available comparison. That does not establish that quantization is lossless for arbitrary instructions, languages or long-context workloads. The task is category generation with a specific prompt and short output.

We read the pinned README and relevant notebook configuration, split, evaluator and memory helpers without executing cells or downloading weights. The reproducible-stack guide covers revision records, and the document-split guide covers source separation. The case is useful when the actual run sizes, parser rules and memory counters stay attached to its conclusions.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles