﻿# LaMDA: published memory values and the freezing schedule

The full published LaMDA paper identifies A6000 and absolute BART memory peaks, while the pinned trainer needs a separate freezing-schedule audit.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/lamda-adapter-memory-published-graph-freezing-schedule/
Language: en

LaMDA changes the adapter path to reduce both the number of updated parameters and the activations retained for their gradients. The published work contains more concrete memory evidence than an abstract-only description suggests. Its current public code also needs to be distinguished from the paper's intended freezing schedule before treating it as a reproduction.

## A small learned matrix inside the adapter

The [published paper](https://aclanthology.org/2024.findings-emnlp.563.pdf) places a trainable square matrix between projection matrices. The first projection is frozen; the second is gradually frozen in the described training procedure. LaMDA++ additionally allocates different ranks using spectral properties of pretrained weights. The aim is to retain a lower-dimensional activation in the adapter path, rather than save the full input solely to update that projection.

This does not remove the base model, all other activations or runtime workspaces. Reducing the adapter's updated state therefore need not reduce total peak memory by the same factor. The [LoRA memory guide](/journal/lora-qlora-memory/) explains why parameter count alone is not a complete training-memory budget.

## The published graph has absolute memory values

The paper explicitly identifies a single NVIDIA A6000 for its experiments and attention query, key, value and feed-forward linear targets. Figure 4, inspected in the actual PDF, gives BART-large XSUM peaks for LoRA versus LaMDA of 11.5 versus 8.9 GB at batch 8, 20.9 versus 15.7 GB at batch 16, and 39.1 versus 29.5 GB at batch 32.

Those are graph-labeled training observations, not a minimum GPU specification or a guarantee for every sequence length. They also correct the earlier assumption that absolute values and hardware were unavailable. Exact profiling precision and a full allocator measurement recipe should not be inferred from the graph alone.

## Memory and quality remain separate comparisons

For LLaMA2-7B, the paper reports GSM8K results of 36.9 for LoRA rank 16, 37.9 for LaMDA rank 32 and 38.2 for LaMDA++ target rank 32. Corresponding WikiText perplexities are 5.43, 5.45 and 5.41. The mixed directions reinforce why the comparison needs task-specific metrics rather than an unqualified statement that every quality measure improves.

The appendix's effective trainable-parameter count incorporates how long a projection remains trainable. It is a schedule-weighted quantity, not simply the number of parameters present in a saved checkpoint. Different rank and freeze schedules change both adaptation capacity and the meaning of that count.

## The pinned implementation needs a schedule audit

The public [adapter source](https://raw.githubusercontent.com/arminazizi98/lamda/8ad34b46e15496be1279afebb80206cd91163933/lamda.py) inserts the square layer and freezes the first projection. However, the [pinned trainer](https://raw.githubusercontent.com/arminazizi98/lamda/8ad34b46e15496be1279afebb80206cd91163933/custom_trainer.py) computes the number of masked columns from elapsed microbatches divided by a fraction of total steps, without multiplying by the projection rank. Under the ordinary loop shown in that file, the resulting count does not implement complete rank-wide freezing at the paper's stated early boundary.

This is a static source discrepancy, not a training experiment or proof of the original runs' behavior. The [repository README](https://raw.githubusercontent.com/arminazizi98/lamda/8ad34b46e15496be1279afebb80206cd91163933/README.md) identifies research code; the paper's results should remain attributed to the publication while the selected code revision is audited separately. The [software reproducibility guide](/journal/software-stack-reproducibility/) explains that distinction. LaMDA supplies substantive memory evidence, with reproducibility depending on the actual adapter initialization, schedule and measurement configuration.
