Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Optimum RBLN

Optimum RBLN

PyPI version License Documentation Contributor Covenant

🤗 Optimum RBLN provides an interface between HuggingFace libraries (Transformers, Diffusers) and RBLN NPUs, including ATOM and Rebel100.

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-compiler library, which is required for running optimum-rbln, is only available for approved users. Please refer to the installation guide for instructions on accessing and installing rebel-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

  • Install uv (refer to this link for detailed commands)

The below commands create a virtual environment in .venv and install optimum-rbln in editable mode along with its dependencies. See CONTRIBUTING.md for the full development setup.

git clone https://github.com/rbln-sw/optimum-rbln.git
cd optimum-rbln
uv sync

Need Help?

Metadata

Release files for optimum-rbln 0.12.1a11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optimum-rbln 0.12.1a11
File Size Uploaded Provenance Actions
optimum_rbln-0.12.1a11.tar.gz 725.2 kB Without provenance Details for optimum_rbln-0.12.1a11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optimum-rbln 0.12.1a11
File Interpreter ABI Platform Actions
optimum_rbln-0.12.1a11-py3-none-any.whl Python 3 none any Details for optimum_rbln-0.12.1a11-py3-none-any.whl

Total release size: 1.5 MB

Release files / optimum_rbln-0.12.1a11.tar.gz

Download URL optimum_rbln-0.12.1a11.tar.gz
Size 725.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8287d58017a5b7b19f3743e6b590f6fce495348589f702e2a3f4e431468c766f
BLAKE2b-256 checksum
How to use checksums
7e337e8b2fff31eb4c4b2d2e24126789967143d3ba5e14c50102829915687094
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / optimum_rbln-0.12.1a11-py3-none-any.whl

Download URL optimum_rbln-0.12.1a11-py3-none-any.whl
Size 795.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
180886a8f5e4cfea2e5488f3dba7f9e38bfd230eb2688563682f6bd3bc4c0eba
BLAKE2b-256 checksum
How to use checksums
5af1d7a3fb6c4d62efd5007de4b53beb246362380663cb244b53011630b6d0c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for optimum-rbln 0.12.1a11

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page