Skip to main content

SORSA Python Package

Initialize SORSA model:

from sorsa import SORSAConfig, SORSAModel, SORSATrainer, SORSATrainingArguments
config = SORSAConfig(
    base_model_name_or_path="meta-llama/Llama-2-7b-hf",
    target_modules=[
        "q_proj",
        "o_proj",
        "k_proj",
        "v_proj",
        "gate_proj",
        "up_proj",
        "down_proj",
    ],
    rank=16,
    dropout=0,
)
sorsaModel = SORSAModel(config)
self.model.to("cuda")
self.model.sorsa_init() # Initialize SORSA adapters.

Train SORSA model:

trainingArguments = SORSATrainingArguments(
    # ...
    gamma=4e-4,
)
trainer = SORSATrainer(
        model=sorsaModel,
        args=trainingArguments,
        train_dataset=train_dataset,
)
trainer.train()

Metadata

Release files for sorsa 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sorsa 1.0.1
File Size Uploaded Provenance Actions
sorsa-1.0.1.tar.gz 56.8 kB Without provenance Details for sorsa-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sorsa 1.0.1
File Interpreter ABI Platform Actions
sorsa-1.0.1-py3-none-any.whl Python 3 none any Details for sorsa-1.0.1-py3-none-any.whl

Total release size: 115.6 kB

Release files / sorsa-1.0.1.tar.gz

Download URL sorsa-1.0.1.tar.gz
Size 56.8 kB
Tags Source
SHA-256 checksum
How to use checksums
02834961b03629b705b8ddeff5a4831411b4a9f03e789b53bf4daa6d973cb741
BLAKE2b-256 checksum
How to use checksums
f2f6ebc3881c9efbc18439a273d80f8397ed58a7cf94f45ccd6a039a18c02858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / sorsa-1.0.1-py3-none-any.whl

Download URL sorsa-1.0.1-py3-none-any.whl
Size 58.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
175ccfdf9f54c1160ad64f6babf91ed6915f06d77cc8339cf6f8bdf493752414
BLAKE2b-256 checksum
How to use checksums
624c02854a54c42fed3471267ff28151f3e523728505a1562029404cbd54f01c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for sorsa 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page