skillfed

loralib

PyTorch implementation of low-rank adaptation (LoRA), a parameter-efficient approach to adapt a large pre-trained deep learning model which obtains performance on-par with full fine-tuning.

loralib v0.1.2 214.3K downloads/30d#9,422 on PyPI13,734
Permissive license DORMANT released

What it is and what it does

loralib is a library that implements Low-Rank Adaptation, a parameter-efficient fine-tuning technique for large language models. Instead of updating all weights during fine-tuning, LoRA freezes the original model weights and trains only small rank-decomposition matrices, dramatically reducing the number of trainable parameters and storage requirements while maintaining task performance.

The library integrates with transformer architectures and enables efficient task-switching during deployment without introducing inference latency. It requires Python 3.6 or later and has no external runtime dependencies, making it lightweight to install. The package is designed for use with pre-trained models from standard model repositories.

Use it for:

  • Fine-tune large language models on specific tasks while storing only a fraction of the parameters needed for full fine-tuning.
  • Adapt pre-trained models to multiple downstream tasks with minimal storage overhead for each task-specific checkpoint.
  • Reduce training time and memory consumption when working with models in the billions of parameters.
  • Implement efficient multi-task learning where different LoRA adapters can be swapped during inference.
  • Integrate parameter-efficient adaptation into production systems where model size and deployment efficiency matter.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

loralib provides PyTorch modules that implement Low-Rank Adaptation (LoRA), enabling efficient fine-tuning of large language models by training only small rank-decomposition matrices while freezing original weights.

Yes, if you are actively fine-tuning large language models and need parameter efficiency. The package is stable and well-tested on standard benchmarks. However, note that loralib has been dormant since August 2023 and may not track the latest library changes, so verify compatibility with your current dependencies before adopting it in new projects.

Install

loralib on PyPI

pip

pip install loralib

uv

uv add loralib

poetry

poetry add loralib

Installing loralib

Before you install

Installation is straightforward with no runtime dependencies. The package is dormant (last release August 2023), but remains stable for its core use case; note that alternative maintained implementations now exist.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install loralib

import loralib as lora

# Replace model layers with LoRA equivalents
model.layer = lora.Linear(in_features, out_features, r=8)

# Mark only LoRA parameters as trainable
lora.mark_only_lora_as_trainable(model)

Requires a deep learning framework (PyTorch) to be installed separately; loralib provides only the LoRA layer implementations.

Verify before relying

  • Whether loralib remains compatible with current PyTorch and transformer library versions given its dormant maintenance status.
  • Performance characteristics and memory savings compared to other parameter-efficient fine-tuning implementations.
  • Whether the package tracks breaking changes in its dependencies since the last release in August 2023.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,083 days since the last release
Last repo commit
First released
Downloads 214,254/month — #9,422 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: loralib-0.1.2-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

low-rank adaptation pytorchefficient fine-tuning large modelsparameter-efficient model adaptationlora pytorch implementationreduce trainable parameters llmtask-specific model tuningadapter layers for transformers
parameter-efficient-tuningtransformer-adaptationmodel-compression

More Artificial Intelligence packages

Further reading