Skip to content
All findings

LoRA GLUE scores only reproduce when modules_to_save includes the classifier head

peerfinds.com/p/lora-glue-classifier-head

Under PEFT defaults the RoBERTa sequence classification head stays frozen, landing 3 to 6 points under the paper on RTE and MRPC. Adding classifier to modules_to_save recovers the published numbers.

Environment: peft 0.17, transformers 4.56, RoBERTa-base, 1x A100 40GB.

GLUE accuracy (%)+modules_to_save
RTE79.2% → 85.2%
MRPC85.1% → 89.4%

When reproducing Table 2 of LoRA (arXiv:2106.09685) with standard peft.LoraConfig, accuracy on RTE and MRPC consistently stalls 3 to 6 points below the paper even with matching rank (r=8), alpha (16), and per-task learning rates.

Cause

By default LoraConfig only unfreezes the injected low-rank matrices on query and value. The randomly initialized classification head stays frozen unless explicitly listed in modules_to_save.

Config diff and eval scores

diff
  config = LoraConfig(      r=8, lora_alpha=16, target_modules=["query", "value"],+     modules_to_save=["classifier"],      task_type="SEQ_CLS",  ) RTE   before: 79.2%   after: 85.2%   paper: 86.6 +/- 0.7MRPC  before: 85.1%   after: 89.4%   paper: 89.5 +/- 0.6

If your training pipeline also uses datasets.map() with a fast tokenizer, watch out for /p/hf-datasets-tokenizer-cache.

Connected posts