Skip to main content

FXBEX

Linux CLI for packaging and running precompiled Furiosa RNGD artifacts. .fxbex is an independent format, not an official Furiosa FXB.

Install

Python3.10+ is required. Install a compatible Furiosa SDK separately for NPU execution.

# Once the first public PyPI release has completed:
python -m pip install fxbex
fxbex --help

For local development from a checkout, use python -m pip install -e . instead.

To avoid changing any existing SDK dependencies:

PYTHON=python3.10 bash scripts/install.sh

This package does not install/upgrade Furiosa SDK, PyTorch or drivers. Build/inspect and integrity-only validation use the Python standard library; NPU execution requires the package's exact compatible SDK. Public PyPI installation is available only after the first trusted publishing workflow has completed successfully.

Commands

fxbex build ./compiled_model -o model.fxbex
fxbex build ./compiled_model -o model-standalone.fxbex --standalone
fxbex inspect model.fxbex
fxbex validate model.fxbex
fxbex run model.fxbex
fxbex chat model.fxbex
fxbex serve model.fxbex --port 8000
fxbex doctor

run starts chat for a chat adapter. For a tensor model, supply --input inputs.json -o result.json. chat supports /reset and /quit. serve binds localhost and supports non-streaming /v1/chat/completions for chat adapters and /predict for tensor adapters. fxbex ui --port 7861 is optional and requires Gradio. Every command has --help.

validate checks checksums, external weights, SDK versions, installed adapter contracts and RNGD detection; it does not execute inference. To inspect on a machine without SDK/NPU use fxbex validate model.fxbex --integrity-only. --weights-dir /path/to/snapshot relocates external weights, with hash validation.

The builder packages existing compiled artifacts; it does not compile an arbitrary HF model. Kernel load fails on missing or mismatched artifacts, never silently recompiles. Use only trusted packages and installed plugins.

Model Forge integration

FXBEX core has no compiler_engine dependency. Generic runnable_dag packages run directly. Model-specific code belongs to separately installed adapter plugins:

cd /root/rngd-model-forge
bash tests/install_fxbex.sh /root/FXBEX

This installs the qwen35_replay plugin via the fxbex.adapters Python entry point and writes a shared NPU lock path in ~/.config/fxbex/config.json, coordinating with the existing Model Forge web workers. Model Forge's FXBEX package tab calls this installed runtime in a subprocess; unloading releases the process.

A plugin class receives (extracted_root, report_dir, ExitStack, weights_dir=None) and provides chat and/or predict; preflight(root, weights_dir=None) performs static checks. Packages name an installed entry point, never an arbitrary import or embedded Python program. Conflicting or missing entry points fail explicitly.

Default reports: ~/.cache/fxbex/runs. Configure reports_dir and npu_lock in ~/.config/fxbex/config.json; FXBEX_CONFIG and FXBEX_NPU_LOCK can override paths. The integration installer deliberately shares Model Forge's existing lock.

Scope

Current built-in runtime supports fixed tensor DAGs on RNGD fusion8. Qwen's plugin is text-only BF16 with512-token capacity. Previous verified Qwen package reload used zero compiler calls; first load still takes about3minutes for weight preparation and graph reconstruction. Other model adapters and automatic memory planning are not implemented. Historical validation records in docs/ predate this repository split; current split validation is recorded separately.

Tests: python3.10 -m unittest discover -s tests.

Reusable Gradio model page

Copy examples/model_page.py, set PACKAGE = Path('fxbex/model.fxbex'), then run it on the SDK host. Keep delivery packages in your application's fxbex/ folder: fxbex build ./compiled_model -o fxbex/model.fxbex. The page lists saved packages, copies uploaded packages there without replacing existing files, provides Load/Unload, measures request wall time, and displays a Python load/run/release example with the selected filename below the controls. Use mode='chat' or mode='predict'; an agent can supply controls(run) for image/upscale-specific inputs and outputs without rewriting the lifecycle shell. That callback calls run('predict', named_inputs) and receives (result, timing). Input conversion and output rendering must match a validated model adapter; the template does not add model support. Existing Model Forge embeds this same shell with its coordinated service. Packages remain excluded from Git.

Python LLM API

from fxbex import LLM

package = '/root/rngd-model-forge/fxbex/RedHatAI--Qwen3.5-9B-FP8-dynamic__text-bf16__fusion8__ctx512__sdk2026.4.0.fxbex'
with LLM('RedHatAI/Qwen3.5-9B-FP8-dynamic', fxbex=package) as llm:
    print(llm.generate('What is 2+2? Reply briefly.')['text'])
    print(llm.converse('What is 2+2?')['text'])
    print(llm.converse('Multiply that answer by 3.')['text'])
    llm.reset()

fxb=package is an alias for fxbex=package; supply exactly one. LLM(fxbex=package) reads model identity from the package. Explicit model names must match; naming Qwen3-8B does not turn a Qwen3.5-9B package into that model. chat(messages) accepts explicit message history. Results are dictionaries containing text and available runtime metrics. Without a with block, call llm.close() (or unload()). Model execution runs in a persistent subprocess; closing releases its NPU allocations.

This API accepts FXBEX content even if the filename ends in .fxb, but official Furiosa FXB content is not supported by this loader; use furiosa_llm.LLM for it. The compatible SDK, original weights and model adapter plugin are still required. No model download, automatic compilation, or CPU fallback is introduced.

Wheel installation

Build with python -m pip wheel --no-deps --no-build-isolation . -w dist, then:

python -m pip install dist/fxbex-0.2.1-py3-none-any.whl

pip install fxbex is available only after the first successful PyPI publication. GitHub remains private. Publishing a wheel to PyPI exposes its source publicly; PyPI authentication and explicit release approval are required separately.

Release preparation and keyless GitHub OIDC authentication: docs/PYPI_RELEASE.md. The Python core is Apache-2.0 licensed; Furiosa SDK and model assets are not bundled. Actual NPU testing of the new LLM wrapper is deferred; its API unit tests pass.

Metadata

Release files for fxbex 0.2.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 fxbex 0.2.1
File Size Uploaded Provenance Actions
fxbex-0.2.1.tar.gz 29.2 kB With provenance Details for fxbex-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fxbex 0.2.1
File Interpreter ABI Platform Actions
fxbex-0.2.1-py3-none-any.whl Python 3 none any Details for fxbex-0.2.1-py3-none-any.whl

Total release size: 60.4 kB

Release files / fxbex-0.2.1.tar.gz

Download URL fxbex-0.2.1.tar.gz
Size 29.2 kB
Tags Source
SHA-256 checksum
How to use checksums
98596235f0da5c3b39094af6e8a64dde32c7af770f0a2d4f118525937c257914
BLAKE2b-256 checksum
How to use checksums
d60e01cbc76bbc765c711e6c926adf7204945277dbfc75f6c528f097fc8f1cf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Release files / fxbex-0.2.1-py3-none-any.whl

Download URL fxbex-0.2.1-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
333341192db60df1557ba72e2067097da5330454dcfd3adda2cdb15744dde125
BLAKE2b-256 checksum
How to use checksums
b2827c053ca3a66d14282f8141a6aba82aa730e135c77e15b7c7c729fd11459a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for fxbex 0.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fxbex-0.2.1.tar.gz

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 Nov 3, 2026.

Transparency log

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.

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