Skip to main content

A minimal PyTorch implementation of LoRA

Project description

Pytora

A minimal pytorch implementation for lora via pytorch parametrizations

Installation

pip install pytora

Usage

from pytora import apply_lora

apply_lora(
    model,
    lora_r = 4,
    lora_alpha = 1,
    lora_dropout = 0.0
)

A simple example use case with a pretrained huggingface model can be found in demo.ipynb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytora-0.0.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

pytora-0.0.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file pytora-0.0.4.tar.gz.

File metadata

  • Download URL: pytora-0.0.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for pytora-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5660b41cf18d6bc1b5e866fdf57d2f4d9d0515199dbc1a1f8d5cf9e46398c9f3
MD5 6c842cdc518a1d864f69299b5d6abff2
BLAKE2b-256 3a7b9f80fd9d636bddd23dab11558538b163b2e6b89ade79cdb30c5150f7671f

See more details on using hashes here.

File details

Details for the file pytora-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pytora-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for pytora-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8cb4bcb23f46ae43aa658f0232403df3e3c7df5d1abbf6146a5bf53145a639
MD5 478e93266902af7e8ccf25f1a402258a
BLAKE2b-256 68fa7a65caabc7b24f8d54b1e9c48c2dd870690202f35cf2bfad28c090e98236

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page