Adept
Automatic Differentiation Engine for Tensor Processing
Dependencies | Build | Usage example| Developer rules
A research and educational project for developing a platform for training and inference machine learning models, with a GPU backend implemented on the Vulkan API.
Supported platforms:
- Linux x86_64
- Android aarch64
CPU:
-
Armv7+: NEON_WITHOUT_AES, NEON, NEON_BF16, SVE, SVE2, SVE_256, SVE2_128;
Tested on: Qualcomm Snapdragon 870
-
x86: SSE2, SSSE3, SSE4, AVX2, AVX3, AVX3_DL, AVX3_ZEN4, AVX3_SPR;
Tested on: 13th Gen Intel(R) Core(TM) i9-13900HX, AMD Ryzen™ AI 9 HX 370w
GPU:
-
Vulkan (NVIDIA, AMD, Intel, Qualcomm, etc.)
Tested on: NVIDIA RTX 4070 8Gb, Radeon™ 890M × 24, Adreno (TM) 650, Intel(R) Graphics (RPL-S)
Dependencies
- OpenBLAS - operations with 2D matrices
- Highway - cross-platform SIMD intrinsics
- hash_flat_map - fast flat_map container
- oneTBB - parallel algorithms
- Vulkan SDK - low-level API and development tools for GPU
- Python 3.12 - the Python language
Optional dependencies
- pybind11 - binding C++ code to Python
- protobuf - Protocol Buffers library for ONNX support
- ONNX - only the protobuf description of the Open Neural Network Exchange format is used
- OpenMPI - library for distributed message processing
Development environment
The project is developed using C++20(gcc-13.3.0) and the CMake build system.
Instructions for setting up the development environment can be found in the Wiki.
Installation
pip install https://storage.yandexcloud.net/adept-releases/adept-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Getting the source code:
git clone --recursive https://gitverse.ru/adept-platform/adept.git
cd adept
# if you are updating an existing checkout
git submodule sync
git submodule update --init --recursive
Building:
WITH_PYTHON_BINDINGS=1 ./build_dependencies.sh
mkdir -p build && cd build
cmake .. -DWITH_TESTS=ON -DWITH_PYTHON_BINDINGS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --target mlp tests adeptpy
cd ../
./build_python_wheel.sh
To build with Vulkan support, use the CMake configuration flag:
cmake -DWITH_VULKAN=ON ...
To build for the Android platform, use the following flags:
BUILD_ANDROID=1 ./build_dependencies.sh
cmake -DBUILD_ANDROID=ON ...
Python interface usage example:
Notebook implementing MNIST classification using LeNet.
Example of a simple perceptron:
class MLP(Module):
def __init__(self):
super().__init__("MLP")
self.l1 = Linear(28 * 28, 512, device, dtype)
self.l2 = Linear(512, 256, device, dtype)
self.l3 = Linear(256, 10, device, dtype)
def forward(self, x):
out = relu(self.l1(x))
out = relu(self.l2(out))
out = self.l3(out)
return out
...
dataset = MNISTDataset(train_images_file, train_labels_file, dtype, device, True)
dataloader = DataLoader(dataset, batch_size)
mlp = MLP()
optimizer = SGD(mlp.parameters(), lr)
for _ in tqdm(range(epochs), unit="epoch"):
pbar = tqdm(dataloader, unit="batch")
for b_i, batch in enumerate(pbar):
x, y = batch
out = mlp.forward(Variable(x))
loss = cross_entropy_with_logits(out.squeeze(1), Variable(y).squeeze(1))
if b_i % 64 == 0:
pbar.set_postfix(loss=loss.data().float_at([0, 0]))
loss.backward()
optimizer.step()
optimizer.zero_grad()
optimizer.set_lr(optimizer.lr() * lr_decay)
More detailed examples can be found in the apps directory.
Metadata
Release files for adept-platform 0.2.1
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 |
|---|---|---|---|---|
| adept_platform-0.2.1.tar.gz | 14.4 MB | Without provenance | Details for adept_platform-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adept_platform-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.34+ x86-64 | Details for adept_platform-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl |
Total release size: 29.0 MB
Release files / adept_platform-0.2.1.tar.gz
| Download URL | adept_platform-0.2.1.tar.gz |
|---|---|
| Size | 14.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ae4e5af71d5e5a7f17100d5a4cc5919684244394ca759059d5fbe5000f5782b
|
|
BLAKE2b-256 checksum How to use checksums |
cc4fdd2ca371c6b304332ba5c7e75715a7d4392e1c19500c2606a503517d1894
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / adept_platform-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | adept_platform-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 14.6 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ee0f61a0c9aaaa93e8a214c00b6ccd2ef04a294433a698fb8bbd0fb9c2a395df
|
|
BLAKE2b-256 checksum How to use checksums |
793da822722fffd47eca7e0abb91c319de2e65aed31dfbf3adff445e20e77a5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for adept-platform 0.2.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.