Low-rank adaptation (LoRA) reduces fine-tuning memory use by freezing a model’s original weights and training a compact low-rank update to selected projections. section 16.3.3
A smaller update
For a 2,048 × 2,048 kernel, the frozen weights number 4,194,304. A rank-8 update uses two smaller matrices with 32,768 parameters in total. In KerasHub, LoRA can be enabled on a model backbone with `enable_lora(rank = 8L)`. section 16.3.3
Listing 16.13 Enabling LoRA training for a KerasHub model
gemma_lm$backbone$enable_lora(rank = 8L)
See the KerasHub call for enabling LoRA on a model backbone. section 16.3.3








