Releases: pedrovergueiro/dNaty
Releases · pedrovergueiro/dNaty
Release list
v2.0.1 — Documentation corrections
v2.0.1 — Documentation corrections only
No API, algorithm, or benchmark changes. Fixes wrong numbers published in v2.0.0 README.
Fixed
- Electrical Fault Detect: −86.0% → −83.0% FLOPs; 99.04% → 99.25% accuracy
- Breast Cancer (UCI): 100.0% → 99.56% accuracy
- Headline range: "8–86%" → "8–83% fewer FLOPs"
- METHODOLOGY.md: max dataset corrected (−86% Electrical Fault → −83.4% Dry Bean Quality)
Install
pip install dnaty==2.0.1v2.0.0 — Hardware-aware Latency NAS, N:M Sparsity, INT8
What's new in v2.0.0
Hardware-aware Latency NAS
LatencyEvolver— bi-objective NAS minimising(1−accuracy, latency_ms)instead of FLOPs. Uses real ONNX Runtime measurement; optional GBM surrogate for 80% of evaluations.compress(model, data, target="latency", hw_target="rpi4")— newtargetparameter. Fully backwards-compatible.detect_hw()/latency_scale(device)/estimate_latency(ms, from, to)— cross-device estimation without hardware. Calibrated: RPi4 (9×), RPi5 (4.5×), Jetson Nano (5×), Apple M1 (0.6×).LatencyPredictor— GBM (LightGBM) surrogate. Degrades gracefully to analytical fallback.
N:M Structured Sparsity
apply_nm_sparsity(model, n=2, m=4)— 2:4 structured sparsity baked into weights, ONNX-ready.sparsity_stats(model)— global and per-layer sparsity report.compress(model, data, sparsity="2:4")— apply automatically after NAS.
Quantization-aware Search
QuantAwareEvolver— fitness evaluated under INT8. Filters architectures that degrade under quantization during search. ~20% overhead vs standard.compress(model, data, quant_aware=True)— enable via parameter.result.quantize()— applytorch.quantization.quantize_dynamicin one call.
Pandas / NumPy Auto-input
compress()now accepts(X, y)tuple,pandas.DataFrame, ornumpy.ndarraydirectly — no manual DataLoader needed.
Telemetry Flywheel
- Every
compress()call appends arch/FLOPs/latency/CPU info to~/.dnaty/telemetry.jsonl. Seeds the GBM latency predictor. Never raises.
New Scripts
scripts/build_latency_dataset.py— build GBM latency surrogate from measured ONNX timings.
Install
pip install dnaty==2.0.0Benchmarks
| Dataset | FLOPs ↓ | Val acc |
|---|---|---|
| Dry Bean Quality | −83.4% | 92.43% |
| Predictive Maint. (AI4I) | −83.1% | 96.70% |
| Electrical Fault Detect | −83.0% | 99.25% |
| Credit Fraud FULL (284K) | −64.0% | 99.96% |
| HAR Sensors | −46.8% | 99.17% |
| MNIST (full 70K) | −41.8% | 98.68% |
Continual learning (Split-MNIST, 5 tasks): 4.9× less forgetting than EWC (BWT −0.204 vs −0.998).
Full changelog
See CHANGELOG.md for complete details.