Rebellions Extension for PyTorch
Project description
PyTorch RBLN
About
PyTorch RBLN (torch-rbln) is a PyTorch extension that allows natural use of Rebellions NPU compute within PyTorch. By implementing eager mode, which operates in a define-by-run fashion, it supports the full lifecycle of model development, deployment, and serving in the PyTorch ecosystem. It is also convenient for debugging and related workflows.
The same interface style as CPU and GPU applies — the rbln device, torch.rbln, and torch.compile — so developers and customers can target RBLN NPUs with familiar APIs. Operations on rbln tensors are integrated via PyTorch’s out-of-tree extension path; execution is coordinated with the RBLN compiler and runtime (rebel-compiler).
PyTorch RBLN is currently in beta and under active development. APIs may change between releases, backward compatibility is not guaranteed, and production use is not recommended yet. For the full notice, architecture, supported operators, and tutorials, see PyTorch RBLN — Overview in the RBLN SDK documentation. For wheels, rebel-compiler, and building from source, see Installation.
Getting started
Prerequisites
- Python 3.10–3.13 — see Installation — Requirements (source build).
rebel-compiler— required; not installed withtorch-rbln. Use an RBLN Portal account and the RBLN package index as described in Install pre-built wheels.
Install pre-built wheels
torch-rbln (public wheel; torch resolves to 2.10.0+cpu via the PyTorch CPU index):
pip3 install torch-rbln --extra-index-url https://download.pytorch.org/whl/cpu
For rebel-compiler and the rest of the setup, see Prerequisites above and Installation.
Build from source
- Install uv (see Installation — Prerequisites in the SDK docs).
- Follow Build from source (venv,
rebel-compiler, editable build, manual steps).
git clone https://github.com/RBLN-SW/torch-rbln.git
cd torch-rbln
uv venv .venv && source .venv/bin/activate
./tools/dev-setup.sh pypi
rebel-compiler must be available in the same environment before the torch-rbln build finishes (see Prerequisites).
Documentation
RBLN SDK (hosted)
- Overview — design, components, and entry points into the PyTorch RBLN docs
- Installation — pre-built wheels,
rebel-compiler, build from source - Running and debugging with PyTorch RBLN — basic usage and debugging
- Running a LLM model: Llama3.2-1B —
transformersexample - Supported Ops — operator coverage
- APIs — Python API reference
- Troubleshooting —
librbln/torch_rbln.diagnose, core dumps, logging, dtype / CPU, memory (maintained in the RBLN SDK docs)
This repository
- Configuration — environment variables and runtime options
- Test Guide — local test runs
- Linting — code style and lint
- Third-party update — PyTorch pin, upstream files,
rebel-compilerversion bumps inpyproject.toml - Release Process — branch model, versioning, tagging, and publication
Contributing
See docs/CONTRIBUTING.md.
License
Apache License 2.0 — see LICENSE and NOTICE.
Contact
- Community: discuss.rebellions.ai
- Email: support@rebellions.ai
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 Distributions
Built Distributions
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 torch_rbln-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 788.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
413243b275c21c5841a2005d7008c77e20f97be8efbb8afd96a9ae512f0512c4
|
|
| MD5 |
5c1858b0348a4c33484763c6e81af7d6
|
|
| BLAKE2b-256 |
fbe8143c1b74b7a900f72d0f92f290b829dd67ed7edee521f6e78fed91908cb5
|
File details
Details for the file torch_rbln-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 787.3 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c26d90c991ae0bb123129e0ed820c2ef827a3c8a809b68171de1c52963399b82
|
|
| MD5 |
37e16f7be854f81c9c3cf8e81ee7d26a
|
|
| BLAKE2b-256 |
c116c5b147fff84e90b2125d29e624b862faf85b3e70e79a47e701dd46fb32aa
|
File details
Details for the file torch_rbln-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 785.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
987f7adb6143782f7a3a157d7bff8f6a2bc903a085f981d9dcea5178e3a63959
|
|
| MD5 |
b67e7687bb773cb46426e472c9269835
|
|
| BLAKE2b-256 |
64cbf1737196908628304a13a98396edad811c070338f77a84d9454007e91cc8
|
File details
Details for the file torch_rbln-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 784.8 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad3c8b95846ec50a760b43d862a323cf7a57ba0ccd50f071337a86fcb24ce22
|
|
| MD5 |
0d99f371270899848995fb30820742b1
|
|
| BLAKE2b-256 |
a861113aaca8fd7904637b06465df92a31d88e24cea4aeb07dafaacf5cfad811
|