This release is a pre-release and may not be stable for production use.
Optimum RBLN
🤗 Optimum RBLN provides an interface between HuggingFace libraries (Transformers, Diffusers) and RBLN NPUs, including ATOM and REBEL.
This library enables seamless integration between the HuggingFace ecosystem and RBLN NPUs through a comprehensive toolkit for model loading and inference across single and multi-NPU environments. While we maintain a list of officially validated models and tasks, users can easily adapt other models and tasks with minimal modifications.
Key Features
🚀 High Performance Inference
- Optimized model execution on RBLN NPUs through RBLN SDK compilation
- Support for both single and multi-NPU inference
- Integrated with RBLN Runtime for optimal performance
🔧 Easy Integration
- Seamless compatibility with HuggingFace Model Hub
- Drop-in replacement for existing HuggingFace pipelines
- Minimal code changes required for NPU acceleration
Seamless Replacement for Existing HuggingFace Code
Swap the HuggingFace class for its RBLN counterpart. Passing a HuggingFace model id compiles the
model for the NPU on the first run; passing a directory of previously compiled artifacts loads them
directly, so compilation is skipped.
- from diffusers import StableDiffusionXLPipeline
+ from optimum.rbln import RBLNStableDiffusionXLPipeline
# Load model
model_id = "stabilityai/stable-diffusion-xl-base-1.0"
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
- pipe = StableDiffusionXLPipeline.from_pretrained(model_id)
+ pipe = RBLNStableDiffusionXLPipeline.from_pretrained(model_id)
# Generate image
image = pipe(prompt).images[0]
# Save image result
image.save("image.png")
+ # (Optional) Save compiled artifacts to skip the compilation step in future runs
+ pipe.save_pretrained("compiled_sdxl")
Compile Ahead of Time with the CLI
Instead of compiling inside your script, you can compile a model up front with the optimum-rbln-cli
command and load the resulting artifacts later:
# Compile and save the artifacts to ./compiled_qwen3
optimum-rbln-cli --model-id Qwen/Qwen3-4B -o ./compiled_qwen3 \
--max_seq_len 8192 --batch_size 1 --num_devices 4
from optimum.rbln import RBLNQwen3ForCausalLM
# Load the compiled artifacts (no recompilation)
model = RBLNQwen3ForCausalLM.from_pretrained("./compiled_qwen3")
Useful CLI helpers:
optimum-rbln-cli --list-classes # list available RBLN classes
optimum-rbln-cli --class RBLNQwen3ForCausalLM --show-rbln-config # show accepted rbln_config keys
optimum-rbln-cli --examples # show more usage examples
Documentation
Check out the documentation of Optimum RBLN for more advanced usage.
Getting Started
Note: The
rebel-compilerlibrary, which is required for runningoptimum-rbln, is only available for approved users. Please refer to the installation guide for instructions on accessing and installingrebel-compiler.
Install from PyPI
To install the latest release of this package:
pip install optimum-rbln --extra-index-url https://download.pytorch.org/whl/cpu
Install from source
Prerequisites
The below command installs optimum-rbln along with its dependencies.
git clone https://github.com/rbln-sw/optimum-rbln.git
cd optimum-rbln
./scripts/uv-sync.sh
Need Help?
- Join discussions and get answers in our Developer Community
- Contact maintainers at support@rebellions.ai
Metadata
Release files for optimum-rbln 0.11.3a8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| optimum_rbln-0.11.3a8.tar.gz | 668.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| optimum_rbln-0.11.3a8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / optimum_rbln-0.11.3a8.tar.gz
| Download URL | optimum_rbln-0.11.3a8.tar.gz |
|---|---|
| Size | 668.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
840ceb4aaf7c60fc1ca19a0f737ec757f21fe0edd0c7ab29fafc871844ab403b
|
|
BLAKE2b-256 checksum How to use checksums |
44014b594368256d1d5de81832be2869aedd9c80fc397886351de57b7152cd4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.14
|
Release files / optimum_rbln-0.11.3a8-py3-none-any.whl
| Download URL | optimum_rbln-0.11.3a8-py3-none-any.whl |
|---|---|
| Size | 696.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd2296e5996598ba46574c2c1b5b701bab5d8eee1d1f61cf0fb03545c8881108
|
|
BLAKE2b-256 checksum How to use checksums |
4fd7c9cb0743d03bc74458d2269cf8d469f810d156aaca5124270b87e0906a57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.14
|