Skip to main content

Mobilint NPU Python

Shared runtime support for applications that run MXQ models on Mobilint NPUs or ONNX models through ONNX Runtime. mblt-npu-python provides the common backend, device-selection rules, Hugging Face artifact resolution, and model-detail logging used by Mobilint Python packages. It is a library dependency, rather than an end-user model catalog.

Version 0.0.0 is the initial standalone release.

logging ships here rather than with its only caller because the two are mutually dependent — npu_backend imports log_model_details, and log_model_details reads a MobilintNPUBackend's fields.

Installation

PyPI - Version PyPI Downloads PyPI - Python Version

pip install mblt-npu-python

This package requires a supported Linux environment with mobilint-qb-runtime available and Python 3.10 through 3.12.

Public API

Import the backend from mblt_npu:

from mblt_npu import MobilintNPUBackend

backend = MobilintNPUBackend(
    mxq_path="model.mxq",
    core_mode="single",
)
backend.create()
try:
    backend.launch()
    outputs = backend.mxq_model.infer([input_tensor])
finally:
    backend.dispose()

MobilintNPUBackend selects the appropriate implementation from target_device (default: "aries-rb"). "aries-rb" selects MobilintAriesBackend; "regulus-ra" and "regulus-rb" select MobilintRegulusBackend. The former generic values "aries" and "regulus" remain accepted when loading older configurations. backend_class_for() and BACKEND_CLASSES are available for integrations that need to inspect the supported targets.

Multi-slot MXQ execution

max_batch_size is aggregate capacity. At create(), the backend probes the compiled per-model capacity K and loads ceil(max_batch_size / K) model slots. Slots are distributed round-robin over the devices named by canonical target strings and reuse one accelerator per device. mxq_model and acc continue to refer to slot zero for compatibility; concurrent callers can use infer_slot(slot_index, inputs). Allocation failures dispose all created slots and raise MobilintBackendAllocError with the failed slot and device.

Hub-backed configurations retain name_or_path, revision, and commit_hash through to_dict() / from_dict(). Artifact lookup never substitutes an unpinned revision or an unrelated cached MXQ.

For ONNX inference, install the optional runtime extra and use ONNXBackend:

pip install "mblt-npu-python[onnxruntime]"
from mblt_npu import ONNXBackend

backend = ONNXBackend("model.onnx")
backend.create()
outputs = backend({"images": input_array})
backend.dispose()

ONNXBackend imports onnxruntime only when it creates a session.

Most users should access the backend through a model package such as mblt-vision-python, which owns model configuration, preprocessing, and postprocessing.

Testing helpers

The optional test extra provides a shared pytest plugin with NPU options and the npu_params fixture used by Mobilint package test suites:

pip install "mblt-npu-python[test]"

Import mblt_npu.pytest_plugin from a repository's root tests/conftest.py to register its options. The plugin is intentionally not auto-registered, so projects control when those command-line options are exposed.

Support and issues

For installation, runtime, or integration support, visit the Mobilint forum. Report reproducible package issues in the mblt-npu-python issue tracker.

License

Distributed under the BSD 3-Clause License.

Metadata

Release files for mblt-npu-python 0.0.1

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

Source distribution (sdist)

Source distribution for mblt-npu-python 0.0.1
File Size Uploaded
mblt_npu_python-0.0.1.tar.gz 47.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mblt-npu-python 0.0.1
File Interpreter ABI Platform
mblt_npu_python-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 86.8 kB

Release files / mblt_npu_python-0.0.1.tar.gz

Download URL mblt_npu_python-0.0.1.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f4fabfc1096d16550046ebbe694aaab55514df5f6ef3c76b912a397ef6608cca
BLAKE2b-256 checksum
How to use checksums
8d5e3c4a77bc15b22efc7b07226801a1451fce29d306a5ff11d70e4d4607780a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mblt_npu_python-0.0.1-py3-none-any.whl

Download URL mblt_npu_python-0.0.1-py3-none-any.whl
Size 39.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5eafb1c1891d6d4734694a96405ec70e3e634c7c8787338d73ce900f7b44dc3d
BLAKE2b-256 checksum
How to use checksums
9294c1fe5c00385c70f82695c7876334964d6ec0749bedc7d2b7a4187a7bea3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.0

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

0.0.0

2 release files

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