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 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-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 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?

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optimum_rbln-0.11.2a7.tar.gz (613.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optimum_rbln-0.11.2a7-py3-none-any.whl (664.2 kB view details)

Uploaded Python 3

File details

Details for the file optimum_rbln-0.11.2a7.tar.gz.

File metadata

  • Download URL: optimum_rbln-0.11.2a7.tar.gz
  • Upload date:
  • Size: 613.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for optimum_rbln-0.11.2a7.tar.gz
Algorithm Hash digest
SHA256 f5d8c1f5caf181dbf9bbbf7b24f718bdec27f18f9fb02b1a3f5c41acfbaef4e0
MD5 53f83854c1e7b83df3c3d1f231ae415f
BLAKE2b-256 cbbbf4305c22be213ed1f128d42e203fa59e6135c1b9986d5b88eab976d7e057

See more details on using hashes here.

File details

Details for the file optimum_rbln-0.11.2a7-py3-none-any.whl.

File metadata

  • Download URL: optimum_rbln-0.11.2a7-py3-none-any.whl
  • Upload date:
  • Size: 664.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for optimum_rbln-0.11.2a7-py3-none-any.whl
Algorithm Hash digest
SHA256 f0b3679d433c2e6059dff8531c033367fafe1a7abaa35ab94b90d341f145a831
MD5 89d14f2b2b5b372818dfc8ae2455998b
BLAKE2b-256 3cbb351caf5f39da07f517dc0efed52dc6462e36c1ac5ad22d675e9110eb68dc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.11.2

2 files

This release

0.11.2a7 This release

2 files

0.11.1

2 files

0.11.0.post1

2 files

0.11.0

2 files

0.10.4

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0.post2

2 files

0.10.0.post1

2 files

0.10.0

2 files

0.9.4

2 files

0.9.3.post1

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0.post2

2 files

0.8.0.post1

2 files

0.8.0

2 files

0.7.4

2 files

0.7.3.post2

2 files

0.7.3.post1

2 files

0.7.2

2 files

0.2.0

1 file

0.1.15

1 file

0.1.13

1 file

0.1.12

1 file

0.1.11

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.4

1 file

0.1.1

1 file

0.1.0

1 file

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