PLAIN/TEXT — ISSUE 377/456 COMPUTER SCIENCE · FOUNDATION / EFFICIENT TRAINING · ~4 MIN READING DATE: 2027-10-13 ARCHIVE: https://plaintext.click/newsletter/ SUBJECT: How a model adapts without rewriting every setting How a model adapts without rewriting every setting ================================================== / START HERE A large spreadsheet can change in a coordinated way without editing every cell independently. A model is a computer program whose numerical settings are learned from examples. LoRA is a training method that represents an adjustment to those settings using two smaller tables of numbers. The original settings stay fixed while the smaller adjustment tables are learned. / WHY NOW This can make adapting a language model to a specialised task less demanding than training every setting. The saving comes from restricting the shape of the adjustment, not from discovering a way to update unlimited information for free. / THE IDEA A matrix is a rectangular table used in calculations. A model layer can multiply its input numbers by a large matrix of settings, often called weights. Ordinary full fine-tuning allows each of those weights to change independently. Low-rank adaptation instead builds the change by multiplying two thinner matrices. Rank describes how many independent directions that product can express. Choosing a small rank reduces trainable settings, while also limiting the changes available. The original matrix plus this product defines the adapted calculation. / THE FORMAL IDEA W_new = W + BA; trainable settings = r(d_in + d_out) - W = original table of settings; W_new = adapted table. W has d_out rows and d_in columns. B has d_out rows and r columns; A has r rows and d_in columns. - r = chosen rank limit; the actual product may have lower rank. BA means matrix multiplication, producing an adjustment with the same shape as W. Dimensions and parameter counts are whole numbers, not physical units. / RUN THE TINY EXAMPLE Change one thing. Predict what happens. Take a 4-by-4 W: full adaptation could train 16 entries. With r = 1, B has 4 entries and A has 4: train 8. Change only r to 2: train 2 × (4 + 4) = 16 entries. The saving disappears in this tiny example as the allowed adjustment becomes richer. The arithmetic shows why low rank matters. Using the name LoRA is not itself a guarantee of a small adapter: rank and the layers receiving adapters determine how many settings must be learned. Larger matrices can offer much bigger savings at low rank. / SO WHAT? For a document-classification project, this can make it practical to keep separate small adaptations for different tasks while sharing a base model. Still evaluate the adapted behaviour on untouched examples. A small training file can change important decisions, and saving trainable memory does not remove the memory needed to hold or run the base model. / ONE CAVEAT This omits the usual scaling factor and assumes an unmerged additive adapter. Not every desired change is well represented at low rank; training activations and other components also consume memory. / KEEP THIS Restricting an update to a few coordinated directions reduces trainable settings but constrains what can change. / SOURCE TRAIL [1] Hu and colleagues — LoRA https://arxiv.org/abs/2106.09685 [2] Hugging Face — LoRA concepts https://huggingface.co/docs/peft/main/en/conceptual_guides/lora NEXT: Why the same pressure can give two different readings --- HARD IDEAS. PLAIN TEXT. You are receiving this because you asked for one clear computer-science or physics idea each day. Unsubscribe: https://plaintext.click/unsubscribe View in browser: https://plaintext.click/newsletter/2027/10/2027-10-13-lora-low-rank.html From: Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click