liuhongwei-2026/mba-simplifier
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

MBA Simplifier — Ascend NPU Deployment

Deploy the qox/mba-simplifier MBA expression simplifier on Ascend NPU.

{hardware NPU}

Prerequisites

  • Python 3.10 or newer
  • Ascend NPU driver and CANN runtime available locally

Local Deployment

# 1. Clone this deployment package
git clone <repo-url>
cd mba-simplifier

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run inference locally
python inference.py "(x & y) + (x | y)"

Expected output:

Input:      (x & y) + (x | y)
Simplified: x + y
Reduction:  57% (bfs)
Latency:    186 ms (cold), ~2 ms (warm)

Model Assets

This deployment reuses the upstream simplifier assets from qox/mba-simplifier:

FileDescription
inference.pyLocal inference entrypoint
bfs_table_6.jsonPre-computed BFS table
mba_classifier_v2.ptOptional neural classifier

Notes

  • The optional neural guidance layer requires torch; CPU/NumPy-only symbolic rewriting still works without it.
  • For repeated calls, the BFS table is cached after the first load.