Metadata-Version: 2.3
Name: optimum-rbln
Version: 0.1.15
Summary: Optimum RBLN is the interface between the Hugging Face Transformers and Diffusers libraries and RBLN accelerators. It provides a set of tools enabling easy model loading and inference on single and multiple rbln device settings for different downstream tasks.
Project-URL: Homepage, https://rebellions.ai
Project-URL: Documentation, https://docs.rbln.ai
Author-email: "Rebellions Inc." <support@rebellions.ai>
License: Apache
Keywords: atom,diffusers,inference,rbln,rebel,transformers
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <3.13,>=3.9
Requires-Dist: accelerate>=1.0.1
Requires-Dist: diffusers<=0.31.0
Requires-Dist: einops>=0.8.0
Requires-Dist: halo>=0.0.31
Requires-Dist: packaging>=24.1
Requires-Dist: torch<=2.5.1
Requires-Dist: torchaudio<=2.5.1
Requires-Dist: torchvision<=0.20.1
Requires-Dist: transformers==4.45.2
Description-Content-Type: text/markdown


# Optimum RBLN

<div align="center">

<img src="assets/rbln_logo.png" width="60%"/>

[![PyPI version](https://badge.fury.io/py/optimum-rbln.svg)](https://badge.fury.io/py/optimum-rbln)
[![License](https://img.shields.io/github/license/rebellions-sw/optimum-rbln)](https://github.com/rebellions-sw/optimum-rbln/blob/main/LICENSE)

</div>

🤗 Optimum RBLN provides an interface between Hugging Face libraries ([Transformers](https://huggingface.co/docs/transformers), [Diffusers](https://huggingface.co/docs/diffusers/index)) and RBLN Accelerators, including [ATOM](https://rebellions.ai/rebellions-product/rbln-ca25/) and [REBEL](https://rebellions.ai/rebellions-product/rebel/).

This library enables seamless integration between the Hugging Face ecosystem and RBLN's NPU acceleration through a comprehensive toolkit for model loading and inference across single- and multi-Accelerator environments. While we maintain a list of [officially validated models and tasks](https://docs.rbln.ai/software/optimum/optimum_rbln.html), 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-NPU 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


## Documentation

Check out [the documentation of Optimum RBLN](https://docs.rbln.ai/software/optimum/optimum_rbln.html) for more advanced usage.

## Getting Started

### Install from PyPI

To install the latest release of this package:

- Export environment variables to access to RBLN private PyPI.
  ```bash
  export REBEL_PYPI_USERNAME=<username>
  export REBEL_PYPI_PASSWORD=<password>
  ```

- Install optimum-rbln package:
  ```bash
  pip install --index-url https://pypi.rebellions.in/simple optimum-rbln
  ```

### Install from source

#### Prerequisites

- Install [uv](https://docs.astral.sh/uv/) (refer [this link](https://docs.astral.sh/uv/getting-started/installation/) for detailed commands)

The below command installs optimum-rbln along with its dependencies.

```bash
git clone https://github.com/rebellions-sw/optimum-rbln.git
cd optimum-rbln
./scripts/uv-sync.sh
```

If you want to install local rebel-compiler as editable mode in uv environment,
```bash
uv pip install -e /path/to/rebel_compiler/python
```

### Need Help?

- Join our [Developer Community](https://discuss.rebellions.ai/)
- Contact maintainers at [support@rebellions.ai](mailto:support@rebellions.ai)