This release is a pre-release and may not be stable for production use.
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.14 — see Installation — Requirements (source build).
rebel-compiler— required; not installed withtorch-rblnunless you request theruntimeextra (torch-rbln[runtime]). 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). Install torch from the PyTorch CPU index first, then torch-rbln from PyPI.
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).
- Configure access to the RBLN package index (see Authenticate to the RBLN package index below).
- 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).
Authenticate to the RBLN package index
rebel-compiler is installed from the RBLN package index (pypi.rbln.ai), which requires an RBLN Portal account. Without credentials, ./tools/dev-setup.sh pypi fails with:
❌ Cannot reach any rbln pypi index (no permission or network error).
Add your RBLN Portal credentials to ~/.netrc so pip/uv can authenticate:
machine pypi.rbln.ai
login <your-rbln-portal-id>
password <your-rbln-portal-password>
Then restrict its permissions (tools refuse a world-readable .netrc):
chmod 600 ~/.netrc
Alternatively, if you are using uv, you can provide the credentials via
environment variables instead of ~/.netrc:
export UV_INDEX_RBLN_USERNAME=<your-rbln-portal-id>
export UV_INDEX_RBLN_PASSWORD=<your-rbln-portal-password>
Re-run ./tools/dev-setup.sh pypi once the credentials are in place.
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 — release lifecycle, 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
Metadata
Release files for torch-rbln 0.5.0rc4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| torch_rbln-0.5.0rc4-cp314-cp314-manylinux_2_34_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.34+ x86-64 | Details |
| torch_rbln-0.5.0rc4-cp313-cp313-manylinux_2_34_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.34+ x86-64 | Details |
| torch_rbln-0.5.0rc4-cp312-cp312-manylinux_2_34_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.34+ x86-64 | Details |
| torch_rbln-0.5.0rc4-cp311-cp311-manylinux_2_34_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.34+ x86-64 | Details |
| torch_rbln-0.5.0rc4-cp310-cp310-manylinux_2_34_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.34+ x86-64 | Details |
Total release size: 6.8 MB
Release files / torch_rbln-0.5.0rc4-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | torch_rbln-0.5.0rc4-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ea092e7fff21105d7a363d7d2a2e4b80c8ad7e4c27c03533ad1edd48ab91a3ff
|
|
BLAKE2b-256 checksum How to use checksums |
f4ec8e6f7202f5609181c790c17a153028c6982b770c335513dc3e7c9c8be650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / torch_rbln-0.5.0rc4-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | torch_rbln-0.5.0rc4-cp313-cp313-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
be9770c3d51f5714506c0f43d702cdf10ff02753515361f4ad66d257782f75c4
|
|
BLAKE2b-256 checksum How to use checksums |
86f00b404d9f53ec03bc338c78650ab0b081d75d0f97c5e8b31eb1cb6e2d72ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / torch_rbln-0.5.0rc4-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | torch_rbln-0.5.0rc4-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
2f5b88ab5b6e690a9faf67f480fd0a44d34c28fc0a56d23b1cde2ba0c8c47ea1
|
|
BLAKE2b-256 checksum How to use checksums |
d2722f48c93a97f2993bb06bd8a6062e8e2f5748fd065c5fc8ad2f750325f060
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / torch_rbln-0.5.0rc4-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | torch_rbln-0.5.0rc4-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
647b69e746134a1f4f2230030750430235679761a34b508eca665f3fca7a6250
|
|
BLAKE2b-256 checksum How to use checksums |
11c9cbc262f000e182e0df5c7bf9b24c5c0449ef4c1027c1891ab21c4f569894
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / torch_rbln-0.5.0rc4-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | torch_rbln-0.5.0rc4-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ff47d9705c6ed361a9313d45c05cdff265e07fea34f90b22afaa9fd9fea04be6
|
|
BLAKE2b-256 checksum How to use checksums |
ce8a936702a0825df018356e047a39e5af7b551aaa021d192bd54ce4229996a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|