BeyondML (formerly MANN)
BeyondML is a Python package which enables creating sparse multitask artificial neural networks (MANNs) compatible with TensorFlow and PyTorch. This package contains custom layers and utilities to facilitate the training and optimization of models using the Reduction of Sub-Network Neuroplasticity (RSN2) training procedure developed by AI Squared, Inc.
Installation
This package is available through PyPi and can be installed via the following command:
pip install beyondml
To install the current version directly from GitHub without cloning, run the following command:
pip install git+https://github.com/Beyond-ML-Labs/BeyondML.git
Alternatively, you can install the package by cloning the repository from GitHub using the following commands:
# clone the repository and cd into it
git clone https://github.com/Beyond-ML-Labs/BeyondML
cd BeyondML
# install the package
pip install .
Mac M1 Users
For those with a Mac with the M1 processor, this package can be installed, but the standard version of TensorFlow is not compatible with the M1 SOC. In order to install a compatible version of TensorFlow, please install the Miniforge conda environment, which utilizes the conda-forge channel only. Once you are using Miniforge, using conda to install TensorFlow in that environment should install the correct version. After installing TensorFlow, the command pip install beyondml will install the BeyondML package.
Contributing
For those who are interested in contributing to this project, we first thank you for your interest! Please refer to the CONTRIBUTING.md file in this repository for information about best practices for how to contribute.
Vulnerability reporting
In the event you notice a vulnerability within this project, please open a GitHub Issue detailing the vulnerability to report it. In the event you would like to keep the report private, please email mann@squared.ai.
Capabilities
To view current capabilities within the BeyondML package, we welcome you to check the BeyondML documentation.
Feature Roadmap
Lists of features slated for this project will be added here.
Changes
Below are a list of additional features, bug fixes, and other changes made for each version.
MANN
The below version numbers and logged changes refer to the MANN package.
Version 0.2.2
- Small documentation changes
- Added
quantize_modelfunction - Added
build_transformer_blockandbuild_token_position_embedding_blockfunctions for transformer functionality - Removed unnecessary imports breaking imports in minimal environments
Version 0.2.3
- Per-task pruning
- Functionality for this feature is implemented, but usage is expected to be incomplete. Note that task gradients have to be passed retrieved and passed to the function directly (helper function available), and that the model has to initially be compiled using a compatible loss function (recommended 'mse') to identify gradients.
- It has been found that this functionality is currently only supported for models with the following layers:
- MaskedConv2D
- MaskedDense
- MultiMaskedDense
- Note also that this functionality does not support cases where layers of an individual model are other TensorFlow models, but supporting this functionality is on the roadmap.
- Iterative training using per-task pruning
- Functionality for this feature is implemented, but there are known bugs when trying to apply this methodology to models with the
MultiMaskedConv2Dlayer present
- Functionality for this feature is implemented, but there are known bugs when trying to apply this methodology to models with the
Version 0.3.0
- Support for PyTorch layers
- Support for additional custom objects in the
quantize_modelfunction - Added tests to the package functionality
- Added auto-generated documentation
BeyondML
The below version numbers and changes refer to the BeyondML package
Version 0.1.0
- Refactored existing MANN repository to rename to BeyondML
Version 0.1.1
- Added the
SparseDense,SparseConv,SparseMultiDense, andSparseMultiConvlayers tobeyondml.tflow.layers, giving users the functionality to utilize sparse tensors during inference
Version 0.1.2
- Added the
MaskedMultiHeadAttention,MaskedTransformerEncoderLayer, andMaskedTransformerDecoderLayerlayers tobeyondml.pt.layersto add pruning to the transformer architecture - Added
MaskedConv3D,MultiMaskedConv3D,MultiConv3D,MultiMaxPool3D,SparseConv3D, andSparseMultiConv3Dlayers tobeyondml.tflow.layers - Added
MaskedConv3D,MultiMaskedConv3D,MultiConv3D,MultiMaxPool3D,SparseConv3D,SparseMultiConv3D, andMultiMaxPool2Dlayers tobeyondml.pt.layers
Version 0.1.3
- Added
beyondml.ptcompatibility with more native PyTorch functionality for using models on different devices and datatypes - Added
train_modelfunction tobeyondml.tflow.utils - Added
MultitaskNormalizationlayer tobeyondml.tflow.layersandbeyondml.pt.layers
Version 0.1.4
- Updated documentation to use Sphinx
Version 0.1.5
- Updated requirements to use newer version of TensorFlow
- Fixed errors with changes to types of
input_shapein TensorFlow Keras layers - Fixed errors resulting from model/configuration changes with TensorFlow
Version 0.1.6
- Fixed issues with converting between masked and unmasked models in TensorFlow
Version 0.1.7
- Updated Pytorch implementation of Transformer-based architectures
Metadata
Release files for beyondml 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beyondml-0.1.7.tar.gz | 38.6 kB | Without provenance | Details for beyondml-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beyondml-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for beyondml-0.1.7-py3-none-any.whl |
Total release size: 113.5 kB
Release files / beyondml-0.1.7.tar.gz
| Download URL | beyondml-0.1.7.tar.gz |
|---|---|
| Size | 38.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c95239b9a1a19a99134ff92d96a64ca0838a7eb4af1df244f6872a533b7f5bd
|
|
BLAKE2b-256 checksum How to use checksums |
2f36c050359673f02d2dc7881d61e22f471611cbf430a0626b3ca827d1512a46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / beyondml-0.1.7-py3-none-any.whl
| Download URL | beyondml-0.1.7-py3-none-any.whl |
|---|---|
| Size | 74.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7095d2312b1d1b937587a1b5054fe07f0a4fea83c4c0cad5c920297bc4127e94
|
|
BLAKE2b-256 checksum How to use checksums |
51877a8f7c1c56eb9169acc33cf275c17ddbe00dacc157e94b1be1dc5ef9bdd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for beyondml 0.1.7
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.