Hacker News new | ask | show | jobs
by godelmachine 951 days ago
What’s a Loras?
3 comments

From https://arxiv.org/abs/2106.09685:

> LoRA: Low-Rank Adaptation of Large Language Models

> An important paradigm of natural language processing consists of large-scale pre-training on general domain data and adaptation to particular tasks or domains. As we pre-train larger models, full fine-tuning, which retrains all model parameters, becomes less feasible. Using GPT-3 175B as an example -- deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive. We propose Low-Rank Adaptation, or LoRA, which freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks. Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times. LoRA performs on-par or better than fine-tuning in model quality on RoBERTa, DeBERTa, GPT-2, and GPT-3, despite having fewer trainable parameters, a higher training throughput, and, unlike adapters, no additional inference latency.

It's a smaller (space-wise) model that's much easier to train, both computation and input data-wise. It accomplishes a specific style or goal when combined with a full sized model.

An Emma Watson lora: https://civitai.com/models/123338/emma-watson-2010-sdxl?mode...

A lora to add motion trails: https://civitai.com/models/95680/motion-trail-after-image-or...

A lora to add a piano/black and white contrast style to the image: https://civitai.com/models/187675/piano-style-ebony-and-ivor...

If you view Civitai's list of all loras, sorted by most downloaded, you'll see a _lot_ of porn.

A kind of auxiliary model.