liveBook · Manning

Low-rank adaptation

As explained in The Complete Obsolete Guide to Generative AI

LoRA is a parameter-efficient fine-tuning technique that adapts a pretrained model by learning low-rank updates rather than modifying all model parameters.

Fine-tuning a large language model can sound like a job for a warehouse full of GPUs and an electricity bill with its own zip code. Low-rank adaptation (LoRA) is a parameter-efficient alternative: instead of changing every parameter in a pretrained model, it learns low-rank updates for the adaptation. The practical appeal is simple—fine-tuning can use a tiny fraction of the resources and time associated with older, heavier approaches. section 9.1

LoRA belongs to a broader workflow for making an existing model suit a particular use case. Rather than starting an LLM project from scratch, choose an existing model and its weights, then decide whether fine-tuning is needed. Configuration can adjust behavior, while fine-tuning is the more involved route for customization with your own data. section 9.1 section 9.4

Keep the trade-off in view:

  • LoRA makes fine-tuning more feasible on limited hardware, but it does not make the overall task magically effortless. section 9.1 section 9.4
  • A GPU with 24 GB of graphics RAM, such as an Nvidia 3090, is presented as sufficient for efficient LoRA fine-tuning in many LLM build operations; larger jobs may require multiple GPUs. section 9.4
  • Fine-tuning differs from ordinary configuration because it retrains a model and relies on large datasets; the intended customization comes from using data you control. section 9.4

A sensible decision point

Suppose an existing model is already close to what you need. First try configuration for the task at hand. If its behavior still needs deeper, data-driven customization and you have suitable GPU capacity, consider LoRA fine-tuning rather than assuming every model parameter must be retrained. Verify the resulting model against the actual use case; lower resource use is not a guarantee of better outputs. section 9.1 section 9.4

How The Complete Obsolete Guide to Generative AI covers it

How deep it goes
Introduces LoRA through its efficiency and hardware implications, while deferring practical implementation and low-rank mechanics.
Examples
Uses Nvidia 3090 hardware and possible multi-GPU setups as the concrete LoRA fine-tuning examples.
What it assumes
Assumes familiarity with existing models and GPUs while introducing fine-tuning as a distinct customization path.
What you can do after
Evaluate/understand LoRA as a lower-resource fine-tuning option for customizing an existing model with your own data.
How it connects
Connects LoRA to fine-tuning, model weights, model configuration, GPUs, quantization, and training data.

Also explained in

Compare how 9 books explain low-rank adaptation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Complete Obsolete Guide to Generative AI. The section links point to the parts of the book it draws on.