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
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5660b41cf18d6bc1b5e866fdf57d2f4d9d0515199dbc1a1f8d5cf9e46398c9f3 |
|
MD5 | 6c842cdc518a1d864f69299b5d6abff2 |
|
BLAKE2b-256 | 3a7b9f80fd9d636bddd23dab11558538b163b2e6b89ade79cdb30c5150f7671f |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba8cb4bcb23f46ae43aa658f0232403df3e3c7df5d1abbf6146a5bf53145a639 |
|
MD5 | 478e93266902af7e8ccf25f1a402258a |
|
BLAKE2b-256 | 68fa7a65caabc7b24f8d54b1e9c48c2dd870690202f35cf2bfad28c090e98236 |