Structurally Adaptive Learning — training-time sparsification for robust neural networks
Project description
sal-torch
Structurally Adaptive Learning for PyTorch
Training-time sparsification that makes neural networks structurally resilient to compression.
Install
pip install sal-torch # core
pip install sal-torch[hf] # + HuggingFace Trainer
pip install sal-torch[all] # everything
from sal import SALConfig, SALCallback
config = SALConfig.auto(model)
trainer = Trainer(model=model, callbacks=[SALCallback(config)])
trainer.train()
Three lines. Any transformer. Compression-resilient.
Examples
examples/quickstart.py— 3-line SAL training on DistilBERTexamples/standalone_fi.py— Fragility Index scan, no trainingexamples/full_control.py— manual config + standalone trainerexamples/compare_with_without_sal.py— SAL vs. baseline under compression
New here? Start with docs/getting_started.md.
License
BSL 1.1 — free for research and evaluation. Commercial production requires a license.
Built by Cognitive Engineering in Switzerland.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sal_torch-0.1.0.tar.gz.
File metadata
- Download URL: sal_torch-0.1.0.tar.gz
- Upload date:
- Size: 63.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d502223ca3429eafa2afc25acd6d27ae8d1e6ff3d08976a1927cd5ea4a7d734e
|
|
| MD5 |
56c95552a44716b4edda81e30a1c987e
|
|
| BLAKE2b-256 |
7ea8b430746a605eae6c98d09ccfc5bdf74ed312af58262d2a83789068b844cb
|
File details
Details for the file sal_torch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sal_torch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b152eb5a2ea551fb5bf83e662dae59c1863c96b4c4b251be098352d4458cc3f6
|
|
| MD5 |
154722a60852fa7edcbebe05f88478d1
|
|
| BLAKE2b-256 |
63b6f5b310f07a1aef0b2cdfb86cf3258cab1fbbe8725555e524be3808d02e8f
|